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

From Flowcode Help
Jump to navigationJump to search
(XML import)
Line 1: Line 1:
 +
 +
 
{| width="50%"
 
{| width="50%"
 
|-
 
|-
Line 5: Line 7:
 
|-
 
|-
 
| width="20%" style="color: gray;" | Version
 
| width="20%" style="color: gray;" | Version
| 1.1
+
| 1.1 (Release)
 
|-
 
|-
 
| width="20%" style="color: gray;" | Category
 
| width="20%" style="color: gray;" | Category
Line 22: Line 24:
  
 
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.
 
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}}
 
{{Fcfile|RC5_Test_Rx.fcfx|RC5 Receive Example}}
 
 
 
===Transmit Data===
 
===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.
 
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}}
  
Line 54: Line 52:
  
 
===<span style="font-weight: normal;"><u><tt>RXDisable</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>RXDisable</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Disables the RC5 data receive functionality.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
Line 69: Line 65:
  
 
===<span style="font-weight: normal;"><u><tt>TXPacket</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>TXPacket</tt></u></span>===
''<span style="color:red;">No additional information</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 88: Line 85:
  
 
===<span style="font-weight: normal;"><u><tt>TXEnable</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>TXEnable</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Enables the RC5 data transmit functionality.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
Line 120: Line 115:
  
 
===<span style="font-weight: normal;"><u><tt>TXDisable</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>TXDisable</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Disables the RC5 data transmit functionality.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
Line 135: Line 128:
  
 
===<span style="font-weight: normal;"><u><tt>RXEnable</tt></u></span>===
 
===<span style="font-weight: normal;"><u><tt>RXEnable</tt></u></span>===
''<span style="color:red;">No additional information</span>''
+
Enables the RC5 data receive functionality.
 
 
 
 
  
 
'''Parameters'''
 
'''Parameters'''
Line 160: Line 151:
 
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''.
  
''<span style="color:red;">No additional information</span>''
+
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 168: Line 157:
 
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''.
  
''<span style="color:red;">No additional information</span>''
+
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 176: Line 163:
 
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''.
  
''<span style="color:red;">No additional information</span>''
+
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 184: Line 169:
 
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''.
  
''<span style="color:red;">No additional information</span>''
+
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 192: Line 175:
 
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''.
  
''<span style="color:red;">No additional information</span>''
+
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 200: Line 181:
 
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''.
  
''<span style="color:red;">No additional information</span>''
+
Specifies which transmit mode the program should use.
 
 
 
 
 
 
<span style="font-weight: normal;"><u>Modulation</u></span>
 
 
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''tx_modulation''.
 
 
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
<span style="font-weight: normal;"><u>PWM Channel</u></span>
 
 
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''tx_pwm_chan''.
 
 
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
<span style="font-weight: normal;"><u>Transmit Pin</u></span>
 
 
 
This property is of type ''Single digital pin'' and can be referenced with the variable name ''tx_pin''.
 
 
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
<span style="font-weight: normal;"><u>PWM Pin</u></span>
 
 
 
This property is of type ''Single digital pin'' and can be referenced with the variable name ''tx_pwm_pin''.
 
 
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
<span style="font-weight: normal;"><u>Remap Pin</u></span>
 
 
 
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''RemapPin''.
 
 
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
  
 
<span style="font-weight: normal;"><u>Label</u></span>
 
<span style="font-weight: normal;"><u>Label</u></span>
Line 248: Line 187:
 
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''.
  
''<span style="color:red;">No additional information</span>''
+
Label used to help identify the component on the panel.

Revision as of 11:25, 13 February 2015


Author Matrix Ltd.
Version 1.1 (Release)
Category Wireless


Image 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. 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

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

BYTE


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

BYTE


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.