Order this document
as AN463/D
MOTOROLA
S EMICONDUCTOR
APPLICATION NOTE
AN463
68HC05K0 Infra-red Rem ote Control
Tony Breslin,
MCU Applications Group,
Motorola Ltd., East Kilbride, Scotland
The MC68HC05K0 is a low cost, low pin count
single chip microcomputer with 504 bytes of user
ROM and 32 bytes of RAM. The MC68HC05K0 is
a member of the 68HC05K series of devices which
are available in 16-pin DIL or SOIC packages.
It uses the same CPU as the other devices in the
68HC05 family and has the same instructions and
registers. Additionally, the device has a 15-stage
multi-function timer and 10 general purpose
bi-directional I/0 lines. A mask option is available
for software programmable pull-downs on all of
the I/O pins and four of the pins are capable of
generating interrupts.
When a key on the remote control keypad is
pressed, the micro controller must first determine
what key is being pressed and generate an
individual code for the key. The key code is then
converted to a instruction code that is inserted into
the transmission command which, using a defined
protocol, is transmitted to the television receiver.
The command is continually transmitted as long as
the key is being held down.
As the remote control is battery powered it needs
to use as little power as possible. This is achieved
by entering STOP mode when no keys are being
pressed and effectively switches off the device.
The micro controller comes out of STOP mode
upon receipt of an interrupt request that is
generated when a key is pressed.
The device is ideally suited for remote-control
keyboard applications because the pull-downs and
the interrupt drivers on the port pins allow
keyboards to be built without any external
components except the keys themselves. There is
no need for external pull-up or pull-down resistors,
or diodes for wired-OR interrupts, as these features
are already designed into the device.
Rem ote Control Keyboard
The 68HC05K0 has ten general purpose I/O pins.
One of these is used for the transmission signal
output leaving nine pins for the keyboard control.
Of these, four pins on PortA have internal interrupt
request hardware. Using these four pins as inputs
allows key presses to be detected without any
external interrupt hardware. This leaves the five
remaining pins for outputs.
This application makes use of many of the device
features to control an infra-red television remote
control. The application could be very easily
modified to control any device with a similar
transmission protocol. It will run on any of the ‘K’
devices without modification.
Using the internal pull-down facility and the rising
edge interrupt request on the four inputs permits
interrupts to be generated. If the five outputs are
set to logic ‘1’, so driving an input from logic ‘0’
to logic ‘1’ w hen a key is pressed, an interrupt
request can be generated. Using this
arrangement a five by four keyboard matrix can be
used. An extra four keys can be controlled if the
Vdd line is used to drive one row of four keys to
logic ‘1’. Therefore the maximum amount of keys
controllable becomes twenty four.
Rem ote Control Specifications
The basic purpose of a television remote control is
to transmit a control instruction to the television.
The instruction is generated by a keystroke on the
remote control keyboard. The detection and
decoding of a key press and the transmission
encoding is carried out by the remote control micro
controller.
!MOTOROLA
© MOTOROLA LTD., 1992