Full Software Package on DOS/WINDOWS
(C-Compiler, Cross-Assembler, Debugger)
TM
ST72141
PRODUCT OVERVIEW
PSDIP32
CSDIP32W
SO34
Device Summary
FeaturesST72141K2
Program Memory - bytes8K
RAM (stack) - bytes256 (64)
Peripherals
Operating Supply4.5 to 5.5 V
CPU Frequency
Temperature Range- 40°Cto+85°C
PackageSO34 - PSDIP32
MotorControl, Watchdog,
Timers, SPI, ADC
8 or 4 MHz
(16 or 8MHz oscillator)
Rev. 1.1
July 19981/13
Thisispreliminary information onanewproduct in development orundergoing evaluation.Detailsaresubjecttochangewithout notice.
1
ST72141
1 GENERAL DESCRIPTION
1.1 INTRODUCTION
The ST72141 Microcontroller Unit (MCU) is a
member of the ST7 family of Microcontrollers. The
device is based on an industry-standard 8-bit core
and features an enhanced instruction set. The device is operated at an 8 or 16MHz oscillator frequency. Under software control, the ST72141 may
be placed in either Wait, Slow or Halt modes, thus
reducing power consumption. The enhanced instruction set and addressing modes afford real
programming potential. In addition to standard 8bit data management, the ST72141 features true
bit manipulation, 8x8 unsigned multiplication and
indirect addressing modes. The device includes a
low consumption and fast start on-chip oscillator,
Figure 1.ST72E14 Block Diagram
Internal
OSCIN
OSCOUT
V
DD
V
RESET
SS
OSC
POWER
SUPPLY
CONTROL
CLOCK
DIV
LVD
CPU, ROM/OTP/EPROM, RAM, 14 I/O lines and
the following on-chip peripherals: Analog-to-Digital
converter (ADC) with 8 multiplexed analog inputs,
Motor Control (MTC) peripheral, industry standard
synchronous SPI serial interface, digital Watchdog, two independent 16-bit Timers featuring
Clock Inputs, Pulse Generator capabilities, 2 Input
Captures and 2 Output Compares.
The MTC peripheral is designed to control electric
brushless motors, with or without sensors. An
example of application is givenFigure 2 for 6-step
control of Permanent Magnet Direct Current
(PMDC) motor.
PORT A
ADDRESS A ND DATA BUS
8-BIT ADC
TIMER B
TIMER A
PA7-PA0
(8 bits)
OC1A
2/13
8-BIT CORE
ALU
Program Memory
8KBytes
RAM
256 Bytes
MOTOR CTRL
PORT B
SPI
WATCHDOG
MCO5-MCO0
MCIA-C
MCES
MICCFI
PB5-PB0
(6 bits)
2
Figure 2.Example of a 6-step-controlled Motor
ST72141
ST7
MTC
MCCFI
MCO5-0
MCIB
MCIA
MCIC
6
Current feedback
300V
T0
T2
T4
B
I
T5
6
I
3
I
C
2
T1
I
1
I
4
A
I
5
T3
Step
Switch
T0
T1
T2
T3
T4
T5
Node
A
B
C
300V
150V
0
300V
150V
0
300V
150V
0
Σ
Σ
Σ
Σ
Σ
Σ
Σ
Σ
1
2
3
4
5
6
1
Σ
2
3
3/13
3
ST72141
1.2 PIN DESCRIPTION
Figure 3.34-Pin SO Package Pinout
Factory fixedOpen Drain(Push-Pull programming not available) - High Sink
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
32
MCIA
31
MCIB
30
MCIC
29
MCCFI
28
V
27
V
26
TEST/V
25
OCP1A
24
PA7 / AIN7 /EI1 / OCP2A
23
PA6 / AIN6 /EI1 / ICP1A
22
PA5 / AIN5 /EI1/ ICP2A
21
PA4 / AIN4 /EI1/ OCP1B
20
PA3 / AIN3 /EI1/ OCP2B
19
PA2 / AIN2 /EI1/ ICP1B
18
PA1 / AIN1 /EI1/ ICP2B
17
PA0 / AIN0 /EI1
DD
SS
PP
4/13
4
Table 1.ST72E141 Pin Description
ST72141
Pin n°
Pin n°
SO34
SDIP32
11MCO5OCMTC Output Channel 5
22MCO4OCMTC Output Channel 4
33MCO3OCMTC Output Channel 3
44MCO2OCMTC Output Channel 2
55MCO1OCMTC Output Channel 1
66MCO0OCMTC Output Channel 0
77MCESICMTC Emergency Stop
88MISO/EI2/PB5I/OCCPort B5 or SPI Master In / Slave Out Data External Interrupt: EI2
9NCNot Connected
109MOSI/EI2/PB4I/OCCPort B4 or SPI Master Out / Slave In Data External Interrupt: EI2
1110SCK/EI2/PB3OCCPort B3 or SPI Serial ClockExternal Interrupt: EI2
1211SS/EI2/PB2I/OCCPort B2 or SPI Slave Select (active low)Ext. Int.: EI2, High Sink
1312EXTCLK_B/EI2/PB1 I/OCCPort B1 or Timer B Input ClockExt. Int.:EI2, High Sink
1413EXTCLK_A/EI2/PB0 I/OCCPort B0 or Timer A Input ClockExt. Int.:EI2, High Sink
1514OSCINI
1615OSCOUTO
1716RESETI/OCCBidirectional. Active low. Top priority non maskable interrupt.
1817PA0/AIN0/EI1I/OC/ACPort A0 or ADC Analog Input 0External Interrupt: EI1
Control Register2
Control Register1
Status Register
Input Capture1 High Register
Input Capture1 Low Register
Output Compare1 High Register
Output Compare1 Low Register
Counter High Register
Counter Low Register
Alternate Counter High Register
Alternate Counter Low Register
Input Capture2 High Register
Input Capture2 Low Register
Output Compare2 High Register
Output Compare2 Low Register
Reserved Area (16 bytes)
Counter Register
Zn-1 Capture Register
Zn Capture Register
C
Compare Register
n+1
D capture/Compare Register
Weight Register
Prescaler and Ratio Register
Interrupt Mask Register
Interrupt Status Register
Control Register A
Control Register B
Phase State Register
Output Parity Register
Output Polarity Register
The Motor Control (MTC) peripheral can be seen
as a Pulse Width Modulator which can be multiplexed on six output channels, and a Back Electromotive Force (BEMF) zero-crossing detector
which enables a sensorless control of self commutated Permanent Magnet Direct Current (PMDC)
brushless motor.
This peripheral is particularly suited to driving synchronous motors and enables the implementation
of operating modes like
■ Commutation step control with motor voltage
regulation.
■
Commutation step control with motor current
regulation, i.e. direct torque control.
■ Sensor or sensorless motor phase commutation
control.
■
BEMFzero-crossingdetectionwithhigh
sensitivity.Theintegratedphasevoltage
comparator is directly referred to the full BEMF
voltage without any attenuation. So a BEMF
voltage down to 200mV can be detected,
providing high noise immunity and a selfcommutated operation in a large speed range.
■ Real timemotor winding demagnetisation
detection enabling to fine-tune the phase
voltage masking time to be applied before
BEMF monitoring.
■ Automatic andprogrammable delaying between
BEMF zero-crossing detection and motorphase
commutation.
2.1 MTC peripheral main features
■ Two on-chip analog comparators, one for BEMF
zero-crossingdetectionwithan100mV
hysteresis, the other for current regulation or
limitation.
■ One of four selectableinternal voltage reference
values for the hysteresis comparator (0.2V,
0.6V, 1.2V, 2.5V).
■
One central 8-bit timer with two compare
registers and two capture features.
■ A “measurement window generator” allowing
BEMF zero-crossing detection.
ST72141
■ An auto-calibrated prescaler with 16 division
steps.
■ One 8-bit by 8-bit multiplier.
■ Phase input multiplexer.
■ Sophisticated output management:
– The six output channels can be split in two
groups (high side & low side).
– The PWM signal can be multiplexed on high,
low or both groups, alternatively or simultaneously.
– The output polarity is programmable channel
by channel.
– An output enable bit forces the outputs in HiZ
(active low).
– Anemergency stop pin input (MCES) immedi-
ately forces the outputs in HiZ when reset.
■ The MTC peripheral always operates at a4MHz
frequency, equal to f
the external clock frequency, and not affected
by slow mode selection.
2.2 General principle
The following example (Figure 6) relates to a six
step command sequence for a PMDC brushless
motor.
The commutation event [Cn] is automatically generated by the MTC peripheral after detecting the
zero-crossing of the BEMF induced in the non-exited coil by the rotor. The delay between this event
[Zn] and the commutation is computed by the MTC
peripheral. The BEMF zero-crossing detection is
enabled only after the end of demagnetization
event [Dn], also detected (or simulated) by the
MTC peripheral.
The speed regulation is managed by the microcontroller, by means of an adjustable reference
current level (current control), or by the PWM dutycycle adjustment (voltage control).
All the detection of [Zn] events is done during a
short measurement window while the high side
switch is turned off. The high side node (refer to
Table 4) is tied to 0V by the free-wheeling diode,
and the “zero-crossing” detection is then possible.
CPU
orf
/2depending on
CPU
9/13
ST72141
Figure 6.Example of command sequence for 6-step mode
Σ
Step
Switch
1Σ2Σ3Σ4Σ5Σ6Σ1Σ2Σ3
300V
T0
T1
T2
T3
T4
T5
Node
A
B
C
300V
150V
0
300V
150V
0
300V
150V
0
T0
T2
T4
B
T5
I
6
I
3
I
2
C
T1
I
1
I
4
A
I
5
T3
Note: Control & sampling PWM influence is not represented on these simplified chronograms.
superimposed voltage
(BEMF induced byrotor)
Demagnetization
10/13
300V
150V
0V
Wait for BEMF = 0
Σ
2
]
[D
2
]
[Z
2
Commutation delay
[C
Σ
3
]
2
[C
Σ
4
]
4
Σ
5
[Z
]
5
]
[D
5
t
Table 4.Step configuration summary
ST72141
Step
Σ
1
Σ
2
Σ
3
Σ
4
Σ
5
Current directionA(+)/B(-)A(+)/C(-)B(+)/C(-)B(+)/A(-)C(+)/A(-)C(+)/B(-)
Note (*) : The PWM signal is generated by Timer A
[Z] : Back EMF Zero-crossing event
Z
: Time elapsed between two consecutive Z events
n
[C] : Commutation event
C
: Time delayed after Z event to generate C event
n
(I): Current mode
(V): Voltage mode
(I)
CURRENT
VOLTAGE
(V)
MODE
PHASE
CHANNEL MANAGER
MCO5
MCO4
MCO3
MCO2
MCO1
MCO0
MCES
MCCFI
OCP1A
C
ext
(I)
R
(V)
ext
11/13
ST72141
3 MTC Peripheral general description
The MTC peripheral can be split into four main
parts as described in the simplified block diagram
(Figure 7).
– The PWM MANAGER, including a “measure-
ment window generator”, a mode selector and
current control.
– The BEMF ZERO-CROSSING DETECTORwith
a comparator and an input multiplexer.
– The DELAY MANAGER with an 8 bit timer and
an 8x8 bit multiplier.
– The CHANNEL MANAGER with the PWM multi-
plexer, polarity programming capability and
emergency HiZ configuration input.
A pre-load register enables the CPU to asynchronously update the channel configuration for the
next step.
The multiplexer directs the PWM to the upper
channel, the lower channel or both of them alternatively or simultaneously, enabling to choose the
most appropriate reference potential when freewheeling the motor in order to improve system efficiency andspeed up the demagnetisation phase.
The polarity register is used to fit the polarity of the
power drivers keeping the same control logic and
software.
3.3 BEMF zero-crossing detector
3.1 PWM Manager
The PWM manager enables a voltage control or a
current control of the motor to beperformed via the
six output channels.
3.1.1 Voltage Mode
In voltage mode, the PWM provided by TimerA is
directed to the channel manager.
Its duty cycle is adjusted by software according to
the needs of the application (speed regulation for
example).
The current comparator is used for safety purpose
as a current limitation, with a limit fixed by means
of an internal resistor bridge, adjustable with an
external resistor (R
on OCP1A).
ext
3.1.2 Current Mode
In current mode, the PWM output signal is generated by a combination of the “measurement window generator” and the current comparator outputs, and is directed to the channel manager.
The “on state” of the resulting PWM starts at the
end of the “measurement window” (rising edge),
and ends either at the beginning of the next
“measurement window” (falling edge), or when the
current level in theexited coils reaches the current
reference.
This current reference is provided to the comparator by the PWM output of TimerA (0.25% resolution), filtered through a RC (integrated resistor and
external capacitor C
on OCP1A).
ext
3.2 Channel manager
The channel manager includes a channel state
register, a multiplexer with upper and lower channel differentiation, a polarity register and a tri-state
output buffer.
This detector is made of:
– a phase multiplexer for addressing thenon-excit-
ed motor winding
– an analog comparator referred to a selectable
voltage level for zero-crossing detection. This
voltage reference can be chosen between four
values, depending on the noise level and the
voltage supply of the application
– a latch to sample theBEMF zero-crossing detec-
tion.
This block is used for detecting BEMF zero-crossing and end of demagnetization events.
The BEMF detections are performed during the
“measurementwindow”,whenfree-wheeling
through the low side switches. The zero-crossing
sampling frequency is then defined by the “measurement window generator” frequency.
3.4 Delay manager
The delay manager computes in real time the delay between the BEMF zero-crossing detection
and the next step commutation.
It includes an 8 bit timer with two capture, two
compare registers and an 8x8 bit multiplier.
An auto-updated prescaler always configures the
timer in the best accuracy area.
Two BEMF zero-crossing consecutive events are
memorized by the capture registers. Starting from
those values, and using parameters preset by the
CPU, the delay manager calculates the value tobe
loaded in a compare register, which automatically
triggers the next commutation.
The second compare register is used for end of
demagnetization simulation when the event is not
detectable ([D2] on the example ofFigure 6).
12/13
Notes:
ST72141
Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences
of use of suchinformation nor for anyinfringement of patents or otherrights ofthird partieswhich may result from its use. No license isgranted
by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in thispublication are subject
to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not
authorized for use as critical components in life support devices or systems without the express writtenapproval of STMicroelectronics.
The ST logo is a registered trademark of STMicroelectronics
2
Purchase of I
Australia - Brazil - Canada - China - France -Germany - Italy - Japan - Korea - Malaysia - Malta - Mexico - Morocco - The Netherlands -
C Components by STMicroelectronics conveys a license under the Philips I2C Patent. Rights to use these components in an
2
C system is granted provided that the system conforms to the I2C Standard Specification asdefined by Philips.
I
Singapore - Spain - Sweden - Switzerland - Taiwan - Thailand - United Kingdom - U.S.A.
1998 STMicroelectronics - AllRights Reserved.
STMicroelectronics Group of Companies
http://www.st.com
13/13
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.