Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Michael Karas
11/04/11 12:50
Modified:
  11/04/11 14:42

Read: 431 times
Beaverton Or
USA


 
#184543 - Both with Queues
Responding to: Erik Malund'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


List of 12 messages in thread
TopicAuthorDate
Both UARTs simultaneous works      Alex Volk      11/04/11 08:16      
   yes      Erik Malund      11/04/11 09:49      
      Both with Queues      Michael Karas      11/04/11 12:50      
         C code      Alex Volk      11/04/11 15:11      
         Or C      Neil Kurzman      11/04/11 16:54      
            No simultaneous work      Alex Volk      11/04/11 21:09      
               The Example is for one UART      Neil Kurzman      11/04/11 22:03      
               Duplicate or Generalise      Andy Neil      11/05/11 04:45      
   at89c51RE2      Alex Volk      11/08/11 23:48      
      Start a new thread      Andy Neil      11/09/11 00:08      
         The same      Alex Volk      11/09/11 05:19      
            but not same problem      Erik Malund      11/09/11 06:30      

Back to Subject List