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

master and 3 slaves PIC

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







master and 3 slaves PIC
PostPosted: Sun Dec 21, 2003 9:25 pm     Reply with quote

Hi

I want use CCS do program of communication between 1 master PIC (18F452) and 3 Slaves PIC(18F452), the salve PIC has different address. which is the best way for this program.
I used Intel MCS51 for a similar project before, the MCS51 has multiprocessor communication mode. but I don't know how about PIC.
Thanks,
Merry Christmas and happy new year!

David
TSchultz



Joined: 08 Sep 2003
Posts: 66
Location: Toronto, Canada

View user's profile Send private message

PostPosted: Mon Dec 22, 2003 5:24 am     Reply with quote

I have used both I2C and SPI for this type of communication before if the PICS are all on the same board. I have also used multi-drop RS485 when they are on different boards.

One thing I find helpfull for interprocess communications is to add a couple of handshaking lines to ease to process. I like the SPI interface best and in addition to chip select, I add a busy pin to each of the slaves.

The busy can then be used to indicate when the slave is doing something that should not be interrupted. With some thought and knowledge of how the firmware is written it is also possible to write the routines to keep the slave and master code flow so it can be synchronized if necessary.

As with any interprocess data bus you need to have a way to control the use of the bus so you don't have contention problems.
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