332
Tibbo Project System (TPS)
© Tibbo Technology Inc.
Command Register
Address = &h000; read/write access
This register is used to direct the Tibbit to start receiving IR data or start
transmitting IR data. This register also contains three option bits.
·
Bit 4,
carrier mode
:
0- incoming signal contains the carrier frequency, 1- incoming
signal does not contain the carrier frequency.
·
Bit 3,
data output mode: 0- LOW to turn the emitter LED on (normal mode), 1-
HIGH to turn the emitter LED on (inverted mode).
·
Bit 2,
data input mode: 0- LOW means that the IR light is detected (normal
mode), 1- HIGH means that the IR light is detected (inverted mode).
·
Bit 1:
"Rising edge" on this bit directs the Tibbit to start receiving data.
·
Bit 0:
"Rising edge" on this bit directs the Tibbit to start transmitting data.
"Rising edge" for bits 1 and 0 refers to the change of the bit state. For example, to
initiate data reception in the no-carrier mode, do the following:
·
Write
&h10
into the command register. This will set bit 4 (carrier mode) to the
desired state and clear bit 1.
·
Write
&h12
into the command register. This will still keep bit 4 in the desired
state and set bit 1 to HIGH. Since this bit was previously set LOW, this second
step will achieve the "rising edge" on bit 1.
Note that two writes above are two separate
store &h10 and &h12 into the command register.
Status Register
Address = &h001; read-only access
This register reports the status of the data recording and transmission (playback).
·
Bit 1:
0- IR data transmission is in progress, 1- IR data transmission has been
completed.
·
Bit 0:
0- IR data recording is in progress, 1- IR data recording has been
completed. If the data recording fails (i.e. because no IR signal has been received
at all) then this bit will remain at 0.
TX Length Registers
Address = &h002 (low byte) and &h003 (high byte); read/write
access
Low and high bytes of the length of data prepared for transmission in the
. Your program must set the actual length of data prepared for transmission.
Note that the data length is expressed in bytes (even though the logical unit of
data in the TX buffer is a 16-bit word).