lab6_Timerfun - Microprocessor Lab Timer function Using...

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

View Full Document Right Arrow Icon
Microprocessor Lab --- Timer function Using timer function generate wave form 1. Equipment M68HC12EVB Oscilloscope Signal Generator Personal Computer 2. Introduction The purpose of the timer module is to allow for time critical operations to be handled mostly by hardware, instead of entirely in software. For example, generating or measuring waveforms can be done with minimal input from the processor using the timer module. The 68HC12 Standard Timer Module consists of a 16-bit programmable timer that is driven by a programmable prescaler mechanism. It also has eight 16-bit input capture/output compare channels, and two pulse accumulators. This hardware is explained in your text book and as well as in its datasheet. ( pdf?srch=1 ) Before anything happens in the Standard Timer Module, the software on the CPU must enable the timer system by setting bits in the appropriate registers. The Timer System Control Register, located at register offset $0086, controls the basic behavior of the entire timer module. Bit 7 enables and disables the timer, bits 6 and 5 determine if the module runs during wait and freeze modes, and bit 4 determines if certain flags are automatically cleared after access to their associated registers. As described previously, the Standard Timer Module has 8 channels which are individually programmed to be input capture or output compare. The function of each channel must be specified in software by writing to the TIOS (Timer Input
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 10/27/2009 for the course ECE 5 taught by Professor Chavez during the Spring '09 term at Stevens.

Page1 / 4

lab6_Timerfun - Microprocessor Lab Timer function Using...

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