community_tca9555¶
CircuitPython library for connecting a TCA9555 16-Bit I2C GPIO expander Library for TCA9555 Low-Voltage 16-Bit I2C and SMBus I/O Expander with Interrupt Output and Configuration Registers
Author(s): James Carr
Implementation Notes¶
Hardware:
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards:
Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
Adafruit’s Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
- community_tca9555.ADDRESS_MAXIMUM = 39¶
The maximum I2C address the TCA9555 supports
- community_tca9555.ADDRESS_MINIMUM = 32¶
The minimum I2C address the TCA9555 supports
- class community_tca9555.TCA9555(i2c: busio.I2C, address: int = 32)¶
CircuitPython driver for the Texas Instruments TCA9555 expander.
- Parameters
i2c (busio.I2C) – the I2C bus object to use. Note: This will be converted to an
adafruit_bus_device.i2c_device.I2CDeviceinternally.address (int) – The I2C address of the TCA9555. This must be in the range
ADDRESS_MINIMUMtoADDRESS_MAXIMUM. (Defaults toADDRESS_MINIMUM)
- configuration_port_0¶
Read or write 8 bits of port 0 configuration state. 0 = Output, 1 = Input
- configuration_port_0_pin_0¶
Read or write port 0 pin 0 configuration state. 0 = Output, 1 = Input
- configuration_port_0_pin_1¶
Read or write port 0 pin 1 configuration state. 0 = Output, 1 = Input
- configuration_port_0_pin_2¶
Read or write port 0 pin 2 configuration state. 0 = Output, 1 = Input
- configuration_port_0_pin_3¶
Read or write port 0 pin 3 configuration state. 0 = Output, 1 = Input
- configuration_port_0_pin_4¶
Read or write port 0 pin 4 configuration state. 0 = Output, 1 = Input
- configuration_port_0_pin_5¶
Read or write port 0 pin 5 configuration state. 0 = Output, 1 = Input
- configuration_port_0_pin_6¶
Read or write port 0 pin 6 configuration state. 0 = Output, 1 = Input
- configuration_port_0_pin_7¶
Read or write port 0 pin 7 configuration state. 0 = Output, 1 = Input
- configuration_port_1¶
Read or write 8 bits of port 1 configuration state. 0 = Output, 1 = Input
- configuration_port_1_pin_0¶
Read or write port 1 pin 0 configuration state. 0 = Output, 1 = Input
- configuration_port_1_pin_1¶
Read or write port 1 pin 1 configuration state. 0 = Output, 1 = Input
- configuration_port_1_pin_2¶
Read or write port 1 pin 2 configuration state. 0 = Output, 1 = Input
- configuration_port_1_pin_3¶
Read or write port 1 pin 3 configuration state. 0 = Output, 1 = Input
- configuration_port_1_pin_4¶
Read or write port 1 pin 4 configuration state. 0 = Output, 1 = Input
- configuration_port_1_pin_5¶
Read or write port 1 pin 5 configuration state. 0 = Output, 1 = Input
- configuration_port_1_pin_6¶
Read or write port 1 pin 6 configuration state. 0 = Output, 1 = Input
- configuration_port_1_pin_7¶
Read or write port 1 pin 7 configuration state. 0 = Output, 1 = Input
- configuration_ports¶
Read or write 16 bits of configuration state. If a bit is set to 1, the corresponding port pin is enabled as an input with a high-impedance output driver. If a bit in this register is cleared to 0, the corresponding port pin is enabled as an output.
- input_port_0¶
Read all 8 bits from port 0. The Input Port register reflect the incoming logic levels of the pins, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_0.
- input_port_0_pin_0¶
Read the state of port 0 pin 0. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_0_pin_0.
- input_port_0_pin_1¶
Read the state of port 0 pin 1. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_0_pin_1.
- input_port_0_pin_2¶
Read the state of port 0 pin 2. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_0_pin_2.
- input_port_0_pin_3¶
Read the state of port 0 pin 3. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_0_pin_3.
- input_port_0_pin_4¶
Read the state of port 0 pin 4. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_0_pin_4.
- input_port_0_pin_5¶
Read the state of port 0 pin 5. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_0_pin_5.
- input_port_0_pin_6¶
Read the state of port 0 pin 6. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_0_pin_6.
- input_port_0_pin_7¶
Read the state of port 0 pin 7. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_0_pin_7.
- input_port_1¶
Read all 8 bits from port 1. The Input Port register reflect the incoming logic levels of the pins, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_1.
- input_port_1_pin_0¶
Read the state of port 1 pin 0. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_1_pin_0.
- input_port_1_pin_1¶
Read the state of port 1 pin 1. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_1_pin_1.
- input_port_1_pin_2¶
Read the state of port 1 pin 2. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_1_pin_2.
- input_port_1_pin_3¶
Read the state of port 1 pin 3. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_1_pin_3.
- input_port_1_pin_4¶
Read the state of port 1 pin 4. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_1_pin_4.
- input_port_1_pin_5¶
Read the state of port 1 pin 5. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_1_pin_5.
- input_port_1_pin_6¶
Read the state of port 1 pin 6. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_1_pin_6.
- input_port_1_pin_7¶
Read the state of port 1 pin 7. The Input Port register reflect the incoming logic level of the pin, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_port_1_pin_7.
- input_ports¶
Read all 16 bits from port 0 and 1. The Input Port registers reflect the incoming logic levels of the pins, regardless of whether the pin is defined as an input or an output by the Configuration register
configuration_ports.
- output_port_0¶
Write 8 bits of state to port 0. This will only apply to pins that are configured as outputs.
- output_port_0_pin_0¶
Write boolean state to port 0 pin 0. This will only apply if the pin is configured as an output.
- output_port_0_pin_1¶
Write boolean state to port 0 pin 1. This will only apply if the pin is configured as an output.
- output_port_0_pin_2¶
Write boolean state to port 0 pin 2. This will only apply if the pin is configured as an output.
- output_port_0_pin_3¶
Write boolean state to port 0 pin 3. This will only apply if the pin is configured as an output.
- output_port_0_pin_4¶
Write boolean state to port 0 pin 4. This will only apply if the pin is configured as an output.
- output_port_0_pin_5¶
Write boolean state to port 0 pin 5. This will only apply if the pin is configured as an output.
- output_port_0_pin_6¶
Write boolean state to port 0 pin 6. This will only apply if the pin is configured as an output.
- output_port_0_pin_7¶
Write boolean state to port 0 pin 7. This will only apply if the pin is configured as an output.
- output_port_1¶
Write 8 bits of state to port 1. This will only apply to pins that are configured as outputs.
- output_port_1_pin_0¶
Write boolean state to port 1 pin 0. This will only apply if the pin is configured as an output.
- output_port_1_pin_1¶
Write boolean state to port 1 pin 1. This will only apply if the pin is configured as an output.
- output_port_1_pin_2¶
Write boolean state to port 1 pin 2. This will only apply if the pin is configured as an output.
- output_port_1_pin_3¶
Write boolean state to port 1 pin 3. This will only apply if the pin is configured as an output.
- output_port_1_pin_4¶
Write boolean state to port 1 pin 4. This will only apply if the pin is configured as an output.
- output_port_1_pin_5¶
Write boolean state to port 1 pin 5. This will only apply if the pin is configured as an output.
- output_port_1_pin_6¶
Write boolean state to port 1 pin 6. This will only apply if the pin is configured as an output.
- output_port_1_pin_7¶
Write boolean state to port 1 pin 7. This will only apply if the pin is configured as an output.
- output_ports¶
Write 16 bits of state to the outputs. This will only apply to pins that are configured as outputs.
- polarity_inversion_port_0¶
Read or write 8 bits of port 0 polarity inversion state.
- polarity_inversion_port_0_pin_0¶
Read or write port 0 pin 0 polarity inversion state.
- polarity_inversion_port_0_pin_1¶
Read or write port 0 pin 1 polarity inversion state.
- polarity_inversion_port_0_pin_2¶
Read or write port 0 pin 2 polarity inversion state.
- polarity_inversion_port_0_pin_3¶
Read or write port 0 pin 3 polarity inversion state.
- polarity_inversion_port_0_pin_4¶
Read or write port 0 pin 4 polarity inversion state.
- polarity_inversion_port_0_pin_5¶
Read or write port 0 pin 5 polarity inversion state.
- polarity_inversion_port_0_pin_6¶
Read or write port 0 pin 6 polarity inversion state.
- polarity_inversion_port_0_pin_7¶
Read or write port 0 pin 7 polarity inversion state.
- polarity_inversion_port_1¶
Read or write 8 bits of port 1 polarity inversion state.
- polarity_inversion_port_1_pin_0¶
Read or write port 1 pin 0 polarity inversion state.
- polarity_inversion_port_1_pin_1¶
Read or write port 1 pin 1 polarity inversion state.
- polarity_inversion_port_1_pin_2¶
Read or write port 1 pin 2 polarity inversion state.
- polarity_inversion_port_1_pin_3¶
Read or write port 1 pin 3 polarity inversion state.
- polarity_inversion_port_1_pin_4¶
Read or write port 1 pin 4 polarity inversion state.
- polarity_inversion_port_1_pin_5¶
Read or write port 1 pin 5 polarity inversion state.
- polarity_inversion_port_1_pin_6¶
Read or write port 1 pin 6 polarity inversion state.
- polarity_inversion_port_1_pin_7¶
Read or write port 1 pin 7 polarity inversion state.
- polarity_inversions¶
Read or write 16 bits of polarity inversion state.