| ??? 04/11/02 11:07 Read: times |
#21667 - RE: serial interrupt of DAllAS 89c420 |
SBUF holds ONE character, you will never pass the second IF. You need read the characters to a buffer and then test or use a state machine such as (gramatically incorrect and incomplete, just showing the idea)
.. init state = 0 ISR if (RI) { switch (state) case 0: if (sbuf = 'J') state = 1; if (sbuf = '0') joybutton= 0; break case 1: if (sbuf = '1')state = 0, joybutton=1; deafult: state = 0; Have fun, Erik |
| Topic | Author | Date |
| serial interrupt of DAllAS 89c420 | 01/01/70 00:00 | |
| RE: serial interrupt of DAllAS 89c420 | 01/01/70 00:00 | |
RE: serial interrupt of DAllAS 89c420 | 01/01/70 00:00 |



