| ??? 04/18/06 22:15 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#114488 - About interupts Responding to: ???'s previous message |
the "General Rule" is get out fast and do as little as posible.
What is in LCD_Command()? How long does it take? Is it re-entrant? The interupt interupted some thing. If you call a function that was interupted, it can get confused. If you sit in a interupt you can miss other interupts. Additionally if you call a function from an interupt the compiler may push every register onto the stack. Step one would be set a flag in the interupt to notify main that data is ready. Kind of lame in your case , it gets you a one byte buffer. Look at the Keil Interupt driven serial example. It puts the data into a ring buffer. This could be the best plan. |
| Topic | Author | Date |
| P89LPC922 UART | 01/01/70 00:00 | |
| correct if | 01/01/70 00:00 | |
| I have accounted for this | 01/01/70 00:00 | |
| this may be the culprit | 01/01/70 00:00 | |
| Yes!!! | 01/01/70 00:00 | |
| P89LPC922 UART Solution | 01/01/70 00:00 | |
| Isolation - Not generally necessary | 01/01/70 00:00 | |
| what things | 01/01/70 00:00 | |
| Opto-Isolators | 01/01/70 00:00 | |
These things? | 01/01/70 00:00 | |
| Polling UART | 01/01/70 00:00 | |
| fine, but that is NOT the question | 01/01/70 00:00 | |
| What about interrupts? | 01/01/70 00:00 | |
| About interupts | 01/01/70 00:00 | |
| I'd say THE plan | 01/01/70 00:00 |



