??? 11/04/11 18:50 Modified: 11/04/11 20:42 Read: times |
#184543 - Both with Queues Responding to: ???'s previous message |
Erik Malund said:
Look for any example how to make work wth UART0 and UART1 simultaneously via interrupts, if that possible.
yes, just do code for UART0 and code for UART1 nothing special. Erik Yup, and if you do both with full fifo queue implementation it is then very easy to do I/O into and out of the application. Using the FIFOs allows the interrupt service routine code to be simple and short in execution time. If you happen to be programming in assembly language you can find some code for queued serial interrupt handling within the boot loader that I posted here some years back. http://www.8052.com/users/mkaras/loader.pdf The code here is for another MCU variety but it can be used as a model to fit to your own 8051 part. To support two UARTs just duplicate the template, like Erik said, to have one for UART0 and one for UART1. When you look at the boot loader you will see it was programmed to support one UART that was selectable from two via an assembly time define. Michael Karas |
Topic | Author | Date |
Both UARTs simultaneous works | 01/01/70 00:00 | |
yes | 01/01/70 00:00 | |
Both with Queues | 01/01/70 00:00 | |
C code | 01/01/70 00:00 | |
Or C | 01/01/70 00:00 | |
No simultaneous work | 01/01/70 00:00 | |
The Example is for one UART | 01/01/70 00:00 | |
Duplicate or Generalise | 01/01/70 00:00 | |
at89c51RE2 | 01/01/70 00:00 | |
Start a new thread | 01/01/70 00:00 | |
The same | 01/01/70 00:00 | |
but not same problem | 01/01/70 00:00 |