??? 01/11/06 19:24 Read: times |
#107082 - What to do Where Responding to: ???'s previous message |
Siri Manne said:
Yes Erik, with one ISR and general infinite loop I can do, but after I receive data from modem I need 1.3 mSeconds for data processing (lot of Keil C language string code using), if I include my serial interrupt execution delay almost its comming 2.2mS (Total RS 485 Communication bytes for one packet 100 bytes). You need to decouple the servicing of data (both arriving and leaving) from the processing of that data. It is appropriate to use an interrupt for sending and receiving data but not for processing it. You should consider placing TX and TX data into separate circular buffers - that's all you need to do in the ISR, add a received byte or send a TX byte. The processing of the data, including using lots of Keil string code, should be done by another task. As Erik has said, this other task can be nothing more than an infinite loop running in the background. Ian |
Topic | Author | Date |
8052 Software Design with Interrupts | 01/01/70 00:00 | |
Serial interrupt | 01/01/70 00:00 | |
PC thinking | 01/01/70 00:00 | |
Periodic Update.. | 01/01/70 00:00 | |
you do not need a "task' to do that | 01/01/70 00:00 | |
OP is right | 01/01/70 00:00 | |
Data Transmission timings... | 01/01/70 00:00 | |
Numbers ? | 01/01/70 00:00 | |
I do not understand how a 100ms tick wil | 01/01/70 00:00 | |
What to do Where | 01/01/70 00:00 | |
2ms - Eh??? | 01/01/70 00:00 | |
Are We There Yet ? | 01/01/70 00:00 | |
Your kids are patient | 01/01/70 00:00 | |
kids | 01/01/70 00:00 | |
Don't be silly![]() | 01/01/70 00:00 |