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.

two microcontroller communication?

Status
Not open for further replies.

vicky29

Member level 4
Joined
Feb 5, 2005
Messages
75
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
750
microcontroller to microcontroller communication

hi friends

i want to communicate between two microcontrollers(89c51 ) using RXD & TXD pins, P3.0 and P3.1 respectively. should i need to connect TXD of Transmiter 89c51 with RXD of receiver 89c51 and vice -versa directly or should i use two MAX232 chips for communication.
please help
waiting for reply
neelam
 

microcontroller communication

As long as the power supplies are the same, you can connect the pins directly without using any drivers like max232. But it is sometimes dangerous if the 8051's are powered by 2 diff sources. A cheaper way is the use a TTL open collector gate to act as a buffer.
As a thumb rule, whenever I have both the 8051's powered by the same VCC, I connect pins directly and when I have diff sources, I use a TTL OC gate in between.
 

communication between microcontrollers

If they are in the same circuit and powered by the same source, connect the pins together.
If they will be in different circuits, and connected through cables, then use interface IC's.
 

how to communicate two microcontroller

Although, technically speaking, you don't need any drivers, but I would use 232 interface. And the reason is that if you encounter any problems with your software at one or the other end you will be able to connect your PC or laptop or any other port analyser and "see" what your microcontrolleres are trying to send/receive.
Once your system is running smoothly you can remove (or leave) 232 drivers.
Regards,
IanP
 

8051 to 8051 communication

Also with different PSU's I would not put RS232 converters in between, just use
a protection resistor in each dataline.
The value depends on the distance (length of cable) you work with and the speed
of communication, but I would use 1k for 'on the bench' and about 120 ohm if you
span some meters.
RS232 officially will span 15 meters, but 50 can be reached if your baudrate is not
to high.
 

max485 pic

You could also use RS485 device. For example I use Max485 to make 2 pic communicating both if they are on different boards with diferent power supply or if they are lying on the same board.
I think it would be very simple using I2C protocol to make communication instead of using TX and RX pins if MCU are on the same board.
Check if your MCU has an internal I2C HW.
 

example of how link two microcontroller

fuzzzy said:
You could also use RS485 device. For example I use Max485 to make 2 pic communicating both if they are on different boards with diferent power supply or if they are lying on the same board.

i want to connect few PIC's with max485 can u giv me few good examples, code preference is c

thx
 

pic max485 code

It's very very simple.

I haven't got a simple schemtic to upload now. i'll tell you in few words.
i use SN75176(texas) or max485(maxim) interchangeble.

You have to use Hardawre or software uart of PIC. connect TX(usually RC6) to PIN 4 of rs485 chip and RX(usually RC7) to PIN 1 of max485. Also I usually control TX(pin 2) and RX(pin 3) enable together by another PIC's Port(whatever).
Pins 5 and 8 are for power supply. and pins 6 and 7 (A, B) are for rs485 bus(all on the same line and all B on the other bus line). You have to connect all of your max485 in the same way.

To send or receive data is the same of simple rs232.if you use to program in C you can Use commands PUTC() or Printf() to send characters or strings.
and command kbht() and GETC() to control if byte has been received.

If you need more explanations tell me.
 

    V

    Points: 2
    Helpful Answer Positive Rating
communication between two 8051

hi
you don't need a max232 Ic ,
you must connect RX1 to TX2 and TX1 to RX2 ,
 

pic18 max485

I think it would be very simple using I2C protocol to make communication instead of using TX and RX pins if MCU are on the same board.
Check if your MCU has an internal I2C HW.
 

how to communicate between microcontrolers

See this thread for a simlar discussion
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top