DEMO9S08QD4 Freescale Semiconductor, DEMO9S08QD4 Datasheet

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
Freescale Semiconductor
Application Note
Driving a Stepper Motor Based on
the MC9S08QD4 and Other 8-bit
Families
Using Input Signals to Determine the Position of the Stepper Motor
by: Francisco Ramirez
1
This application note describes how to control a low
current stepper motor using the MC9S08QD4. It also
shows how to change the position of a stepper motor
using the duty cycle variations from an external PWM by
using an external reference voltage or an external
modulated signal. It shows the reader an easy example of
how to drive a low current stepper motor using a simple
input signal with a low end S08 MCU.
The MC9S08QD4 is a low cost automotive
microcontroller and can be applied to several
applications using different input signals.
This application note briefly describes operating a
stepper motor, how it works, and what is required to
drive it. The document also establishes how the input
signal is managed, implemented and used. An
explanation of code compatibility with the MC9S08SG8
(automotive device) or to the MC9S08QG8 (consumer
and industrial device) is in this application note.
© Freescale Semiconductor, Inc., 3/2008. All rights reserved.
Mexico
Introduction
1
2
3
4
5
6
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Stepper Motor Management . . . . . . . . . . . . . . . . . . . . . . 2
Controlling the Stepper Based on an Input Signal (PWM)4
Describing the Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
How to Port the Code and Use other Devices. . . . . . . . 12
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Document Number: AN3602
Contents
Rev. 0, 4/2008

Related parts for DEMO9S08QD4

DEMO9S08QD4 Summary of contents

Page 1

... The document also establishes how the input signal is managed, implemented and used. An explanation of code compatibility with the MC9S08SG8 (automotive device the MC9S08QG8 (consumer and industrial device this application note. © Freescale Semiconductor, Inc., 3/2008. All rights reserved. Document Number: AN3602 Rev. 0, 4/2008 Contents 1 Introduction ...

Page 2

... Available with this document is the software for this application note, AN3602SW.zip. Section 5, “How to Port the Code and Use Other can be ported to other similar MCUs, for example the MC9S08QG8 and the MC9S08SG8. The code described in this application note has been developed based on the DEMO9S08QD4 evaluation board shown in Figure 1 ...

Page 3

... The torque provided by the motor is small. The maximum static torque = 4 mNm, maximum dynamic torque = 1.3, mNm which is strong enough to move standard gauges. The S08 Driving a Stepper Motor Based on the MC9S08QD4 and Other 8-bit Families, Rev. 0 Freescale Semiconductor 2). (Figure 3). ...

Page 4

... PWM signal. The variations of this PWM signal can be translated into positions to indicate temperature or speed like the application described in this document. Driving a Stepper Motor Based on the MC9S08QD4 and Other 8-bit Families, Rev Figure 4. Complete Implemented System Figure 4. The system requires VCC, Figure example Freescale Semiconductor ...

Page 5

... ADC of the microcontroller. This document explains how to use the timer/pulse width modulator (TPM) module. Driving a Stepper Motor Based on the MC9S08QD4 and Other 8-bit Families, Rev. 0 Freescale Semiconductor Controlling the Stepper Based on an Input Signal (PWM) Figure 5. Stepper Motor with Gauge ...

Page 6

... PTAD1 - Pin COIL_B1 PTAD2 - Pin COIL_B2 PTAD3 - Pin 5 * *****************************************/ Driving a Stepper Motor Based on the MC9S08QD4 and Other 8-bit Families, Rev PTA0/KBI1P0/TPM1CH0/ADC1P0 8 1 PTA1/KBI1P1/TPM1CH1/ADC1P1 7 2 PTA2/KBI1P2/TCLK1/ADC1P2 PTA3/KBI1P3/TCLK2/ADC1P3 8-pin Assignment DIP/SOIC Figure 7. MC9S08QD4 8-Pin Package Figure 8. Input Signal Data Measurements (Figure 8). These Freescale Semiconductor ...

Page 7

... Therefore, to create an image of port A behavior in time, an example is shown as in Figure 9. Driving a Stepper Motor Based on the MC9S08QD4 and Other 8-bit Families, Rev. 0 Freescale Semiconductor Controlling the Stepper Based on an Input Signal (PWM) Frequency . To find the duty cycle of the signal calculate: ( ...

Page 8

... Used to know the new position of the stepper */ /* Used to know the frequency of the PWM */ /* Used to know the duty cycle of the PWM */ /* Used to know the duty cycle of the PWM */ /* Used to know the duty cycle of the PWM */ /* Used to know the process status */ /* general use variable */ Figure 4. The process of Freescale Semiconductor ...

Page 9

... Duty_Cycle=Duty_Cycle_H-Frequency; Duty_Cycle_100=Duty_Cycle_H*100; Required_Position=Duty_Cycle_100/Frequency; Driving a Stepper Motor Based on the MC9S08QD4 and Other 8-bit Families, Rev. 0 Freescale Semiconductor moves the stepper motor to the reference or initial position. In this case, the the code moves the motor backwards stores the instant position of the motor. At the Current_position ...

Page 10

... Idle_DONE , it is important to check if the difference , then the motor moves forward until both , port A is set to: CHECKED Required_Position - Figure 9 sequences the motor moves backwards until both port A is set to: CHECKED Current_position - Freescale Semiconductor is set. ...

Page 11

... Below is a comparison of the MC9S08QG4, the MC9S08QG8, and the MC9S08QD4 pinouts and their subtle differences. These must be considered when migrating between these devices. Driving a Stepper Motor Based on the MC9S08QD4 and Other 8-bit Families, Rev. 0 Freescale Semiconductor How to Port the Code and Use Other Devices NOTE ...

Page 12

... Driving a Stepper Motor Based on the MC9S08QD4 and Other 8-bit Families, Rev PTA0/KBI1P0/TPM1CH0/ADC1P0 8 1 PTA1/KBI1P1/TPM1CH1/ADC1P1 7 2 PTA2 /KBI1P2/TCLK1/ADC1P2 PTA3/KBI1P3/TCLK2/ADC1P3 8-pin Assignment MC9S08QD4 PTA0/KBIP0/TPM1CH0/ADP0/ACMP PTA1/KBIP1/ADP1/ACMP– 2 PTA2/KBIP2/SDA/ADP2 PTA3/KBIP3/SCL/ADP3 8-pin Assignment MC9S08QG4 PTA0/KBIP0/TPMCH0/ADP0/ACMP– PTA1/KBIP1/ADP1/ACMP– PTA2/KBIP2/SDA/ADP2 PTA3/KBIP3/SCL/ADP3 PTB0/KBIP4/RxD/ADP4 12 5 PTB1/KBIP5/TxD /ADP5 6 11 PTB2/KBIP6/SPSCK/ADP6 7 10 PTB4/MIS0 PTB3/KBIP7/MOSI/ADP7 8 9 16-pin Assignment MC9S08QG8 Freescale Semiconductor ...

Page 13

... For more information go to AN3325 — Designing for Migration among 8-pin, 8-bit MCUs. Driving a Stepper Motor Based on the MC9S08QD4 and Other 8-bit Families, Rev. 0 Freescale Semiconductor /*to wait the flag for rising edge*/ /*to wait the flag for rising edge*/ ...

Page 14

... Freescale Semiconductor product could create a situation where personal injury or death may occur. Should Buyer ...

Related keywords