Difference between revisions of "Component: RC5 (EB060, Generic 36KHz) (Wireless)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{| width="50%"
+
{| style="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.1
+
| 1.2
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Wireless
 
| Wireless
 
|}
 
|}
  
  
 +
==RC5 (EB060, Generic 36KHz) component==
 +
Low level routines for controlling a standard RC5 IR interface. Also available in the form of the EB060 RC5 E-block.
  
==[[File:Component Icon 81e90a9f_1594_4b34_8aef_5dd671dddc30.png|Image]] RC5 (EB060, Generic 36KHz) component==
+
==Component Pack==
Low level routines for controlling a standard RC5 IR interface.
 
Also available in the form of the EB060 RC5 E-block.
 
  
==Examples==
+
COMMSB
''<span style="color:red;">No additional examples</span>''
 
  
 +
==Detailed description==
  
==Downloadable macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>CollectData</tt></u></span>===
 
Retreives a value from the last successful RC5 reception.
 
  
0 = Read Command
 
  
1 = Read Address
 
  
2 = Read Toggle Bit
 
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''selection''
 
  
  
'''Return value'''
 
  
:[[Variable Types|BYTE]]
 
  
  
===<span style="font-weight: normal;"><u><tt>RXDisable</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
  
 +
''No detailed description exists yet for this component''
  
 +
==Examples==
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>TXPacket</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
  
  
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''command''
 
  
:[[Variable Types|BYTE]] ''address''
 
  
:[[Variable Types|BYTE]] ''toggle''
 
  
 +
===Receive Data===
  
'''Return value'''
+
Example to receive data via RC5 encoded IR. RC5 incoming data pin connected to pin RB0. If a valid RC5 packet is received then the 8-bit data is shown on the PORTD pins and the 5-bit address data is shown on the PORTA pins.
 +
{{Fcfile|RC5_Test_Rx.fcfx|RC5 Receive Example}}
 +
===Transmit Data===
  
:''This call does not return a value''
+
Example to send data via RC5 encoded IR. The transmission is done via the RC0 pin and the modulation is performed by the PWM output signal on the RC2 pin. The data and address values are incremented after each transmission.
 +
{{Fcfile|RC5_Test_Tx.fcfx|RC5 Transmit Example}}
  
 +
Schematic showing the required hardware to combine TX masking pin and PWM output pin.
  
===<span style="font-weight: normal;"><u><tt>TXEnable</tt></u></span>===
+
[[file:RC5_TX.jpg]]
''<span style="color:red;">No additional information</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;" | '''CollectData'''
 +
|-
 +
| colspan="2" | Retreives a value from the last successful RC5 reception. 0 = Read Command 1 = Read Address 2 = Read Toggle Bit&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | selection
 +
|-
 +
| colspan="2" | &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''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
{| 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;" | '''RXDisable'''
 +
|-
 +
| colspan="2" | Disables the RC5 data receive functionality.&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''
 +
|}
  
  
'''Return value'''
+
{| 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;" | '''TXPacket'''
 +
|-
 +
| colspan="2" | Transmits a RC5 data packet consisting of command, address and toggle bit.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | command
 +
|-
 +
| colspan="2" | Command to send 0-63&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | address
 +
|-
 +
| colspan="2" | Address to send 0-31&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | toggle
 +
|-
 +
| colspan="2" | Toggle bit value 0-1&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''
 +
|}
  
