Component: I2C Free (Peripheral CAL): Difference between revisions
Appearance
No edit summary |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 93: | Line 93: | ||
===GetConsoleHandle=== | ===GetConsoleHandle=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetConsoleHandle''' | ||
|- | |- | ||
| colspan="2" | Obtains the CAL console handle | | colspan="2" | Obtains the CAL console handle | ||
| Line 107: | Line 107: | ||
===GetList=== | ===GetList=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetList''' | ||
|- | |- | ||
| colspan="2" | returns Named property List as filter string | | colspan="2" | returns Named property List as filter string | ||
| Line 126: | Line 126: | ||
===GetValue=== | ===GetValue=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''GetValue''' | ||
|- | |- | ||
| colspan="2" | Get the Named property value. | | colspan="2" | Get the Named property value. | ||
| Line 145: | Line 145: | ||
===Master_Init=== | ===Master_Init=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Master_Init''' | ||
|- | |- | ||
| colspan="2" | Initialise the Master | | colspan="2" | Initialise the Master | ||
| Line 159: | Line 159: | ||
===Master_Restart=== | ===Master_Restart=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Master_Restart''' | ||
|- | |- | ||
| colspan="2" | Output a Master Restart sequence | | colspan="2" | Output a Master Restart sequence | ||
| Line 173: | Line 173: | ||
===Master_RxByte=== | ===Master_RxByte=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Master_RxByte''' | ||
|- | |- | ||
| colspan="2" | 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. | | colspan="2" | 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. | ||
| Line 192: | Line 192: | ||
===Master_Start=== | ===Master_Start=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Master_Start''' | ||
|- | |- | ||
| colspan="2" | Output a Master Start sequence | | colspan="2" | Output a Master Start sequence | ||
| Line 206: | Line 206: | ||
===Master_Stop=== | ===Master_Stop=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Master_Stop''' | ||
|- | |- | ||
| colspan="2" | Output a Master Stop | | colspan="2" | Output a Master Stop | ||
| Line 220: | Line 220: | ||
===Master_TxByte=== | ===Master_TxByte=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Master_TxByte''' | ||
|- | |- | ||
| colspan="2" | Send a data byte | | colspan="2" | Send a data byte | ||
| Line 239: | Line 239: | ||
===Master_Uninit=== | ===Master_Uninit=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Master_Uninit''' | ||
|- | |- | ||
| colspan="2" | Uninitialise the Master | | colspan="2" | Uninitialise the Master | ||
| Line 253: | Line 253: | ||
===SetValue=== | ===SetValue=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetValue''' | ||
|- | |- | ||
| colspan="2" | Change Named property to new Value. If "CHANNEL" the ports will be also updated from the fcd | | colspan="2" | Change Named property to new Value. If "CHANNEL" the ports will be also updated from the fcd | ||
| Line 277: | Line 277: | ||
===Slave_Init=== | ===Slave_Init=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Slave_Init''' | ||
|- | |- | ||
| colspan="2" | 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. | | colspan="2" | 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. | ||
| Line 301: | Line 301: | ||
===Slave_RxByte=== | ===Slave_RxByte=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Slave_RxByte''' | ||
|- | |- | ||
| colspan="2" | Returns the data received, and sends either Ack or Nak Set parameter Last as: 1=Last=Nak, 0=Ack=More | | colspan="2" | Returns the data received, and sends either Ack or Nak Set parameter Last as: 1=Last=Nak, 0=Ack=More | ||
| Line 320: | Line 320: | ||
===Slave_Status=== | ===Slave_Status=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Slave_Status''' | ||
|- | |- | ||
| colspan="2" | 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) | | colspan="2" | 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) | ||
| Line 334: | Line 334: | ||
===Slave_TxByte=== | ===Slave_TxByte=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Slave_TxByte''' | ||
|- | |- | ||
| colspan="2" | Send a data byte, returns Ack/Nak from Master 0=Ack=More, 1=Nak=Last | | colspan="2" | Send a data byte, returns Ack/Nak from Master 0=Ack=More, 1=Nak=Last | ||
| Line 353: | Line 353: | ||
===Slave_Uninit=== | ===Slave_Uninit=== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Slave_Uninit''' | ||
|- | |- | ||
| colspan="2" | Uninitialise the Slave | | colspan="2" | Uninitialise the Slave | ||
| Line 368: | Line 368: | ||
==Property reference== | ==Property reference== | ||
{| class="wikitable | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| Line 414: | Line 414: | ||
| colspan="2" | 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. | | colspan="2" | 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. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Simulation | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| 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
GetConsoleHandle
| GetConsoleHandle | |
| Obtains the CAL console handle | |
| Return | |
GetList
| GetList | |
| returns Named property List as filter string | |
| Name | |
| Return | |
GetValue
| GetValue | |
| Get the Named property value. | |
| Name | |
| Return | |
Master_Init
| Master_Init | |
| Initialise the Master | |
| Return | |
Master_Restart
| Master_Restart | |
| Output a Master Restart sequence | |
| Return | |
Master_RxByte
Master_Start
| Master_Start | |
| Output a Master Start sequence | |
| Return | |
Master_Stop
| Master_Stop | |
| Output a Master Stop | |
| Return | |
Master_TxByte
| Master_TxByte | |
| Send a data byte | |
| Data | |
| Return | |
Master_Uninit
| Master_Uninit | |
| Uninitialise the Master | |
| Return | |
SetValue
| SetValue | |
| Change Named property to new Value. If "CHANNEL" the ports will be also updated from the fcd | |
| Name | |
| Value | |
| port value as string | |
| Return | |
Slave_Init
Slave_RxByte
| Slave_RxByte | |
| Returns the data received, and sends either Ack or Nak Set parameter Last as: 1=Last=Nak, 0=Ack=More | |
| Last | |
| Sends Ack if 0, else Nak | |
| Return | |
Slave_Status
Slave_TxByte
| Slave_TxByte | |
| Send a data byte, returns Ack/Nak from Master 0=Ack=More, 1=Nak=Last | |
| Data | |
| Return | |
Slave_Uninit
| Slave_Uninit | |
| Uninitialise the Slave | |
| Return | |