Difference between revisions of "Component: I2C (CAL) (Misc)"
From Flowcode Help
Jump to navigationJump to search(2 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
==I2C component== | ==I2C component== | ||
CAL = Code Abstraction Layer - Allows one code base to run on a wide range of chips. A low level implementation giving direct access to the Two Wire I²C peripheral. | CAL = Code Abstraction Layer - Allows one code base to run on a wide range of chips. A low level implementation giving direct access to the Two Wire I²C peripheral. | ||
+ | |||
+ | ==Component Pack== | ||
+ | |||
+ | FREE | ||
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 24: | Line 34: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 160: | Line 176: | ||
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] - | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-h32-icon.png]] - HANDLE |
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
Line 385: | Line 401: | ||
|- | |- | ||
| colspan="2" | Allows the component to be easily disabled from generating code, allowing for multiple CAL components to be easily created. For example a sensor IC with both I2C and SPI communications interfaces. | | colspan="2" | Allows the component to be easily disabled from generating code, allowing for multiple CAL components to be easily created. For example a sensor IC with both I2C and SPI communications interfaces. | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Channel | ||
+ | |- | ||
+ | | colspan="2" | Channel selection | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Mode | ||
+ | |- | ||
+ | | colspan="2" | Defines if the component will be used for Master or Slave communications. Master mode supports a software bitbanged I2C channel. Slave mode requires a hardware I2C peripheral to catch the communications from the Master. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | SDA | ||
+ | |- | ||
+ | | colspan="2" | Pin used for SDA (data signal) | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | ||
+ | | width="90%" | SCL | ||
+ | |- | ||
+ | | colspan="2" | Pin used for SCL (clock signal) | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Options | ||
+ | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]] | ||
Line 411: | Line 455: | ||
| colspan="2" | When Enabled input logic thresholds are compliant with SMBus specification | | colspan="2" | When Enabled input logic thresholds are compliant with SMBus specification | ||
|- | |- | ||
− | | width="10%" align="center" style="background-color:# | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
− | | width="90%" style="background-color:# | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
|- | |- |
Latest revision as of 17:27, 9 November 2022
Author | Matrix TSL |
Version | 2.0 |
Category | Misc |
Contents
I2C component
CAL = Code Abstraction Layer - Allows one code base to run on a wide range of chips. A low level implementation giving direct access to the Two Wire I²C peripheral.
Component Pack
FREE
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.
Downloadable macro reference
![]() |
Slave_Uninit |
Uninitialise the Slave | |
![]() |
Return |
![]() |
GetValue |
Get the Named property value. | |
![]() |
Name |
![]() |
Return |
![]() |
Master_Stop |
Output a Master Stop | |
![]() |
Return |
![]() |
Master_Uninit |
Uninitialise the Master | |
![]() |
Return |
![]() |
GetConsoleHandle |
Obtains the CAL console handle | |
![]() |
Return |
![]() |
Slave_TxByte |
Send a data byte, returns Ack/Nak from Master 0=Ack=More, 1=Nak=Last | |
![]() |
Data |
![]() |
Return |
![]() |
Transaction_Uninit |
Uninitialise the I2C interface | |
![]() |
Return |
![]() |
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 |
![]() |
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 |
![]() |
Master_Init |
Initialise the Master | |
![]() |
Return |
![]() |
Master_Start |
Output a Master Start sequence | |
![]() |
Return |
![]() |
Master_Restart |
Output a Master Restart sequence | |
![]() |
Return |
![]() |
GetList |
returns Named property List as filter string | |
![]() |
Name |
![]() |
Return |