Difference between revisions of "Component: USB Serial (Comms: USB)"

From Flowcode Help
Jump to navigationJump to search
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix Ltd.
 
| Matrix Ltd.
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.6 (Development)
+
| 1.6
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Comms: USB
 
| Comms: USB
 
|}
 
|}
  
  
 +
==USB Serial component==
 +
Component to create and communicate using a standard CDC type COM port. Compatible with simulation and USB enabled microcontroller devices PIC/dsPIC/AVR.
  
==[[File:Component Icon 3e28ac22_2855_410a_9660_0b0a4731e545.png|Image]] USB Serial component==
+
==Component Source Code==
Component to create and communicate using a standard CDC type COM port.
 
Compatible with simulation and USB enabled microcontroller devices PIC/dsPIC/AVR.
 
  
==Examples==
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_USBSerial.fcfx FC_Comp_Source_USBSerial.fcfx]
The PIC based ECIOs or MIAC are good targets for USB as they do not have any additional configuration setting that need to be setup to allow the firmware to run correctly. For other targets you will have to setup the configuration correctly for your hardware to allow the USB to run correctly.
 
  
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_USBSerial.fcfx FC_Comp_Source_USBSerial.fcfx]
  
Here is an example file which waits for incoming data and then when valid data is received it displays this as a binary value onto the PortB pins before echoing back the data.
+
==Detailed description==
  
{{Fcfile|USB_Serial.fcfx|USB Serial Simple Receive}}
 
  
The example requires a device driver to function correctly. The driver can be generated by selecting the USB Serial component on the System panel, Looking down the list of properties in the properties window, selecting the Generate Driver property and switching the setting to Yes. This will place the driver file into the same directory as the Flowcode fcfx project file is located.
 
  
  
Here is a signed version of the USB Serial device driver using the default VID/PID properties.
 
  
[[File:USBSerial_Driver.zip|USB Serial Driver]]
 
  
  
Here is an example file which is designed to run in simulation to communicate with the connected embedded device. The COM port property will have to match the COM port for the embedded device to allow the communications to work correctly. Alternatively a program like Hyperterminal or RealTerm can be used to generate the COM port data to send to the connected device.
 
  
{{Fcfile|USB_Serial_Sim.fcfx|USB Serial Simulation}}
 
  
  
Finding which COM port has been allocated to your embedded device is as easy as opening the Windows device manager and looking under Ports.
 
  
[[File:DeviceManager.jpg]]
 
  
  
Assigning the correct COM port in the simulation needs to be done to allow the communications to work correctly.
 
  
[[File:SerialProps.jpg]]
 
  
  
Example of the data console with data being passed back and forth between the simulation and the embedded device.
 
  
[[File:SerialComms.jpg]]
 
  
  
  
==Downloadable macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>SendString</tt></u></span>===
 
Sends the specified data string to the host
 
  
'''Parameters'''
 
  
:[[Variable Types|<- STRING]] ''Data''
 
::Data string to send to the host
 
::''This parameter may be returned back to the caller''
 
  
  
'''Return value'''
+
''No detailed description exists yet for this component''
  
:[[Variable Types|BYTE]]
+
==Examples==
  
  
===<span style="font-weight: normal;"><u><tt>ReadString</tt></u></span>===
 
Retreives a string from the incoming data buffer. If data is available then the macro will return straight away. If there is no data available then the macro waits up the the period specified by the timeout before returning the value 255.
 
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Timeout_ms''
 
::Length of time to wait before timing out
 
  
:[[Variable Types|BYTE]] ''Length''
 
::Maximum number of bytes to try and read
 
  
  
'''Return value'''
 
  
:[[Variable Types|STRING]]
 
  
  
===<span style="font-weight: normal;"><u><tt>SendByte</tt></u></span>===
 
Sends the specified data byte to the host
 
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''data''
 
::Data byte to send to the host
 
  
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
 
  
  
