View previous topic :: View next topic |
Author |
Message |
jfk1965
Joined: 21 Oct 2003 Posts: 58
|
Easiest Method of communication between 2 pics? |
Posted: Tue Jan 02, 2007 10:25 am |
|
|
I have to send the value of an adc reading that I need to communicate from one pic to another what would the easiest way to do this?
The communication doesn't need to be fast as I only need to update the reading twice a second.
The method needs to be suitable for use through a digital optoisolater.
JFK |
|
|
sjbaxter
Joined: 26 Jan 2006 Posts: 141 Location: Cheshire, UK
|
|
Posted: Tue Jan 02, 2007 10:36 am |
|
|
The easiest way is to use the builtin UART and send the data as ascii data. You don't need a level shifter (i.e. RS232 transceiver) if the pics are close together (i.e. TTL levels and less than 18inches apart). But if you use a couple of opto isolators, then you increase the distance between the PICs as this is a current based line driver (i.e. 5mA or 20mA dependant upton the opto).
The latter is basically the signal driver and isolation that MIDI uses (do a search on Google) to talk between musical instruments.
As for the data transfer on this 'hardware link', there are plenty of examples of serial reading/writing all over this forum. _________________ Regards,
Simon. |
|
|
domdom
Joined: 06 Sep 2006 Posts: 29
|
|
Posted: Thu Mar 15, 2007 3:01 am |
|
|
Any working code i can try with minor modification? |
|
|
sjbaxter
Joined: 26 Jan 2006 Posts: 141 Location: Cheshire, UK
|
|
Posted: Thu Mar 15, 2007 3:50 am |
|
|
Quote: | As for the data transfer on this 'hardware link', there are plenty of examples of serial reading/writing all over this forum. |
Try using the search feature on the top of this forum page !!! it really doesn't take that much effort. _________________ Regards,
Simon. |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Thu Mar 15, 2007 5:05 am |
|
|
Quote: |
I have to send the value of an adc reading that I need to communicate from one pic to another what would the easiest way to do this?
|
In the pointed link you will find a short -and uncomplete- example of hardware
configurations + examples codes to start communicating 2 PIC.
http://www.ccsinfo.com/faq.php?page=connect_pics
Humberto |
|
|
|