beautypg.com

Motorola M68HC08 User Manual

Page 150

background image

User Guide

Designer Reference Manual

DRM028 — Rev 0

150

User Guide

MOTOROLA

it is recommended to change START_INCR_OOUTREG by PC
master software. (If it is a problem to start the motor, then
I_CNTR_FOK can also be changed from default 0x03, but not
recommended!)

17. If the motor starts and continues running, after you repeatedly

start/stop, the start-up parameters are set properly

18. Open const_cust_x.h and modify parameters with the final

variable values PER_CMT_START_US,
START_INCR_OOUTREG
, evaluated with PC master software.

19. Change the software back to normal, set speed regulator

parameters to:

20. #define SPEED_PIREG_P_GAIN 64

#define SPEED_PIREG_I_GAIN 0

21. in const_cust_x.h file to enable speed regulation

22. Build the code (see

Software Execution

and

Build

)

6.5.6 Software Customizing to Motor — Speed Control Setting

When the motor commutation setting is done, the speed control
parameters need to be set.

For settings which must be done, follow the labels MUST_CHANGE_nn,
MUST_CHANGE_EXPER_nn in file const_cust_x.h.

For changes which can be done (but usually are not necessary), follow
the labels CAN_CHANGE_nn, CAN_CHANGE_EXPER_nn in file
const_cust_x.h

Number of commutations per motor revolution:

/* MUST_CHANGE_9: */

#define COMMUT_REV 18.0

Range: <0,255>

F

re

e

sc

a

le

S

e

m

ic

o

n

d

u

c

to

r,

I

Freescale Semiconductor, Inc.

For More Information On This Product,

Go to: www.freescale.com

n

c

.

..