===<span style="font-weight: normal;"><u><tt>ReadByte</tt></u></span>===
 
Retreives the byte from the incoming data buffer. If data is available then the macro will return straight away. If there is no data available then the macro waits up the the period specified by the timeout before returning the value 255.
 
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''Timeout_ms''
 
::Number of milliseconds to wait before timing out
 
  
  
'''Return value'''
 
  
:[[Variable Types|UINT]]
 
  
  
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
 
Starts up the USB communications and attempts to enumerate.
 
  
Returns 0 for a successful startup or 255 for a enumeration timeout.
 
  
'''Parameters'''
+
The PIC based ECIOs or MIAC are good targets for USB as they do not have any additional configuration setting that need to be setup to allow the firmware to run correctly. For other targets you will have to setup the configuration correctly for your hardware to allow the USB to run correctly.
  
:''This macro has no parameters''
 
  
 +
Here is an example file which waits for incoming data and then when valid data is received it displays this as a binary value onto the PortB pins before echoing back the data.
 +
{{Fcfile|USB_Serial.fcfx|USB Serial Simple Receive}}
 +
The example requires a device driver to function correctly. The driver can be generated by selecting the USB Serial component on the System panel, Looking down the list of properties in the properties window, selecting the Generate Driver property and switching the setting to Yes. This will place the driver file into the same directory as the Flowcode fcfx project file is located.
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
+
Here is a signed version of the USB Serial device driver using the default VID/PID properties.
  
 +
{{Zip|USBSerial_Driver.zip|USB Serial Driver}}
  
  
==Simulation macro reference==
+
Here is an example file which is designed to run in simulation to communicate with the connected embedded device. The COM port property will have to match the COM port for the embedded device to allow the communications to work correctly. Alternatively a program like Hyperterminal or RealTerm can be used to generate the COM port data to send to the connected device.
 +
{{Fcfile|USB_Serial_Sim.fcfx|USB Serial Simulation}}
 +
Finding which COM port has been allocated to your embedded device is as easy as opening the Windows device manager and looking under Ports.
  
''This component does not contain any simulation macros''
+
[[File:DeviceManager.jpg]]
  
  
==Property reference==
+
Assigning the correct COM port in the simulation needs to be done to allow the communications to work correctly.
<span style="font-weight: normal;"><u>Vendor ID</u></span>
 
  
This property is of type ''Signed integer'' and can be referenced with the variable name ''vendor_ID''.
+
[[File:SerialProps.jpg]]
  
USB VID
 
  
<span style="font-weight: normal;"><u>Product ID</u></span>
+
Example of the data console with data being passed back and forth between the simulation and the embedded device.
  
This property is of type ''Signed integer'' and can be referenced with the variable name ''product_ID''.
+
[[File:SerialComms.jpg]]
  
USB PID
 
  
<span style="font-weight: normal;"><u>Device Name</u></span>
 
  
This property is of type ''Line of text'' and can be referenced with the variable name ''dev_name''.
 
  
USB Device Name
 
  
<span style="font-weight: normal;"><u>Manufacturer</u></span>
 
  
This property is of type ''Line of text'' and can be referenced with the variable name ''dev_manufacturer''.
 
  
USB Manufacturer
 
  
<span style="font-weight: normal;"><u>Major Version</u></span>
 
  
This property is of type ''Signed integer'' and can be referenced with the variable name ''major_version''.
 
  
USB Major Version Number
 
  
<span style="font-weight: normal;"><u>Minor Version</u></span>
+
==Macro reference==
  
