Motorola M68HC08 Sys3Def, Process Measurement, Start/Stop Switch Reading and Start/Stop Decision

Models: M68HC08

1 168
Download 168 pages 716 b
Page 77
Image 77

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc.

Software Design

Data Flow

Type: S8- signed 8 bit, U8- unsigned 8 bit, S16- signed 16bit, U16- unsigned 16bit, (union)- 16 bits access or 2*8bit access

The system registers Sys1 flags are described by definitions of

Sys3_Def:

typedef union

 

 

{

 

 

struct

 

 

{

 

 

unsigned int PC_F

: 1;

/* BIT0 Phase Commutation Flag */

unsigned int Off_F

: 1; /* BIT1 Offset timeout flag

 

- Offset timeout can be measured */

unsigned int ICR_F

: 1;

/* BIT2 Input Capture

 

 

was succesfuly Received - Flag */

unsigned int Rmp_F

: 1;

/* BIT3 Speed Ramp Flag - motor

ramping */

 

 

unsigned int Stop_F

: 1;

/* BIT4 Motor is going or is

stopped */

 

 

unsigned int Strt_F

: 1; /* BIT5 Start Phase Flag */

unsigned int Run_F

: 1; /* BIT6 Motor Running with

 

 

back-EMF feedback Flag */

unsigned int FOK_F

: 1;

/* BIT7 Feedback within the righ

time Flag */

 

 

} B;

 

 

/*

 

 

FOK_FRun_FStrt_FStop_FRmp_FICR_FOff_FPC_F */ char R;

} Sys1_Def; /* System register #1 Definition */

Main data flow is displayed in Figure 5-1. The processes are described in the following subsections.

5.3.2 Process Measurement

The process provides measurement of analog values using ADC. The measured inputs are: dc-bus current, dc-bus voltage, and speed input. The measurement is provided by the measurement handler. The state diagram is explained in State Diagram.

5.3.3 Start/Stop Switch Reading and Start/Stop Decision

The process reads the start stop switch and provides start condition and clear failure decisions, as explained in Stand-Byand Fault State.

DRM028 — Rev 0

 

Designer Reference Manual

 

 

 

MOTOROLA

Software Design

77

 

For More Information On This Product,

 

 

Go to: www.freescale.com

 

Page 77
Image 77
Motorola M68HC08 manual Sys3Def, Process Measurement, Start/Stop Switch Reading and Start/Stop Decision