C Control The I Unit-M Advanced 5 Vdc Inputs / outputs 16 x digital I/Os / 8 x analogue or digital I/Os Program memory 2 198805 Datenbogen
Produktcode
198805
IR OBJECT
The IR Object supports all basic functions for infrared communication (based on the RC5 format) in an very
easy manner. The IR Receiver/Transmitter connected to PORT 2 (RX) und PORT 3 (TX).
The RC5 data format consists of a device address and a data byte reveived from (or transmitted to) a IR
remote device. Even Word sized values are accepted, IR.SEND/GET will transfer 6 bytes for command and
6 bytes for address and Toggle.
easy manner. The IR Receiver/Transmitter connected to PORT 2 (RX) und PORT 3 (TX).
The RC5 data format consists of a device address and a data byte reveived from (or transmitted to) a IR
remote device. Even Word sized values are accepted, IR.SEND/GET will transfer 6 bytes for command and
6 bytes for address and Toggle.
RC5 FORMAT:
13-12-11-10-09-08-07-06-05-04-03-02-01-00 DATA BIT
S S T a4 a3 a2 a1 a0 c5 c4 c3 c2 c1 c0 RC5 Format
S = Start Bit (auto set/remove by the IR OBject)
T = Toggle
a = Address
c = Command
The IR MODULE expects a receiver connected at port 2 and the
transmitter connected to port 3
13-12-11-10-09-08-07-06-05-04-03-02-01-00 DATA BIT
S S T a4 a3 a2 a1 a0 c5 c4 c3 c2 c1 c0 RC5 Format
S = Start Bit (auto set/remove by the IR OBject)
T = Toggle
a = Address
c = Command
The IR MODULE expects a receiver connected at port 2 and the
transmitter connected to port 3
IR.INIT
Activate the Object to get access to its registers for read/write operation. Close other Objects prior to open.
Syntax: OBJECT.instruction
IR.INIT
IR.SEND MyAddress , MyByte
IR.OFF
IR.GET
IR.SEND
Access the I²C bus to read/write a binary value.
Syntax: OBJECT.instruction Address,Data
Address: Variable or constant which is send as address
at write access (SEND)
Variable, the received address is moved to at read
access. Valid for word and byte size.
IR.INIT
IR.GET MyAddress , MyByte
IR.OFF
Data: Variable or constant which is send as data
at write access (SEND)
Variable, the received data is moved to at read
access. Valid for word and byte size.
Both values (address and data) will be read as 255 if no valid data frame was received i.e if the receive
buffer is empty The receive buffer is set to 255 (address and data) if it has been read.
IR.OFF
Close the Object prior to open any other Object.
Syntax: OBJECT.instruction
24