Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Newbie- PWM by hardware & controlled by PIC18F

Status
Not open for further replies.

prowede

Newbie level 4
Joined
Sep 11, 2007
Messages
5
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,318
pic18f pwm

I am a newbie in electronics
I want to make a LED lamp which can adjust the intensity by control the PWM

I have use a stupid method to make the PWM
that's use 555+ reference DC level into comparator, by adjusting the DC level I can change the duty cycle

But now i want to use the PIC to control the duty cycle
I know there is a software PWM function in PIC, but my programming is not so good(i just know C but not asm), so i prefer using hardware PWM controlled by PIC

But I have not idea in how to control the duty cycle by PIC
Or other hardware approach i have to use for PWM?

Can anyone give some ideas or suggestions?

THANKS A LOT!
 

pic18 pwm

Search for the PWMWizard
 

pwm pic18

For an easy start use Swordfish BASIC for the 18F, free SE edition and a PWM module. Easy peasey
I use it with our robot kits motor control. Excellent.
 

pwm pic18f4550

Actually I am quite confused between "hardware PWM" and "software PWM"
 
pic18f2550 pwm

Hi there,

Hardware PWM: Most of the hard work is done by the chip itself. You basically just have to supply the
1) PWM period ~ Frequency
2) PWM Duty Cycle ~ how long it must be of or on.
And the chip will do the rest, you will get a almost perfect PWM signal on the pin of the µC you use.

With some or most of the µC there is no PWM peripheral available so you have to program the whole thing yourself. You fisrst have to establish a frequency with one of the timers and then you have to alternate the pin on the µC you want to use so that you get the correct duty cycle.

The best reference I used for hardware PWM was the Midrange Microchip Reference Manual, and for software PWM I had a look at this site:

http://www.mcmanis.com/chuck/robotics/projects/servo.html

Regards

Nic
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top