CMPEN 472, The Pennsylvania State University
Homework 10: Signal Wave Generation and Digital Clock Program with HCS12
Due: Nov. 8, 2023 11:30pm
Objective
To learn interrupt based multi-tasking programming, with multiple interrupt type handling.
Textbook Reading:
1. MC9S12C128 Family Data Sheet: Chapters 9, 13, and 15
2. MC9S12C128 Family Data Sheet: Chapters 8 (for next homework)
Instruction
1. Write a program to generate sawtooth wave, triangle wave, and square wave while the digital clock is running on the background. The wave generation function is based on the Timer Interrupt OC3 at the rate of 125usec (8000Hz). The Homework 10 program generates wave form on the terminal connected to the HC12 by sending the signal value in 8-bit unsigned integer numbers, printed on the terminal screen. One number is printed ev 125usec and total 2048 numbers are printed for each wave generation command. At the same time, the digital clock is running and displayed on the 7-segment display connected to the PORT of the HCS12 board (same