Latch mode, Receiver control mode, Tx id – Linx Technologies LICAL-DEC-MS001 User Manual

Page 8: System example

Advertising
background image

10

11

Latch Mode

The MS Series decoder has two output options based on the state of the
LATCH line. If it is low, then the data lines are momentary, meaning that
they are only high for as long as a valid signal is received. Once the signal
stops and the decoder times out, the lines are pulled low.

If the LATCH line is high, the decoder pulls a data line high upon reception
of a valid signal and holds it high until the signal is received a second time,
at which point the decoder pulls it low. The decoder must see a break and
time out between valid transmissions before it toggles the outputs. The
minimum required time-out periods are listed in the Receive Mode section.

Receiver Control Mode

If the RX_CNTL line is pulled high when the decoder initially powers on,
then the decoder enters Receiver Control Mode. Once in this mode, the
RX_CNTL line becomes an output that can be attached to the PDN or
V

CC

line of a Linx receiver or a similar input on another receiver. This allows

the decoder to power down the receiver when it is not required, thereby
reducing current consumption and prolonging battery life. The decoder
draws full current in this mode, but an active receiver typically draws much
more than the decoder, so a savings is realized.

The decoder activates the receiver for approximately one packet’s time plus
10ms for the receiver to power up, so the actual “on” time depends on the
baud rate chosen by the user. This time can be calculated in milliseconds
as (60/Baud Rate)(1000) + 10. The “off” time is nine times the “on” time,
resulting in a 10% duty cycle, greatly reducing the receiver’s current
consumption. However, there may be a lag time from when the encoder
activates to when the decoder responds. The decoder enters Receive
Mode when it sees a valid packet, so there would only be a lag for the first
packet. This can be reduced by selecting a higher baud rate.

If this feature is not going to be used, then this pin should be tied to
ground. If it is tied to V

CC

, then the decoder will create a short when it pulls

the line to ground while trying to power down the receiver. This mode is
appropriate for receivers that have a high internal pull-up resistance, such
as those offered by Linx. If the intended receiver does not have a pull-up,
then a 100k

Ω or larger resistor to V

CC

can be added to the RX_CNTL line to

activate this mode.

TX ID

The TX_ID line outputs an eight-bit binary number to identify which learned
encoder sent the transmission. The number is output at the baud rate
set by the SEL_BAUD lines and normally corresponds to the order in
which the decoder learned the encoder, so the first encoder learned gets
number ‘1’, the second gets number ‘2’, and so on. An exception arises
when the memory is full, in which case the first numbers are overwritten as
described in the Learn Mode section. Application Note AN-00156 shows
some example software to read the TX_ID and associate it with a particular
encoder. The C and Visual Basic code is well documented so that it can be
modified for a specific application.

System Example

The first step in using the decoder is to set the baud rate and determine
if the outputs should be latched or momentary. Next, the decoder needs
to learn the encoder’s Address. This is done by momentarily pressing the
button connected to the LEARN line. The LED connected to the MODE_
IND line begins to flash to indicate that the decoder is ready to learn a new
Address. One of the buttons on the transmitter is pressed to send a signal
to the decoder. Once this is done, the LEARN button is pressed again to
exit Learn Mode.

Now, when a button is pressed on the encoder, the corresponding line on
the decoder activates. If the LATCH line is high, the data line remains high
until the encoder button is pressed again, telling the decoder to pull the line
low.

To clear the decoder's memory, the LEARN button is pressed and held
for ten seconds until the MODE_IND line goes low. Once the button is
released, the LED lights for two seconds to indicate that the memory has
been cleared.

Advertising