Difference between revisions of "Component: RMT (Internal) (Misc)"

From Flowcode Help
Jump to navigationJump to search
 
(3 intermediate revisions by the same user not shown)
Line 14: Line 14:
 
==RMT (Internal) component==
 
==RMT (Internal) component==
 
Provides access to the onboard remote control (RMT) peripheral allowing for high speed data input / output without requiring bit banging from the ESP32 processor.
 
Provides access to the onboard remote control (RMT) peripheral allowing for high speed data input / output without requiring bit banging from the ESP32 processor.
 +
 +
==Component Pack==
 +
 +
BASICIO
  
 
==Detailed description==
 
==Detailed description==
Line 19: Line 23:
  
  
''No detailed description exists yet for this component''
 
  
==Examples==
 
  
  
  
''<span style="color:red;">No additional examples</span>''
 
  
==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;" | '''SetBuffer'''
 
|-
 
| colspan="2" | Writes data to the RMT buffer&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Index
 
|-
 
| colspan="2" | Array index, Range: 0 - (BufferSize - 1)&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | State0
 
|-
 
| colspan="2" | The first state to output&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Length0
 
|-
 
| colspan="2" | The length of the first output state in divided clock periods&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | State1
 
|-
 
| colspan="2" | The second state to output&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Length1
 
|-
 
| colspan="2" | The length of the second output state in divided clock periods&nbsp;
 
|-
 
| 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;"
+
''No detailed description exists yet for this component''
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Transmit'''
 
|-
 
| colspan="2" | Sends out the RMT data buffer.&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
  
 +
==Examples==
  
{| 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 RMT module ready for data to be sent or received.&nbsp;
 
|-
 
|-
 
| 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;" | '''SetValue'''
 
|-
 
| colspan="2" | Sets the component to the specified value.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | value
 
|-
 
| colspan="2" | A new value for the component.&nbsp;
 
|-
 
| 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;" | '''RefreshChart'''
 
|-
 
| colspan="2" | Redraws the chart.&nbsp;
 
|-
 
|-
 
| 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;" | '''GetData'''
 
|-
 
| colspan="2" | Gets a data point from the specified series.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Series
 
|-
 
| colspan="2" | Which series to add to (1-8)&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Index
 
|-
 
| colspan="2" | The data point index (1 - 32767)&nbsp;
 
|-
 
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:]] -
 
| 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;" | '''AddDataCXYY1'''
 
|-
 
| colspan="2" | Adds a data point to a bubble chart.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Series
 
|-
 
| colspan="2" | Which series to add to (1-8)&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Category
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Y
 
|-
 
| colspan="2" | Y coordinate&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | X
 
|-
 
| colspan="2" | X coordinate&nbsp;
 
|-
 
| width="10%" align="center" | [[File:]] -
 
| width="90%" | Value
 
|-
 
| colspan="2" | The value of the data point&nbsp;
 
|-
 
| 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;"
+
''<span style="color:red;">No additional examples</span>''
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetList'''
 
|-
 
| colspan="2" | Returns CHANNEL or PRESCALE list from the FCD and updates the internal property &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Name
 
|-
 
| colspan="2" | &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''
 
|}
 
  
 +
==Downloadable macro reference==
  
 
{| 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;" | '''InitRXConfig'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TransmitBusy'''
|-
 
| colspan="2" | Initialization setting for RX Buffer Config&nbsp;
 
|-
 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| colspan="2" | Checks to see if the RMT channel is currently transmitting. Returns 1 if transmitting and 0 if transmission is complete.&nbsp;
| width="90%" | Buffer
 
 
|-
 
|-
| colspan="2" | Buffer Number (0 or 1)&nbsp;
 
 
|-
 
|-
| 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%" | Value
 
|-
 
| colspan="2" | Config data byte&nbsp;
 
|-
 
| 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''
 
|}
 
|}
Line 229: Line 65:
 
|-
 
|-
 
| 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;" | '''Uninit'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBuffer'''
 
|-
 
|-
| colspan="2" | Uninitialises the CAN, freeing its connections for general use &nbsp;
+
| colspan="2" | Writes data to the RMT buffer&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | Index
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | Array index, Range: 0 - (BufferSize - 1)&nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetList'''
 
 
|-
 
|-
| colspan="2" | Get the Filter List of the Named Property&nbsp;
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
 +
| width="90%" | State0
 
|-
 
|-
 +
| colspan="2" | The first state to output&nbsp;
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="90%" | Name
+
| width="90%" | Length0
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | The length of the first output state in divided clock periods&nbsp;
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
+
| width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL
| width="90%" style="border-top: 2px solid #000;" | ''Return''
+
| width="90%" | State1
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| colspan="2" | The second state to output&nbsp;
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRxIdent'''
 
 
|-
 
|-
| colspan="2" | Generic function to get the received message Identifier.   &nbsp;
+
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Length1
 
|-
 
|-
 +
| colspan="2" | The length of the second output state in divided clock periods&nbsp;
 
|-
 
|-
| 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%" | buffer
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
Line 278: Line 103:
 
|-
 
|-
 