This property is of type ''Signed integer'' and can be referenced with the variable name ''minor_version''.
+
===Initialise===
 +
{| 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" | Starts up the USB communications and attempts to enumerate. Returns 0 for a successful startup or 255 for a enumeration timeout.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
USB Minor Version Number
 
  
<span style="font-weight: normal;"><u>Return Type</u></span>
+
===ReadByte===
 +
{| 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;" | '''ReadByte'''
 +
|-
 +
| colspan="2" | Retreives the byte from the incoming data buffer. If data is available then the macro will return straight away. If there is no data available then the macro waits up the the period specified by the timeout before returning the value 255.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Timeout_ms
 +
|-
 +
| colspan="2" | Number of milliseconds to wait before timing out&nbsp;
 +
|-
 +
| 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''
 +
|}
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''RETURN''.
 
  
Specifies the way the receive function indicates a timeout.
+
===ReadString===
 +
{| 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;" | '''ReadString'''
 +
|-
 +
| colspan="2" | Retreives a string from the incoming data buffer. If data is available then the macro will return straight away. If there is no data available then the macro waits up the the period specified by the timeout before returning the value 255.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Timeout_ms
 +
|-
 +
| colspan="2" | Length of time to wait before timing out&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Length
 +
|-
 +
| colspan="2" | Maximum number of bytes to try and read&nbsp;
 +
|-
 +
| 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''
 +
|}
  
8 Bit mode - Timeout is represented by the value 255.
 
  
16 Bit mode - Timeout is represented by the value 512 allowing the value 255 to represent valid data
+
===SendByte===
 +
{| 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;" | '''SendByte'''
 +
|-
 +
| colspan="2" | Sends the specified data byte to the host&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | data
 +
|-
 +
| colspan="2" | Data byte to send to the host&nbsp;
 +
|-
 +
| 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''
 +
|}
  
<span style="font-weight: normal;"><u>Enumeration Timeout</u></span>
 
  
This property is of type ''True or false'' and can be referenced with the variable name ''enumeration_tout''.
+
===SendByteArray===
 +
{| 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;" | '''SendByteArray'''
 +
|-
 +
| colspan="2" | Sends the specified data array to the host&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Data
 +
|-
 +
| colspan="2" | Data array to send to the host&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | NumBytes
 +
|-
 +
| colspan="2" | Max bytes is set by the Transmit Buffer Size property&nbsp;
 +
|-
 +
| 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''
 +
|}
  
Specifies if the enumeration (Initialise function) can timeout if taking too long.
 
  
<span style="font-weight: normal;"><u>Transmit Buffer Size</u></span>
+
===SendNumber===
 +
{| 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 the specified numeric value as an ASCII string to the host.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-s16-icon.png]] - INT
 +
| width="90%" | Number
 +
|-
 +
| colspan="2" | Range -32768 to 32767&nbsp;
 +
|-
 +
| 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''
 +
|}
  
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''TXBUFSZ''.
 
  
Sets the size of the transmit buffer.
+
===SendString===
 +
{| 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 the specified data string to the host&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Data
 +
|-
 +
| colspan="2" | Data string to send to the host&nbsp;
 +
|-
 +
| 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''
 +
|}
  
Recommended to be between 8 and 64 bytes.
 
  
<span style="font-weight: normal;"><u>Receive Buffer Size</u></span>
+
==Property reference==
  
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''RXBUFSZ''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Sets the size of the receive buffer.
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
Recommended to be between 8 and 64 bytes.
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Driver Directory</u></span>
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | USB Properties
This property is of type ''Directory'' and can be referenced with the variable name ''driver_directory''.
+
|-
 
+
|-
Directory to save the generated device driver .inf file
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | Vendor ID
<span style="font-weight: normal;"><u>Driver Filename</u></span>
+
|-
 
+
| colspan="2" | USB VID&nbsp;
This property is of type ''Line of text'' and can be referenced with the variable name ''driver_filename''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
Filename to give to the generated driver file.
+
| width="90%" | Product ID
 
+
|-
<span style="font-weight: normal;"><u>Generate Driver</u></span>
+
| colspan="2" | USB PID&nbsp;
 
+
|-
This property is of type ''True or false'' and can be referenced with the variable name ''gen_driver''.
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 
+
| width="90%" | Device Name
Generates a driver file when set to Yes, Automatically jumps back to No when complete.
+
|-
 
