Hardware Interrupts and Wireless NEC Communication Protocol for Accurate Timing
Objective
We aim at becoming familiar with the concept of interrupt. Through two specific examples, we will learn how to implement an interrupt process with the Arduino board. Along this description we will become aware of the “NEC IR communication” protocol.
In these examples, an infrared remote control unit is used (upon punching one of its particular keys) to send a time-coded ON and OFF infrared signal. This modulated signal is detected at a distance by a demodulator unit (the latter containing an infrared detector and capability to demodulate the signal into a binary electrical information.) The output binary signal from the demodulator is used as an interrupt of the Arduino microcontroller. In one example, a subroutine (provided herein) is added to the Arduino program so that the decoded signal (the interrupt signal) is sequentially read and the full signal displayed in a monitor display. In the other example, the IR signal is used to remotely control a 4-digit (7 segment) display.
CONTENTS
1. INTRODUCTION
A. The concept of priority
B. The concept of interrupt
C. More details about interrupt
D. Accurate timing
2. INFRARED (IR) REMOTE CONTROL and the NEC IR COMMUNICATION PROTOCOL
3. EXPERIMENTAL PROCEDURE
A. Decoding the HEX code of the different buttons of a remote control
B. IR remote control of the 4-digit (7 segment) display