Longo programmable controller LPC-2.SM6
4.3 IR learn, receive and transmit
LPC-2.SM6 module can be learned to recognize 15 different IR commands. Module enters IR learning
mode as soon as the left pair of DIP switches (S1) are not in position for "No learning - receive only" –
see table 4.
IR learn is demonstrated on the example on how to learn LPC-2.SM6 the IR command "power ON"
from third-party IR remote controller for air conditioning and store it under command 15 in the LPC-
2.SM6 internal memory. IR receive and transmit is demonstrated on the example how to verify
stored IR commands.
IR learn
Set the S1 DIP switches to the setting than corresponds to the number under which IR command will
be stored. In this example, switches must be set to setting "learning mode for command 15". Once
this is done, LPC-2.SM6 is ready to receive the IR command from the remote controller and store it
to internal memory under command 15.
Press the button on the IR remote controller which you want it to be stored under command that is
set with DIP switches on LPC-2.SM6. In this example, press "power ON" button on the IR remote
controller. Once the button has been pressed, the LPC-2.SM6 stores the IR command to internal
memory, in this example under command 15. LPC-2.SM6 will not store any other command under
command 15, unless S1 DIP switches has been changed to other setting and back to the setting
"learning mode for command 15".
IR receive
Which protocol should be used for IR receive, user can select with IrProtocolSel parameter. To check
if the IR command has been learned and stored correctly IrProtocolSel parameter must be "0".
Set the DIP switches to the setting "No learning - receive only" and than press button "power ON" on
the IR remote controller. If the received IR command corresponds to any of the IR commands stored
in the LPC-2.SM6 internal memory, the command number under which the received IR command has
been stored will be shown in the feedback parameter iIrCmdRecNum. In this example, number 15
should be shown.
If IrProtocolSel is set to "0" and DIP switches to the setting "No learning - receive only" than LPC-
2.SM6 will receive learned IR commands only.
If IrProtocolSel is set to "1" and DIP switches to the setting "No learning - receive only" than LPC-
2.SM6 will receive RC-5 IR protocol only.
Be advised that during IR transmit, IR receive is blocked.
IR transmit
In order to check if the IR command that was stored can also be transmitted correctly, the LPC-
2.SM6 should be used as a substitution of the IR remote controller. On the main module, number 15
should be written to the LPC-2.SM6 command oIrCmdSendNum. This command selects IR command
which is stored under number 15 for transmit. IR transmit is executed once oIrCmdSend is set to
logical “1”. In this example, air conditioning should be turned ON.
Procedure for IR learn can be repeated for 15 different IR commands. DIP switch setting corresponds
to learning mode for one of 15 commands and IR receive only mode – see table 4.
The IR commands may also be learned during manufacturing process - consult with Smarteh.
6