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.
One more thing one port pin will be used as select line for those mux/demux. And can I get mux/demux with one select line and 1:2 data lines? I couldn't find it on net, 74 series is for 4 line and above so I'm using basic gates like AND OR etc.
If you got a controller with ISP and two UARTs you wouldn't need a programmer and you'd solve the problem!
Thank you for suggestion. I considered it however the thing is right now I never want to waste my time on learning for how to use ISP and all. I just finished my college and trying my hands on some products anyway if its not possible at all then i'll have to go for that option. I have seen 89c51re with 2 UARTs and an ISP can you direct me on how to program it? I am good at programming in C in uVision how much change will I have to do in my program etc.
"I never want to waste my time (sic) on learning for how to use ISP and all"
What makes you think that would be a waste of time?! I would rather call it a worthwhile investment - as it will save you from wasting your money on programmers and your time on stuff like multiplexing serial ports!
Have you tried a search for "multiplex" or "multiplexing"...?
Ya that sure is an investment but I wanted to get that product ready.And yes I searched a lot but couldn't find anything about multiplexed serial. O.K. now can you please guide e how to start with ISP programming frankly saying I know nothing about ISP, just its In System Programming and done via Serial port of PC thats all
now can you please guide e how to start with ISP programming
Assuming you are using the AT89C51RE2:
The chip has a built in bootloader program that operates via one of the UARTs. Details of how to invoke it and how to use it to copy your program into the internal code space are given in the datasheet and associated application notes. You will find reading these documents more useful than a question and answer session on the forum.
Thats cool Thanks a lot I'll start right away
but as everybody knows it(8051) has only one UART
It is, of course, true that "many '51 derivatives have only one UART", however it is equally true tha many modern '51 derivatives have 2 UARTS.
Erik
Ya that sure is an investment but I wanted to get that product ready.
It has to be pointed out that you're contradicting yourself there. You have to decide what the goal is going to be: getting the product ready, or learning stuff on your own free time. The approach to steps like picking a controller has to be different in each case.
Take a look at http://www.silabs.com go to the microcontrollers / selector or developement section (about in the middle of the page). they have many dual UART chips and cheap developement kits and target boards ranging from $35 US to around $199. Around $99 you can get the target board and a serial or USB debug adapter ($35 US by itself) that can be used with most of their products. They have lots of free software to use both UARTs onboard. The developement kits include a CD with all the docs for all their kits and a Keil tool chain that runs the debugger and an evaluation compiler. It has lots of other goodies to.
I detest the SILabs deviates (f3x-up), but like immesily the SILabs derivatives (f0x-f2x) and so this is, by no means, a 'do not use silabs post' to argue against the one above. I use, almost exclusively, SILabs derivatives in my designs and the debugging facilities can not be acquired better for the price.
I have no idea which access the OP has to various brands. I can imagine that SILabs may not be available in Farawayistan.
THUS, when such comes up, why not use the available tool, the Keil device database
http://www.keil.com/dd/parm_search.asp
which with a few keystrokes will give you a lost of each and every such chip.
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.
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