Difference between revisions of "Component: RC5 (EB060, Generic 36KHz) (Wireless)"
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {| 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.2 | + | | 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. | ||
− | == | + | ==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. | |
− | + | {{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}} | ||
− | + | Schematic showing the required hardware to combine TX masking pin and PWM output pin. | |
− | : | + | [[file:RC5_TX.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;" | '''CollectData''' | ||
+ | |- | ||
+ | | colspan="2" | Retreives a value from the last successful RC5 reception. 0 = Read Command 1 = Read Address 2 = Read Toggle Bit | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | width="90%" | selection | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | 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;" | '''RXDisable''' | ||
+ | |- | ||
+ | | colspan="2" | Disables the RC5 data receive functionality. | ||
+ | |- | ||
+ | |- | ||
+ | | 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;" | '''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" | [[File:Fc9-u8-icon.png]] - BYTE | ||
+ | | 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="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;" | '''TXEnable''' | ||
+ | |- | ||
+ | | colspan="2" | Enables the RC5 data transmit functionality. | ||
+ | |- | ||
+ | |- | ||
+ | | 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. | + | {| 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'' | ||
+ | |} | ||
− | |||
− | + | {| 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. | |
− | + | |- | |
− | :[[ | + | |- |
− | + | | 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'' | |
− | = | + | |} |
− | Disables the RC5 data transmit functionality. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == | ||
− | |||
− | |||
− | |||
− | |||
− | : | ||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | {| 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. | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | |||
− | |||
==Property reference== | ==Property reference== | ||
− | |||
− | + | {| 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''' | |
− | + | |- | |
− | + | |- | |
− | + | | 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. | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
− | + | | 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]] | |
− | + | | width="90%" | Receive Mode | |
− | + | |- | |
− | + | | colspan="2" | Specifies which receive mode the program should use. | |
− | + | |- | |
− | 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 | |
− | + | |- | |
− | + | | colspan="2" | Allows the incoming signal to automatically be inverted if needed by the receive hardware. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | Pin assigned to receive incoming RC5 data | + | | width="90%" | Address Mask |
− | + | |- | |
− | + | | colspan="2" | What incoming values should we allow to make it through to the CheckRx macro. | |
− | + | |- | |
− | + | | 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 | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
− | + | | 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. | ||
+ | |- | ||
+ | | 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. | ||
+ | |} |
Latest revision as of 17:21, 9 November 2022
Author | Matrix Ltd. |
Version | 1.2 |
Category | Wireless |
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 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.
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.
Downloadable macro reference
![]() |
CollectData |
Retreives a value from the last successful RC5 reception. 0 = Read Command 1 = Read Address 2 = Read Toggle Bit | |
![]() |
selection |
![]() |
Return |
![]() |
RXDisable |
Disables the RC5 data receive functionality. | |
![]() |
Return |
![]() |
TXEnable |
Enables the RC5 data transmit functionality. | |
![]() |
Return |
![]() |
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. | |
![]() |
Return |
![]() |
TXDisable |
Disables the RC5 data transmit functionality. | |
![]() |
Return |
![]() |
RXEnable |
Enables the RC5 data receive functionality. | |
![]() |
Return |