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 support@ccsinfo.com

connect 20 pics
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
kloppy



Joined: 28 Jul 2004
Posts: 32

View user's profile Send private message

connect 20 pics
PostPosted: Tue Aug 31, 2004 2:56 pm     Reply with quote

what is a good way to communicate with 20 pics? I need only one master and it hasn't to be fast. the distance between the first and the last pic ist between 0.5 an 1 meter
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Tue Aug 31, 2004 3:04 pm     Reply with quote

I2C or SPI are easy to impliment. 485 is overkill for the short distance. You get best speed with a parallel bus but it will use a lot of pins.
_________________
The search for better is endless. Instead simply find very good and get the job done.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Aug 31, 2004 3:07 pm     Reply with quote

See this article in the CCS FAQ:
http://www.ccsinfo.com/faq/?23

If you search google for these keywords: PIC network "multi-drop"
there are several good web pages. Here is one:
http://jap.hu/electronic/pbus.html
Darren Rook



Joined: 06 Sep 2003
Posts: 287
Location: Milwaukee, WI

View user's profile Send private message Send e-mail

PostPosted: Tue Aug 31, 2004 4:00 pm     Reply with quote

Ok, I gotta know... What are you doing that you need 20 PICs within 1 meter of each other?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Aug 31, 2004 6:05 pm     Reply with quote

We do it with lighting controllers

http://www.lithonia.com/Controls/synergy/Products/enclosures.htm
jds-pic



Joined: 17 Sep 2003
Posts: 205

View user's profile Send private message

PostPosted: Tue Aug 31, 2004 6:10 pm     Reply with quote

Darren Rook wrote:
Ok, I gotta know... What are you doing that you need 20 PICs within 1 meter of each other?


beowulf cluster of PICs. (!)

http://www.beowulf.org/overview/index.html

jds-pic
Darren Rook



Joined: 06 Sep 2003
Posts: 287
Location: Milwaukee, WI

View user's profile Send private message Send e-mail

PostPosted: Tue Aug 31, 2004 9:40 pm     Reply with quote

Mark,

how many PICs in the big one?
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Tue Aug 31, 2004 10:33 pm     Reply with quote

We used RS485 to connect 16 PICs, with each PIC being about one meter apart from the next one. It worked very well.
kloppy



Joined: 28 Jul 2004
Posts: 32

View user's profile Send private message

PostPosted: Wed Sep 01, 2004 1:02 am     Reply with quote

i have 20 steppermotor controllers in a scanner with a pic on each controller.
i thought about i2c but i worry if the distance is already too long.
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Wed Sep 01, 2004 8:37 am     Reply with quote

I have one project with an 18F452 talking to 10 16F87's. The 87's do all of the time intensive stuff (monitoring sensors) while the 452 simply requests data from each slave every second and then does the process controlling. All using I2C.

Ronald
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Wed Sep 01, 2004 8:45 am     Reply with quote

kloppy wrote:
i have 20 steppermotor controllers in a scanner with a pic on each controller.
i thought about i2c but i worry if the distance is already too long.


I2C should be able to handle 1 meter. Just be careful of excess capacitance on the lines and use pull-up resistors on the low side of the usual range, maybe 1K or 330 Ohm.
_________________
The search for better is endless. Instead simply find very good and get the job done.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed Sep 01, 2004 10:27 am     Reply with quote

We use 6ma active pullups
kloppy



Joined: 28 Jul 2004
Posts: 32

View user's profile Send private message

PostPosted: Wed Sep 01, 2004 3:46 pm     Reply with quote

what do you think about twisted pair connections?
Yashu



Joined: 08 Oct 2003
Posts: 26

View user's profile Send private message

PostPosted: Wed Sep 01, 2004 11:52 pm     Reply with quote

crying out for single wire CAN
J_Purbrick



Joined: 16 Sep 2003
Posts: 9

View user's profile Send private message

PostPosted: Thu Sep 02, 2004 9:22 am     Reply with quote

A method that I'm using for about 20 PICs communicating with a computer is "modified RS422" where the master (the computer) can talk any time it wants to, using packets containing an address. Every character is received by every PIC, and each PIC checks for the address, and responds only to packets addressed to it. Simple enough.

For data back to the master, there's a "hardware token" that is generated by the processor closest to the computer. It's a positive-going pulse that's sent out 10 times a second, and while sending it, the PIC has the authority (in fact, a requirement) to enable its driver onto a shared line and send a packet to the master. When the PIC completes its packet, it sends the token line feeding the next PIC low, which starts that processor's communication sequence. The packet sent by a PIC contains its address, so the master knows who said what, regardless of the order of PICs on the network. Clearly, there are limitations on what this network can achieve, but it's suitable for the purpose.

The network runs at 115.2KB and hence is compatible with an ordinary serial port, with just the need for RS232 to RS422 level conversion.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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