+
| colspan="2" | USB Device Name&nbsp;
<span style="font-weight: normal;"><u>COM Port</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
This property is of type ''Fixed list of text'' and can be referenced with the variable name ''COM_port''.
+
| width="90%" | Manufacturer
 
+
|-
Hardware COM port to communicate with any connected USB serial devices or any other virtual COM ports.
+
| colspan="2" | USB Manufacturer&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Label</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | Major Version
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
+
|-
 
+
| colspan="2" | USB Major Version Number&nbsp;
Text displayed on the I/O flasher comms component.
+
|-
 +
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 +
| width="90%" | Minor Version
 +
|-
 +
| colspan="2" | USB Minor Version Number&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Return Type
 +
|-
 +
| colspan="2" | Specifies the way the receive function indicates a timeout. 8 Bit mode - Timeout is represented by the value 255. 16 Bit mode - Timeout is represented by the value 512 allowing the value 255 to represent valid data&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Enumeration Timeout
 +
|-
 +
| colspan="2" | Specifies if the enumeration (Initialise function) can timeout if taking too long.&nbsp;
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | RAM Usage
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Transmit Buffer Size
 +
|-
 +
| colspan="2" | Sets the size of the transmit buffer. Recommended to be between 8 and 64 bytes.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Receive Buffer Size
 +
|-
 +
| colspan="2" | Sets the size of the receive buffer. Recommended to be between 8 and 64 bytes.&nbsp;
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | USB Driver
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-20-icon.png]]
 +
| width="90%" | Driver Directory
 +
|-
 +
| colspan="2" | Directory to save the generated device driver .inf file&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | Driver Filename
 +
|-
 +
| colspan="2" | Filename to give to the generated driver file.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Generate Driver
 +
|-
 +
| colspan="2" | Generates a driver file when set to Yes, Automatically jumps back to No when complete.&nbsp;
 +
|-
 +
| 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-12-icon.png]]
 +
| width="90%" | COM Port
 +
|-
 +
| colspan="2" | Hardware COM port to communicate with any connected USB serial devices or any other virtual COM ports.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | Label
 +
|-
 +
| colspan="2" | Text displayed on the I/O flasher comms component.&nbsp;
 +
|}

Latest revision as of 13:13, 7 February 2023

Author Matrix Ltd.
Version 1.6
Category Comms: USB


USB Serial component

Component to create and communicate using a standard CDC type COM port. Compatible with simulation and USB enabled microcontroller devices PIC/dsPIC/AVR.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

The PIC based ECIOs or MIAC are good targets for USB as they do not have any additional configuration setting that need to be setup to allow the firmware to run correctly. For other targets you will have to setup the configuration correctly for your hardware to allow the USB to run correctly.


Here is an example file which waits for incoming data and then when valid data is received it displays this as a binary value onto the PortB pins before echoing back the data. FC6 Icon.png USB Serial Simple Receive The example requires a device driver to function correctly. The driver can be generated by selecting the USB Serial component on the System panel, Looking down the list of properties in the properties window, selecting the Generate Driver property and switching the setting to Yes. This will place the driver file into the same directory as the Flowcode fcfx project file is located.


Here is a signed version of the USB Serial device driver using the default VID/PID properties.

ZIP Icon.png USB Serial Driver


Here is an example file which is designed to run in simulation to communicate with the connected embedded device. The COM port property will have to match the COM port for the embedded device to allow the communications to work correctly. Alternatively a program like Hyperterminal or RealTerm can be used to generate the COM port data to send to the connected device. FC6 Icon.png USB Serial Simulation Finding which COM port has been allocated to your embedded device is as easy as opening the Windows device manager and looking under Ports.

DeviceManager.jpg


Assigning the correct COM port in the simulation needs to be done to allow the communications to work correctly.

SerialProps.jpg


Example of the data console with data being passed back and forth between the simulation and the embedded device.

SerialComms.jpg






Macro reference

Initialise

Fc9-comp-macro.png Initialise
Starts up the USB communications and attempts to enumerate. Returns 0 for a successful startup or 255 for a enumeration timeout. 
Fc9-u8-icon.png - BYTE Return


ReadByte

Fc9-comp-macro.png ReadByte
Retreives the byte from the incoming data buffer. If data is available then the macro will return straight away. If there is no data available then the macro waits up the the period specified by the timeout before returning the value 255. 
Fc9-u8-icon.png - BYTE Timeout_ms
Number of milliseconds to wait before timing out 
Fc9-u16-icon.png - UINT Return


ReadString

Fc9-comp-macro.png ReadString
Retreives a string from the incoming data buffer. If data is available then the macro will return straight away. If there is no data available then the macro waits up the the period specified by the timeout before returning the value 255. 
Fc9-u8-icon.png - BYTE Timeout_ms
Length of time to wait before timing out 
Fc9-u8-icon.png - BYTE Length
Maximum number of bytes to try and read 
Fc9-string-icon.png - STRING Return


SendByte

Fc9-comp-macro.png SendByte
Sends the specified data byte to the host 
Fc9-u8-icon.png - BYTE data
Data byte to send to the host 
Fc9-u8-icon.png - BYTE Return


SendByteArray

Fc9-comp-macro.png SendByteArray
Sends the specified data array to the host 
Fc9-u8-icon.png - BYTE Data
Data array to send to the host 
Fc9-u8-icon.png - BYTE NumBytes
Max bytes is set by the Transmit Buffer Size property 
Fc9-u8-icon.png - BYTE Return


SendNumber

Fc9-comp-macro.png SendNumber
Sends the specified numeric value as an ASCII string to the host. 
Fc9-s16-icon.png - INT Number
Range -32768 to 32767 
Fc9-u8-icon.png - BYTE Return


SendString

Fc9-comp-macro.png SendString
Sends the specified data string to the host 
Fc9-string-icon.png - STRING Data
Data string to send to the host 
Fc9-u8-icon.png - BYTE Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png USB Properties
Fc9-type-21-icon.png Vendor ID
USB VID 
Fc9-type-21-icon.png Product ID
USB PID 
Fc9-type-10-icon.png Device Name
USB Device Name 
Fc9-type-10-icon.png Manufacturer
USB Manufacturer 
Fc9-type-14-icon.png Major Version
USB Major Version Number 
Fc9-type-14-icon.png Minor Version
USB Minor Version Number 
Fc9-type-16-icon.png Return Type
Specifies the way the receive function indicates a timeout. 8 Bit mode - Timeout is represented by the value 255. 16 Bit mode - Timeout is represented by the value 512 allowing the value 255 to represent valid data 
Fc9-type-7-icon.png Enumeration Timeout
Specifies if the enumeration (Initialise function) can timeout if taking too long. 
Fc9-conn-icon.png RAM Usage
Fc9-type-21-icon.png Transmit Buffer Size
Sets the size of the transmit buffer. Recommended to be between 8 and 64 bytes. 
Fc9-type-21-icon.png Receive Buffer Size
Sets the size of the receive buffer. Recommended to be between 8 and 64 bytes. 
Fc9-conn-icon.png USB Driver
Fc9-type-20-icon.png Driver Directory
Directory to save the generated device driver .inf file 
Fc9-type-10-icon.png Driver Filename
Filename to give to the generated driver file. 
Fc9-type-7-icon.png Generate Driver
Generates a driver file when set to Yes, Automatically jumps back to No when complete. 
Fc9-conn-icon.png Simulation
Fc9-type-12-icon.png COM Port
Hardware COM port to communicate with any connected USB serial devices or any other virtual COM ports. 
Fc9-type-10-icon.png Label
Text displayed on the I/O flasher comms component.