| 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;" | '''SetRxFilterStd'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Transmit'''
 
|-
 
|-
| colspan="2" | Sets the 16-bit filter as a bit-mask of the standard ID for received messages The messages are accepted if (StdID & Mask) == Filter  &nbsp;
+
| colspan="2" | Sends out the RMT data buffer.&nbsp;
 
|-
 
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Filter
+
| width="90%" | WaitWhileComplete
 
|-
 
|-
| colspan="2" | Filter number&nbsp;
+
| colspan="2" | 0=Dont Wait, 1=Wait for TX to complete&nbsp;
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Hi
 
|-
 
| colspan="2" | The high byte (bits 8-15) of the ID&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Lo
 
|-
 
| colspan="2" | The low byte (bits 0-7) of the ID&nbsp;
 
 
|-
 
|-
 
| 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 306: Line 121:
 
|-
 
|-
 
| 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;" | '''SetRxFilterExd'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
|-
| colspan="2" | Sets the 32-bit filter as a bit-mask of the extended ID for received messages The messages are accepted if (ExtID & Mask) == Filter &nbsp;
+
| colspan="2" | Initialises the RMT module ready for data to be sent or received.&nbsp;
 
|-
 
|-
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Filter
 
|-
 
| colspan="2" | Send filter: 0  to 3&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | ID3
 
|-
 
| colspan="2" | The high byte (bits 24-31) of the ID&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | ID2
 
|-
 
| colspan="2" | The mid-high byte (bits 16-23) of the ID&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | ID1
 
|-
 
| colspan="2" | The mid-low byte (bits 8-15) of the ID&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | ID0
 
|-
 
| colspan="2" | The low byte (bits 0-7) of the ID&nbsp;
 
 
|-
 
|-
 
| 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 375: Line 165:
 
|-
 
|-
 
| colspan="2" | Number of values inside the data buffer, 64 = 1 Block A buffer size of 128 would consume two sequential blocks of memory. If starting at block 1 then you can have a maximum buffer size of 512 consuming all 8 blocks. &nbsp;
 
| colspan="2" | Number of values inside the data buffer, 64 = 1 Block A buffer size of 128 would consume two sequential blocks of memory. If starting at block 1 then you can have a maximum buffer size of 512 consuming all 8 blocks. &nbsp;
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Tx Properties
 +
|-
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
Line 395: Line 189:
 
|-
 
|-
 
| colspan="2" | Sets the output state when idle.&nbsp;
 
| colspan="2" | Sets the output state when idle.&nbsp;
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | RX Filter Enable
 
|-
 
| colspan="2" | Allows the receive data to be filtered.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | RX Idle Threshold
 
|-
 
| colspan="2" | Sets the number of divided clock periods to detect when the receiver is idle. Pulses longer then this period will not be received.&nbsp;
 
|-
 
| 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 17:18, 9 November 2022

Author Matrix TSL
Version 2.0
Category Misc


RMT (Internal) component

Provides access to the onboard remote control (RMT) peripheral allowing for high speed data input / output without requiring bit banging from the ESP32 processor.

Component Pack

BASICIO

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Downloadable macro reference

Fc9-comp-macro.png TransmitBusy
Checks to see if the RMT channel is currently transmitting. Returns 1 if transmitting and 0 if transmission is complete. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png SetBuffer
Writes data to the RMT buffer 
Fc9-u16-icon.png - UINT Index
Array index, Range: 0 - (BufferSize - 1) 
Fc9-bool-icon.png - BOOL State0
The first state to output 
Fc9-u16-icon.png - UINT Length0
The length of the first output state in divided clock periods 
Fc9-bool-icon.png - BOOL State1
The second state to output 
Fc9-u16-icon.png - UINT Length1
The length of the second output state in divided clock periods 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Transmit
Sends out the RMT data buffer. 
Fc9-u8-icon.png - BYTE WaitWhileComplete
0=Dont Wait, 1=Wait for TX to complete 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Initialise
Initialises the RMT module ready for data to be sent or received. 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Mode
Controls if we are transmitting or receiving data 
Fc9-type-5-icon.png Pin
Pin to assign the RMT functionality 
Fc9-type-21-icon.png Clock Divider
Base Clock speed is 80MHz. Div by 1 = 80MHz Div by 2 = 40MHz Div by 4 = 20MHz Div by 8 = 10MHz 
Fc9-type-16-icon.png Mem Block Num
Starting RMT memory block 
Fc9-type-21-icon.png Buffer Size
Number of values inside the data buffer, 64 = 1 Block A buffer size of 128 would consume two sequential blocks of memory. If starting at block 1 then you can have a maximum buffer size of 512 consuming all 8 blocks.  
Fc9-conn-icon.png Tx Properties
Fc9-type-7-icon.png TX Loop Enable
Allows the transmit buffer to be constantly looped. 
Fc9-type-7-icon.png TX Carrier Enable
Enables a carrier frequency to be overlaid on the transmitted data 
Fc9-type-7-icon.png TX Idle Output
When not transmitting should the Transmit pin be an active output? 
Fc9-type-16-icon.png TX Idle Level
Sets the output state when idle.