I2C controlled port expansion
Posted: Thu May 07, 2009 5:18 am
I am trying to connect a couple of PCA9534 IO port expanders via I2C to a PIC18F4321 and I am using the Flowcode Pro v3.6.11 to which I am fairly new but I am even newer to I2C.
The comm speed is not important and there's no need to get back any interrupts as all the expanded ports will most likely be configured as digital outputs to drive some relays and status LEDs.
The picture attached only shows a portion of the schematic, the second port expander hardware address is 110.
Can I get any help or sample flowcode to get a primer on using/configuring the I2C feature to be able to control these expanded outputs?
Any help is greatly appreciated so please reply with anything that can help me put together the thoughts behind the I2C configuration and communication structure.
The port expander datasheet http://focus.ti.com/lit/ds/symlink/pca9534a.pdf has some good advise but I am not sure of how to use that info in combination with the flowcode feature.
Here's a portion of the schematic:
The comm speed is not important and there's no need to get back any interrupts as all the expanded ports will most likely be configured as digital outputs to drive some relays and status LEDs.
The picture attached only shows a portion of the schematic, the second port expander hardware address is 110.
Can I get any help or sample flowcode to get a primer on using/configuring the I2C feature to be able to control these expanded outputs?
Any help is greatly appreciated so please reply with anything that can help me put together the thoughts behind the I2C configuration and communication structure.
The port expander datasheet http://focus.ti.com/lit/ds/symlink/pca9534a.pdf has some good advise but I am not sure of how to use that info in combination with the flowcode feature.
Here's a portion of the schematic: