Difference between revisions of "Component: Device Helper (Matrix Tools)"

From Flowcode Help
Jump to navigationJump to search
 
(13 intermediate revisions by the same user not shown)
Line 14: Line 14:
 
==Device Helper component==
 
==Device Helper component==
 
A purely cosmetic component for viewing the details specific to your current selected target microcontroller. Lists stats like ADC resolution, ADC channels, UARTs, SPI, PWM, RAM, ROM etc
 
A purely cosmetic component for viewing the details specific to your current selected target microcontroller. Lists stats like ADC resolution, ADC channels, UARTs, SPI, PWM, RAM, ROM etc
 +
 +
==Component Source Code==
 +
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Device_Helper.fcfx FC_Comp_Source_Device_Helper.fcfx]
 +
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Device_Helper.fcfx FC_Comp_Source_Device_Helper.fcfx]
  
 
==Detailed description==
 
==Detailed description==
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
  
Line 26: Line 52:
  
  
By simply adding the device helper component to your project and selecting it on the panel you can see all the following statistics regarding your current selected microcontroller in the properties window.
 
  
  
[[File:Dev_Helper.jpg]]
 
  
==Downloadable 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;" | '''ResetRecords'''
 
|-
 
| colspan="2" | Allows the peak and trough to be reset back to default values. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | ResetPeak
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | ResetTrough
 
|-
 
| 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;" | '''ReceiveString'''
 
|-
 
| colspan="2" | Gets a string from the receive buffer 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | MaxChars
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Timeout
 
|-
 
| colspan="2" | Time in milliseconds to wait for data 
 
|-
 
| 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" | Initialises the UART component pins ready to send and receive 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;" | '''ReceiveString'''
 
|-
 
| colspan="2" | Receives a string of bytes and returns the number of bytes received. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | StringData
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | NumBytes
 
|-
 
| colspan="2" | Maximum number of bytes to try and receive 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Timeout
 
|-
 
| colspan="2" | Max amount of time in ms to wait between bytes 
 
|-
 
| 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;" | '''Start'''
 
|-
 
| colspan="2" | Startup routine required by the hardware device. Automatically clears the display after initialising. 
 
|-
 
|-
 
| 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;" | '''SetLEDState'''
 
|-
 
| colspan="2" | Sets the state of a single LED 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Port
 
|-
 
| colspan="2" | 0 = PortA, 1 = PortB 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | LED
 
|-
 
| colspan="2" | 0 = LED0, 7 = LED7 
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | State
 
|-
 
| 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;" | '''GetRxIdent'''
 
|-
 
| colspan="2" | Gets the Rx ID as a Integer Standard and Extended IDs. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Buffer
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u32-icon.png]] - ULONG
 
| 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]]
+
By simply adding the device helper component to your project and selecting it on the panel you can see all the following statistics regarding your current selected microcontroller in the properties window.
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
+
 
|-
+
 
| colspan="2" | Must be called before any other CAN component macros to enable and initialise the CAN peripheral.  
+
[[File:Dev_Helper.jpg]]
|-
+
 
|-
+
 
| 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''
+
 
|}
+
 
 +
 
 +
 
 +
 
  
  
  
 +
==Macro reference==
  
 
==Property reference==
 
==Property reference==
Line 200: Line 95:
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
| 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;" | Device
 
|-
 
|-
 
|-
 
|-
Line 221: Line 120:
 
|-
 
|-
 
| colspan="2" | Million Instructions Per Second (MIPS) Number of complete instruction cycles per second based on the max clock speed and instructions per clock divided by 1 million. Note that some instructions such as decisions can take multiple instructions to complete. 
 
| colspan="2" | Million Instructions Per Second (MIPS) Number of complete instruction cycles per second based on the max clock speed and instructions per clock divided by 1 million. Note that some instructions such as decisions can take multiple instructions to complete. 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Memory
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
Line 236: Line 139:
 
|-
 
|-
 
| colspan="2" | Number of bytes available for EEPROM storage. EEPROM - Electrically Erasable Programmable Read Only Memory - Contains user data that can persist when the power is removed 
 
| colspan="2" | Number of bytes available for EEPROM storage. EEPROM - Electrically Erasable Programmable Read Only Memory - Contains user data that can persist when the power is removed 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Analogue
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
Line 256: Line 163:
 
|-
 
|-
 
| colspan="2" | Number of pins capable of outputting an analogue voltage. 
 
| colspan="2" | Number of pins capable of outputting an analogue voltage. 
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Digital / Peripheral
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
Line 301: Line 212:
 
|-
 
|-
 
| colspan="2" | Universal Serial Bus (USB) Used for interconnective communications with high end equipment such as PCs. 
 
| colspan="2" | Universal Serial Bus (USB) Used for interconnective communications with high end equipment such as PCs. 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 
|-
 
 
|}
 
|}

Latest revision as of 13:09, 7 February 2023

Author Matrix TSL
Version 1.1
Category Matrix Tools


Device Helper component

A purely cosmetic component for viewing the details specific to your current selected target microcontroller. Lists stats like ADC resolution, ADC channels, UARTs, SPI, PWM, RAM, ROM etc

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

By simply adding the device helper component to your project and selecting it on the panel you can see all the following statistics regarding your current selected microcontroller in the properties window.


Dev Helper.jpg






Macro reference

Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Device
Fc9-type-21-icon.png Pin Count
 
Fc9-type-21-icon.png Max Clock Speed
Maximum frequency the device can operate. 
Fc9-type-21-icon.png Master Divider
Number of clock cycles per single device instruction. 
Fc9-type-21-icon.png Max MIPs
Million Instructions Per Second (MIPS) Number of complete instruction cycles per second based on the max clock speed and instructions per clock divided by 1 million. Note that some instructions such as decisions can take multiple instructions to complete. 
Fc9-conn-icon.png Memory
Fc9-type-21-icon.png ROM Size
Number of bytes available for ROM storage. ROM - Read Only Memory - Contains the Flowcode program as well as other constants such as strings 
Fc9-type-21-icon.png RAM Size
Number of bytes available for RAM storage. RAM - Random Access Memory - Contains the Flowcode variables as well as the operational stack 
Fc9-type-21-icon.png EEPROM Size
Number of bytes available for EEPROM storage. EEPROM - Electrically Erasable Programmable Read Only Memory - Contains user data that can persist when the power is removed 
Fc9-conn-icon.png Analogue
Fc9-type-21-icon.png ADC Max Bits
Maximum number of bits used for an ADC conversion which dictates the maximum reading the ADC can generate. 8 bits = 0 - 255 10 bits = 0 - 1023 12 bits = 0 - 4095 
Fc9-type-21-icon.png ADC Pins
Number of pins capable of reading an analogue input. 
Fc9-type-21-icon.png DAC Max Bits
Maximum number of bits used for an DAC conversion which dictates the output resolution of the DAC. 5 bits = 0 - 31 8 bits = 0 - 255 10 bits = 0 - 1023 
Fc9-type-21-icon.png DAC Pins
Number of pins capable of outputting an analogue voltage. 
Fc9-conn-icon.png Digital / Peripheral
Fc9-type-21-icon.png Digital Pins
Number of pins capable of reading a digital input and/or writing a digital output. 
Fc9-type-21-icon.png CAN Count
Controller Area Network (CAN) Used for fixed system architecture in noisy environments e.g. Cars and Automotive 
Fc9-type-21-icon.png I2C Count
Inter-Integrated Circuit (I2C) Used for on board communications e.g. Sensors, Memory 
Fc9-type-10-icon.png I2C Modes
 
Fc9-type-21-icon.png H-Bridge Count
 
Fc9-type-21-icon.png PWM Count
Pulse Width Modulation Output (PWM) Useful for analogue style outputs. 
Fc9-type-21-icon.png SPI Count
Serial Peripheral Interface (SPI) Used for high speed on board communications e.g. Sensors, Memory 
Fc9-type-21-icon.png UART Count
Universal Asynchronous Receiver Transmitter (UART) Used for on board and off board communications e.g. RS232, Bluetooth, GPS, GSM 
Fc9-type-21-icon.png USB Count
Universal Serial Bus (USB) Used for interconnective communications with high end equipment such as PCs.