Hi guys, Here is the situation I've 89c51 microcontroller board which I want to connect with PC as well as GSM but as everybody knows it(8051) has only one UART so one solution is try using 87xx or 83xx series of controller but that means I'll have to change my programmer. So what I'm thinking is I'll use simple mux/demux for Tx/Rx of 8051. I want to know will it be o.k.? Can simple AND or OR gates can handle data rate of 9600bps?
Thank you very much in advance.
checkout this site-- www.atmel.com/.../doc3aae2f186a94b.pdf this is a software UART program.
There are other code sets for software UARTs on the WEB, one at--- www.silabs.com/.../mcu_applications_appnotes.htm
Look for AN115 and the software source code AN115SW
If your system can spare the overhead, a software UART might just be what you need.
while "soft UARTs" indeed are possible, they are true 'killers' if a reasonable baudrate is desired.
They WILL tie up your uC in ways that, most likely, will cause timing problems elsewhere.
Of course, if your project is a banale calculator, such may not be a problem but since the '51 is a microcontroller the likelyhood is you are controlling something and a "soft UART" can (most likely will) be disastrous.
Erik
Hey I did it successfully I can actually multiplex that UART of 89c51 through hardware just have to keep in mind that it needs some delay after select line has changed its state. I read 89c51re2 surely will consider it Thanks a lot for all your contribution. Will come back and let you know if something goes wrong
Well if you need to use 2 UART not working simultaneously and can tolerate some delay between switching then u can consider it
Well guys the assembly I've designed was working fine till I tried to receive the data through it i.e. My board(at89c51) is still able to transmit data to 2 devices alternatively however when I multiplexed the transmit lines of 2 devices to connect to receive line of (at89c51) , it doesn't work. please provide your suggestions anyway will update if I find some solution
"when I multiplexed the transmit lines of 2 devices to connect to receive line of (at89c51) , it doesn't work"
So you've done it wrong!
With no details of exactly what you have done, or exactly how it "doesn't work", it is obviously impossible to say exactly where it's wrong!
One thing: how do you ensure that you don't switch the multiplexer in the middle of a character?
My 2 PCs (which are connected to my microcontroller) don't communicate simultaneously so I've ORed their transmit pin to connect to receive of microcontroller
After the RS232 receivers, of course...?!
We have a similar situation and have implemented an analog switch to switch between the two ports rather cheap way to solve it but with a small possibility of missing data if not coded right :)
That would be good option but my problem is I want switching to be handled by uC according to command comes to it Anyway Thanks for sharing your opinion
View all questions in Keil forum