Difference between revisions of "Component: SPI (CAL) (Misc)"
From Flowcode Help
Jump to navigationJump to searchLine 15: | Line 15: | ||
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 Serial Peripheral Interface 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 Serial Peripheral Interface peripheral. | ||
− | ==Component | + | ==Component Source Code== |
− | + | Please click here for the component source code: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_SPI.fcfx FC_Comp_Source_SPI.fcfx] | |
==Detailed description== | ==Detailed description== | ||
+ | |||
+ | |||
Line 32: | Line 34: | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
Line 331: | Line 335: | ||
| colspan="2" | A global flag to enable or disable the SPI component from producing code. Useful for generating components with multiple communications options. | | colspan="2" | A global flag to enable or disable the SPI component from producing code. Useful for generating components with multiple communications options. | ||
|- | |- | ||
− | + | | 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" style="background-color:# | ||
− | | width="90%" style="background-color:# | ||
|- | |- | ||
|- | |- | ||
Line 395: | Line 374: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
− | | 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;" | Options |
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Mode | ||
+ | |- | ||
+ | | colspan="2" | Configures the mode of the SPI component. Currently only Master mode is supported. | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Prescale | ||
+ | |- | ||
+ | | colspan="2" | Prescale option selector | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Clock Phase | ||
+ | |- | ||
+ | | colspan="2" | Clock Phase (data change edge) selection | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Clock Polarity | ||
+ | |- | ||
+ | | colspan="2" | Clock Polarity setting, inactive (idle) state | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
+ | | width="90%" | Sample Point | ||
+ | |- | ||
+ | | colspan="2" | Data bit read sample point | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
+ | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation | ||
|- | |- | ||
|- | |- |
Revision as of 17:50, 9 November 2022
Author | Matrix TSL |
Version | 2.1 |
Category | Misc |
Contents
SPI 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 Serial Peripheral Interface peripheral.
Component Source Code
Please click here for the component source code: FC_Comp_Source_SPI.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.
Downloadable macro reference
![]() |
Master_Enable_CS |
Outputs a low signal to the chip select pin to select the remote slave device. | |
![]() |
Return |
![]() |
Slave_Uninit |
Uninitialise the Slave | |
![]() |
Return |
![]() |
GetValue |
Reads Named property Value. | |
![]() |
Name |
![]() |
Return |
![]() |
Slave_Init |
Initialise the Slave | |
![]() |
Return |
![]() |
Master_Disable_CS |
Outputs a high signal to the chip select pin to deselect the remote slave device. | |
![]() |
Return |
![]() |
Master_Uninit |
Uninitialise the Master | |
![]() |
Return |
![]() |
Master_Byte |
Sends and receives a data byte | |
![]() |
DataOut |
![]() |
Return |
![]() |
GetConsoleHandle |
Returns a handle to the console used by this component | |
![]() |
Return |
![]() |
Slave_TxByte |
Sets the data to be transmitted to the SPI master. | |
![]() |
Data |
![]() |
Return |
![]() |
Slave_RxByte |
Returns the data received from the SPI Master | |
![]() |
Return |
![]() |
SetValue |
Change Named property to new Value. | |
![]() |
Name |
![]() |
Value |
![]() |
Return |
![]() |
SetPrescaler |
Sets the prescaler value for the clock divider chain | |
![]() |
Prescaler |
![]() |
Return |
![]() |
Master_Init |
Initialise the Master | |
![]() |
Return |
![]() |
GetList |
returns Named property list | |
![]() |
Name |
![]() |
Return |