|
|
| (13 intermediate revisions by 3 users not shown) |
| Line 17: |
Line 17: |
| ==Component Source Code== | | ==Component Source Code== |
|
| |
|
| Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_ESP32_API_Comp.fcfx FC_Comp_Source_ESP32_API_Comp.fcfx] | | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_ESP32_API_Comp.fcfx FC_Comp_Source_ESP32_API_Comp.fcfx] |
|
| |
|
| Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_ESP32_API_Comp.fcfx FC_Comp_Source_ESP32_API_Comp.fcfx] | | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_ESP32_API_Comp.fcfx FC_Comp_Source_ESP32_API_Comp.fcfx] |
|
| |
|
| ==Detailed description== | | ==Detailed description== |
| | |
| | |
| | |
| | |
|
| |
|
|
| |
|
| Line 67: |
Line 71: |
|
| |
|
| ==Examples== | | ==Examples== |
| | |
| | |
| | |
| | |
|
| |
|
|
| |
|
| Line 102: |
Line 110: |
| |4 | | |4 |
| |5 | | |5 |
| |6
| |
| |7
| |
| |8
| |
| |9
| |
| |10
| |
| |11
| |
| |12 | | |12 |
| |13 | | |13 |
| Line 136: |
Line 138: |
| |A4 | | |A4 |
| |A5 | | |A5 |
| |A6
| |
| |A7
| |
| |A8
| |
| |A9
| |
| |A10
| |
| |A11
| |
| |A12 | | |A12 |
| |A13 | | |A13 |
| Line 170: |
Line 166: |
| |4 | | |4 |
| |5 | | |5 |
| |6
| |
| |7
| |
| |8
| |
| |9
| |
| |10
| |
| |11
| |
| |12 | | |12 |
| |13 | | |13 |
| Line 233: |
Line 223: |
|
| |
|
| <span style="color:red">Please note that PWM channels are tied in pairs and so channel 0 and 1 use the same internal timer peripheral. They will always run at the same frequency and when enabling channel 1 channel 0 duty will be reset to 0% and visa versa.</span> | | <span style="color:red">Please note that PWM channels are tied in pairs and so channel 0 and 1 use the same internal timer peripheral. They will always run at the same frequency and when enabling channel 1 channel 0 duty will be reset to 0% and visa versa.</span> |
| | |
|
| |
|
| {| class="wikitable" | | {| class="wikitable" |
| Line 269: |
Line 260: |
| |A15 | | |A15 |
| |A14 | | |A14 |
| |A9 | | |A13 |
| |A10 | | |A12 |
| |A11 | | |A14 |
| |A6 | | |A23 |
| |A7 | | |A19 |
| |A8 | | |A18 |
| |A26 | | |A26 |
| |A25 | | |A25 |
| Line 298: |
Line 289: |
| |15 | | |15 |
| |14 | | |14 |
| |9 | | |13 |
| |10 | | |12 |
| |11 | | |14 |
| |6 | | |23 |
| |7 | | |19 |
| |8 | | |18 |
| |26 | | |26 |
| |25 | | |25 |
| Line 330: |
Line 321: |
| ==Macro reference== | | ==Macro reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===ADCSample10=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CInitialise''' | | | width="90%" class="mtx-class-macrohead" | '''ADCSample10''' |
| |- | | |- |
| | colspan="2" | Initialise the I2C module ready for communications | | | colspan="2" | Reads the voltage present on an Analog pin as an 12-bit value range 0-4095 |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Channel | | | width="90%" | ADCChannel |
| | |- |
| | | colspan="2" | Range: 0, 3-7 |
| | |- |
| | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT |
| | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| | |} |
| | |
| | |
| | ===ADCSample8=== |
| | {| class="mtx-class-macrotable wikitable" |
| | |- |
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | | width="90%" class="mtx-class-macrohead" | '''ADCSample8''' |
| | |- |
| | | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Baud | | | width="90%" | ADCChannel |
| |- | | |- |
| | colspan="2" | 0=100KHz, 1=400KHz, 2=1MHz | | | colspan="2" | Range: 0, 3-7 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===ADCSampleArray10=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleArray8''' | | | width="90%" class="mtx-class-macrohead" | '''ADCSampleArray10''' |
| |- | | |- |
| | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 Performs the selected number of samples with the selected time in microseconds in between samples and returns each sample in a single packet | | | colspan="2" | Reads the voltage present on an Analog pin as an 10-bit value range 0-1023 Performs the selected number of samples with the selected time in microseconds in between samples and returns each sample in a single packet |
| |- | | |- |
| |- | | |- |
| Line 376: |
Line 383: |
| | colspan="2" | Delay in us between each sample | | | colspan="2" | Delay in us between each sample |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" | Samples | | | width="90%" | Samples |
| |- | | |- |
| | colspan="2" | 8-bit samples returned from the function | | | colspan="2" | 10-bit samples returned from the function |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 386: |
Line 393: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===ADCSampleArray8=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPITransferTrans''' | | | width="90%" class="mtx-class-macrohead" | '''ADCSampleArray8''' |
| |- | | |- |
| | colspan="2" | Transfer an array of bytes using the SPI bus | | | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 Performs the selected number of samples with the selected time in microseconds in between samples and returns each sample in a single packet |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Channel | | | width="90%" | ADCChannel |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1 | | | colspan="2" | Range: 0, 3-7 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Count | | | width="90%" | SampleCount |
| |- | | |- |
| | colspan="2" | Number of bytes to send and receive | | | colspan="2" | Range: 1- 32 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" | DataOut | | | width="90%" | SampleDelay |
| |- | | |- |
| | colspan="2" | Outgoing data | | | colspan="2" | Delay in us between each sample |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | DataIn | | | width="90%" | Samples |
| |- | | |- |
| | colspan="2" | Incoming data | | | colspan="2" | 8-bit samples returned from the function |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 419: |
Line 427: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===ADCSampleAverage10=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireBusReset''' | | | width="90%" class="mtx-class-macrohead" | '''ADCSampleAverage10''' |
| |- | | |- |
| | colspan="2" | Issue a 'ping' on the bus. If there is at least one sensor on the bus then it will generate a presence pulse. Returns 0 if a presense pulse was detected Returns 1 no device was detected | | | colspan="2" | Reads the voltage present on an Analog pin as an 10-bit value range 0-1023. Performs the selected number of samples with the selected time in microseconds in between samples |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Channel | | | width="90%" | ADCChannel |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | colspan="2" | Range: 0, 3-7 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" | SampleCount |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOGetInputPin'''
| |
| |-
| |
| | colspan="2" | Sets the selected digital pin to an input and reads the input state.
| |
| |- | | |- |
| | | colspan="2" | Range: 1- 100 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Pin | | | width="90%" | SampleDelay |
| |- | | |- |
| | colspan="2" | Range: 0-29 | | | colspan="2" | Delay in us between each sample |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===ADCSampleAverage8=== |
| | {| class="mtx-class-macrotable wikitable" |
| | |- |
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | | width="90%" class="mtx-class-macrohead" | '''ADCSampleAverage8''' |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 Performs the selected number of samples with the selected time in microseconds in between samples |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTBaud'''
| |
| |- | | |- |
| | colspan="2" | Control the communications rate of the UART module
| |
| |- | | |- |
| | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | | width="90%" | ADCChannel |
| | |- |
| | | colspan="2" | Range: 0, 3-7 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Channel | | | width="90%" | SampleCount |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 | | | colspan="2" | Range: 1- 100 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Rate | | | width="90%" | SampleDelay |
| |- | | |- |
| | colspan="2" | 0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200 | | | colspan="2" | Delay in us between each sample |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===ADCSetPrechargeTime=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireInitialise''' | | | width="90%" class="mtx-class-macrohead" | '''ADCSetPrechargeTime''' |
| |- | | |- |
| | colspan="2" | Initialise the OneWire module ready for communications | | | colspan="2" | Specifies the precharge time for the ADC input readings in microseconds. The longer the time the more immune to noise the reading will be. |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Channel | | | width="90%" | ChargeTime |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | colspan="2" | Default 10 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 496: |
Line 504: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===ADCSetReferenceVoltage=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireMatchROM''' | | | width="90%" class="mtx-class-macrohead" | '''ADCSetReferenceVoltage''' |
| |- | | |- |
| | colspan="2" | Performs a reset followed by the MatchROM code and then the 8-bit ROM code. | | | colspan="2" | Specified the reference setting for ADC reads. |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Channel | | | width="90%" | RefType |
| | |- |
| | | colspan="2" | 0=AREF, 1=VCC, 3=Internal 1.1V |
| | |- |
| | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| | |} |
| | |
| | |
| | ===I2CInitialise=== |
| | {| class="mtx-class-macrotable wikitable" |
| | |- |
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | | width="90%" class="mtx-class-macrohead" | '''I2CInitialise''' |
| | |- |
| | | colspan="2" | Initialise the I2C module ready for communications |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | FamilyCode | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | SerialNumber | | | width="90%" | Baud |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | 0=100KHz, 1=400KHz, 2=1MHz |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 524: |
Line 547: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===I2CReceive=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSample8''' | | | width="90%" class="mtx-class-macrohead" | '''I2CReceive''' |
| |- | | |- |
| | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 | | | colspan="2" | Receive a byte using the I2C bus |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | ADCChannel | | | width="90%" | Channel |
| | |- |
| | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| | |- |
| | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| | | width="90%" | Last |
| |- | | |- |
| | colspan="2" | Range: 0, 3-7 | | | colspan="2" | Last byte to receive: Range 0-1 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| Line 542: |
Line 571: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===I2CRestart=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransReceive''' | | | width="90%" class="mtx-class-macrohead" | '''I2CRestart''' |
| |- | | |- |
| | colspan="2" | Receives an I2C Transaction on the selected I2C channel. Returns the number of bytes received. | | | colspan="2" | Put the I2C Module into Restart mode |
| |- | | |- |
| |- | | |- |
| Line 555: |
Line 585: |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" | Data
| |
| |-
| |
| | colspan="2" | Data variable to receive into
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Count
| |
| |-
| |
| | colspan="2" | Number of bytes to receive
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===I2CSend=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTInitialise''' | | | width="90%" class="mtx-class-macrohead" | '''I2CSend''' |
| |- | | |- |
| | colspan="2" | Initialise the UART module ready for communications | | | colspan="2" | Transmit a byte using the I2C bus |
| |- | | |- |
| |- | | |- |
| Line 581: |
Line 602: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 | | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" | DataOut |
| | |- |
| | | colspan="2" | |
| | |- |
| | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL |
| | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===I2CStart=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTCheckRX''' | | | width="90%" class="mtx-class-macrohead" | '''I2CStart''' |
| |- | | |- |
| | colspan="2" | Check to see if the UART module has received any data | | | colspan="2" | Put the I2C Module into Start mode |
| |- | | |- |
| |- | | |- |
| Line 599: |
Line 626: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 | | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===I2CStop=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSetPrechargeTime''' | | | width="90%" class="mtx-class-macrohead" | '''I2CStop''' |
| |- | | |- |
| | colspan="2" | Specifies the precharge time for the ADC input readings in microseconds. The longer the time the more immune to noise the reading will be. | | | colspan="2" | Put the I2C Module into Stop mode |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | ChargeTime | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Default 10 | | | colspan="2" | |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 624: |
Line 652: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===I2CTransInit=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireTransmitByte''' | | | width="90%" class="mtx-class-macrohead" | '''I2CTransInit''' |
| |- | | |- |
| | colspan="2" | Transmit a byte to the one wire bus a bit at a time | | | colspan="2" | Initialises the I2C Transaction mode with the 7-bit device address |
| |- | | |- |
| |- | | |- |
| Line 638: |
Line 667: |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Data | | | width="90%" | DeviceAddress |
| | |- |
| | | colspan="2" | 7-bit Device Address |
| | |- |
| | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | | width="90%" | Baud |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | 0=100KHz, 1=400KHz, 2=1MHz |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 647: |
Line 681: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===I2CTransReceive=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CRestart''' | | | width="90%" class="mtx-class-macrohead" | '''I2CTransReceive''' |
| |- | | |- |
| | colspan="2" | Put the I2C Module into Restart mode | | | colspan="2" | Receives an I2C Transaction on the selected I2C channel. Returns the number of bytes received. |
| |- | | |- |
| |- | | |- |
| Line 660: |
Line 695: |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | | width="90%" | Data |
| | |- |
| | | colspan="2" | Data variable to receive into |
| | |- |
| | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | | width="90%" | Count |
| | |- |
| | | colspan="2" | Number of bytes to receive |
| | |- |
| | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===I2CTransSend=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMDisable''' | | | width="90%" class="mtx-class-macrohead" | '''I2CTransSend''' |
| |- | | |- |
| | colspan="2" | Disable a PWM output | | | colspan="2" | Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent. |
| |- | | |- |
| |- | | |- |
| Line 676: |
Line 722: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Range: 0-11 | | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| | |- |
| | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | | width="90%" | Data |
| | |- |
| | | colspan="2" | Data to send |
| | |- |
| | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | | width="90%" | Count |
| | |- |
| | | colspan="2" | Number of bytes to send out, MS bit 0x8000 signifies no Stop if set |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===IOGetInputPin=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CStart''' | | | width="90%" class="mtx-class-macrohead" | '''IOGetInputPin''' |
| |- | | |- |
| | colspan="2" | Put the I2C Module into Start mode | | | colspan="2" | Sets the selected digital pin to an input and reads the input state. |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Channel | | | width="90%" | Pin |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | colspan="2" | Range: 0-29 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===IOSetOutputPin=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPITransfer''' | | | width="90%" class="mtx-class-macrohead" | '''IOSetOutputPin''' |
| |- | | |- |
| | colspan="2" | Transfer a byte using the SPI bus | | | colspan="2" | Sets the selected digital pin to an output and assigns the output state. |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Channel | | | width="90%" | Pin |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1 | | | colspan="2" | Range: 0-29 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| | width="90%" | DataOut | | | width="90%" | State |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | Range: 0-1 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Initialise=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CReceive''' | | | width="90%" class="mtx-class-macrohead" | '''Initialise''' |
| |- | | |- |
| | colspan="2" | Receive a byte using the I2C bus | | | colspan="2" | Initialise the comms to the Arduino board ready for commands to be sent. |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" | Channel | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| | |} |
| | |
| | |
| | ===OneWireBusReset=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | | width="90%" class="mtx-class-macrohead" | '''OneWireBusReset''' |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | | | colspan="2" | Issue a 'ping' on the bus. If there is at least one sensor on the bus then it will generate a presence pulse. Returns 0 if a presense pulse was detected Returns 1 no device was detected |
| | width="90%" | Last | | |- |
| | |- |
| | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | | width="90%" | Channel |
| | |- |
| | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| | |- |
| | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL |
| | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| | |} |
| | |
| | |
| | ===OneWireGetDeviceCount=== |
| | {| class="mtx-class-macrotable wikitable" |
| | |- |
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | | width="90%" class="mtx-class-macrohead" | '''OneWireGetDeviceCount''' |
| | |- |
| | | colspan="2" | Returns the number of devices found by the last ScanBus operation. |
| | |- |
| | |- |
| | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Last byte to receive: Range 0-1 | | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| Line 747: |
Line 834: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===OneWireGetIDByte=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireGetIDByte''' | | | width="90%" class="mtx-class-macrohead" | '''OneWireGetIDByte''' |
| |- | | |- |
| | colspan="2" | Returns a single byte of the 64-Bit lasered ROM code, 255 on error | | | colspan="2" | Returns a single byte of the 64-Bit lasered ROM code, 255 on error |
| Line 775: |
Line 863: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===OneWireInitialise=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMSetFrequency''' | | | width="90%" class="mtx-class-macrohead" | '''OneWireInitialise''' |
| |- | | |- |
| | colspan="2" | Sets PWM frequency in Hz | | | colspan="2" | Initialise the OneWire module ready for communications |
| |- | | |- |
| |- | | |- |
| Line 786: |
Line 875: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Range: 0 - 11 | | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" | Frequency
| |
| |-
| |
| | colspan="2" | Frequency (Hz)
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===OneWireMatchROM=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CStop''' | | | width="90%" class="mtx-class-macrohead" | '''OneWireMatchROM''' |
| |- | | |- |
| | colspan="2" | Put the I2C Module into Stop mode | | | colspan="2" | Performs a reset followed by the MatchROM code and then the 8-bit ROM code. |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Channel | | | width="90%" | Channel |
| | |- |
| | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| | |- |
| | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | | width="90%" | FamilyCode |
| | |- |
| | | colspan="2" | |
| | |- |
| | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | | width="90%" | SerialNumber |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | |
| Line 816: |
Line 911: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===OneWireReceiveByte=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSetReferenceVoltage''' | | | width="90%" class="mtx-class-macrohead" | '''OneWireReceiveByte''' |
| |- | | |- |
| | colspan="2" | Specified the reference setting for ADC reads. | | | colspan="2" | Receives a byte from the one wire bus a bit at a time |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | RefType | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | 0=AREF, 1=VCC, 3=Internal 1.1V | | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===OneWireScanBus=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireSkipROM''' | | | width="90%" class="mtx-class-macrohead" | '''OneWireScanBus''' |
| |- | | |- |
| | colspan="2" | Performs a bus reset and the sends the SkipROM command byte | | | colspan="2" | Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. |
| |- | | |- |
| |- | | |- |
| Line 847: |
Line 944: |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===OneWireSkipROM=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPIPrescaler''' | | | width="90%" class="mtx-class-macrohead" | '''OneWireSkipROM''' |
| |- | | |- |
| | colspan="2" | Modify the speed of the SPI bus | | | colspan="2" | Performs a bus reset and the sends the SkipROM command byte |
| |- | | |- |
| |- | | |- |
| Line 863: |
Line 961: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1 | | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Prescaler
| |
| |-
| |
| | colspan="2" | Range: 0-2
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 875: |
Line 968: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===OneWireTransmitByte=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMSetDuty''' | | | width="90%" class="mtx-class-macrohead" | '''OneWireTransmitByte''' |
| |- | | |- |
| | colspan="2" | Sets the duty for the PWM output | | | colspan="2" | Transmit a byte to the one wire bus a bit at a time |
| |- | | |- |
| |- | | |- |
| Line 886: |
Line 980: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Range: 0-11 | | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Duty | | | width="90%" | Data |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | |
| Line 898: |
Line 992: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===PWMDisable=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSample10''' | | | width="90%" class="mtx-class-macrohead" | '''PWMDisable''' |
| |- | | |- |
| | colspan="2" | Reads the voltage present on an Analog pin as an 12-bit value range 0-4095 | | | colspan="2" | Disable a PWM output |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | ADCChannel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Range: 0, 3-7 | | | colspan="2" | Range: 0-11 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===PWMEnable=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransSend''' | | | width="90%" class="mtx-class-macrohead" | '''PWMEnable''' |
| |- | | |- |
| | colspan="2" | Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent. | | | colspan="2" | Enable a PWM output |
| |- | | |- |
| |- | | |- |
| Line 927: |
Line 1,023: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | colspan="2" | Range: 0-11 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" | Data
| | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |-
| |
| | colspan="2" | Data to send
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Count
| |
| |-
| |
| | colspan="2" | Number of bytes to send out, MS bit 0x8000 signifies no Stop if set
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===PWMSetDuty=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransInit''' | | | width="90%" class="mtx-class-macrohead" | '''PWMSetDuty''' |
| |- | | |- |
| | colspan="2" | Initialises the I2C Transaction mode with the 7-bit device address | | | colspan="2" | Sets the duty for the PWM output |
| |- | | |- |
| |- | | |- |
| Line 955: |
Line 1,042: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | colspan="2" | Range: 0-11 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | DeviceAddress | | | width="90%" | Duty |
| |- | | |- |
| | colspan="2" | 7-bit Device Address | | | colspan="2" | |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Baud
| |
| |-
| |
| | colspan="2" | 0=100KHz, 1=400KHz, 2=1MHz
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 972: |
Line 1,054: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===PWMSetFrequency=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOSetOutputPin''' | | | width="90%" class="mtx-class-macrohead" | '''PWMSetFrequency''' |
| |- | | |- |
| | colspan="2" | Sets the selected digital pin to an output and assigns the output state. | | | colspan="2" | Sets PWM frequency in Hz |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Pin | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Range: 0-29 | | | colspan="2" | Range: 0 - 11 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | | | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG |
| | width="90%" | State | | | width="90%" | Frequency |
| |- | | |- |
| | colspan="2" | Range: 0-1 | | | colspan="2" | Frequency (Hz) |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| Line 995: |
Line 1,078: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===SPIInitialise=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTReceive''' | | | width="90%" class="mtx-class-macrohead" | '''SPIInitialise''' |
| |- | | |- |
| | colspan="2" | Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available. | | | colspan="2" | Initialsie the SPI module ready for communications |
| |- | | |- |
| |- | | |- |
| Line 1,006: |
Line 1,090: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 | | | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===SPIPrescaler=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleAverage10''' | | | width="90%" class="mtx-class-macrohead" | '''SPIPrescaler''' |
| |- | | |- |
| | colspan="2" | Reads the voltage present on an Analog pin as an 10-bit value range 0-1023. Performs the selected number of samples with the selected time in microseconds in between samples | | | colspan="2" | Modify the speed of the SPI bus |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | ADCChannel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Range: 0, 3-7 | | | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | SampleCount | | | width="90%" | Prescaler |
| |- | | |- |
| | colspan="2" | Range: 1- 100 | | | colspan="2" | Range: 0-2 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" | SampleDelay
| |
| |-
| |
| | colspan="2" | Delay in us between each sample
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===SPITransfer=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireScanBus''' | | | width="90%" class="mtx-class-macrohead" | '''SPITransfer''' |
| |- | | |- |
| | colspan="2" | Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found. | | | colspan="2" | Transfer a byte using the SPI bus |
| |- | | |- |
| |- | | |- |
| Line 1,052: |
Line 1,133: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1 |
| | |- |
| | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | | width="90%" | DataOut |
| | |- |
| | | colspan="2" | |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| Line 1,059: |
Line 1,145: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===SPITransferTrans=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPIInitialise''' | | | width="90%" class="mtx-class-macrohead" | '''SPITransferTrans''' |
| |- | | |- |
| | colspan="2" | Initialsie the SPI module ready for communications | | | colspan="2" | Transfer an array of bytes using the SPI bus |
| |- | | |- |
| |- | | |- |
| Line 1,072: |
Line 1,159: |
| | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1 | | | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" | Count |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | colspan="2" | Number of bytes to send and receive |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireReceiveByte'''
| |
| |- | | |- |
| | colspan="2" | Receives a byte from the one wire bus a bit at a time | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | | width="90%" | DataOut |
| |- | | |- |
| | | colspan="2" | Outgoing data |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Channel | | | width="90%" | DataIn |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | colspan="2" | Incoming data |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===UARTBaud=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CSend''' | | | width="90%" class="mtx-class-macrohead" | '''UARTBaud''' |
| |- | | |- |
| | colspan="2" | Transmit a byte using the I2C bus | | | colspan="2" | Control the communications rate of the UART module |
| |- | | |- |
| |- | | |- |
| Line 1,106: |
Line 1,191: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | DataOut | | | width="90%" | Rate |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | 0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===UARTCheckRX=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTSend''' | | | width="90%" class="mtx-class-macrohead" | '''UARTCheckRX''' |
| |- | | |- |
| | colspan="2" | Send a byte via the UART module | | | colspan="2" | Check to see if the UART module has received any data |
| |- | | |- |
| |- | | |- |
| Line 1,131: |
Line 1,217: |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 | | | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | Data
| |
| |-
| |
| | colspan="2" | Data Byte to send. Range: 0-255
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===UARTInitialise=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireGetDeviceCount''' | | | width="90%" class="mtx-class-macrohead" | '''UARTInitialise''' |
| |- | | |- |
| | colspan="2" | Returns the number of devices found by the last ScanBus operation. | | | colspan="2" | Initialise the UART module ready for communications |
| |- | | |- |
| |- | | |- |
| Line 1,152: |
Line 1,234: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | | | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===UARTReceive=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMEnable''' | | | width="90%" class="mtx-class-macrohead" | '''UARTReceive''' |
| |- | | |- |
| | colspan="2" | Enable a PWM output | | | colspan="2" | Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available. |
| |- | | |- |
| |- | | |- |
| Line 1,170: |
Line 1,253: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Range: 0-11 | | | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===UARTSend=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleArray10''' | | | width="90%" class="mtx-class-macrohead" | '''UARTSend''' |
| |- | | |- |
| | colspan="2" | Reads the voltage present on an Analog pin as an 10-bit value range 0-1023 Performs the selected number of samples with the selected time in microseconds in between samples and returns each sample in a single packet | | | colspan="2" | Send a byte via the UART module |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | ADCChannel | | | width="90%" | Channel |
| |- | | |- |
| | colspan="2" | Range: 0, 3-7 | | | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1 |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | SampleCount | | | width="90%" | Data |
| |- | | |- |
| | colspan="2" | Range: 1- 32 | | | colspan="2" | Data Byte to send. Range: 0-255 |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | SampleDelay
| |
| |-
| |
| | colspan="2" | Delay in us between each sample
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Samples
| |
| |-
| |
| | colspan="2" | 10-bit samples returned from the function
| |
| |- | | |- |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleAverage8'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 Performs the selected number of samples with the selected time in microseconds in between samples
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleCount
| |
| |-
| |
| | colspan="2" | Range: 1- 100
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleDelay
| |
| |-
| |
| | colspan="2" | Delay in us between each sample
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| |
| |-
| |
| | colspan="2" | Initialise the comms to the Arduino board ready for commands to be sent.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
|
| |
|
| |
| ==Property reference==
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connection
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
| |
| | width="90%" | ESP IP Address
| |
| |-
| |
| | colspan="2" | IP Address of the Raspbery Pi we want to control
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | ESP Port
| |
| |-
| |
| | colspan="2" | Port number we want to communicate on. Default 1234
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Network Interface
| |
| |-
| |
| | colspan="2" | Some computers may have several network interfaces such as ethernet ports and wifi access. Select the correct network interface for the network you wish to connect to. Use the IP address to confirm you are connected to the right network.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
| |
| | width="90%" | IP Address
| |
| |-
| |
| | colspan="2" | IP Address of the selected network interface.
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | API Peripherals
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Digital IO
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Analog Input
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Analog Output
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | PWM Output
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | I2C Bus
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | SPI Bus
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | UART
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | OneWire
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | SERVO
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Console
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
| | width="90%" | Console Log
| |
| |-
| |
| | colspan="2" | Create an automatic console log of the commands sent to the ESP
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Log Mode
| |
| |-
| |
| | colspan="2" | Controls how the console data is formatted. Fixed statistics gives an easy to read overview of the IO, Analog and PWM functionality Command Log gives a more in depth analysis of the outgoing commands and incoming returns ASCII mode allows serial data to be shown in raw text form, other commands are shown as in the Command Log mode
| |
| |}==Macro reference==
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CInitialise'''
| |
| |-
| |
| | colspan="2" | Initialise the I2C module ready for communications
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Baud
| |
| |-
| |
| | colspan="2" | 0=100KHz, 1=400KHz, 2=1MHz
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleArray8'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 Performs the selected number of samples with the selected time in microseconds in between samples and returns each sample in a single packet
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleCount
| |
| |-
| |
| | colspan="2" | Range: 1- 32
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | SampleDelay
| |
| |-
| |
| | colspan="2" | Delay in us between each sample
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Samples
| |
| |-
| |
| | colspan="2" | 8-bit samples returned from the function
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPITransferTrans'''
| |
| |-
| |
| | colspan="2" | Transfer an array of bytes using the SPI bus
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Count
| |
| |-
| |
| | colspan="2" | Number of bytes to send and receive
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DataOut
| |
| |-
| |
| | colspan="2" | Outgoing data
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DataIn
| |
| |-
| |
| | colspan="2" | Incoming data
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireBusReset'''
| |
| |-
| |
| | colspan="2" | Issue a 'ping' on the bus. If there is at least one sensor on the bus then it will generate a presence pulse. Returns 0 if a presense pulse was detected Returns 1 no device was detected
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOGetInputPin'''
| |
| |-
| |
| | colspan="2" | Sets the selected digital pin to an input and reads the input state.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Pin
| |
| |-
| |
| | colspan="2" | Range: 0-29
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTBaud'''
| |
| |-
| |
| | colspan="2" | Control the communications rate of the UART module
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Rate
| |
| |-
| |
| | colspan="2" | 0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireInitialise'''
| |
| |-
| |
| | colspan="2" | Initialise the OneWire module ready for communications
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireMatchROM'''
| |
| |-
| |
| | colspan="2" | Performs a reset followed by the MatchROM code and then the 8-bit ROM code.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | FamilyCode
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SerialNumber
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSample8'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransReceive'''
| |
| |-
| |
| | colspan="2" | Receives an I2C Transaction on the selected I2C channel. Returns the number of bytes received.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Data
| |
| |-
| |
| | colspan="2" | Data variable to receive into
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Count
| |
| |-
| |
| | colspan="2" | Number of bytes to receive
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTInitialise'''
| |
| |-
| |
| | colspan="2" | Initialise the UART module ready for communications
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTCheckRX'''
| |
| |-
| |
| | colspan="2" | Check to see if the UART module has received any data
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSetPrechargeTime'''
| |
| |-
| |
| | colspan="2" | Specifies the precharge time for the ADC input readings in microseconds. The longer the time the more immune to noise the reading will be.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ChargeTime
| |
| |-
| |
| | colspan="2" | Default 10
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireTransmitByte'''
| |
| |-
| |
| | colspan="2" | Transmit a byte to the one wire bus a bit at a time
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Data
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CRestart'''
| |
| |-
| |
| | colspan="2" | Put the I2C Module into Restart mode
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMDisable'''
| |
| |-
| |
| | colspan="2" | Disable a PWM output
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Range: 0-11
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CStart'''
| |
| |-
| |
| | colspan="2" | Put the I2C Module into Start mode
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPITransfer'''
| |
| |-
| |
| | colspan="2" | Transfer a byte using the SPI bus
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DataOut
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CReceive'''
| |
| |-
| |
| | colspan="2" | Receive a byte using the I2C bus
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | Last
| |
| |-
| |
| | colspan="2" | Last byte to receive: Range 0-1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireGetIDByte'''
| |
| |-
| |
| | colspan="2" | Returns a single byte of the 64-Bit lasered ROM code, 255 on error
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Device
| |
| |-
| |
| | colspan="2" | Device ID - Range: 0 - NumDevices - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ByteIndex
| |
| |-
| |
| | colspan="2" | Index of the data byte. 0=FamilyCode, 1-6=Serial, 7=CRC
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMSetFrequency'''
| |
| |-
| |
| | colspan="2" | Sets PWM frequency in Hz
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Range: 0 - 11
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | Frequency
| |
| |-
| |
| | colspan="2" | Frequency (Hz)
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CStop'''
| |
| |-
| |
| | colspan="2" | Put the I2C Module into Stop mode
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSetReferenceVoltage'''
| |
| |-
| |
| | colspan="2" | Specified the reference setting for ADC reads.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | RefType
| |
| |-
| |
| | colspan="2" | 0=AREF, 1=VCC, 3=Internal 1.1V
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireSkipROM'''
| |
| |-
| |
| | colspan="2" | Performs a bus reset and the sends the SkipROM command byte
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPIPrescaler'''
| |
| |-
| |
| | colspan="2" | Modify the speed of the SPI bus
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Prescaler
| |
| |-
| |
| | colspan="2" | Range: 0-2
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMSetDuty'''
| |
| |-
| |
| | colspan="2" | Sets the duty for the PWM output
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Range: 0-11
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Duty
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSample10'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 12-bit value range 0-4095
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransSend'''
| |
| |-
| |
| | colspan="2" | Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Data
| |
| |-
| |
| | colspan="2" | Data to send
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Count
| |
| |-
| |
| | colspan="2" | Number of bytes to send out, MS bit 0x8000 signifies no Stop if set
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransInit'''
| |
| |-
| |
| | colspan="2" | Initialises the I2C Transaction mode with the 7-bit device address
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DeviceAddress
| |
| |-
| |
| | colspan="2" | 7-bit Device Address
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Baud
| |
| |-
| |
| | colspan="2" | 0=100KHz, 1=400KHz, 2=1MHz
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOSetOutputPin'''
| |
| |-
| |
| | colspan="2" | Sets the selected digital pin to an output and assigns the output state.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Pin
| |
| |-
| |
| | colspan="2" | Range: 0-29
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | State
| |
| |-
| |
| | colspan="2" | Range: 0-1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTReceive'''
| |
| |-
| |
| | colspan="2" | Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleAverage10'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 10-bit value range 0-1023. Performs the selected number of samples with the selected time in microseconds in between samples
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleCount
| |
| |-
| |
| | colspan="2" | Range: 1- 100
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleDelay
| |
| |-
| |
| | colspan="2" | Delay in us between each sample
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireScanBus'''
| |
| |-
| |
| | colspan="2" | Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPIInitialise'''
| |
| |-
| |
| | colspan="2" | Initialsie the SPI module ready for communications
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireReceiveByte'''
| |
| |-
| |
| | colspan="2" | Receives a byte from the one wire bus a bit at a time
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CSend'''
| |
| |-
| |
| | colspan="2" | Transmit a byte using the I2C bus
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DataOut
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTSend'''
| |
| |-
| |
| | colspan="2" | Send a byte via the UART module
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Data
| |
| |-
| |
| | colspan="2" | Data Byte to send. Range: 0-255
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireGetDeviceCount'''
| |
| |-
| |
| | colspan="2" | Returns the number of devices found by the last ScanBus operation.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMEnable'''
| |
| |-
| |
| | colspan="2" | Enable a PWM output
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Range: 0-11
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleArray10'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 10-bit value range 0-1023 Performs the selected number of samples with the selected time in microseconds in between samples and returns each sample in a single packet
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleCount
| |
| |-
| |
| | colspan="2" | Range: 1- 32
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | SampleDelay
| |
| |-
| |
| | colspan="2" | Delay in us between each sample
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Samples
| |
| |-
| |
| | colspan="2" | 10-bit samples returned from the function
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleAverage8'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 Performs the selected number of samples with the selected time in microseconds in between samples
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleCount
| |
| |-
| |
| | colspan="2" | Range: 1- 100
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleDelay
| |
| |-
| |
| | colspan="2" | Delay in us between each sample
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| |
| |-
| |
| | colspan="2" | Initialise the comms to the Arduino board ready for commands to be sent.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
|
| |
|
| |
| ==Property reference==
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connection
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
| |
| | width="90%" | ESP IP Address
| |
| |-
| |
| | colspan="2" | IP Address of the Raspbery Pi we want to control
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | ESP Port
| |
| |-
| |
| | colspan="2" | Port number we want to communicate on. Default 1234
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Network Interface
| |
| |-
| |
| | colspan="2" | Some computers may have several network interfaces such as ethernet ports and wifi access. Select the correct network interface for the network you wish to connect to. Use the IP address to confirm you are connected to the right network.
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
| |
| | width="90%" | IP Address
| |
| |-
| |
| | colspan="2" | IP Address of the selected network interface.
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | API Peripherals
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Digital IO
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Analog Input
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | Analog Output
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | PWM Output
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | I2C Bus
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | SPI Bus
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | UART
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | OneWire
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| |
| | width="90%" | SERVO
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Console
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
| | width="90%" | Console Log
| |
| |-
| |
| | colspan="2" | Create an automatic console log of the commands sent to the ESP
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Log Mode
| |
| |-
| |
| | colspan="2" | Controls how the console data is formatted. Fixed statistics gives an easy to read overview of the IO, Analog and PWM functionality Command Log gives a more in depth analysis of the outgoing commands and incoming returns ASCII mode allows serial data to be shown in raw text form, other commands are shown as in the Command Log mode
| |
| |}==Macro reference==
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CInitialise'''
| |
| |-
| |
| | colspan="2" | Initialise the I2C module ready for communications
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Baud
| |
| |-
| |
| | colspan="2" | 0=100KHz, 1=400KHz, 2=1MHz
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleArray8'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 Performs the selected number of samples with the selected time in microseconds in between samples and returns each sample in a single packet
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleCount
| |
| |-
| |
| | colspan="2" | Range: 1- 32
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | SampleDelay
| |
| |-
| |
| | colspan="2" | Delay in us between each sample
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Samples
| |
| |-
| |
| | colspan="2" | 8-bit samples returned from the function
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPITransferTrans'''
| |
| |-
| |
| | colspan="2" | Transfer an array of bytes using the SPI bus
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Count
| |
| |-
| |
| | colspan="2" | Number of bytes to send and receive
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DataOut
| |
| |-
| |
| | colspan="2" | Outgoing data
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DataIn
| |
| |-
| |
| | colspan="2" | Incoming data
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireBusReset'''
| |
| |-
| |
| | colspan="2" | Issue a 'ping' on the bus. If there is at least one sensor on the bus then it will generate a presence pulse. Returns 0 if a presense pulse was detected Returns 1 no device was detected
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOGetInputPin'''
| |
| |-
| |
| | colspan="2" | Sets the selected digital pin to an input and reads the input state.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Pin
| |
| |-
| |
| | colspan="2" | Range: 0-29
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTBaud'''
| |
| |-
| |
| | colspan="2" | Control the communications rate of the UART module
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Rate
| |
| |-
| |
| | colspan="2" | 0=1200, 1=2400, 2=4800, 3=9600, 4=19200, 5=38400, 6=57600, 7=115200
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireInitialise'''
| |
| |-
| |
| | colspan="2" | Initialise the OneWire module ready for communications
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireMatchROM'''
| |
| |-
| |
| | colspan="2" | Performs a reset followed by the MatchROM code and then the 8-bit ROM code.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | FamilyCode
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SerialNumber
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSample8'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransReceive'''
| |
| |-
| |
| | colspan="2" | Receives an I2C Transaction on the selected I2C channel. Returns the number of bytes received.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Data
| |
| |-
| |
| | colspan="2" | Data variable to receive into
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Count
| |
| |-
| |
| | colspan="2" | Number of bytes to receive
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTInitialise'''
| |
| |-
| |
| | colspan="2" | Initialise the UART module ready for communications
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTCheckRX'''
| |
| |-
| |
| | colspan="2" | Check to see if the UART module has received any data
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSetPrechargeTime'''
| |
| |-
| |
| | colspan="2" | Specifies the precharge time for the ADC input readings in microseconds. The longer the time the more immune to noise the reading will be.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ChargeTime
| |
| |-
| |
| | colspan="2" | Default 10
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireTransmitByte'''
| |
| |-
| |
| | colspan="2" | Transmit a byte to the one wire bus a bit at a time
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Data
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CRestart'''
| |
| |-
| |
| | colspan="2" | Put the I2C Module into Restart mode
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMDisable'''
| |
| |-
| |
| | colspan="2" | Disable a PWM output
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Range: 0-11
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CStart'''
| |
| |-
| |
| | colspan="2" | Put the I2C Module into Start mode
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPITransfer'''
| |
| |-
| |
| | colspan="2" | Transfer a byte using the SPI bus
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DataOut
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CReceive'''
| |
| |-
| |
| | colspan="2" | Receive a byte using the I2C bus
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | Last
| |
| |-
| |
| | colspan="2" | Last byte to receive: Range 0-1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireGetIDByte'''
| |
| |-
| |
| | colspan="2" | Returns a single byte of the 64-Bit lasered ROM code, 255 on error
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Device
| |
| |-
| |
| | colspan="2" | Device ID - Range: 0 - NumDevices - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ByteIndex
| |
| |-
| |
| | colspan="2" | Index of the data byte. 0=FamilyCode, 1-6=Serial, 7=CRC
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMSetFrequency'''
| |
| |-
| |
| | colspan="2" | Sets PWM frequency in Hz
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Range: 0 - 11
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
| |
| | width="90%" | Frequency
| |
| |-
| |
| | colspan="2" | Frequency (Hz)
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CStop'''
| |
| |-
| |
| | colspan="2" | Put the I2C Module into Stop mode
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSetReferenceVoltage'''
| |
| |-
| |
| | colspan="2" | Specified the reference setting for ADC reads.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | RefType
| |
| |-
| |
| | colspan="2" | 0=AREF, 1=VCC, 3=Internal 1.1V
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireSkipROM'''
| |
| |-
| |
| | colspan="2" | Performs a bus reset and the sends the SkipROM command byte
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPIPrescaler'''
| |
| |-
| |
| | colspan="2" | Modify the speed of the SPI bus
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Prescaler
| |
| |-
| |
| | colspan="2" | Range: 0-2
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMSetDuty'''
| |
| |-
| |
| | colspan="2" | Sets the duty for the PWM output
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Range: 0-11
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Duty
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSample10'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 12-bit value range 0-4095
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransSend'''
| |
| |-
| |
| | colspan="2" | Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Data
| |
| |-
| |
| | colspan="2" | Data to send
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Count
| |
| |-
| |
| | colspan="2" | Number of bytes to send out, MS bit 0x8000 signifies no Stop if set
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransInit'''
| |
| |-
| |
| | colspan="2" | Initialises the I2C Transaction mode with the 7-bit device address
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DeviceAddress
| |
| |-
| |
| | colspan="2" | 7-bit Device Address
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Baud
| |
| |-
| |
| | colspan="2" | 0=100KHz, 1=400KHz, 2=1MHz
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOSetOutputPin'''
| |
| |-
| |
| | colspan="2" | Sets the selected digital pin to an output and assigns the output state.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Pin
| |
| |-
| |
| | colspan="2" | Range: 0-29
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" | State
| |
| |-
| |
| | colspan="2" | Range: 0-1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTReceive'''
| |
| |-
| |
| | colspan="2" | Receives a data byte from the UART. Recommend calling the UARTCheckRx function first to ensure data is available.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleAverage10'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 10-bit value range 0-1023. Performs the selected number of samples with the selected time in microseconds in between samples
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleCount
| |
| |-
| |
| | colspan="2" | Range: 1- 100
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleDelay
| |
| |-
| |
| | colspan="2" | Delay in us between each sample
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireScanBus'''
| |
| |-
| |
| | colspan="2" | Scans the one wire bus to detect all connected devices. Returns the number of one wire devices found.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPIInitialise'''
| |
| |-
| |
| | colspan="2" | Initialsie the SPI module ready for communications
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireReceiveByte'''
| |
| |-
| |
| | colspan="2" | Receives a byte from the one wire bus a bit at a time
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CSend'''
| |
| |-
| |
| | colspan="2" | Transmit a byte using the I2C bus
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | DataOut
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTSend'''
| |
| |-
| |
| | colspan="2" | Send a byte via the UART module
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - UART Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Data
| |
| |-
| |
| | colspan="2" | Data Byte to send. Range: 0-255
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OneWireGetDeviceCount'''
| |
| |-
| |
| | colspan="2" | Returns the number of devices found by the last ScanBus operation.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMEnable'''
| |
| |-
| |
| | colspan="2" | Enable a PWM output
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Range: 0-11
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleArray10'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 10-bit value range 0-1023 Performs the selected number of samples with the selected time in microseconds in between samples and returns each sample in a single packet
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleCount
| |
| |-
| |
| | colspan="2" | Range: 1- 32
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | SampleDelay
| |
| |-
| |
| | colspan="2" | Delay in us between each sample
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
| | width="90%" | Samples
| |
| |-
| |
| | colspan="2" | 10-bit samples returned from the function
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleAverage8'''
| |
| |-
| |
| | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 Performs the selected number of samples with the selected time in microseconds in between samples
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | ADCChannel
| |
| |-
| |
| | colspan="2" | Range: 0, 3-7
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleCount
| |
| |-
| |
| | colspan="2" | Range: 1- 100
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | SampleDelay
| |
| |-
| |
| | colspan="2" | Delay in us between each sample
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| |
| |-
| |
| | colspan="2" | Initialise the comms to the Arduino board ready for commands to be sent.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
|
| |
|
|
| |
|
| ==Property reference== | | ==Property reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | | width="90%" class="mtx-class-macrohead" | '''Properties''' |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connection | | | width="90%" class="mtx-class-propfolder" | Connection |
| |- | | |- |
| |- | | |- |
| Line 3,323: |
Line 1,316: |
| | colspan="2" | IP Address of the selected network interface. | | | colspan="2" | IP Address of the selected network interface. |
| |- | | |- |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | API Peripherals | | | width="90%" class="mtx-class-propfolder" | API Peripherals |
| |- | | |- |
| |- | | |- |
| Line 3,372: |
Line 1,365: |
| | colspan="2" | | | | colspan="2" | |
| |- | | |- |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Console | | | width="90%" class="mtx-class-propfolder" | Console |
| |- | | |- |
| |- | | |- |