Hardware Reference
In-Depth Information
E10.9 Write a C program to generate a sine waveform using the circuit shown in Figure 10.20.
Divide one period of the sine wave into 60 points and use these 60 points to represent the wave-
form. Every two adjacent points are separated by 3.0°.
E10.10 Use the OUT pin of the MCP4922 shown in Figure 10.20 to drive a speaker. Write
a C program to generate a two-tone siren. The two frequencies of the siren are 1 kHz and
500 Hz.
E10.11 The Freescale MC14489 is a fi ve-digit, seven-segment display driver chip. The data
sheet is on the CD for this text (also available on Freescale's website). Describe how to interface
one MC14489 with the HCS12 using the SPI subsystem. Write a program to display the value
12345 on the seven-segment displays driven by the MC14489.
E10.12 Defi ne a new font for each of the characters shown in Figure E10.12 and write a pro-
gram to display these four characters on the four matrix displays driven by one MAX6952. The
PM5 signal drives the CS signal.
Figure E10.12 User-definable font example
E10.13 Download the datasheet of the 10-bit, two-channel DAC LTC1661 from Linear Tech-
nology ( www.linear-tech.com). Answer the following questions:
How much time does it take to complete a DAC conversion?
How many bytes need to be sent to LTC1661 in order to generate a voltage output?
What is the range of the reference voltage?
Describe a viable circuit connection for the LTC1661 and the HCS12.
E10.14 For the same LTC1661 interfacing with the HCS12, answer the following questions
assuming the reference voltage is set to 5 V:
What value should be sent in order to generate a 5-V output from V OUTA ?
What value should be sent in order to generate a 0-V output from V OUTA ?
What value should be sent in order to generate a 5-V output from V OUTB ?
What value should be sent in order to generate a 0-V output from V OUTB ?
E10.15 Use the LTC1661 from Linear Technology to generate a two-frequency square wave
from the V OUTA pin. The frequency alternates between 1 and 4 kHz every 4 s.
Search WWH ::




Custom Search