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 to PIC communication (suggestions)

Status
Not open for further replies.

Krumlink

New Member
The current project I am working on right now will be to maximize I/O pins without going completely serial (serial communication, not YouTube - Al Gore Im Serial!). I am using a 18F4620 connected to a 18F2525. The way in which I have parts connected, is that It requires 6 I/O pins to run the SN754410 Dual H bridge. I will be using the 18F4620 to output a binary value using 3 I/O pins, in which I will OR together with the 18F2525 and drive high the proper pins afterward. You may say it will be easier to just drive the 18F4620 with 6 I/O pins in the first place, but I am looking at the total of the 4620's pins, not about the 2525's, in a sense the 2525 is a demultiplexer.
Truth table of 4620 & 2525
0 0 0 Null
0 0 1 Forward Motor A
0 1 0 Forward Motor B
0 1 1 Backward Motor A
1 0 0 Backward Motor B
1 0 1 Forward A + B
1 1 0 Backward A + B
1 1 1 High Brake

The three inputs on the left will be the 4620, and the name is the appropriate motor that it will be driving. Otherwise, the 2525 will take the inputs and turn on the appropriate ports to replicate the results on the right. I have already implemented both systems, but I have yet to merge them together to create a demultiplexer, but I can.

Really what I am asking is for your past experiences and tips of PIC to PIC communication and any suggestions that you have.
 
Really what I am asking is for your past experiences and tips of PIC to PIC communication and any suggestions that you have.

The easiest way is to go 'completely serial', you can use the USART's which would take two pins (one each way), or if you do it in software you can use just a single pin and a little 'clever' programming.
 
while were on the topic, how does serial pic to pic communication work? anyone have a good website about it?
 
While at school today in my free time I devised a new communication system with handshaking and status. It will be a 6 bit parallel communication that will have the ability to read and write to the other device, and a status that would indicate whether or not the PIC was receiving data. 6 bit allows for up to 64 states and would only require a single port. I will be testing the transmission protocol between 2 18F1320's.
 
while were on the topic, how does serial pic to pic communication work? anyone have a good website about it?

There are several methods of communicating data between PICs, and the way that I thought of this was to decide between parallel and serial. I chose parallel and then I needed to figure how many states I wanted to have.
 
Still a confusing choice when you already have what you need with 2 pin RX and TX UART. Is there a reason your using a parallel scheme, or is it just an experiment?
 
Still a confusing choice when you already have what you need with 2 pin RX and TX UART. Is there a reason your using a parallel scheme, or is it just an experiment?
Both an experiment, and the TX&RX pins on one PIC is already being dedicated to PIC to PC communication.
 
Could also be 6 bit data and the 2 handshake lines, using a full PORT.

Parallel transfer can be much faster than serial, if time is an issue.
From what he says, he is not transferring ASCII text, but 64 command/control states.
 
Oh my. I need one of those emoticons that shows the little smiley face guy eating popcorn.
 
Like that?
popcorn-gif.26606

;)
 

Attachments

  • popcorn.gif
    popcorn.gif
    2.9 KB · Views: 259
Last edited:
Yes. Perfect mister_e!:D
As for the topic, everything and nothing at the same time. It seems to have made its way off in the weeds:D.

"The current project I am working on right now will be to maximize I/O pins without going completely serial"

"the TX&RX pins on one PIC is already being dedicated to PIC to PC communication"

Krumlink appears to be intent on going PARALLEL- ONLY!. "Sheer folly" Nigel suggested serial anyway (great idea to save pins!) and then shot out the raspberry :p as in "HUMOR". And of course Triod dropped the thread hijacking SERIAL subject in the mix. Yep parallel is gonna be faster of course.
Parallel-serial-parallel-serial-3bit-6bit-8-bit

I just saw it going oscillatory divergent and added a little damping. (Humor). Have I upset the humor police on the board?:confused:
 
while were on the topic, how does serial pic to pic communication work? anyone have a good website about it?

see:

**broken link removed**

but:

I think spi or i2c serial is probably the way to go, they are serial methods for microcontrollers.


:p:):D:rolleyes::eek:;):mad::p
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top