Motorola M68HC08 Manual page 51

Low power bldc drive for fans using the mc68hc908qy4 reference design
Hide thumbs Also See for M68HC08:
Table of Contents

Advertisement

6.2.2 Interrupts
6.2.3 Software Timer
DRM046 — Rev 0
MOTOROLA
Freescale Semiconductor, Inc.
initializes Timer 0 for Output Compare (OC)
initializes Timer 1 for Input Capture (IC)
initializes Analog to Digital Converter
The MCU has just one 16-bit timer counter with two timer channels. The
counter is primarily used for the generation of PWM signal of desired
period. The duty cycle is defined by timer channel 0 set as an output
compare. Channel 1 is used for the speed measurements using the input
capture function. It measures the time between the edges of the Hall
sensor signal.
After MCU initialization application, variables are initialized and the
interrupts are enabled.
The interrupt handlers provide the following services:
OverFlow Interrupt Handler is used for update of PWM duty cycle
and determination of the commutation vector based on the Hall
sensor signals (Process Commutation and PWM generation).
Input Capture (IC) Interrupt Handler reads the time between the
two consequential IC edges (basic part of the Process Speed
Sensor). Since the only timer of the MCU is used for PWM
generation, the determination of time between the Hall sensor
edges is based on the number of PWM periods.
Fault Interrupt Handler takes care of over-current fault interrupt
(over-current part of the Process Fault Control)
The software timer routine provides the timing sequence for required
subroutines running in the background. The background routine is called
in 10msec time-out. The timing is based on counting of the PWM
periods.
The background routine provides:
Software Design
For More Information On This Product,
Go to: www.freescale.com
Software Design
Software Implementation
Designer Reference Manual
51

Advertisement

Table of Contents
loading

Table of Contents