??? 07/23/08 11:17 Read: times |
#156974 - look at str_len carefully Responding to: ???'s previous message |
Dear George,
have a look at str_len variable carefully. str_len++; in serial isr and while(1) { if(data_ready) { data_ready = 0; if(my_string[str_len--] == 0xaa) Now considor when you store first char and increase str_len in serial isr. By the time next char arrives and serial interrupt appears; how many times if(data_ready) would have been executed. and what would be the value of str_len at that time? Can u visualise the situation Regards, Mahesh |