Homework #6 - ECE 331 Microprocessors and Digital Systems

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 331 — Microprocessors and Digital Systems http://angel.msu.edu/ Instructor: Prof. N IHAR R. M AHAPATRA Solutions to Homework 6 Instructions: Solve the following end-of-chapter problems from the Microcontroller Theory and Applications: HC12 and S12 (second edition) required textbook. Chapter Problem Category Problem Number Textbook Page(s) Points 7 Fundamental 1 357 2 7 Fundamental 2 357 2 7 Fundamental 3 357 2 7 Advanced 1 357 8 7 Advanced 3 357 8 7 Advanced 4 358 4 7 Advanced 5 358 4 Total Points 30 Fundamental-1. The difference between the two counts is: $FF20 - $1037 = $EEE9. The binary equivalent of $EEE9 is: 1110 1110 1110 1001. Expressed in decimal it is: 61,161. Fundamental-2. With the prescaler bits PR[2:1:0] set to “000”, a prescale factor of 1, results in an MCLK period of 0.5 microseconds. With 61,161 free running counter clock ticks, the total expired time is: 61161 x 0.5 μ s = 30.58 milliseconds. Fundamental-3. With the prescaler bits PR[2:1:0] set to “101”, a prescale factor of 32, results in an MCLK period of 16.0 microseconds. With 61,161 free running counter clock ticks, the total expired time is: 61161 x 16 μ s = 978.576 milliseconds. Advanced-1. To measure the duty cycle and frequency of a periodic signal the length of the “on time” and the length of the entire cycle must be captured. This may be accomplished by capturing the first rising edge, the first falling edge, and the second rising edge of a signal. “On time” may be calculated as first falling edge minus first rising edge. The period may be calculated by taking the difference between the second rising edge and the first rising edge. The detailed steps follow. It is
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/17/2010 for the course ECE 331 taught by Professor M.shanblatt during the Fall '08 term at Michigan State University.

Page1 / 3

Homework #6 - ECE 331 Microprocessors and Digital Systems

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online