Difference between revisions of "Component: RC5 (EB060, Generic 36KHz) (Wireless)"
(XML import) |
(XML import) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 7: | Line 7: | ||
|- | |- | ||
| width="20%" style="color: gray;" | Version | | width="20%" style="color: gray;" | Version | ||
− | | 1. | + | | 1.2 (Release) |
|- | |- | ||
| width="20%" style="color: gray;" | Category | | width="20%" style="color: gray;" | Category | ||
Line 15: | Line 15: | ||
− | ==[[ | + | ==[[File:Component Icon 81e90a9f_1594_4b34_8aef_5dd671dddc30.png|Image]] RC5 (EB060, Generic 36KHz) component== |
Low level routines for controlling a standard RC5 IR interface. | Low level routines for controlling a standard RC5 IR interface. | ||
Also available in the form of the EB060 RC5 E-block. | Also available in the form of the EB060 RC5 E-block. | ||
==Examples== | ==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}} | ||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
Line 45: | Line 51: | ||
===<span style="font-weight: normal;"><u><tt>RXDisable</tt></u></span>=== | ===<span style="font-weight: normal;"><u><tt>RXDisable</tt></u></span>=== | ||
− | + | Disables the RC5 data receive functionality. | |
− | |||
− | |||
'''Parameters''' | '''Parameters''' | ||
Line 60: | Line 64: | ||
===<span style="font-weight: normal;"><u><tt>TXPacket</tt></u></span>=== | ===<span style="font-weight: normal;"><u><tt>TXPacket</tt></u></span>=== | ||
− | + | Transmits a RC5 data packet consisting of command, address and toggle bit. | |
− | |||
− | |||
'''Parameters''' | '''Parameters''' | ||
:[[Variable Types|BYTE]] ''command'' | :[[Variable Types|BYTE]] ''command'' | ||
+ | ::Command to send 0-63 | ||
:[[Variable Types|BYTE]] ''address'' | :[[Variable Types|BYTE]] ''address'' | ||
+ | ::Address to send 0-31 | ||
:[[Variable Types|BYTE]] ''toggle'' | :[[Variable Types|BYTE]] ''toggle'' | ||
+ | ::Toggle bit value 0-1 | ||
Line 79: | Line 84: | ||
===<span style="font-weight: normal;"><u><tt>TXEnable</tt></u></span>=== | ===<span style="font-weight: normal;"><u><tt>TXEnable</tt></u></span>=== | ||
− | + | Enables the RC5 data transmit functionality. | |
− | |||
− | |||
'''Parameters''' | '''Parameters''' | ||
Line 111: | Line 114: | ||
===<span style="font-weight: normal;"><u><tt>TXDisable</tt></u></span>=== | ===<span style="font-weight: normal;"><u><tt>TXDisable</tt></u></span>=== | ||
− | + | Disables the RC5 data transmit functionality. | |
− | |||
− | |||
'''Parameters''' | '''Parameters''' | ||
Line 126: | Line 127: | ||
===<span style="font-weight: normal;"><u><tt>RXEnable</tt></u></span>=== | ===<span style="font-weight: normal;"><u><tt>RXEnable</tt></u></span>=== | ||
− | + | Enables the RC5 data receive functionality. | |
− | |||
− | |||
'''Parameters''' | '''Parameters''' | ||
Line 151: | Line 150: | ||
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''ir_freq''. | 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. | |
− | |||
− | |||
<span style="font-weight: normal;"><u>Receive Mode</u></span> | <span style="font-weight: normal;"><u>Receive Mode</u></span> | ||
Line 159: | Line 156: | ||
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''rx_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. | |
− | |||
− | |||
<span style="font-weight: normal;"><u>Invert Signal</u></span> | <span style="font-weight: normal;"><u>Invert Signal</u></span> | ||
Line 167: | Line 162: | ||
This property is of type ''True or false'' and can be referenced with the variable name ''rx_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. | |
− | |||
− | |||
<span style="font-weight: normal;"><u>Address Mask</u></span> | <span style="font-weight: normal;"><u>Address Mask</u></span> | ||
Line 175: | Line 168: | ||
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''rx_addr_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. | |
− | |||
− | |||
<span style="font-weight: normal;"><u>Receive Pin</u></span> | <span style="font-weight: normal;"><u>Receive Pin</u></span> | ||
Line 183: | Line 174: | ||
This property is of type ''Single digital pin'' and can be referenced with the variable name ''rx_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 | |
− | |||
− | |||
<span style="font-weight: normal;"><u>Transmit Mode</u></span> | <span style="font-weight: normal;"><u>Transmit Mode</u></span> | ||
Line 191: | Line 180: | ||
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''tx_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. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<span style="font-weight: normal;"><u>Label</u></span> | <span style="font-weight: normal;"><u>Label</u></span> | ||
Line 239: | Line 186: | ||
This property is of type ''Line of text'' and can be referenced with the variable name ''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. |
Latest revision as of 17:59, 18 March 2016
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
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.