资料介绍
The PIC18F2331/2431/4331/4431 family of micro-
controllers have peripherals that are suitable for motor
control applications. These peripherals and some of
their primary features are:
• Power Control PWM (PCPWM)
- Up to 8 output channels
- Up to 14-bit PWM resolution
- Center-aligned or edge-aligned operation
- Hardware shutdown by Fault pins, etc.
• Quadrature Encoder Interface (QEI)
- QEA, QEB and Index interface
- High and low resolution position
measurement
- Velocity Measurement mode using Timer5
- Interrupt on detection of direction change
• Input Capture (IC)
- Pulse width measurement
- Different modes to capture timer on edge
- Capture on every input pin edge
- Interrupt on every capture event
• High-Speed Analog-to-Digital Converter (ADC)
- Two sample and hold circuits
- Single/Multichannel selection
- Simultaneous and Sequential Conversion
mode
- 4-word FIFO with flexible interrupts
In this application note, we will see how to use these
features to control a Brushless DC (BLDC) motor in open
loop and in closed loop. Refer to the Microchip applica-
tion note, “AN885, Brushless DC (BLDC) Motor
Fundamentals” (DS00885), for working principles of
Brushless DC motors and basics of control. Also, to
obtain more information on motor control peripherals and
their functions, refer to the PIC18F2331/2431/4331/4431
Data Sheet (DS39616). AN899
Brushless DC Motor Control Using PIC18FXX31 MCUs
Author: Padmaraja Yedamale HARDWARE
Microchip Technology Inc.
A PICDEM MC demo board was used to develop,
test and debug the motor control code. The PICDEM
INTRODUCTION MC has a single-phase diode bridge rectifier, convert-
ing AC input to DC and a power capacitor bank that
The PIC18F2331/2431/4331/4431 family of micro- keeps a stable DC bus. A 3-phase IGBT-based inverter