
Chapter 8
Signal Generation
8.1 Objective
To become familiar with generating square waves.
8.2 Background
In an earlier lab, you had to generate a square wave signal using various interrupts.
This lab builds on this. For a general square wave signal, we define the on-time,
T
on
, the off-time, T
off
, and the period T as shown in the figure 7.1. The goal of
the lab is to generate such square waves. The ratio
T
on
T
is called the duty cycle
and is expressed as a percentage. When dealing with time it is convenient to talk
in terms of clock ticks. The HC11 has a 2 MHz e-clock, or you have 2 × 10
6
ticks
per second. Hence 1 clock tick is 0.5 microseconds.
-¾
T
on
-¾
-¾
T
off
T = T
on
+ T
off
0 Volts
5 Volts
Figure 8.1: 0-5 volt square wave
87
Comentarios a estos manuales