8-5

FREQUENCY GENERATOR

Figure 8-4. Infrared Remote Control Application Block Diagram

Figure 8-5. Data Encoding Exam ple

This program example was designed to run on a n 8XC196MD demo board. It uses an EPA timer(timer 1) and compare channel (COMP3) to provide the timebase for the ones and zeros.
$debug
$nolist
$include (c:\ecm\196mc\mc.inc)
$list
;
;***************************************
; PROGRAM FREQ.A96
;
; This program transmits a block of data serially
; by gating the frequency generator on and off.
;
; The carrier frequency is programmed for 40 kHz.
; Ones are represented by a long (2 ms) carrier burst
; followed by a long (2 ms) pause (no carrier).
; Zeros are represented by a short (1 ms) carrier burst
A2704-02
Filter and
Detector
Output Signal
8XC196
Device
P7.7
V
CC
A2703-01

Zero = 2 ms One = 4 ms

40 kHz