|
|
(5 intermediate revisions by the same user not shown) |
Line 22: |
Line 22: |
| | | |
| ==Detailed description== | | ==Detailed description== |
| + | |
| + | |
| + | |
| + | |
| | | |
| | | |
Line 70: |
Line 74: |
| | | |
| ==Examples== | | ==Examples== |
| + | |
| + | |
| + | |
| + | |
| | | |
| | | |
Line 366: |
Line 374: |
| |E4 | | |E4 |
| |} | | |} |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| | | |
| ==Macro reference== | | ==Macro reference== |
| | | |
| + | ===ADCSample12=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CInitialise''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSample12''' |
| |- | | |- |
− | | colspan="2" | Initialsie 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" | Channel Index: Range 0 - I2C Bus Count - 1 | + | | colspan="2" | Range: 0-31 ... Channels 16-23 unimplemented |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" | Baud | + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
− | |- | + | |} |
− | | colspan="2" | 0=100KHz, 1=400KHz, 2=1MHz | + | |
| + | |
| + | ===ADCSample8=== |
| + | {| 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-31 ... Channels 16-23 unimplemented |
| |- | | |- |
− | | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===ADCSampleArray10=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleArray8''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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 415: |
Line 449: |
| | 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 425: |
Line 459: |
| | | |
| | | |
| + | ===ADCSampleArray8=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPITransferTrans''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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-5 |
| |- | | |- |
− | | 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 458: |
Line 493: |
| | | |
| | | |
| + | ===ADCSampleAverage10=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOGetInputPin''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleAverage10''' |
| |- | | |- |
− | | colspan="2" | Sets the selected digital pin to an input and reads the input state. | + | | 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%" | Pin | + | | width="90%" | ADCChannel |
| + | |- |
| + | | colspan="2" | Range: 0-5 |
| |- | | |- |
− | | colspan="2" | Range: 0-47 ... Pin 34 unimplemented | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| + | | width="90%" | SampleCount |
| |- | | |- |
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-bool-icon.png]] - BOOL | + | | colspan="2" | Range: 1- 100 |
− | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | + | |- |
− | |} | + | | 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'' |
| + | |} |
| | | |
| | | |
| + | ===ADCSampleAverage8=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTBaud''' | + | | 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 |
| + | |- |
| |- | | |- |
− | | 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-5 |
| |- | | |- |
| | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===ADCSetPrechargeTime=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSample8''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSetPrechargeTime''' |
| |- | | |- |
− | | colspan="2" | Reads the voltage present on an Analog pin as an 8-bit value range 0-255 | + | | 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%" | ADCChannel | + | | width="90%" | ChargeTime |
| |- | | |- |
− | | colspan="2" | Range: 0-31 ... Channels 16-23 unimplemented | + | | colspan="2" | Default 10 |
| |- | | |- |
− | | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===ADCSetReferenceVoltage=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransReceive''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSetReferenceVoltage''' |
| |- | | |- |
− | | colspan="2" | Receives an I2C Transaction on the selected I2C channel. Returns the number of bytes received. | + | | 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" | Channel Index: Range 0 - I2C Bus Count - 1 | + | | colspan="2" | 0=AREF, 1=VCC, 3=Internal 1.1V |
| |- | | |- |
− | | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===I2CInitialise=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTCheckRX''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CInitialise''' |
| |- | | |- |
− | | colspan="2" | Check to see if the UART module has received any data | + | | colspan="2" | Initialsie the I2C module ready for communications |
| |- | | |- |
| |- | | |- |
Line 556: |
Line 601: |
| | 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" | [[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'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
| | | |
| | | |
| + | ===I2CReceive=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTInitialise''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CReceive''' |
| |- | | |- |
− | | colspan="2" | Initialise the UART module ready for communications | + | | colspan="2" | Receive a byte using the I2C bus |
| |- | | |- |
| |- | | |- |
Line 574: |
Line 625: |
| | 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" | [[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-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'' |
| |} | | |} |
| | | |
| | | |
| + | ===I2CRestart=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RegisterWrite''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CRestart''' |
| |- | | |- |
− | | colspan="2" | Writes to one of the registers on-board the device | + | | colspan="2" | Put the I2C Module into Restart mode |
| |- | | |- |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
− | | width="90%" | RegisterAddress | + | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | The address of the register | + | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
− | | width="90%" | Data
| |
− | |-
| |
− | | colspan="2" | The data value to assign to the register
| |
− | |-
| |
− | | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===I2CSend=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSetPrechargeTime''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CSend''' |
| + | |- |
| + | | colspan="2" | Transmit a byte using the I2C bus |
| + | |- |
| |- | | |- |
− | | 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%" | Channel |
| |- | | |- |
| + | | 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%" | ChargeTime | + | | width="90%" | DataOut |
| |- | | |- |
− | | 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-bool-icon.png]] - BOOL |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
| | | |
| | | |
| + | ===I2CStart=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RegisterRead''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CStart''' |
| |- | | |- |
− | | colspan="2" | Read one of the registers on-board the device | + | | colspan="2" | Put the I2C Module into Start mode |
| |- | | |- |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
− | | width="90%" | RegisterAddress | + | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | The address of the register | + | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 |
| |- | | |- |
− | | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===I2CStop=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CRestart''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CStop''' |
| |- | | |- |
− | | colspan="2" | Put the I2C Module into Restart mode | + | | colspan="2" | Put the I2C Module into Stop mode |
| |- | | |- |
| |- | | |- |
Line 651: |
Line 711: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | + | | 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 658: |
Line 718: |
| | | |
| | | |
| + | ===I2CTransInit=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMDisable''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransInit''' |
| |- | | |- |
− | | colspan="2" | Disable a PWM output | + | | colspan="2" | Initialises the I2C Transaction mode with the 7-bit device address |
| |- | | |- |
| |- | | |- |
Line 669: |
Line 730: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | Range: 0-15 | + | | 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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
Line 676: |
Line 747: |
| | | |
| | | |
| + | ===I2CTransReceive=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CStart''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransReceive''' |
| |- | | |- |
− | | colspan="2" | Put the I2C Module into Start mode | + | | colspan="2" | Receives an I2C Transaction on the selected I2C channel. Returns the number of bytes received. |
| |- | | |- |
| |- | | |- |
Line 689: |
Line 761: |
| | 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%" style="border-top: 2px solid #000;" | ''Return'' | + | | 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'' |
| + | |} |
| | | |
| | | |
| + | ===I2CTransSend=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPITransfer''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransSend''' |
| |- | | |- |
− | | colspan="2" | Transfer a byte using the SPI bus | + | | colspan="2" | Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent. |
| |- | | |- |
| |- | | |- |
Line 705: |
Line 788: |
| | 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="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
− | | width="90%" | DataOut | + | | width="90%" | Data |
| + | |- |
| + | | colspan="2" | Data to send |
| + | |- |
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
| + | | width="90%" | Count |
| |- | | |- |
− | | colspan="2" | | + | | 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-u8-icon.png]] - BYTE | + | | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===IOGetInputPin=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CReceive''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOGetInputPin''' |
| |- | | |- |
− | | colspan="2" | Receive a byte using the I2C bus | + | | 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-47 ... Pin 34 unimplemented |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[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'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
| | | |
| | | |
| + | ===IOSetOutputPin=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CStop''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOSetOutputPin''' |
| |- | | |- |
− | | colspan="2" | Put the I2C Module into Stop mode | + | | 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" | Range: 0-47 ... Pin 34 unimplemented |
| + | |- |
| + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL |
| + | | width="90%" | State |
| |- | | |- |
− | | colspan="2" | | + | | colspan="2" | Range: 0-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-void-icon.png]] - VOID |
Line 758: |
Line 848: |
| | | |
| | | |
| + | ===Initialise=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSetReferenceVoltage''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' |
| |- | | |- |
− | | colspan="2" | Specified the reference setting for ADC reads. | + | | 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="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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
Line 776: |
Line 862: |
| | | |
| | | |
| + | ===PWMDisable=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPIPrescaler''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMDisable''' |
| |- | | |- |
− | | colspan="2" | Modify the speed of the SPI bus | + | | colspan="2" | Disable a PWM output |
| |- | | |- |
| |- | | |- |
Line 787: |
Line 874: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | Channel Index: Range 0 - SPI Bus Count - 1
| + | | colspan="2" | Range: 0-15 |
− | |-
| |
− | | 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 799: |
Line 881: |
| | | |
| | | |
| + | ===PWMEnable=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSample12''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMEnable''' |
| |- | | |- |
− | | colspan="2" | Reads the voltage present on an Analog pin as an 12-bit value range 0-4095 | + | | colspan="2" | Enable 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-31 ... Channels 16-23 unimplemented | + | | colspan="2" | Range: 0-15 |
| |- | | |- |
− | | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===PWMSetDuty=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
Line 840: |
Line 924: |
| | | |
| | | |
| + | ===PWMSetPrescaler=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransSend''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMSetPrescaler''' |
| |- | | |- |
− | | colspan="2" | Sends an I2C Transaction on the selected I2C channel. Returns the number of bytes sent. | + | | colspan="2" | Sets the prescaler for the PWM output |
| |- | | |- |
| |- | | |- |
Line 851: |
Line 936: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | + | | colspan="2" | Range: 0-15 |
| |- | | |- |
| | 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%" | Prescaler |
| |- | | |- |
− | | colspan="2" | Data to send | + | | colspan="2" | |
| |- | | |- |
− | | 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%" | Period |
| |- | | |- |
− | | colspan="2" | Number of bytes to send out, MS bit 0x8000 signifies no Stop if set | + | | colspan="2" | Default 255 |
| |- | | |- |
− | | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===RegisterRead=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CTransInit''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RegisterRead''' |
| |- | | |- |
− | | colspan="2" | Initialises the I2C Transaction mode with the 7-bit device address | + | | colspan="2" | Read one of the registers on-board the device |
| |- | | |- |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" | Channel | + | | width="90%" | RegisterAddress |
| |- | | |- |
− | | colspan="2" | Channel Index: Range 0 - I2C Bus Count - 1 | + | | colspan="2" | The address of the register |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT |
− | | 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'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
| | | |
| | | |
| + | ===RegisterWrite=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''IOSetOutputPin''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RegisterWrite''' |
| |- | | |- |
− | | colspan="2" | Sets the selected digital pin to an output and assigns the output state. | + | | colspan="2" | Writes to one of the registers on-board the device |
| |- | | |- |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" | Pin | + | | width="90%" | RegisterAddress |
| |- | | |- |
− | | colspan="2" | Range: 0-47 ... Pin 34 unimplemented | + | | colspan="2" | The address of the register |
| |- | | |- |
− | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT |
− | | width="90%" | State | + | | width="90%" | Data |
| |- | | |- |
− | | colspan="2" | Range: 0-1 | + | | colspan="2" | The data value to assign to the register |
| |- | | |- |
| | 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 919: |
Line 996: |
| | | |
| | | |
| + | ===SPIInitialise=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTReceive''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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 930: |
Line 1,008: |
| | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===SPIPrescaler=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleAverage10''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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-5 | + | | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===SPITransfer=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPIInitialise''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPITransfer''' |
| |- | | |- |
− | | colspan="2" | Initialsie the SPI module ready for communications | + | | colspan="2" | Transfer a byte using the SPI bus |
| |- | | |- |
| |- | | |- |
Line 978: |
Line 1,053: |
| | 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-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'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
| | | |
| | | |
| + | ===SPITransferTrans=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2CSend''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SPITransferTrans''' |
| |- | | |- |
− | | colspan="2" | Transmit a byte using the I2C bus | + | | colspan="2" | Transfer an array of bytes using the SPI bus |
| |- | | |- |
| |- | | |- |
Line 994: |
Line 1,075: |
| | 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-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="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
| | width="90%" | DataOut | | | width="90%" | DataOut |
| |- | | |- |
− | | colspan="2" | | + | | colspan="2" | Outgoing data |
| |- | | |- |
− | | 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%" | 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'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
| | | |
| | | |
| + | ===UARTBaud=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTSend''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTBaud''' |
| |- | | |- |
− | | colspan="2" | Send a byte via the UART module | + | | colspan="2" | Control the communications rate of the UART module |
| |- | | |- |
| |- | | |- |
Line 1,020: |
Line 1,112: |
| |- | | |- |
| | 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%" | Rate |
| |- | | |- |
− | | colspan="2" | Data Byte to send. Range: 0-255 | + | | 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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
Line 1,029: |
Line 1,121: |
| | | |
| | | |
| + | ===UARTCheckRX=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMSetPrescaler''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTCheckRX''' |
| |- | | |- |
− | | colspan="2" | Sets the prescaler for the PWM output | + | | colspan="2" | Check to see if the UART module has received any data |
| |- | | |- |
| |- | | |- |
Line 1,040: |
Line 1,133: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | Range: 0-15 | + | | 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%" | Prescaler | + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| + | |} |
| + | |
| + | |
| + | ===UARTInitialise=== |
| + | {| 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 |
| |- | | |- |
− | | colspan="2" |
| |
| |- | | |- |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
− | | width="90%" | Period | + | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | Default 255 | + | | 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-void-icon.png]] - VOID |
Line 1,057: |
Line 1,159: |
| | | |
| | | |
| + | ===UARTReceive=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''PWMEnable''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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,068: |
Line 1,171: |
| | width="90%" | Channel | | | width="90%" | Channel |
| |- | | |- |
− | | colspan="2" | Range: 0-15 | + | | 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'' |
| |} | | |} |
| | | |
| | | |
| + | ===UARTSend=== |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] |
− | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ADCSampleArray10''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''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-5 | + | | 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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID |
− | | width="90%" | SampleDelay
| + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
− | |-
| |
− | | 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-5
| |
− | |-
| |
− | | 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-7-icon.png]]
| |
− | | width="90%" | Auto Detect Port
| |
− | |-
| |
− | | colspan="2" | Allows the component to auto detect the interface board COM port. Requires the latest Flowcode serial comms DLL to function correctly.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | COM Port
| |
− | |-
| |
− | | colspan="2" | Lists all the current available COM port hardware on your PC.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
− | | width="90%" | Refresh Ports
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | 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%" | 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 Arduino
| |
− | |-
| |
− | | 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
| |
− | |}==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" | Initialsie 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-5
| |
− | |-
| |
− | | 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;" | '''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-47 ... Pin 34 unimplemented
| |
− | |-
| |
− | | 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;" | '''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-31 ... Channels 16-23 unimplemented
| |
− | |-
| |
− | | 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;" | '''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;" | '''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;" | '''RegisterWrite'''
| |
− | |-
| |
− | | colspan="2" | Writes to one of the registers on-board the device
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | RegisterAddress
| |
− | |-
| |
− | | colspan="2" | The address of the register
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | Data
| |
− | |-
| |
− | | colspan="2" | The data value to assign to the register
| |
− | |-
| |
− | | 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;" | '''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;" | '''RegisterRead'''
| |
− | |-
| |
− | | colspan="2" | Read one of the registers on-board the device
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | RegisterAddress
| |
− | |-
| |
− | | colspan="2" | The address of the register
| |
− | |-
| |
− | | 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;" | '''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-15
| |
− | |-
| |
− | | 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;" | '''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;" | '''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;" | '''ADCSample12'''
| |
− | |-
| |
− | | 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-31 ... Channels 16-23 unimplemented
| |
− | |-
| |
− | | 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;" | '''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-15
| |
− | |-
| |
− | | 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;" | '''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-47 ... Pin 34 unimplemented
| |
− | |-
| |
− | | 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-5
| |
− | |-
| |
− | | 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;" | '''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;" | '''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;" | '''PWMSetPrescaler'''
| |
− | |-
| |
− | | colspan="2" | Sets the prescaler for the PWM output
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | Range: 0-15
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Prescaler
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Period
| |
− | |-
| |
− | | colspan="2" | Default 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;" | '''PWMEnable'''
| |
− | |-
| |
− | | colspan="2" | Enable a PWM output
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | Range: 0-15
| |
− | |-
| |
− | | 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-5
| |
− | |-
| |
− | | 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-5
| |
− | |-
| |
− | | 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-7-icon.png]]
| |
− | | width="90%" | Auto Detect Port
| |
− | |-
| |
− | | colspan="2" | Allows the component to auto detect the interface board COM port. Requires the latest Flowcode serial comms DLL to function correctly.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | COM Port
| |
− | |-
| |
− | | colspan="2" | Lists all the current available COM port hardware on your PC.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
− | | width="90%" | Refresh Ports
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | 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%" | 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 Arduino
| |
− | |-
| |
− | | 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
| |
− | |}==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" | Initialsie 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-5
| |
− | |-
| |
− | | 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;" | '''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-47 ... Pin 34 unimplemented
| |
− | |-
| |
− | | 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;" | '''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-31 ... Channels 16-23 unimplemented
| |
− | |-
| |
− | | 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;" | '''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;" | '''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;" | '''RegisterWrite'''
| |
− | |-
| |
− | | colspan="2" | Writes to one of the registers on-board the device
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | RegisterAddress
| |
− | |-
| |
− | | colspan="2" | The address of the register
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | Data
| |
− | |-
| |
− | | colspan="2" | The data value to assign to the register
| |
− | |-
| |
− | | 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;" | '''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;" | '''RegisterRead'''
| |
− | |-
| |
− | | colspan="2" | Read one of the registers on-board the device
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | RegisterAddress
| |
− | |-
| |
− | | colspan="2" | The address of the register
| |
− | |-
| |
− | | 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;" | '''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-15
| |
− | |-
| |
− | | 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;" | '''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;" | '''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;" | '''ADCSample12'''
| |
− | |-
| |
− | | 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-31 ... Channels 16-23 unimplemented
| |
− | |-
| |
− | | 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;" | '''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-15
| |
− | |-
| |
− | | 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;" | '''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-47 ... Pin 34 unimplemented
| |
− | |-
| |
− | | 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-5
| |
− | |-
| |
− | | 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;" | '''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;" | '''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;" | '''PWMSetPrescaler'''
| |
− | |-
| |
− | | colspan="2" | Sets the prescaler for the PWM output
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | Range: 0-15
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Prescaler
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Period
| |
− | |-
| |
− | | colspan="2" | Default 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;" | '''PWMEnable'''
| |
− | |-
| |
− | | colspan="2" | Enable a PWM output
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | Range: 0-15
| |
− | |-
| |
− | | 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-5
| |
− | |-
| |
− | | 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-5
| |
− | |-
| |
− | | 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-7-icon.png]]
| |
− | | width="90%" | Auto Detect Port
| |
− | |-
| |
− | | colspan="2" | Allows the component to auto detect the interface board COM port. Requires the latest Flowcode serial comms DLL to function correctly.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
− | | width="90%" | COM Port
| |
− | |-
| |
− | | colspan="2" | Lists all the current available COM port hardware on your PC.
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
− | | width="90%" | Refresh Ports
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | 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%" | 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 Arduino
| |
− | |-
| |
− | | 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
| |
− | |}==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" | Initialsie 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-5
| |
− | |-
| |
− | | 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;" | '''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-47 ... Pin 34 unimplemented
| |
− | |-
| |
− | | 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;" | '''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-31 ... Channels 16-23 unimplemented
| |
− | |-
| |
− | | 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;" | '''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;" | '''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;" | '''RegisterWrite'''
| |
− | |-
| |
− | | colspan="2" | Writes to one of the registers on-board the device
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | RegisterAddress
| |
− | |-
| |
− | | colspan="2" | The address of the register
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | Data
| |
− | |-
| |
− | | colspan="2" | The data value to assign to the register
| |
− | |-
| |
− | | 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;" | '''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;" | '''RegisterRead'''
| |
− | |-
| |
− | | colspan="2" | Read one of the registers on-board the device
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| |
− | | width="90%" | RegisterAddress
| |
− | |-
| |
− | | colspan="2" | The address of the register
| |
− | |-
| |
− | | 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;" | '''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-15
| |
− | |-
| |
− | | 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;" | '''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;" | '''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;" | '''ADCSample12'''
| |
− | |-
| |
− | | 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-31 ... Channels 16-23 unimplemented
| |
− | |-
| |
− | | 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;" | '''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-15
| |
− | |-
| |
− | | 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;" | '''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-47 ... Pin 34 unimplemented
| |
− | |-
| |
− | | 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-5
| |
− | |-
| |
− | | 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;" | '''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;" | '''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;" | '''PWMSetPrescaler'''
| |
− | |-
| |
− | | colspan="2" | Sets the prescaler for the PWM output
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | Range: 0-15
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Prescaler
| |
− | |-
| |
− | | colspan="2" |
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Period
| |
− | |-
| |
− | | colspan="2" | Default 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;" | '''PWMEnable'''
| |
− | |-
| |
− | | colspan="2" | Enable a PWM output
| |
− | |-
| |
− | |-
| |
− | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
− | | width="90%" | Channel
| |
− | |-
| |
− | | colspan="2" | Range: 0-15
| |
− | |-
| |
− | | 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-5
| |
− | |-
| |
− | | 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-5
| |
− | |-
| |
− | | 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''
| |
− | |}
| |
− |
| |
− |
| |
| | | |
| | | |