PICAXE to multiple PICAXE

Pichucker

New Member
Dear All,

Imagine this ... I have between 1 and 9 PICAXE "slave" chips and one PICAXE "master". The master needs to send one byte of information to specific receiver chips (code determines which ones). In your expert opinion, would the best approach be to use i2c or simply connect all slave chips to a single serial bus line, give each one an "address", and broadcast data to them all simultaneously? Basically I'm developing a simple display system with a "slave" PICAXE driving each display unit.

Cheers, PiChucker
 

moxhamj

New Member
Having built a simple bus system, I think a bus would be easier than I2C. Ground the bus with a single 10k resistor, and every device talking to the bus sends data via a 914 diode. If you only have one device talking, you don't even need those components.

The only catch, and it is a big one, is that with all but the newest components, all the slave devices are going to be listening with Serin which means they will essentially hang until they get some data.
 

Pichucker

New Member
Thanks Dr.A.,

Yes, I would only have one device talking but had hoped that all the slaves could beaver away on their own display code in the background and update the display when new data is received.

Cheers,
PiChucker
 

moxhamj

New Member
If it is a display then timing might be an issue. There are all sorts of systems with shared memory or using another handshaking line to say 'I'm ready, send me some data', but if the delay can be tolerated, the easiest way would be for the master to send a header packet eg "ABC" then 10 bytes, and to send this continuously.

When a slave wants some data it does a serin and it will get the 10 bytes within a short space of time (maybe 1/24 of a second at 2400 baud - eg 2400 bits per second, about 240 bytes per second and 10 bytes) then just look at the byte out of the 10 that is for it.
 

Pichucker

New Member
Good idea. timing of the updates is not critical. less than 1 sec would be fine.

Cheers, Pichucker (signing out for now)
 

Technical

Technical Support
Staff member
The best way to do this would be i2c using the 28X1, 40X1.

When a 28X1 is an i2c slave it will run its own task and receive the i2c in the background. This makes it ideal for this kind of application - each chip can run its own program to simply maintain its own display - and then only update its own display when appropriate data is received via the i2c bus.

 

Pichucker

New Member
Thanks All,

I did consider the i2c method on the new chips but was actually trying to explore cheaper options before I headed down the 28X1 path.

Cheers,
PiChucker
 
Top