PWM Programming

What you will learn

Learn importance of microcontroller in designing embedded application.

Learn use of hardware and software tools.

Develop interfacing to real world devices.

To understand need of microcontrollers in real life applications.

Description

With the world so heavily dependent on embedded systems, microcontrollers have become indispensable devices in embedded design. A microcontroller (MCU) is a device that combines the core of a microprocessor (MPU) with features such as I/O ports, timers, some dedicated communication controllers etc. Whereas an MPU needs additional glue logic to interface to the outside world, an MCU is a self-sufficient device as far as Peripheral handling is concerned, due to the availability of rich on-chip resources. Depending on a specific application, the choice of an appropriate MCU can indeed lead to a very efficient design. This course is a brief introductory giving an insight into the PIC18FXXX MCU, and is aimed to explain CCP module and PWM programming.

Indeed the PWM is so widely used that Microchip has enhanced the PWM capabilities of the newer generation of the PIC18 family members and has designated them as ECCP(enhanced CCP).The main difference between ECCP and CCP is the PWM capability.

The speed of the motor depends on three factors : load, voltage, and current. By changing the width of the pulse applied to the Dc motor we can increase or decrease the amount of the power provided to the motor, thereby increasing or decreasing the motor speed. The ability to control the speed of the DC motor using PWM is one reason that DC motors are preferable over AC motors. We use the PWM feature of the CCP to control DC motors.

English

Language

Content

Introduction and preview of the course

Introduction and preview of the course

Introduction to PIC18FXXX Microcontrollers

History of PIC Microcontrollers

Selection Criteria of Microcontroller

Features of PIC18F Microcontroller

Pin description and I/O SFR’s

Timers

Introduction to CCP Module


Get Instant Notification of New Courses on our Telegram channel.


CCP Module

Timer2 Registers

Timer2 Block diagram

Timer2 SFR’s

Timer2 Programming

PWM Programming

PWM Mode

CCPxCON Register

PWM Configuration

Calculations of PR2, Prescalar, CCPR1L and DC1B1:B0

CCP in PWM mode

Configuring CCPx for PWM Programming

PWM Programming

Example Program

Interfacing of DC Motor-PWM Generation