Linking BSII chips question
Tumbleweed
Posts: 45
Hey All,
Has anyone out there ever used a single BSII chip to link to·4·'daughter' BSII chips to expand the number of IO lines available?
For example:
Master Chip IO line 1 connected to Daughter Chip 1 Input pin.
Master Chip IO line·2 connected to Daughter Chip·2 Input pin.
Master Chip IO line·3 connected to Daughter Chip·3 Input pin.
Master Chip IO line·4 connected to Daughter Chip·4 Input pin.
Daughter Chip 1 IO Line 1-8 connected to Device 1-8
Daughter Chip·2 IO Line 1-8 connected to Device 9-16
Daughter Chip·3 IO Line 1-8 connected to Device 17-24
Daughter Chip·4 IO Line 1-8 connected to Device 24-36
My goal is to decentralize the workload (to increase speed and address more than the available IO pins on a single chip) and communicate directly with one chip via my PC computer that will tell all the other chips what to do.
Thanks,
Lance
Has anyone out there ever used a single BSII chip to link to·4·'daughter' BSII chips to expand the number of IO lines available?
For example:
Master Chip IO line 1 connected to Daughter Chip 1 Input pin.
Master Chip IO line·2 connected to Daughter Chip·2 Input pin.
Master Chip IO line·3 connected to Daughter Chip·3 Input pin.
Master Chip IO line·4 connected to Daughter Chip·4 Input pin.
Daughter Chip 1 IO Line 1-8 connected to Device 1-8
Daughter Chip·2 IO Line 1-8 connected to Device 9-16
Daughter Chip·3 IO Line 1-8 connected to Device 17-24
Daughter Chip·4 IO Line 1-8 connected to Device 24-36
My goal is to decentralize the workload (to increase speed and address more than the available IO pins on a single chip) and communicate directly with one chip via my PC computer that will tell all the other chips what to do.
Thanks,
Lance
Comments
You're setting up a classic master-slave arrangement and it will work very well with Stamps. If all the IO is close to the master Stamp, it may be cheaper to use '595 expander chips for extra outputs and multiplexing chips for extra inputs. But, communication is more flexible in the long run.
Look in the help files under SERIN/SEROUT and you'll see an example of getting two stamps to talk. Use SEROUT "Open" directive and you can use a three wire bus ( Tx, Rx, Gnd) to connect all stamps so they can all listen and only respond when the master asks them.
Or, you can go very 'industrial' and use a 75176 chip at each stamp to set up an RS-485 network. Some of my systems have several thousand feet of cable and 8 or more stamp systems connected using these chips.
For THE reference book on serial communications, get "Serial Port Complete" by Jan Axelson.
Cheers
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk
http://www.siskconsult.com
·
Thanks for the info and advice. I'll order the book today.
Thankfully, my instrument is fairly small so I don't have to worry about long cable runs. However I have just over 1000 individual valves to control and all have to cycle pretty much simultaniously. It's going to be FUN to test :-)
Lance
A slightly slower approach would use the 'party line' interface, using SERIN/SEROUT with the 'open baud' modes. But that would let you control 14 elements with each BS2 instead of 8 each. It's slower because then you have SERIN/SEROUT synchronization issues -- the 'master' has to 'poll' each slave for info, that sort of thing.
www.parallax.com/detail.asp?product_id=45300
You'll get access to 40 I/Os and can run it much faster than the BS2 series. You can create the same type of serial network, but it would be a bit more involved than with the Stamps.