microcontroller applications elec 421 dr. ron hayne images courtesy of ramesh gaonkar and delmar...
TRANSCRIPT
Microcontroller Applications
ELEC 421
Dr. Ron Hayne
Images Courtesy of Ramesh Gaonkar and Delmar Learning
Embedded System Typical analog/digital system
TransducerConverts non-electrical signals into electrical signals
A/D converterConverts analog signals into digital signals
Digital processor Processes digital data
D/A converterConverts digital signals into equivalent analog signals
TransducerConverts electrical signals into non-electrical signals
ELEC 330
PIC18 A/D Converter
ELEC 330
Pulse Width Modulation
Duty Cycle Percentage ratio of on time of a pulse to its period
Changing of the duty cycle is defined as PWM CCP pin is set as an output Count for period and duty cycle loaded into CCP registers Varying the duty cycle generates PWM
PWM for DC Motor Control Varies average DC voltage Controls DC motor speed
ELEC 330
PWM Mode
CCP module with Timer2 Output a pulse wave form for a given frequency/duty cycle
Duty cycle CCPR1L register
Period PR2 register
When TMR2 is equal to PR2 TMR2 is cleared Pin RC2/CCP1 of PORTC is set high PWM duty-cycle byte loaded into CCPR1
ELEC 330
MPLAB X IDE
Compile/Assemble Source Files Linker Script for specific Microcontroller
Test Programs Simulator In Circuit Debugger
PICKit 3
Program Microcontroller PICKit 3
ELEC 330
PICKit 3
ELEC 330
PIC18 Explorer Demo Board
ELEC 330
PIC18F8722
ELEC 330
2WD Robot Chassis
ELEC 330
Dual H-Bridge Motor Driver
ELEC 330
Microcontroller Applications
Analog to Digital Conversion Interface Analog Sensors (Transducers)
Pulse Width Modulation DC Motor Control
MPLAB X IDE Programming and Debugging
PIC18 Explorer Demo Board PIC18F8722 with lots of I/O
Robot Chassis H-Bridge Motor Driver
ELEC 330