參數(shù)資料
型號(hào): MC68HC11N4
廠商: Motorola, Inc.
元件分類: 8位微控制器
英文描述: 8-Bit microcontroller(8位微控制器)
中文描述: 8位微控制器(8位微控制器)
文件頁(yè)數(shù): 1/24頁(yè)
文件大?。?/td> 261K
代理商: MC68HC11N4
Order this document by:
AN1215/D
MOTOROLA INC, 1996
SEMICONDUCTOR
APPLICATION NOTE
MOTOROLA
PID Routines for MC68HC11K4 and
MC68HC11N4 Microcontrollers
By James W. Gray
INTRODUCTION
PID (proportional, integral, derivative) compensation is one of the most common forms of closed-loop con-
trol. Control of closed-loop systems that require compensation is a growing area of application for embed-
ded microprocessors. In these systems, analog signals must be converted into discrete digital samples
before compensation or filtering can take place. Loop performance dictates the sampling rate, and calcula-
tions must be complete before the next sample time begins. These loop-related constraints and the Nyquist
frequency requirement place an upper bound on digital control of closed systems with feedback error. If the
controlled system has a resonance or other behavior with a time constant shorter than the sample and cal-
culation time, chaos is the most likely outcome. Despite these limitations, increases in microprocessor clock
rates and the addition of on-chip control-oriented hardware are expanding the number of medium perfor-
mance control applications handled by 8-bit machines. While an expensive DSP-class processor is the cor-
rect choice for the most demanding applications, several members of the M68HC11 family have the speed
and resources to control multiple PWM channels.
This note provides two working examples of PID control-loop software. The first example, written primarily
in C, shows a PID algorithm in a straightforward way using floating-point math. Key features of the C envi-
ronment are covered for readers who are more used to assembly language. The second example imple-
ments a PID algorithm in assembly language. It uses the MC68HC11N4 on-chip math coprocessor to speed
up arithmetic operations.
Both examples are complete and ready to run on a Motorola M68HC11EVS evaluation board. External in-
terfacing is identical for both examples — an 8-bit analog to digital converter is used for input, and an 8-bit
PWM waveform is output. Because the code in both examples carries more than 16 bits of precision, and
because both processors support 16-bit PWM, only minor changes are needed to increase precision. Power
amplifiers, sensors, and other interface circuitry must be supplied in order to experiment with real-world sys-
tems — a simple RC circuit is used for software checkout.
C and assembly language source code and loadable object code can be obtained from Motorola Freeware
Data Systems. Modem access: (512) 891-3733. Internet access: freeware.aus sps.mot.com. Web access:
http:///www.freeware.aus.sps.mot.com.
THE MICROCONTROLLERS
The MC68HC11K4 and MC68HC11N4 are 16-MHz devices with nonmultiplexed external address and data
buses. Each has 24 Kbytes of on-chip ROM or EPROM. Both devices have multiple PWM channels with
programmable period, duty cycle, polarity, and clock source. In both, two 8-bit channels can be concatenat-
ed to generate a 16-bit PWM output. The MC68HC11N4 also has two additional 12-bit PWM channels and
two digital to analog converter channels with 8-bit resolution.
相關(guān)PDF資料
PDF描述
MC68HC12BE32 16-bit Microcontroller Units (MCUs)(16位微控制器)
MC68HC16R1 16-Bit Modular Microcontroller(16位模塊化微控制器)
MC68HC916R1 16-Bit Modular Microcontroller(16位模塊化微控制器)
MC68HC16Y1 16-Bit Modular Microcontroller(16位模塊化微控制器)
MC68HC16Z1 16-Bit Modular Microcontroller(16位模塊化微控制器)
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
MC68HC16Z1CAG 制造商:Freescale Semiconductor 功能描述:
MC68HC16Z1CAG16 功能描述:16位微控制器 - MCU 16 BIT MCU 1K RAM RoHS:否 制造商:Texas Instruments 核心:RISC 處理器系列:MSP430FR572x 數(shù)據(jù)總線寬度:16 bit 最大時(shí)鐘頻率:24 MHz 程序存儲(chǔ)器大小:8 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:2 V to 3.6 V 工作溫度范圍:- 40 C to + 85 C 封裝 / 箱體:VQFN-40 安裝風(fēng)格:SMD/SMT
MC68HC16Z1CAG16 制造商:Freescale Semiconductor 功能描述:IC16-BIT MICROCONTROLLER
MC68HC16Z1CAG20 功能描述:16位微控制器 - MCU 16 BIT MCU 1K RAM RoHS:否 制造商:Texas Instruments 核心:RISC 處理器系列:MSP430FR572x 數(shù)據(jù)總線寬度:16 bit 最大時(shí)鐘頻率:24 MHz 程序存儲(chǔ)器大小:8 KB 數(shù)據(jù) RAM 大小:1 KB 片上 ADC:Yes 工作電源電壓:2 V to 3.6 V 工作溫度范圍:- 40 C to + 85 C 封裝 / 箱體:VQFN-40 安裝風(fēng)格:SMD/SMT
MC68HC16Z1CAG20 制造商:Freescale Semiconductor 功能描述:Microcontroller