How to daisy chain 3 wire serial interface ICs?
lyassa
Posts: 52
I need to monitor the voltage of few batteries that are next to each other, but away from the Propeller. is it possible to daisy serial devices as the diagram below shows?
+-------+ +-------+ |mcp3208| |mcp3208| +-------+ +-------+ c d s c d s | | | | | | +--]--]----+..|..|....to more | +--]-------+..|....3 wire serial | | +----------+....interface | | | to propeller
Comments
If you really need to have several devices on a bus, you should use I2C or 1-Wire protocols. I2C requires a clock and a data line while the 1-Wire protocol only needs 1 line. You'll need a ground wire and power although most 1-Wire devices can get power from the single line in-between data pulses.
It may also be possible to drive the MCP3208's in parallel using clock and datain, but use separate dataout pins. This will depend on software and you will need to write a special object to handle multiple simultaneous replies.
it uses chipselect so you can share the other 3 lines.
So if you need 4 A/Ds, it could be done with 7 pins.
If you want 8 A/Ds, you could use a 74HC138 (3of8) for chip select, for a tolal of 6 pins.
it's active low so it will work with your IC.
If you are really low on pins, go with i2c and you can share props eeprom pins.
But if you want to use a few of the same A/D chip make sure it have at least 2pins for address select.
that you connect to V+ or/and Gnd so you can have 4 of them on the same bus.
If the batteries are close enough to each other a '595 might also be used.