DEMO9S08QD4 Freescale Semiconductor, DEMO9S08QD4 Datasheet - Page 13

BOARD DEMO FOR MC9S08QD FAMILY

DEMO9S08QD4

Manufacturer Part Number
DEMO9S08QD4
Description
BOARD DEMO FOR MC9S08QD FAMILY
Manufacturer
Freescale Semiconductor
Type
MCUr
Datasheets

Specifications of DEMO9S08QD4

Contents
Board, Cable, CD
Processor To Be Evaluated
MC9S08QD
Data Bus Width
8 bit
Interface Type
USB
Silicon Manufacturer
Freescale
Core Architecture
HCS08
Core Sub-architecture
HCS08
Silicon Core Number
MC9S08
Silicon Family Name
S08QD
Rohs Compliant
Yes
For Use With/related Products
MC9S08QD2, MC9S08QD4
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
It must be changed to:
The same changes apply if using the MC9S08QG8 device.
6
This is a description using the frequency and the duty cycle to know the position of a stepper motor in the
MC9S08QD4 and its PWM. This document allows reuse of the code between the MC9S08QD and the
MC9S08QG families with minimal hardware changes.
Besides using a PWM signal to control a stepper motor, this motor control technique can be applied to the
output of temperature sensors or pressure sensors.
This application note teaches how to drive a low current stepper motor. The code presented here can also
be ported to other 8-bit devices. For more information go to AN3325 — Designing for Migration among
8-pin, 8-bit MCUs.
Freescale Semiconductor
TPM2C0SC = 0x04;
TPM2SC = 0x0F;
TPMC0SC = 0x04;
TPMSC = 0x0F;
For the MC9S08QG4, change the derivative file before compiling. There is no TPM2 module. The
code for all TPM2 statements must be changed to reflect TPM. For example:
The values for coil A and coil B are the same, therefore
port A and the pinout change. Replace PTA1, PTA2, PTA3 and PTA5, for PTA0, PTA1, PTA2, and
PTA3. See
Conclusions
PTAD=0x0A;
PTAD=0x09;
PTAD=0x05;
PTAD=0x06;
while(TPM2C0SC_CH0F!=1)
{
}
while(TPMC0SC_CH0F!=1)
{
}
;
;
Driving a Stepper Motor Based on the MC9S08QD4 and Other 8-bit Families, Rev. 0
Figure
11. The values previously used for port A now change:
/*input capture rising edge*/
/*interrupts disabled, counts each 32us*/
/*input capture rising edge*/
/*interrupts disabled, counts each 32us*/
0x0A;
0x28;
0x24;
0x06;
/*to wait the flag for rising edge*/
/*to wait the flag for rising edge*/
Table 1
does not change. The values for
Conclusions
13

Related parts for DEMO9S08QD4