PC Remote Control

Español

Infrared reception with a MC68HC11

Although nowadays the MC68HC11 microcontroller (MCU) from Freescale is practically a relic, useful things can be learnt from it. The list of things needed to build a PC infrared receiver with this MCU is the following:

  • A MC68HC11.
  • Add the circuitry shown at section 2.8 in MC68HC11 Reference Manual for 'single-chip-mode' but selecting 'boostrap mode'.
  • Add RS-232 interface circuitry, for example with integrated circuits like the MAX232, to connec lines PD0/RxD and PD1/TxD to the serial port of the computer.
  • Connect the output of an infrared receiver, like the TSOP1736, to pin PA2 of the 68HC11.

Once the hardware is ready, it is possible to put the firmware either on EEPROM or RAM:

  • EEPROM: use software PCBUG11 from Motorola. After reset, with RxD and TxD connected together, program execution will start from the EEPROM.
  • RAM: in bootstrap mode, after reset, the MCU waits to receive the program to run from the serial port. To make it easier, there is a free utility called BLIR (Boot Loader In RAM) to load S19 files directly by this method.

The proposed firmware uses the internal timer of the MCU to measure the elapsed time between falling edges of the infrared receiver signal output. In other words, it measures the signal period.

Take a look to the source code in assembly language and the compiled executable of the program for more details. It was compiled using AS11.

There are some examples of reception obtained with different remote controls that show how the same commands give very similar values.

Return to the do-it-yourself page for more options...

 

Additional information