CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Easiest Method of communication between 2 pics?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jfk1965



Joined: 21 Oct 2003
Posts: 58

View user's profile Send private message

Easiest Method of communication between 2 pics?
PostPosted: Tue Jan 02, 2007 10:25 am     Reply with 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?

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

View user's profile Send private message Visit poster's website

PostPosted: Tue Jan 02, 2007 10:36 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Mar 15, 2007 3:01 am     Reply with quote

Any working code i can try with minor modification?
sjbaxter



Joined: 26 Jan 2006
Posts: 141
Location: Cheshire, UK

View user's profile Send private message Visit poster's website

PostPosted: Thu Mar 15, 2007 3:50 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Mar 15, 2007 5:05 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group