Difference between revisions of "Component: RC5 (EB060, Generic 36KHz) (Wireless)"
(XML import BR) |
|||
Line 28: | Line 28: | ||
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. | 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}} | {{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== | ==Downloadable macro reference== |
Revision as of 11:22, 15 January 2021
Author | Matrix Ltd. |
Version | 1.2 (Release) |
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.
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
Parameters
- BYTE selection
Return value
RXDisable
Disables the RC5 data receive functionality.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
TXPacket
Transmits a RC5 data packet consisting of command, address and toggle bit.
Parameters
- BYTE command
- Command to send 0-63
- BYTE address
- Address to send 0-31
- BYTE toggle
- Toggle bit value 0-1
Return value
- This call does not return a value
TXEnable
Enables the RC5 data transmit functionality.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
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.
Parameters
- This macro has no parameters
Return value
TXDisable
Disables the RC5 data transmit functionality.
Parameters
- This macro has no parameters
Return value
- This call does not return a value
RXEnable
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
IR Frequency
This property is of type Unsigned integer and can be referenced with the variable name ir_freq.
The infra-red modulation frequency used when transmitting a logic one.
Receive Mode
This property is of type Fixed list of ints and can be referenced with the variable name rx_mode.
Specifies which receive mode the program should use.
Invert Signal
This property is of type True or false and can be referenced with the variable name rx_invert_signal.
Allows the incoming signal to automatically be inverted if needed by the receive hardware.
Address Mask
This property is of type Fixed list of ints and can be referenced with the variable name rx_addr_mask.
What incoming values should we allow to make it through to the CheckRx macro.
Receive Pin
This property is of type Single digital pin and can be referenced with the variable name rx_pin.
Pin assigned to receive incoming RC5 data
Transmit Mode
This property is of type Fixed list of ints and can be referenced with the variable name tx_mode.
Specifies which transmit mode the program should use.
Label
This property is of type Line of text and can be referenced with the variable name label.
Label used to help identify the component on the panel.