| ??? 10/15/03 05:22 Read: times |
#56669 - RE: harsha's points Responding to: ???'s previous message |
Well,
Thank you very much for pointing out my careless mistake. I modified the ISR as below... In this case, even if I alter the value at P2 to something lower than the current "counter" value, then, the system would patiently count upto 255 and then reset to 0 and start counting again. And this delay in refreshing the blink rate is prefectly acceptable. void T0_ISR (void) interrupt 1 { static int counter; static int val; if(counter == (255 - P2)) { if(val == 0) { P1 = 0xff; val = 1; } else { P1 = 0; val = 0; } counter = 0; } else if(counter<256) counter++; else counter = 0; } Thanks everyone again. And congrats to myself for having received the first compliment in this forum (thanks Steve :) ) since I joined. Cheers, Harsha. |
| Topic | Author | Date |
| Un expected stalling of software | 01/01/70 00:00 | |
| RE: Un expected stalling of software | 01/01/70 00:00 | |
| RE: Un expected stalling of software | 01/01/70 00:00 | |
| RE: harsha's points | 01/01/70 00:00 | |
| RE: harsha's points | 01/01/70 00:00 | |
RE: harsha's points | 01/01/70 00:00 |



