This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX TINY LCD PROBLEM

HI, I HAVE CREATED TWO TASK IN TASK1 I AM DOING RELAY ON OFF AND IN TASK2 I AM DISPLAING "HELLOW WORLD"ON LCD BUT ONLY TASK1 IS FUNCTIONING,LCD SOME TIME SHOWS GARBADGE AND SOMTIME ONLY CURSOR. my program
void job1(void)_task_ 0
{

lcd_init();

while(1)

{

os_create_task (1); os_create_task (2);

}
}

void lcd (void) _task_ 1
{

strcpy(lcd_buffer,"HELLOW WORLD "); lcd_display(lcd_buffer);
} void relay (void) _task_ 2
{ RELAY=~RELAY;
DELAY(20);//ms
}

i am using 4 line lcd .this is the problem of delay which i am using in lcd routine or something else.
plz help me.

  • There appear, to me, to be many problems with your program.

    1. Task 0 creates task 1 and task 2 over and over and over. You probably meant to create task 1 and task2 and then end task 0.
    2. Task 1 and task 2 perform their code and then exit. The documentation for RTX51 Tiny specifically says not to do this. So, I would be surprised if these tasks work as expected.
    3. Task 1 never appears to call os_wait or another function that gives up the CPU. You didn't specify if you use round robin or not.

    These are just a few of the problems that I found. However, if you fix these, I think you will start seeing results you expect (or at least can understand).

    Jon