Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC16F84A Need Help(PWM)

Status
Not open for further replies.

tres

New Member
Hi i'm new here...

I need help on my assignment on how to make the 8 LED's connected to PortB to go dim, less bright, then bright... if possible w/ codes and explanation pls. thx

I'm not telling that u do my assignment, just need some explanation what is PWM is and how many uSeconds for 1 cycle, i mean it takes to make the LED to turn on and off... i'm using 8Mhz crystal oscillator. ^__^

And can someone explain to me about PWM and also I still don't how to use the interrupts... Just how to do it w/ just some loops and delays. thx.. I appreciate ur help...
 
Last edited:
does your assignment require only 16f84a only? because it will be a lot easier if you will use 16f628
 
My problem is the delay
example:
turn on all LED's
delay1 ----> how long will I make the LED's on
turn off all LED's
delay2 -----> how long will I make the LED's off
then go back to on...
it should produce a dim

that's my problem i hope u can help me. i'm using assembly language. thx.
And I'm confused... When you use PWM are u basically controlling/limitting the current that will flow?

My configuration is sourcing(LED's turn on when portb is set and are series w/ 330 ohms)
 
Hi,
I'm not exactly sure what you wish to do, however there is a pdf which has a lot of info on using PWM to control LEDs, which you can find here:
https://www.electro-tech-online.com/custompdfs/2006/08/00017085_0.pdf

What is not clear, is if you are turning all the LEDs on at the same time, or one by one. Also not clear if you wish to vary the intensity from nothing to full, then back to nothing?

There is a discussion of PWM, although for another PIC micro, right here on this board, which should help you understand. Look at this:
https://www.electro-tech-online.com/threads/pwm-basics.22650/

Have you tried googgling for PWM?
 
What I want to do is make the 8 LED's turn on at the same time but it should go dim, less bright then bright. yes i'm trying to vary the intensity....

I've tried to google it and found this site **broken link removed**

but i don't fully understand since it uses interrupt... I just wanna do it w/ just delay and loop.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top