Difference between revisions of "Component: RC5 (EB060, Generic 36KHz) (Misc)"
Line 17: | Line 17: | ||
==Component Source Code== | ==Component Source Code== | ||
− | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/ | + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/RC5.fcfx FC_Comp_Source_temp/RC5.fcfx] |
− | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/ | + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/RC5.fcfx FC_Comp_Source_temp/RC5.fcfx] |
==Detailed description== | ==Detailed description== | ||
Line 84: | Line 84: | ||
[[file:RC5_TX.jpg]] | [[file:RC5_TX.jpg]] | ||
+ | |||
+ | |||
Line 90: | Line 92: | ||
==Macro reference== | ==Macro reference== | ||
+ | |||
+ | ===CheckRx=== | ||
+ | {| 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. | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
+ | |||
===CollectData=== | ===CollectData=== | ||
Line 124: | Line 140: | ||
− | === | + | ===RXEnable=== |
{| 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RXEnable''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Enables the RC5 data receive functionality. |
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| 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 153: | Line 154: | ||
− | === | + | ===TXDisable=== |
{| 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TXDisable''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Disables the RC5 data transmit functionality. |
|- | |- | ||
|- | |- | ||
Line 167: | Line 168: | ||
− | === | + | ===TXEnable=== |
{| 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TXEnable''' |
|- | |- | ||
− | | colspan="2" | | + | | colspan="2" | Enables the RC5 data transmit functionality. |
|- | |- | ||
|- | |- | ||
− | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9- | + | | 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'' | ||
|} | |} | ||
− | === | + | ===TXPacket=== |
{| 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;" | ''' | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''TXPacket''' |
+ | |- | ||
+ | | colspan="2" | Transmits a RC5 data packet consisting of command, address and toggle bit. | ||
+ | |- | ||
|- | |- | ||
− | | | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
+ | | width="90%" | command | ||
|- | |- | ||
+ | | colspan="2" | Command to send 0-63 | ||
|- | |- | ||
− | | width="10%" align="center | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
− | | width="90%" | + | | width="90%" | address |
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | | | + | | colspan="2" | Address to send 0-31 |
− | |||
|- | |- | ||
− | | | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE |
+ | | width="90%" | toggle | ||
|- | |- | ||
+ | | colspan="2" | Toggle bit value 0-1 | ||
|- | |- | ||
| 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 |
Revision as of 12:02, 3 February 2023
Author | Matrix Ltd. |
Version | 1.2 |
Category | Misc |
Contents
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 Source Code
Please click here to download the component source project: FC_Comp_Source_temp/RC5.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_temp/RC5.fcfx
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. 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. RC5 Transmit Example
Schematic showing the required hardware to combine TX masking pin and PWM output pin.
Macro reference
CheckRx
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. | |
- BYTE | Return |
CollectData
CollectData | |
Retreives a value from the last successful RC5 reception. 0 = Read Command 1 = Read Address 2 = Read Toggle Bit | |
- BYTE | selection |
- BYTE | Return |
RXDisable
RXDisable | |
Disables the RC5 data receive functionality. | |
- VOID | Return |
RXEnable
RXEnable | |
Enables the RC5 data receive functionality. | |
- VOID | Return |
TXDisable
TXDisable | |
Disables the RC5 data transmit functionality. | |
- VOID | Return |
TXEnable
TXEnable | |
Enables the RC5 data transmit functionality. | |
- VOID | Return |
TXPacket