Header Ads

Make LED dimmer use PIC Microcontroller and Mikro C


In this tutorial we will learn how to make a LED dimmer circuit use pic microcontroller. In this project I am use Pulse Width Modulation technique for LED brightness control. I am use here PIC16F877A and LM16x2 Lcd display. 
You can watch the video or read the written tutorial below.





PIC16F877A Microcontroller has tow pin for PWM.
  1. RC2/CCP1 (pin 17)
  2. RC1/CCP2 (pic 16)
CCP means Capture / Compare / PWM . CCP module generate pule different duty cycle.
Each Capture / Compare / PWM(CCP) module contains a 16 bit register which can operate as a:
  1. 16 bit Capture register
  2. 16 bit Compare register
  3. PWM Master / Slave Duty Cycle register.
Duty cycle:




Circuit shematic:




Mikro C Code:



Click the download button for source code:

download





No comments

Theme images by 5ugarless. Powered by Blogger.