pic to pic communications
Hello everyone.
I am new to the programming world and pics. I have been assigned with a project of making 2 16F877 pics comunicate with eachother. one will send a command and the other will do the command and report back that it was done. Is there someone who could explain this to me so I can understand it.
thank you all for your time
Inverted and NonInverted Mode
Maybe another question for the FAQ? (Which is looking good!)
I need some further guidence from the PIC GODS/ess at Melabs....
I haven't had any luck getting two pics to talk on a very basic level and I think it has to do with the wiring.
Do the pics need to be wired via a resistor and serial data sent / received in inverted mode?
Or is a straight wire connection, no inverted mode good enough?
I just can't get the combination right!
I've had no problems sending and receiving data with and without a MAX chip to terminal programs.. but pic2pic? #&*@!!!
Cheers
Thank you for all the info
Melanie;
Thank you for the reply. as it stands I have the communications thing going but not how I want it to go. My original plan was to have 2 pics talk to eachother but now I find that I will need to have one talk to a computer through a 9pin serial connection.
This is the issue now. How to get the pic to recieve the data from the computer and decifer what it means.
My thought is that serial transfers 1 byte at a time and one command is usually 8 to 10 bytes long
This is where I am finding it diffuclt to program.
Any help is always apprecated.
Thanks
Tom.
Quote:
Originally posted by Melanie
Getting two PICs to talk to each other in it's simplest form is ONE WIRE (plus Vss/Ground) connected from one PIC to the other. No other Hardware.
However, this is a HUGE topic. You can do a posting every day for a year and still not cover everything.
There are so many variables. A solution encompassing one set of variables, would be totally inappropriate for another.
Before making any kind of move in any direction you need to be armed with your design criteria...
1. How far apart are the PICs?
2. Are they both on the same PCB?
3. How many wires can you connect between the two PICs?
4. If not on the same board, are they connected by Cable?
5. If so, how many wires have you got to play with?
6. Is the interconnection going to be in a noisy environment?
7. Are you interconnecting by Laser, Infra-red, Wireless, Satellite or other method?
8. How FAST does the Data Transfer need to be?
9. Are you sending a BYTE, WORD or whole heap of Data?
10. Do you need verification that the Data has been Received?
11. Is the interconnection Bi-Directional?
12. If Bi-Directional, is that just for verification of reception or for actual Data flow?
13. Are the PICs xtal or resonator controlled? All of them?
14. How many of them are going to be interconnected?
15. And by what methodology (peer-to-peer, slave-master, token-passing, TCP/IP etc)?
16. Are the PICs going to be busy doing other things whilst the communication is being transmitted/received or otherwise exchanged? Or are they just sitting there waiting for things to happen?
That's just a VERY brief (and incomplete) list.
Answers to the above will probably pose more questions, and only then can you start a plan for getting these things connected and talking.