:''This call does not return a value''
 
  
 +
{| 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;" | '''TXEnable'''
 +
|-
 +
| colspan="2" | Enables the RC5 data transmit functionality.&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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>CheckRx</tt></u></span>===
 
Checks to see if a new RC5 packet has been received.
 
  
Returns 0 to signify no new data available.
+
{| 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;" | '''CheckRx'''
 +
|-
 +
| colspan="2" | Checks to see if a new RC5 packet has been received. Returns 0 to signify no new data available. Returns 1 to signify there is new data available.&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''
 +
|}
  
Returns 1 to signify there is new data available.
 
  
'''Parameters'''
+
{| 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;" | '''TXDisable'''
 +
|-
 +
| colspan="2" | Disables the RC5 data transmit functionality.&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''
 +
|}
  
:''This macro has no parameters''
 
 
 
'''Return value'''
 
 
:[[Variable Types|BYTE]]
 
 
 
===<span style="font-weight: normal;"><u><tt>TXDisable</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
'''Parameters'''
 
 
:''This macro has no parameters''
 
 
 
'''Return value'''
 
 
:''This call does not return a value''
 
 
 
===<span style="font-weight: normal;"><u><tt>RXEnable</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
'''Parameters'''
 
 
:''This macro has no parameters''
 
  
 +
{| 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;" | '''RXEnable'''
 +
|-
 +
| colspan="2" | Enables the RC5 data receive functionality.&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''
 +
|}
  
'''Return value'''
 
  
:''This call does not return a value''
 
 
 
 
==Simulation macro reference==
 
 
''This component does not contain any simulation macros''
 
  
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>IR Frequency</u></span>
 
  
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''ir_freq''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Receive Mode</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | IR Frequency
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''rx_mode''.
+
|-
 
+
| colspan="2" | The infra-red modulation frequency used when transmitting a logic one.&nbsp;
''<span style="color:red;">No additional information</span>''
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Receive Properties
 
+
|-
<span style="font-weight: normal;"><u>Invert Signal</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
This property is of type ''True or false'' and can be referenced with the variable name ''rx_invert_signal''.
+
| width="90%" | Receive Mode
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| colspan="2" | Specifies which receive mode the program should use.&nbsp;
 
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
+
| width="90%" | Invert Signal
<span style="font-weight: normal;"><u>Address Mask</u></span>
+
|-
 
+
| colspan="2" | Allows the incoming signal to automatically be inverted if needed by the receive hardware.&nbsp;
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''rx_addr_mask''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
''<span style="color:red;">No additional information</span>''
+
| width="90%" | Address Mask
 
+
|-
 
+
| colspan="2" | What incoming values should we allow to make it through to the CheckRx macro.&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Receive Pin</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | Receive Pin
This property is of type ''Single digital pin'' and can be referenced with the variable name ''rx_pin''.
+
|-
 
+
| colspan="2" | Pin assigned to receive incoming RC5 data&nbsp;
''<span style="color:red;">No additional information</span>''
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Transmit Properties
 
+
|-
<span style="font-weight: normal;"><u>Transmit Mode</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''tx_mode''.
+
| width="90%" | Transmit Mode
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| colspan="2" | Specifies which transmit mode the program should use.&nbsp;
 
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 
+
| width="90%" | Label
<span style="font-weight: normal;"><u>Modulation</u></span>
+
|-
 
+
| colspan="2" | Label used to help identify the component on the panel.&nbsp;
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''tx_modulation''.
+
|}
 
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
<span style="font-weight: normal;"><u>PWM Channel</u></span>
 
 
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''tx_pwm_chan''.
 
 
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
<span style="font-weight: normal;"><u>Transmit Pin</u></span>
 
 
 
This property is of type ''Single digital pin'' and can be referenced with the variable name ''tx_pin''.
 
 
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
<span style="font-weight: normal;"><u>PWM Pin</u></span>
 
 
 
This property is of type ''Single digital pin'' and can be referenced with the variable name ''tx_pwm_pin''.
 
 
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
<span style="font-weight: normal;"><u>Remap Pin</u></span>
 
 
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''RemapPin''.
 
 
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
<span style="font-weight: normal;"><u>Label</u></span>
 
 
 
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
 
 
 
''<span style="color:red;">No additional information</span>''
 

Latest revision as of 17:21, 9 November 2022

Author Matrix Ltd.
Version 1.2
Category Wireless


RC5 (EB060, Generic 36KHz) component

Low level routines for controlling a standard RC5 IR interface. Also available in the form of the EB060 RC5 E-block.

Component Pack

COMMSB

Detailed description

No detailed description exists yet for this component

Examples

Receive Data

Example to receive data via RC5 encoded IR. RC5 incoming data pin connected to pin RB0. If a valid RC5 packet is received then the 8-bit data is shown on the PORTD pins and the 5-bit address data is shown on the PORTA pins. FC6 Icon.png RC5 Receive Example

Transmit Data

Example to send data via RC5 encoded IR. The transmission is done via the RC0 pin and the modulation is performed by the PWM output signal on the RC2 pin. The data and address values are incremented after each transmission. FC6 Icon.png RC5 Transmit Example

Schematic showing the required hardware to combine TX masking pin and PWM output pin.

RC5 TX.jpg

Downloadable macro reference

Fc9-comp-macro.png CollectData
Retreives a value from the last successful RC5 reception. 0 = Read Command 1 = Read Address 2 = Read Toggle Bit 
Fc9-u8-icon.png - BYTE selection
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png RXDisable
Disables the RC5 data receive functionality. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png TXPacket
Transmits a RC5 data packet consisting of command, address and toggle bit. 
Fc9-u8-icon.png - BYTE command
Command to send 0-63 
Fc9-u8-icon.png - BYTE address
Address to send 0-31 
Fc9-u8-icon.png - BYTE toggle
Toggle bit value 0-1 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png TXEnable
Enables the RC5 data transmit functionality. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png CheckRx
Checks to see if a new RC5 packet has been received. Returns 0 to signify no new data available. Returns 1 to signify there is new data available. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png TXDisable
Disables the RC5 data transmit functionality. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png RXEnable
Enables the RC5 data receive functionality. 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-21-icon.png IR Frequency
The infra-red modulation frequency used when transmitting a logic one. 
Fc9-conn-icon.png Receive Properties
Fc9-type-16-icon.png Receive Mode
Specifies which receive mode the program should use. 
Fc9-type-7-icon.png Invert Signal
Allows the incoming signal to automatically be inverted if needed by the receive hardware. 
Fc9-type-16-icon.png Address Mask
What incoming values should we allow to make it through to the CheckRx macro. 
Fc9-type-5-icon.png Receive Pin
Pin assigned to receive incoming RC5 data 
Fc9-conn-icon.png Transmit Properties
Fc9-type-16-icon.png Transmit Mode
Specifies which transmit mode the program should use. 
Fc9-type-10-icon.png Label
Label used to help identify the component on the panel.