Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microcontroller Applications ELEC 421 Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.

Similar presentations


Presentation on theme: "Microcontroller Applications ELEC 421 Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning."— Presentation transcript:

1 Microcontroller Applications ELEC 421 Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning

2 Embedded System  Typical analog/digital system Transducer Converts non-electrical signals into electrical signals A/D converter Converts analog signals into digital signals Digital processor Processes digital data D/A converter Converts digital signals into equivalent analog signals Transducer Converts electrical signals into non-electrical signals ELEC 330

3 PIC18 A/D Converter ELEC 330

4 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

5 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

6 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

7 PICKit 3 ELEC 330

8 PIC18 Explorer Demo Board ELEC 330

9 PIC18F8722 ELEC 330

10 2WD Robot Chassis ELEC 330

11 Dual H-Bridge Motor Driver ELEC 330

12 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


Download ppt "Microcontroller Applications ELEC 421 Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning."

Similar presentations


Ads by Google