| Author | Matrix Ltd | 
| Version | 1.3 | 
| Category | Peripheral CAL | 
I2C Free component
Chip Abstraction Layer for Two Wire I2C Communications
Component Source Code
Please click here to download the component source project: FC_Comp_Source_I2C_Free.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_I2C_Free.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Example showing how to build a component using a CAL component Using CAL Components.
Macro reference
|   | Slave_Uninit | 
| Uninitialise the Slave | 
|  - VOID | Return | 
|   | GetValue | 
| Get the Named property value. | 
|  - STRING | Name | 
|  | 
|  - STRING | Return | 
|   | Master_Stop | 
| Output a Master Stop | 
|  - VOID | Return | 
|   | Slave_Init | 
| Initialise the Slave with the given Address, or range of Addresses. Only address bits that have a corresponding bit set in the Mask will be compared with the incoming bus address. | 
|  - BYTE | Address | 
| 7 Bit Address of this device (Bit 0 is ignored) | 
|  - BYTE | Mask | 
| Bit mask used to compare addresses | 
|  - VOID | Return | 
|   | Master_Uninit | 
| Uninitialise the Master | 
|  - VOID | Return | 
|   | Slave_Status | 
| Returns the Slave Status. Bit 0 = 1 Indicates address/data byte available in the buffer to read Bit 5 = 1 Indicates that the last byte received or transmitted was data (else address) | 
|  - BYTE | Return | 
|   | GetConsoleHandle | 
| Obtains the CAL console handle | 
|  - HANDLE | Return | 
|   | Slave_TxByte | 
| Send a data byte, returns Ack/Nak from Master 0=Ack=More, 1=Nak=Last | 
|  - BYTE | Data | 
|  | 
|  - BYTE | Return | 
|   | Slave_RxByte | 
| Returns the data received, and sends either Ack or Nak Set parameter Last as: 1=Last=Nak, 0=Ack=More | 
|  - BYTE | Last | 
| Sends Ack if 0, else Nak | 
|  - BYTE | Return | 
|   | SetValue | 
| Change Named property to new Value.  If "CHANNEL" the ports will be also updated from the fcd | 
|  - STRING | Name | 
|  | 
|  - STRING | Value | 
| port value as string | 
|  - VOID | Return | 
|   | Master_Init | 
| Initialise the Master | 
|  - VOID | Return | 
|   | Master_Start | 
| Output a Master Start sequence | 
|  - VOID | Return | 
|   | Master_TxByte | 
| Send a data byte | 
|  - BYTE | Data | 
|  | 
|  - BYTE | Return | 
|   | Master_Restart | 
| Output a Master Restart sequence | 
|  - VOID | Return | 
|   | Master_RxByte | 
| Returns a received data byte. Set Last=0 if there is following more Master_RxByte macros Set Last=1 if this is the last Master_RxByte and it is followed with Master_Stop. If Last = 1 the I2C bus will be presented with a 'Nack' condition. | 
|  - BYTE | Last | 
| Range: 0-1 - 0 = Not the last byte to receive, 1 = last byte to receive | 
|  - BYTE | Return | 
|   | GetList | 
| returns Named property List as filter string | 
|  - STRING | Name | 
|  | 
|  - STRING | Return | 
Property reference
|   | Properties | 
|   | Channel | 
| Channel selection | 
|   | SDA | 
| Pin used for SDA (data signal) | 
|   | SCL | 
| Pin used for SCL (clock signal) | 
|   | Baud Select | 
| Baud rate option selector | 
|   | Baud Rate | 
| Baud rate to be used | 
|   | Slew Rate Control | 
| Slew Rate Control Enabled or Disabled | 
|   | SMBus Inputs | 
| When Enabled input logic thresholds are compliant with SMBus specification | 
|   | 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. | 
|   | Simulation | 
|   | Scope Traces | 
| Selects if the scope traces are automatically generated or not | 
|   | Console Data | 
| Selects if the console data is automatically generated or not | 
==Macro reference==
|   | Slave_Uninit | 
| Uninitialise the Slave | 
|  - VOID | Return | 
|   | GetValue | 
| Get the Named property value. | 
|  - STRING | Name | 
|  | 
|  - STRING | Return | 
|   | Master_Stop | 
| Output a Master Stop | 
|  - VOID | Return | 
|   | Slave_Init | 
| Initialise the Slave with the given Address, or range of Addresses. Only address bits that have a corresponding bit set in the Mask will be compared with the incoming bus address. | 
|  - BYTE | Address | 
| 7 Bit Address of this device (Bit 0 is ignored) | 
|  - BYTE | Mask | 
| Bit mask used to compare addresses | 
|  - VOID | Return | 
|   | Master_Uninit | 
| Uninitialise the Master | 
|  - VOID | Return | 
|   | Slave_Status | 
| Returns the Slave Status. Bit 0 = 1 Indicates address/data byte available in the buffer to read Bit 5 = 1 Indicates that the last byte received or transmitted was data (else address) | 
|  - BYTE | Return | 
|   | GetConsoleHandle | 
| Obtains the CAL console handle | 
|  - HANDLE | Return | 
|   | Slave_TxByte | 
| Send a data byte, returns Ack/Nak from Master 0=Ack=More, 1=Nak=Last | 
|  - BYTE | Data | 
|  | 
|  - BYTE | Return | 
|   | Slave_RxByte | 
| Returns the data received, and sends either Ack or Nak Set parameter Last as: 1=Last=Nak, 0=Ack=More | 
|  - BYTE | Last | 
| Sends Ack if 0, else Nak | 
|  - BYTE | Return | 
|   | SetValue | 
| Change Named property to new Value.  If "CHANNEL" the ports will be also updated from the fcd | 
|  - STRING | Name | 
|  | 
|  - STRING | Value | 
| port value as string | 
|  - VOID | Return | 
|   | Master_Init | 
| Initialise the Master | 
|  - VOID | Return | 
|   | Master_Start | 
| Output a Master Start sequence | 
|  - VOID | Return | 
|   | Master_TxByte | 
| Send a data byte | 
|  - BYTE | Data | 
|  | 
|  - BYTE | Return | 
|   | Master_Restart | 
| Output a Master Restart sequence | 
|  - VOID | Return | 
|   | Master_RxByte | 
| Returns a received data byte. Set Last=0 if there is following more Master_RxByte macros Set Last=1 if this is the last Master_RxByte and it is followed with Master_Stop. If Last = 1 the I2C bus will be presented with a 'Nack' condition. | 
|  - BYTE | Last | 
| Range: 0-1 - 0 = Not the last byte to receive, 1 = last byte to receive | 
|  - BYTE | Return | 
|   | GetList | 
| returns Named property List as filter string | 
|  - STRING | Name | 
|  | 
|  - STRING | Return | 
Property reference
|   | Properties | 
|   | Channel | 
| Channel selection | 
|   | SDA | 
| Pin used for SDA (data signal) | 
|   | SCL | 
| Pin used for SCL (clock signal) | 
|   | Baud Select | 
| Baud rate option selector | 
|   | Baud Rate | 
| Baud rate to be used | 
|   | Slew Rate Control | 
| Slew Rate Control Enabled or Disabled | 
|   | SMBus Inputs | 
| When Enabled input logic thresholds are compliant with SMBus specification | 
|   | 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. | 
|   | Simulation | 
|   | Scope Traces | 
| Selects if the scope traces are automatically generated or not | 
|   | Console Data | 
| Selects if the console data is automatically generated or not | 
==Macro reference==
|   | Slave_Uninit | 
| Uninitialise the Slave | 
|  - VOID | Return | 
|   | GetValue | 
| Get the Named property value. | 
|  - STRING | Name | 
|  | 
|  - STRING | Return | 
|   | Master_Stop | 
| Output a Master Stop | 
|  - VOID | Return | 
|   | Slave_Init | 
| Initialise the Slave with the given Address, or range of Addresses. Only address bits that have a corresponding bit set in the Mask will be compared with the incoming bus address. | 
|  - BYTE | Address | 
| 7 Bit Address of this device (Bit 0 is ignored) | 
|  - BYTE | Mask | 
| Bit mask used to compare addresses | 
|  - VOID | Return | 
|   | Master_Uninit | 
| Uninitialise the Master | 
|  - VOID | Return | 
|   | Slave_Status | 
| Returns the Slave Status. Bit 0 = 1 Indicates address/data byte available in the buffer to read Bit 5 = 1 Indicates that the last byte received or transmitted was data (else address) | 
|  - BYTE | Return | 
|   | GetConsoleHandle | 
| Obtains the CAL console handle | 
|  - HANDLE | Return | 
|   | Slave_TxByte | 
| Send a data byte, returns Ack/Nak from Master 0=Ack=More, 1=Nak=Last | 
|  - BYTE | Data | 
|  | 
|  - BYTE | Return | 
|   | Slave_RxByte | 
| Returns the data received, and sends either Ack or Nak Set parameter Last as: 1=Last=Nak, 0=Ack=More | 
|  - BYTE | Last | 
| Sends Ack if 0, else Nak | 
|  - BYTE | Return | 
|   | SetValue | 
| Change Named property to new Value.  If "CHANNEL" the ports will be also updated from the fcd | 
|  - STRING | Name | 
|  | 
|  - STRING | Value | 
| port value as string | 
|  - VOID | Return | 
|   | Master_Init | 
| Initialise the Master | 
|  - VOID | Return | 
|   | Master_Start | 
| Output a Master Start sequence | 
|  - VOID | Return | 
|   | Master_TxByte | 
| Send a data byte | 
|  - BYTE | Data | 
|  | 
|  - BYTE | Return | 
|   | Master_Restart | 
| Output a Master Restart sequence | 
|  - VOID | Return | 
|   | Master_RxByte | 
| Returns a received data byte. Set Last=0 if there is following more Master_RxByte macros Set Last=1 if this is the last Master_RxByte and it is followed with Master_Stop. If Last = 1 the I2C bus will be presented with a 'Nack' condition. | 
|  - BYTE | Last | 
| Range: 0-1 - 0 = Not the last byte to receive, 1 = last byte to receive | 
|  - BYTE | Return | 
|   | GetList | 
| returns Named property List as filter string | 
|  - STRING | Name | 
|  | 
|  - STRING | Return | 
Property reference
|   | Properties | 
|   | Channel | 
| Channel selection | 
|   | SDA | 
| Pin used for SDA (data signal) | 
|   | SCL | 
| Pin used for SCL (clock signal) | 
|   | Baud Select | 
| Baud rate option selector | 
|   | Baud Rate | 
| Baud rate to be used | 
|   | Slew Rate Control | 
| Slew Rate Control Enabled or Disabled | 
|   | SMBus Inputs | 
| When Enabled input logic thresholds are compliant with SMBus specification | 
|   | 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. | 
|   | Simulation | 
|   | Scope Traces | 
| Selects if the scope traces are automatically generated or not | 
|   | Console Data | 
| Selects if the console data is automatically generated or not | 
==Macro reference==
|   | Slave_Uninit | 
| Uninitialise the Slave | 
|  - VOID | Return | 
|   | GetValue | 
| Get the Named property value. | 
|  - STRING | Name | 
|  | 
|  - STRING | Return | 
|   | Master_Stop | 
| Output a Master Stop | 
|  - VOID | Return | 
|   | Slave_Init | 
| Initialise the Slave with the given Address, or range of Addresses. Only address bits that have a corresponding bit set in the Mask will be compared with the incoming bus address. | 
|  - BYTE | Address | 
| 7 Bit Address of this device (Bit 0 is ignored) | 
|  - BYTE | Mask | 
| Bit mask used to compare addresses | 
|  - VOID | Return | 
|   | Master_Uninit | 
| Uninitialise the Master | 
|  - VOID | Return | 
|   | Slave_Status | 
| Returns the Slave Status. Bit 0 = 1 Indicates address/data byte available in the buffer to read Bit 5 = 1 Indicates that the last byte received or transmitted was data (else address) | 
|  - BYTE | Return | 
|   | GetConsoleHandle | 
| Obtains the CAL console handle | 
|  - HANDLE | Return | 
|   | Slave_TxByte | 
| Send a data byte, returns Ack/Nak from Master 0=Ack=More, 1=Nak=Last | 
|  - BYTE | Data | 
|  | 
|  - BYTE | Return | 
|   | Slave_RxByte | 
| Returns the data received, and sends either Ack or Nak Set parameter Last as: 1=Last=Nak, 0=Ack=More | 
|  - BYTE | Last | 
| Sends Ack if 0, else Nak | 
|  - BYTE | Return | 
|   | SetValue | 
| Change Named property to new Value.  If "CHANNEL" the ports will be also updated from the fcd | 
|  - STRING | Name | 
|  | 
|  - STRING | Value | 
| port value as string | 
|  - VOID | Return | 
|   | Master_Init | 
| Initialise the Master | 
|  - VOID | Return | 
|   | Master_Start | 
| Output a Master Start sequence | 
|  - VOID | Return | 
|   | Master_TxByte | 
| Send a data byte | 
|  - BYTE | Data | 
|  | 
|  - BYTE | Return | 
|   | Master_Restart | 
| Output a Master Restart sequence | 
|  - VOID | Return | 
|   | Master_RxByte | 
| Returns a received data byte. Set Last=0 if there is following more Master_RxByte macros Set Last=1 if this is the last Master_RxByte and it is followed with Master_Stop. If Last = 1 the I2C bus will be presented with a 'Nack' condition. | 
|  - BYTE | Last | 
| Range: 0-1 - 0 = Not the last byte to receive, 1 = last byte to receive | 
|  - BYTE | Return | 
|   | GetList | 
| returns Named property List as filter string | 
|  - STRING | Name | 
|  | 
|  - STRING | Return | 
Property reference
|   | Properties | 
|   | Channel | 
| Channel selection | 
|   | SDA | 
| Pin used for SDA (data signal) | 
|   | SCL | 
| Pin used for SCL (clock signal) | 
|   | Baud Select | 
| Baud rate option selector | 
|   | Baud Rate | 
| Baud rate to be used | 
|   | Slew Rate Control | 
| Slew Rate Control Enabled or Disabled | 
|   | SMBus Inputs | 
| When Enabled input logic thresholds are compliant with SMBus specification | 
|   | 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. | 
|   | Simulation | 
|   | Scope Traces | 
| Selects if the scope traces are automatically generated or not | 
|   | Console Data | 
| Selects if the console data is automatically generated or not |