Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC Communication

Status
Not open for further replies.

cne

New Member
Hello,

I have been working on a PIC controlled scoreboard recently. It will consist of a controller console at one end, and a large display at the other.

Both the controller and the display will contain a PIC. The controller PIC will send signals to the display.

My question is, which method of communication should I use to interconnect the two PIC's.

Some important aspects are:
-Data needs to be sent over a long cable
-Needs to use as few wires as possible

I am fairly new to microcontrollers so my coding knowledge is limited.

Thanks in advance,

Cameron
 
You could use wireless serial communication with a device on each end called X-Bee found here **broken link removed**
 
RS485 is probably the best answer. It's quick and simple to implement. You just feed your TTL serial into a MAX485 IC or LTC1481 IC, then through up to a thousand feet of two copper wires to another IC as mentioned at the other end to get TTL out. If you use the direction control pins on the ICs mentioned, you can do bi-directional communications, but only one PIC can talk at a time. Plan on having a 100 Ohm or 120 Ohm termination, quarter-Watt (can be 5%) resistor at both ends.
Hope that helped.
kenjj
 
Or do full-duplex and don't worry about direction control pins. Makes life easy, but adds 2 wires. X-Bee is simple though and you won't need wires.
 
So I can communicate both ways, using two wires, just not at the same time?

Three wires if you count the ground, but yes.
 
So would this be correct?
 

Attachments

  • TRANSMITTER.jpg
    TRANSMITTER.jpg
    61.3 KB · Views: 178
That's close. You need to tie RE and DE to a pin. They can both go to the same pin. /RE is a Receive Enable pin and DE is a Driver (output) Enable pin. Set /RE and DE low when you expect to receive data and set /RE and DE high when you want to transmit data.

And don't forget to actually connect power and ground to the pins, and your ICSP header too.
 
Last edited:
Is the code for RS485 the same as RS232. I am using flowcode, which has the RS232 component, but no RS485.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top