Component: RC5 (EB060, Generic 36KHz) (Wireless)

From Flowcode Help
Revision as of 10:37, 17 November 2021 by Wiki bot (talk | contribs)
Jump to navigationJump to search
Author Matrix Ltd.
Version 1.2
Category 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.

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

Schematic showing the required hardware to combine TX masking pin and PWM output pin.

RC5 TX.jpg

Downloadable macro reference

Fc9-comp-macro.png CollectData
Retreives a value from the last successful RC5 reception. 0 = Read Command 1 = Read Address 2 = Read Toggle Bit 
Fc9-u8-icon.png - BYTE selection
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png RXDisable
Disables the RC5 data receive functionality. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png TXPacket
Transmits a RC5 data packet consisting of command, address and toggle bit. 
Fc9-u8-icon.png - BYTE command
Command to send 0-63 
Fc9-u8-icon.png - BYTE address
Address to send 0-31 
Fc9-u8-icon.png - BYTE toggle
Toggle bit value 0-1 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png TXEnable
Enables the RC5 data transmit functionality. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png 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. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png TXDisable
Disables the RC5 data transmit functionality. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png RXEnable
Enables the RC5 data receive functionality. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png CommsBaud
Sets the Baud rate of the alt communications channel 
Fc9-u8-icon.png - BYTE Baud
Range: 0-7 : 0=1200 / 7=115200 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDOptions
Controls some of the LCD options 
Fc9-u8-icon.png - BYTE Foreground
Range: 0-1 
Fc9-u8-icon.png - BYTE Background
Range: 0-1 
Fc9-u8-icon.png - BYTE Transparent
Range: 0-1 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDVerbose
Controls the Verbose mode. When enabled the LCD automatically displays an account of the incoming API commands and parameters. When switched off the LCD is free for the user to control as required. 
Fc9-u8-icon.png - BYTE Mode
Range: 0-1 : 0=Off or User Mode / 1=API Verbose Mode 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReadDigitalInput
Reads a single digital input. 
Fc9-u8-icon.png - BYTE Channel
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png PWMConfig
Sets the PWM configuration. Channel = 0 - 1 : 0 = EN_AB, A, B / 1 = EN_CD, C, D Period = 0 - 65535 Scaler = 0 - 3 : 0=1:1 1=1:8 2=1:64 3=1:256 
Fc9-u8-icon.png - BYTE Channel
Range 0-1 
Fc9-u16-icon.png - UINT Period
Range: 0-65535 
Fc9-u8-icon.png - BYTE Scaler
Range: 0-3 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png PWMEnable
Allows pulse width modulated transistor outputs to be switched on or off. Bit 0 = Enable AB Bit 1 = A / Bit 2 = B Bit 3 = C / Bit 4 = D Bit 5 = Enable CD 
Fc9-u8-icon.png - BYTE EnableMask
Range 0-63 or 0b00000 to 0b111111 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png PWMDuty
Sets a single PWM channel duty. Channel = 0 - 5 : 0=EN_AB, 1=A, 2=B, 3=C, 4=D, 5=EN_CD Duty = 0 - 65535 
Fc9-u8-icon.png - BYTE Channel
Range 0-5 
Fc9-u16-icon.png - UINT Duty
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDCursor
Sets the cursor position for the MIAC display 
Fc9-u8-icon.png - BYTE X
Range: 0-21 
Fc9-u8-icon.png - BYTE Y
Range: 0-4 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png WriteTran
Allows a single transistor output to be switched on or off. 
Fc9-u8-icon.png - BYTE Channel
Range 1-4 
Fc9-u8-icon.png - BYTE Value
0 = Off, 1 = On 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDClear
Clears the MIAC display 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png LCDClear
Clears the LCD 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-21-icon.png IR Frequency
The infra-red modulation frequency used when transmitting a logic one. 
Fc9-type-16-icon.png Receive Mode
Specifies which receive mode the program should use. 
Fc9-type-7-icon.png Invert Signal
Allows the incoming signal to automatically be inverted if needed by the receive hardware. 
Fc9-type-16-icon.png Address Mask
What incoming values should we allow to make it through to the CheckRx macro. 
Fc9-type-5-icon.png Receive Pin
Pin assigned to receive incoming RC5 data 
Fc9-type-16-icon.png Transmit Mode
Specifies which transmit mode the program should use. 
Fc9-type-10-icon.png Label
Label used to help identify the component on the panel. 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations