adjust the duty cycle of pwm using PIC16f84A

Thread Starter

nuripaizail

Joined Jul 29, 2008
6
Hai,
anybody please help me with the programming.
I have given the project to adjust the duty cycle of pwm.
the duty cycle should be adjust to 0%,10%,20%....100%. this, will be implement to the LED so that its brightness can be adjusted from low to high.

I was asked to work with PIC16F84A. The coding must be in High-level language.

in addition, Dip switch will be used. when we turn on switch number 1 duty cycle of 10% will come out, turn on switch no. 2 the duty cycle is 20% and so on.


please help me...
 

beenthere

Joined Apr 20, 2004
15,819
This must be a first assignment, and you might be feeling overwhelmed.

Break the functions down into stages. How do you attach the switches so the PIC can read them? Then write a little progran that reads the switches and indicates which switch/es are set.

Then become familiar with PWM. The Microchip site has tutorials on it and code examples. Your biggest step is deciding what external device to use to control current through the LED.
 
Top