Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 26th February 2007, 12:08 PM   (permalink)
Question How to communicate between 2 or 3 8051 microcontrollers

I want communicate between three 89S51,and ouput of each 89S51 should go to Serial Port & display in Hyperterminal.

Data are coming from each external interrupt
of 89S51 and ouput is in serial port at present in each stage

I want integrete all data's of each stage 89S51 microcontroller
and display in hyperterminal through single Serial port Rs232.


Please kindly help me.
Thanks
prevravanth is offline  
Old 27th February 2007, 01:34 AM   (permalink)
Default rs485

the only REAL way is to use rs485.

If they are all on the same board you can use SPI.
johnsmith123 is offline  
Old 27th February 2007, 09:41 AM   (permalink)
Default

hi,

Do you want to RS232, 'send and receive', all 3 MCU's to the PC
or just receive the 3 MCU's at the PC?

EricG
ericgibbs is offline  
Old 27th February 2007, 10:59 AM   (permalink)
Default

You can use I2C for 8051's to communicate with each other and UART with tocken ring protocol to communicate with PC.

Last edited by tanmaysathe; 27th February 2007 at 11:02 AM.
tanmaysathe is offline  
Old 28th February 2007, 05:19 AM   (permalink)
Default

Quote:
Originally Posted by ericgibbs
hi,

Do you want to RS232, 'send and receive', all 3 MCU's to the PC
or just receive the 3 MCU's at the PC?

EricG
Yes I want All MCU's to pc becasue each MCU is handling signal and giving output to PC in serial port through RS232.
prevravanth is offline  
Old 2nd March 2007, 02:57 PM   (permalink)
Default

hi prevravanth,

If you have 3 external MCU's RS232 output lines connected together 'somehow' , how are you going to prevent more than one MCU using the serial line at any one time?.

Unless the MCU's have some sort of interrupt priority control you are going to have arbitration problems at the PC end. That is, while one MCU is transmitting, the other two MCU's may start transmitting.

The easiest solution I can suggest, is that you install a dual uart pcb in the PC.
Use the existing Com1 for say MCU #1 and the Com3 and Com4 for the other two MCU's.

The program in the PC then can determine which MCU is sending.

If the PC program is written to respond to OnComm events for Com 1,3 and 4 it will not miss any incoming RS232 data
from any of the MCU's.

An additional advantage is that the PC can transmit to each individual MCU.

Eric

Last edited by ericgibbs; 2nd March 2007 at 03:00 PM.
ericgibbs is offline  
Old 2nd March 2007, 04:42 PM   (permalink)
Default

One method that comes to mind is to use an open-drain or open-collector RS-232 bus of sorts (drawing #1 shows a MOSFET open-drain interface). Then design a master/slave command protocol that includes a 'slave' address so that each 'slave' knows when to put data onto the bus in response to a command request from the host.

This async' serial bus method is used at TTL signal levels by Icom in their CI-V protocol (drawing #2).
Attached Images
File Type: jpg RS-232 Circuit for 16F627A.jpg (46.3 KB, 20 views)
File Type: jpg CI-V Bus Drawing.JPG (38.7 KB, 30 views)

Last edited by Mike, K8LH; 2nd March 2007 at 04:49 PM.
Mike, K8LH is offline  
Old 3rd March 2007, 12:42 AM   (permalink)
Default

I would use the hardware Mike K8LH gave you.

Also, you need to control collisions (what happens if two of the units signal your PC at the same time)? You get garbage. Are they only sending one byte or a string of bytes?
mramos1 is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
hyperterminal communication w/ 8051 spyghost Micro Controllers 8 22nd May 2008 11:54 AM
8051 Microcontroller (Urgent Help) UAE_Engineer Micro Controllers 5 22nd March 2007 12:13 PM
8-bit microcontrollers samcheetah Micro Controllers 8 23rd December 2006 09:39 AM
Could I get away with this? (8051 + AM29F010B) mstechca Micro Controllers 0 9th March 2006 03:05 AM
interfacing 16*16 matrix display with 8051 pmphilip Micro Controllers 0 1st February 2005 04:47 AM



All times are GMT. The time now is 07:57 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker