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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/05/11 10:45
Modified:
  11/05/11 12:14

Read: times


 
#184554 - Duplicate or Generalise
Responding to: ???'s previous message
Alex Volk said:
I saw that example. But it not uses both serial at time.

Assuming the 2 UARTs are the same, Once you know how to use one UART, using another is just a matter of doing the same stuff again!

You have 2 choices:

1. Simply duplicate the code for the 2nd UART;

2. Adapt your code so that it takes some kind of "parameter" to enable it to work with either UART - ie, generalise it.

In your case, as a beginner, where you have only 2 UARTs and a very simple processor (8051), I would recommend that you go for the 1st option.

If you were writing code for, say, a PC to handle a dozen COM ports - then the 2nd option might become more appropriate...


Just have problem to write setup code for 2-nd uart.

What particular problem(s), exactly, do you have?




List of 12 messages in thread
TopicAuthorDate
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      

Back to Subject List