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

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
(9 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.2 (Release)
+
| 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
===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.
+
==Detailed description==
{{Fcfile|RC5_Test_Rx.fcfx|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.
 
{{Fcfile|RC5_Test_Tx.fcfx|RC5 Transmit Example}}
 
  
==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>===
+
''No detailed description exists yet for this component''
Disables the RC5 data receive functionality.
 
  
'''Parameters'''
+
==Examples==
  
:''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>===
 
Transmits a RC5 data packet consisting of command, address and toggle bit.
 
  
'''Parameters'''
 
  
:[[Variable Types|BYTE]] ''command''
 
::Command to send 0-63
 
  
:[[Variable Types|BYTE]] ''address''
 
::Address to send 0-31
 
  
:[[Variable Types|BYTE]] ''toggle''
 
::Toggle bit value 0-1
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
 +
===Receive Data===
  
===<span style="font-weight: normal;"><u><tt>TXEnable</tt></u></span>===
+
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.
Enables the RC5 data transmit functionality.
+
{{Fcfile|RC5_Test_Rx.fcfx|RC5 Receive Example}}
 +
===Transmit Data===
  
'''Parameters'''
+
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}}
  
:''This macro has no parameters''
+
Schematic showing the required hardware to combine TX masking pin and PWM output pin.
  
 +
[[file:RC5_TX.jpg]]
  
'''Return value'''
+
==Downloadable macro reference==
  
:''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;" | '''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''
 +
|}
  
  
===<span style="font-weight: normal;"><u><tt>CheckRx</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Checks to see if a new RC5 packet has been received.
+
|-
 +
| 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''
 +
|}
  
Returns 0 to signify no new data available.
 
  
Returns 1 to signify there is 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;" | '''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''
 +
|}
  
'''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;" | '''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''
 +
|}
  
  
'''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;" | '''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''
 +
|}
  
:[[Variable Types|BYTE]]
 
  
 +
{| 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>TXDisable</tt></u></span>===
 
Disables the RC5 data transmit functionality.
 
  
'''Parameters'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
:''This macro has no parameters''
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RXEnable'''
 
+
|-
'''Return value'''
+
| 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''
 +
|}
  
:''This call does not return a value''
 
  
 
===<span style="font-weight: normal;"><u><tt>RXEnable</tt></u></span>===
 
Enables the RC5 data receive functionality.
 
 
'''Parameters'''
 
 
:''This macro has no parameters''
 
 
 
'''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;"
 
+
|-
The infra-red modulation frequency used when transmitting a logic one.
+
| 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>
+
|-
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''rx_mode''.
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | IR Frequency
Specifies which receive mode the program should use.
+
|-
 
+
| colspan="2" | The infra-red modulation frequency used when transmitting a logic one.&nbsp;
<span style="font-weight: normal;"><u>Invert Signal</u></span>
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
This property is of type ''True or false'' and can be referenced with the variable name ''rx_invert_signal''.
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Receive Properties
 
+
|-
Allows the incoming signal to automatically be inverted if needed by the receive hardware.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
<span style="font-weight: normal;"><u>Address Mask</u></span>
+
| width="90%" | Receive Mode
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''rx_addr_mask''.
+
| colspan="2" | Specifies which receive mode the program should use.&nbsp;
 
+
|-
What incoming values should we allow to make it through to the CheckRx macro.
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
+
| width="90%" | Invert Signal
<span style="font-weight: normal;"><u>Receive Pin</u></span>
+
|-
 
+
| colspan="2" | Allows the incoming signal to automatically be inverted if needed by the receive hardware.&nbsp;
This property is of type ''Single digital pin'' and can be referenced with the variable name ''rx_pin''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Pin assigned to receive incoming RC5 data
+
| width="90%" | Address Mask
 
+
|-
<span style="font-weight: normal;"><u>Transmit Mode</u></span>
+
| colspan="2" | What incoming values should we allow to make it through to the CheckRx macro.&nbsp;
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''tx_mode''.
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 
+
| width="90%" | Receive Pin
Specifies which transmit mode the program should use.
+
|-
 
+
| colspan="2" | Pin assigned to receive incoming RC5 data&nbsp;
<span style="font-weight: normal;"><u>Label</u></span>
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
This property is of type ''Line of text'' and can be referenced with the variable name ''label''.
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Transmit Properties
 
+
|-
Label used to help identify the component on the panel.
+
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Transmit Mode
 +
|-
 +
| colspan="2" | Specifies which transmit mode the program should use.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | Label
 +
|-
 +
| colspan="2" | Label used to help identify the component on the panel.&nbsp;
 +
|}

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.