Section 5. Mouse Transmitter Firmware; Firmware Structure - Motorola M68HC08 Designer Reference Manual

Hide thumbs Also See for M68HC08:
Table of Contents

Advertisement

Designer Reference Manual — DRM055

5.1 Firmware Structure

High Data Rate Wireless USB Optical Mouse Solution
MOTOROLA
Freescale Semiconductor, Inc.
The firmware structure consists of two main parts:
Main routine
Timer interrupt routine
Figure 5-1
shows the flow of the main program and the timer interrupt routine.
It also indicates the main functions that the QY4 are to perform. The main
challenge in wireless optical mouse design is the power management to
minimize the power consumption and maximize the performance.
MAIN PROGRAM
GET XY DISPLACEMENT
FROM SENSOR
GET Z DISPLACEMENT
FOR EVERY MILLISECOND
CHECK BUTTON
FOR EVERY MILLISECOND
POWER MANAGEMENT
Figure 5-1. Firmware Structure
The main program continually checks one of the sensor registers to see if any
XY movement has happened. If any XY movement is detected, it gets the X and
Y displacements from the sensor registers, puts them in the FIFO buffer and
sets the corresponding flags. For every millisecond timer tick, it checks the Z
movement and the buttons status.
Mouse Transmitter Firmware
For More Information On This Product,
Go to: www.freescale.com

Section 5. Mouse Transmitter Firmware

IF ALL DATA TRANSMITTED
TIMER
INTERRUPT
TRANSMIT DATA
IF ANY
POWER OFF RF CIRCUIT
SET TIMER
TICK FLAGS
RETURN
DRM055
21

Advertisement

Table of Contents
loading

Table of Contents