PIC to PIC communication requirments

Discuss PIC and electronic related things

Moderators: David Barker, Jerry Messina

richardb
Posts: 310
Joined: Tue Oct 03, 2006 8:54 pm

Post by richardb » Wed Sep 03, 2008 6:51 am

Hi Liak,

have a look here,

http://en.wikipedia.org/wiki/Serial_Per ... erface_Bus

http://en.wikipedia.org/wiki/Image:SPI_three_slaves.svg

http://en.wikipedia.org/wiki/Image:SPI_ ... hained.svg

If the pic that you choose has hardware SPI then that will be the fastest method of getting data into your periferals if your data packets to the periferals are nice byte sized packets then i would daisy chain them as it uses fewest pins, for example if you had 3 periferals you would write three bytes to the spi port then latch in the data with the cs pin.

if the periferals take odd data sets( i remember using an adc which used variable sized data packets upto 17 bits) then do it in paralel.


i hope this helps
Richard
Hmmm..

liak
Registered User
Registered User
Posts: 195
Joined: Fri Oct 05, 2007 12:26 am

Post by liak » Wed Sep 03, 2008 11:05 am

Dear Steven and Richard,
Thanks for the encouragement and materials.
Richard, thanks for the links. I will see if I can make anything out from the links you gave me. I will get back to you if I manage to get anything working from it.
And Steven, you did say it is possible. May I know what do you think? Is it the same as Richard's or something else? I am open to any suggestions since I do not know any solution.

Thanks again.

Regards,
Liak :)

User avatar
Steven
BETA Tester
Posts: 406
Joined: Tue Oct 03, 2006 8:32 pm
Location: Cumbria, UK

Post by Steven » Wed Sep 03, 2008 6:03 pm

It depends on what your devices are - do you need to receive anything from them or are you only sending, do you need to send the same thing to them all, does it need to be sent at exactly the same time? The parallel connection with multiple CS is probably the way forward - simply select only the CS of the device you want to talk to and away you go - the other devices will ignore it.

liak
Registered User
Registered User
Posts: 195
Joined: Fri Oct 05, 2007 12:26 am

Post by liak » Sat Sep 06, 2008 2:30 am

Dear Steven and Richard,
Thanks for the encouragement and info. I managed to solve the problem. I can now run multiple devices on a single PIC without problem. I think, I may not need multiple PICs after all.
Thanks.

Regards,
Liak
:)

Post Reply