Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

connect 2 serial device to microcontroller

Status
Not open for further replies.

m_b_mofidi

Junior Member level 1
Joined
Jan 9, 2007
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,410
Hi guys

I want to connect 2 serial devices(RS232 with TTL level) to 8051 series.
do u have any suggestion for this work?
my devices have different baundrate(4800bps & 9600 bps).
I saw approaches that use a switch for this.So whether switching speed must be 4800bps/10bit or
(we suppose 1 start/8 bit/no parity/1 stop bit) any things else?
 

There are some 8051 cpus with 2 serial ports ..and is perfectly possible to use 2 differents baud rates ..check the cygnal parts .among others ..
 

You may connect as many serial devices to one microcontroller whatever will be that, if the serial will run sequencial (time division multiplexing). You may use pure software methodes, combined software serial interface + hardware interface or multiple hardware serial interfaces. Depends on your microcontroller resources.
For simultaneously serial interfaces only the existence of two hardware interfaces may help you.
 

Another option is to connect one device (faster) to standard Rx/Tx pins and design second UART in software (bit banging) ..
For that you can use any general I/O pin as Tx and Int0 or Int1 as Rx ..

By doing this you can simultanously transmit and receive data from both devices at two different baud rates ..

Use SEARCH to find threads on 8051 software UART ..

Regards,
IanP
 

Probably the best option is to use a 2 Uarts micro DS89C450 and AT89C51RE2 can solve your problem, or you can use external uarts, I now that maxim as one, i don't remember the code.

Hoope that helps.
Regards
 

This is Maxim IC that have full UART with I2C or SPI interface. MAX3110E. I didn't try it but i hope that it is real solution to your problem. I had similar problem when I was making a project with 4 PC or other monitoring devices. Then I have used one hardware UART in the PIC uC and 4052 analog switch, that is 2x4 switch. That is how i solved that problem. Only problem is that every monitoring device had to conntiniusly sendinq command to start comunication with PIC, and when PIC receive that he finish comunication with thad device and then continus to check every other monitoring device.
 

the solution is depend upon the application of ur project if u are not using both serial channel in the same time then u can use DPDT relay (low cost) solution

if both channel u have to monitor in the same time then u can write code for the virtual serial interface in the 8051 in which u can use other timeer and then can collect the data from timer in put pin............
 

thanks guys
I don't want to use any other UART IC or Micro with 2 UART.I prefer DPDT(such as 4052) switch.
In other word, I never use both channel in same time
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top