Component: I2C Multiplexer (TCA9548A) (Comms: System)

From Flowcode Help
Jump to navigationJump to search
Author MatrixTSL
Version 1.0
Category Comms: System


I2C Multiplexer (TCA9548A) component

An I2C multiplexing IC allowing up to 8 different I2C busses to be connected to a single I2C channel on your target microcontroller.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_I2C_Multiplexer_TCA9548A.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_I2C_Multiplexer_TCA9548A.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Here we have a simple example showing how to use the multiplexer to connect multiple of the same I2C sensor IC to the microcontroller.

The multiplexer IC is connected directly to the microcontroller I2C pins and up to 8 temp/humidity sensors are connected to the CH0-CH7 I2C pins of the multiplexer.


FC6 Icon.png I2C Multiplex Example






Macro reference

Initialise

Fc9-comp-macro.png Initialise
Startup the I2C bus ready for communications. 
Fc9-void-icon.png - VOID Return


SelectChannel

Fc9-comp-macro.png SelectChannel
Selects a single output channel to multiplex the I2C output to (0-7). 
Fc9-u8-icon.png - BYTE Channel
Range: 0-7 
Fc9-void-icon.png - VOID Return


SetChannelMask

Fc9-comp-macro.png SetChannelMask
Allows a user determined number of channels to be connected to the I2C bus. 
Fc9-u8-icon.png - BYTE Mask
Range: 0-255 / Bit0=CH0 EN / Bit1 = CH1 EN etc 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Multiplexer Properties
Fc9-type-16-icon.png Address Bits
 
Fc9-conn-icon.png I2C Properties
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
Channel selection 
Fc9-type-5-icon.png SDA
Pin used for SDA (data signal) 
Fc9-type-5-icon.png SCL
Pin used for SCL (clock signal) 
Fc9-conn-icon.png Options
Fc9-type-7-icon.png Stop Delay
On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.  
Fc9-type-16-icon.png Baud Select
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
Baud rate to be used 
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Simulate Comms