• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

timer/serial port alignment issues - 8051

mik3ca

Member
I'm making a project in which 5 serial ports are required but my board has only one microcontroller.

I created 4 software uarts and the remaining uart is hardware.

When I scanned all uarts in the same timer (I scanned hardware uart using the statuses of TI and RI) the hardware uart does not transmit the correct data.

However when I have the uart in its serial interrupt with high priority, the data for the hardware uart is always correct, but the problem now is everything else will go out of sync when the hardware uart needs to be accessed. Another problem is that the hardware uart needs to be at a high enough speed (19.2K+)

Is there an easy way to make it so that the hardware uart and software uarts can be scanned on a regular fixed-time basis without anything going out of sync and without lowering hardware uart speed?

The only thing I could think of off the top of my head is to make the timer be accessed at a different rate than once every 256 clock cycles?
 

Latest threads

EE World Online Articles

Loading

 
Top