Difference between revisions of "Component: Bluetooth (HC05 / HC06) (Wireless)"

From Flowcode Help
Jump to navigationJump to search
Line 17: Line 17:
 
==Component Source Code==
 
==Component Source Code==
  
Please click here to download the component source project: [https://www.flowcode.co.uk/wikicopy/componentsource/FC_Comp_Source_BTHC05.fcfx FC_Comp_Source_BTHC05.fcfx]
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_BTHC05.fcfx FC_Comp_Source_BTHC05.fcfx]
  
 
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_BTHC05.fcfx FC_Comp_Source_BTHC05.fcfx]
 
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_BTHC05.fcfx FC_Comp_Source_BTHC05.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 44: Line 46:
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 72: Line 76:
  
 
==Macro reference==
 
==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;" | '''SetPairKey'''
 +
|-
 +
| colspan="2" | Sets the Bluetooth pair key stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Key
 +
|-
 +
| colspan="2" | Four digit pair key e.g. "0000" or "1234" 
 +
|-
 +
| 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;" | '''SendString'''
 +
|-
 +
| colspan="2" | Sends out a string of bytes from the UART interface. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Data
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
 +
 +
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendCommand'''
 +
|-
 +
| colspan="2" | Sends a command string to the HC05/HC06 module. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Command
 +
|-
 +
| 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;" | '''SetBaud'''
 +
|-
 +
| colspan="2" | Sets the Bluetooth baud rate stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Baud
 +
|-
 +
| colspan="2" | 1=1200, 2=2400, 3=4800, 4=9600, 5=19200, 6=NA, 7=38400, 8=57600, 9=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;" | '''SendNumber'''
 +
|-
 +
| colspan="2" | Sends out a number as an ASCII String from the UART interface. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Number
 +
|-
 +
| 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;" | '''SendChar'''
 +
|-
 +
| colspan="2" | Sends out a single packet from the UART interface. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 +
| width="90%" | Char
 +
|-
 +
| 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;" | '''SetName'''
 +
|-
 +
| colspan="2" | Sets the Bluetooth Friendly name stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Name
 +
|-
 +
| colspan="2" | Name you wish to provide to the module 
 +
|-
 +
| 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;" | '''ReceiveString'''
 +
|-
 +
| colspan="2" | Attempts to receive a string of bytes from the UART interface. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Timeout
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | NumBytes
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| 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" | Sets up the RS232 peripheral, must be called at the start of your program or at least before you start calling any other RS232 macros. 
 +
|-
 +
|-
 +
| 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;" | '''ReceiveChar'''
 +
|-
 +
| colspan="2" | Attempts to receive a single packet from the UART interface. 
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 +
| width="90%" | Timeout
 +
|-
 +
| colspan="2" | Time to wait for valid data before returning, 0=Dont wait, 255=Wait forever. 
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT
 +
| 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;" | Comms Settings
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Data Bits
 +
|-
 +
| colspan="2" | Number of data bits 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Return
 +
|-
 +
| colspan="2" | Return data width from Receive macro. 8-bit data mode always returns a byte ranging from 0-255, 255 could mean a timeout or could be a valid data. 16-bit data mode rereturns 0-255 for valid data, 256 for a timeout, return data must be stored into an INT or UINT variable. 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Echo
 +
|-
 +
| colspan="2" | Echo selection 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Baud Options
 +
|-
 +
| colspan="2" | Baud rate option selector 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 +
| width="90%" | Baud Rate
 +
|-
 +
| colspan="2" |  
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Channel
 +
|-
 +
| colspan="2" | UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Use TX
 +
|-
 +
| colspan="2" | Selects if the Transmit pin is used by the component.  Yes: The TX pin is active and used to transmit data for the UART. No: The TX pin is disabled and free to be used as general I/O. 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 +
| width="90%" | TX
 +
|-
 +
| colspan="2" | Pin to be used for Transmit data 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Use RX
 +
|-
 +
| colspan="2" | Selects if the Receive pin is used by the component.  Yes: The RX pin is active and used to receive data for the UART. No: The RX pin is disabled and free to be used as general I/O. 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 +
| width="90%" | RX
 +
|-
 +
| colspan="2" | Pin to be used for Receive data 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Use Flow Control
 +
|-
 +
| colspan="2" | Flow Control (Handshake) enable or disable.    On: Two I/O pins are used to control the flow of data in and out of the device.    Off: Flow control is disabled. 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | Label
 +
|-
 +
| colspan="2" | Textual label shown on the component I/O flasher 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Scope Traces
 +
|-
 +
| colspan="2" | Selects if the scope traces are automatically added to the data recorder window or not.    Simulation - draws an approximation of the UART data onto the scope trace.    ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Console Data
 +
|-
 +
| colspan="2" | Selects if the console data is automatically generated or not 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Console Columns
 +
|-
 +
| colspan="2" | Number of characters that can be displayed on a single line of the console. 
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Data Source
 +
|-
 +
| colspan="2" | Simulation data source used to allow the component to connect to various remote devices    Nothing - Simulation data is ignored    COM port - Routes the communication data to and from a physical or virtual COM port    API - Routes the communication data via a data injector component on the Panel. 
 +
|}==Macro reference==
  
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"

Revision as of 09:52, 27 January 2023

Author Matrix Ltd
Version 2.1
Category Wireless


Bluetooth (HC05 / HC06) component

Low level routines for controlling or interacting with a HC05 or HC06 Bluetooth module. Contains functions to allow the baud rate, bluetooth name and bluetooth key to be defined.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_BTHC05.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_BTHC05.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Example Program that configures a HC05 / HC06 Bluetooth module and then allows a data connection to be established and utilised.

Incoming data will be displayed on an LCD.

Outgoing data is assigned and sent using a keypad component. FC6 Icon.png HC05 Example

Macro reference

Fc9-comp-macro.png SetPairKey
Sets the Bluetooth pair key stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
Fc9-string-icon.png - STRING Key
Four digit pair key e.g. "0000" or "1234" 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendString
Sends out a string of bytes from the UART interface. 
Fc9-string-icon.png - STRING Data
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendCommand
Sends a command string to the HC05/HC06 module. 
Fc9-string-icon.png - STRING Command
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetBaud
Sets the Bluetooth baud rate stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
Fc9-u8-icon.png - BYTE Baud
1=1200, 2=2400, 3=4800, 4=9600, 5=19200, 6=NA, 7=38400, 8=57600, 9=115200 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendNumber
Sends out a number as an ASCII String from the UART interface. 
[[File:]] - Number
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendChar
Sends out a single packet from the UART interface. 
Fc9-s16-icon.png - INT Char
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetName
Sets the Bluetooth Friendly name stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
Fc9-string-icon.png - STRING Name
Name you wish to provide to the module 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReceiveString
Attempts to receive a string of bytes from the UART interface. 
Fc9-u8-icon.png - BYTE Timeout
 
Fc9-u8-icon.png - BYTE NumBytes
 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png Initialise
Sets up the RS232 peripheral, must be called at the start of your program or at least before you start calling any other RS232 macros. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReceiveChar
Attempts to receive a single packet from the UART interface. 
Fc9-s16-icon.png - INT Timeout
Time to wait for valid data before returning, 0=Dont wait, 255=Wait forever. 
Fc9-s16-icon.png - INT Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Comms Settings
Fc9-type-16-icon.png Data Bits
Number of data bits 
Fc9-type-16-icon.png Return
Return data width from Receive macro. 8-bit data mode always returns a byte ranging from 0-255, 255 could mean a timeout or could be a valid data. 16-bit data mode rereturns 0-255 for valid data, 256 for a timeout, return data must be stored into an INT or UINT variable. 
Fc9-type-16-icon.png Echo
Echo selection 
Fc9-type-16-icon.png Baud Options
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
 
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
Fc9-type-7-icon.png Use TX
Selects if the Transmit pin is used by the component. Yes: The TX pin is active and used to transmit data for the UART. No: The TX pin is disabled and free to be used as general I/O. 
Fc9-type-5-icon.png TX
Pin to be used for Transmit data 
Fc9-type-7-icon.png Use RX
Selects if the Receive pin is used by the component. Yes: The RX pin is active and used to receive data for the UART. No: The RX pin is disabled and free to be used as general I/O. 
Fc9-type-5-icon.png RX
Pin to be used for Receive data 
Fc9-type-16-icon.png Use Flow Control
Flow Control (Handshake) enable or disable. On: Two I/O pins are used to control the flow of data in and out of the device. Off: Flow control is disabled. 
Fc9-conn-icon.png Simulation
Fc9-type-10-icon.png Label
Textual label shown on the component I/O flasher 
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically added to the data recorder window or not. Simulation - draws an approximation of the UART data onto the scope trace. ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-21-icon.png Console Columns
Number of characters that can be displayed on a single line of the console. 
Fc9-type-16-icon.png Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port API - Routes the communication data via a data injector component on the Panel. 

==Macro reference==

Fc9-comp-macro.png SetPairKey
Sets the Bluetooth pair key stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
Fc9-string-icon.png - STRING Key
Four digit pair key e.g. "0000" or "1234" 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendString
Sends out a string of bytes from the UART interface. 
Fc9-string-icon.png - STRING Data
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendCommand
Sends a command string to the HC05/HC06 module. 
Fc9-string-icon.png - STRING Command
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetBaud
Sets the Bluetooth baud rate stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
Fc9-u8-icon.png - BYTE Baud
1=1200, 2=2400, 3=4800, 4=9600, 5=19200, 6=NA, 7=38400, 8=57600, 9=115200 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendNumber
Sends out a number as an ASCII String from the UART interface. 
[[File:]] - Number
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendChar
Sends out a single packet from the UART interface. 
Fc9-s16-icon.png - INT Char
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetName
Sets the Bluetooth Friendly name stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
Fc9-string-icon.png - STRING Name
Name you wish to provide to the module 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReceiveString
Attempts to receive a string of bytes from the UART interface. 
Fc9-u8-icon.png - BYTE Timeout
 
Fc9-u8-icon.png - BYTE NumBytes
 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png Initialise
Sets up the RS232 peripheral, must be called at the start of your program or at least before you start calling any other RS232 macros. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReceiveChar
Attempts to receive a single packet from the UART interface. 
Fc9-s16-icon.png - INT Timeout
Time to wait for valid data before returning, 0=Dont wait, 255=Wait forever. 
Fc9-s16-icon.png - INT Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Comms Settings
Fc9-type-16-icon.png Data Bits
Number of data bits 
Fc9-type-16-icon.png Return
Return data width from Receive macro. 8-bit data mode always returns a byte ranging from 0-255, 255 could mean a timeout or could be a valid data. 16-bit data mode rereturns 0-255 for valid data, 256 for a timeout, return data must be stored into an INT or UINT variable. 
Fc9-type-16-icon.png Echo
Echo selection 
Fc9-type-16-icon.png Baud Options
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
 
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
Fc9-type-7-icon.png Use TX
Selects if the Transmit pin is used by the component. Yes: The TX pin is active and used to transmit data for the UART. No: The TX pin is disabled and free to be used as general I/O. 
Fc9-type-5-icon.png TX
Pin to be used for Transmit data 
Fc9-type-7-icon.png Use RX
Selects if the Receive pin is used by the component. Yes: The RX pin is active and used to receive data for the UART. No: The RX pin is disabled and free to be used as general I/O. 
Fc9-type-5-icon.png RX
Pin to be used for Receive data 
Fc9-type-16-icon.png Use Flow Control
Flow Control (Handshake) enable or disable. On: Two I/O pins are used to control the flow of data in and out of the device. Off: Flow control is disabled. 
Fc9-conn-icon.png Simulation
Fc9-type-10-icon.png Label
Textual label shown on the component I/O flasher 
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically added to the data recorder window or not. Simulation - draws an approximation of the UART data onto the scope trace. ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-21-icon.png Console Columns
Number of characters that can be displayed on a single line of the console. 
Fc9-type-16-icon.png Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port API - Routes the communication data via a data injector component on the Panel. 

==Macro reference==

Fc9-comp-macro.png SetPairKey
Sets the Bluetooth pair key stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
Fc9-string-icon.png - STRING Key
Four digit pair key e.g. "0000" or "1234" 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendString
Sends out a string of bytes from the UART interface. 
Fc9-string-icon.png - STRING Data
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendCommand
Sends a command string to the HC05/HC06 module. 
Fc9-string-icon.png - STRING Command
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetBaud
Sets the Bluetooth baud rate stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
Fc9-u8-icon.png - BYTE Baud
1=1200, 2=2400, 3=4800, 4=9600, 5=19200, 6=NA, 7=38400, 8=57600, 9=115200 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendNumber
Sends out a number as an ASCII String from the UART interface. 
[[File:]] - Number
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendChar
Sends out a single packet from the UART interface. 
Fc9-s16-icon.png - INT Char
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetName
Sets the Bluetooth Friendly name stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
Fc9-string-icon.png - STRING Name
Name you wish to provide to the module 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReceiveString
Attempts to receive a string of bytes from the UART interface. 
Fc9-u8-icon.png - BYTE Timeout
 
Fc9-u8-icon.png - BYTE NumBytes
 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png Initialise
Sets up the RS232 peripheral, must be called at the start of your program or at least before you start calling any other RS232 macros. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReceiveChar
Attempts to receive a single packet from the UART interface. 
Fc9-s16-icon.png - INT Timeout
Time to wait for valid data before returning, 0=Dont wait, 255=Wait forever. 
Fc9-s16-icon.png - INT Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Comms Settings
Fc9-type-16-icon.png Data Bits
Number of data bits 
Fc9-type-16-icon.png Return
Return data width from Receive macro. 8-bit data mode always returns a byte ranging from 0-255, 255 could mean a timeout or could be a valid data. 16-bit data mode rereturns 0-255 for valid data, 256 for a timeout, return data must be stored into an INT or UINT variable. 
Fc9-type-16-icon.png Echo
Echo selection 
Fc9-type-16-icon.png Baud Options
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
 
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
Fc9-type-7-icon.png Use TX
Selects if the Transmit pin is used by the component. Yes: The TX pin is active and used to transmit data for the UART. No: The TX pin is disabled and free to be used as general I/O. 
Fc9-type-5-icon.png TX
Pin to be used for Transmit data 
Fc9-type-7-icon.png Use RX
Selects if the Receive pin is used by the component. Yes: The RX pin is active and used to receive data for the UART. No: The RX pin is disabled and free to be used as general I/O. 
Fc9-type-5-icon.png RX
Pin to be used for Receive data 
Fc9-type-16-icon.png Use Flow Control
Flow Control (Handshake) enable or disable. On: Two I/O pins are used to control the flow of data in and out of the device. Off: Flow control is disabled. 
Fc9-conn-icon.png Simulation
Fc9-type-10-icon.png Label
Textual label shown on the component I/O flasher 
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically added to the data recorder window or not. Simulation - draws an approximation of the UART data onto the scope trace. ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-21-icon.png Console Columns
Number of characters that can be displayed on a single line of the console. 
Fc9-type-16-icon.png Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port API - Routes the communication data via a data injector component on the Panel. 

==Macro reference==

Fc9-comp-macro.png SetPairKey
Sets the Bluetooth pair key stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
Fc9-string-icon.png - STRING Key
Four digit pair key e.g. "0000" or "1234" 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendString
Sends out a string of bytes from the UART interface. 
Fc9-string-icon.png - STRING Data
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendCommand
Sends a command string to the HC05/HC06 module. 
Fc9-string-icon.png - STRING Command
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetBaud
Sets the Bluetooth baud rate stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
Fc9-u8-icon.png - BYTE Baud
1=1200, 2=2400, 3=4800, 4=9600, 5=19200, 6=NA, 7=38400, 8=57600, 9=115200 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendNumber
Sends out a number as an ASCII String from the UART interface. 
[[File:]] - Number
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendChar
Sends out a single packet from the UART interface. 
Fc9-s16-icon.png - INT Char
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetName
Sets the Bluetooth Friendly name stored in the Bluetooth module's ROM. Commands must be sent before Bluetooth communications are estabished e.g. right after power on and initialisation. 
Fc9-string-icon.png - STRING Name
Name you wish to provide to the module 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReceiveString
Attempts to receive a string of bytes from the UART interface. 
Fc9-u8-icon.png - BYTE Timeout
 
Fc9-u8-icon.png - BYTE NumBytes
 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png Initialise
Sets up the RS232 peripheral, must be called at the start of your program or at least before you start calling any other RS232 macros. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReceiveChar
Attempts to receive a single packet from the UART interface. 
Fc9-s16-icon.png - INT Timeout
Time to wait for valid data before returning, 0=Dont wait, 255=Wait forever. 
Fc9-s16-icon.png - INT Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Comms Settings
Fc9-type-16-icon.png Data Bits
Number of data bits 
Fc9-type-16-icon.png Return
Return data width from Receive macro. 8-bit data mode always returns a byte ranging from 0-255, 255 could mean a timeout or could be a valid data. 16-bit data mode rereturns 0-255 for valid data, 256 for a timeout, return data must be stored into an INT or UINT variable. 
Fc9-type-16-icon.png Echo
Echo selection 
Fc9-type-16-icon.png Baud Options
Baud rate option selector 
Fc9-type-14-icon.png Baud Rate
 
Fc9-conn-icon.png Connections
Fc9-type-16-icon.png Channel
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller. 
Fc9-type-7-icon.png Use TX
Selects if the Transmit pin is used by the component. Yes: The TX pin is active and used to transmit data for the UART. No: The TX pin is disabled and free to be used as general I/O. 
Fc9-type-5-icon.png TX
Pin to be used for Transmit data 
Fc9-type-7-icon.png Use RX
Selects if the Receive pin is used by the component. Yes: The RX pin is active and used to receive data for the UART. No: The RX pin is disabled and free to be used as general I/O. 
Fc9-type-5-icon.png RX
Pin to be used for Receive data 
Fc9-type-16-icon.png Use Flow Control
Flow Control (Handshake) enable or disable. On: Two I/O pins are used to control the flow of data in and out of the device. Off: Flow control is disabled. 
Fc9-conn-icon.png Simulation
Fc9-type-10-icon.png Label
Textual label shown on the component I/O flasher 
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically added to the data recorder window or not. Simulation - draws an approximation of the UART data onto the scope trace. ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD. 
Fc9-type-7-icon.png Console Data
Selects if the console data is automatically generated or not 
Fc9-type-21-icon.png Console Columns
Number of characters that can be displayed on a single line of the console. 
Fc9-type-16-icon.png Data Source
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port API - Routes the communication data via a data injector component on the Panel.