ely/ecet340cartdotcom
FOR MORE CLASSES VISIT
www.ecet340cart.com
OBJECTIVES:
To become familiar with Microcontroller MC9S12 parallel ports and
how simple input and output devices are interfaced through them.
To learn how to program I/O instructions in C language.
To learn how to organize a program to read data from input ports,
process the data, and display the result on a simple output device.
I. OBJECTIVES:
To learn how to use A-to-D converters to digitize signals from analo
g input devices.
To learn how to write a C language program that samples the data
from an analog device, digitizes it and formats it for output on an L
CD.
To become more proficient in programming displays for real-time
operation.
Scenario/Summary
This week's lab covers two areas, conversion of digital HCS12
signals to an analog format, and the use of a Serial Peripheral Inter
face (SPI)
to transfer data, and commands between the HCS12, and the DAC
peripheral.
Deliverables
For this lab, the deliverables include the cover sheet,
filled-in sections of the lab report, photographs (online), or instruct
or
sign-offs (onsite), and answers to the questions. The cover sheet m
ust be
completed in typed format.
1. What are the four main functions of the HC12 Timer unit?
2. Two input capture events occur at counts 0x1037 and 0xFF20 of
the free-running counter. How many counts (in decimal) have tran
spired between these two events?
3. What is the maximum time possible before the free-running co
unter overflows when the e MHz?
4. Two input capture events occur at 0x1037 and 0x002A. If the pr
escaler bits PR[2:1:0] are set to 101 and the e clock is 24 MHz, how
much time as transpired between the two events?