Search found 17 matches

by siliconchip
Mon Jan 05, 2026 4:03 pm
Forum: General
Topic: PWM ADVICE PLEASE
Replies: 11
Views: 214

Re: PWM ADVICE PLEASE

Hi martin
Success the calculations you gave made sense and ive now got my head around how to derive the frequencys i want but now realise the period is critical when choosing duty
Thanks for the help and giving me the insight to playing with the pwm function

Bob
by siliconchip
Sun Jan 04, 2026 9:02 pm
Forum: General
Topic: PWM ADVICE PLEASE
Replies: 11
Views: 214

Re: PWM ADVICE PLEASE

Hi martin
Thank you i now understand i will experiment tomorrow but its starting to make sense now thanks i will post to let you know how i go
Cheers bob
by siliconchip
Sun Jan 04, 2026 6:15 pm
Forum: General
Topic: PWM ADVICE PLEASE
Replies: 11
Views: 214

Re: PWM ADVICE PLEASE

Hi martin
Am i correct using the 10 bit duty cycle as thought using this would equate to 512 for a 50% duty. Just a thought ive got the oscilator set to 8Mhz would this being low affect my duty cycles ?
Cheers bob
by siliconchip
Sun Jan 04, 2026 4:06 pm
Forum: General
Topic: PWM ADVICE PLEASE
Replies: 11
Views: 214

Re: PWM ADVICE PLEASE

hi martin and chip fryer thanks for the replys, i can confirm that the config allows me to flash a led at 1 second intervals, ive now used this congfig but still not getting any where i was under the impression if i added a component macro and set frequency then the duty cycle would be 50% automatic...
by siliconchip
Sat Jan 03, 2026 5:31 pm
Forum: General
Topic: PWM ADVICE PLEASE
Replies: 11
Views: 214

Re: PWM ADVICE PLEASE

Hi martin
Thanks for the reply i set the chip at 10Mhz from the config page so im guessing it doesnt slways mean a chip can run at that frequency ?. As for my code itself have i wrote it out correctly other than the duty cycle for said reason
Cheers
Bob
by siliconchip
Sat Jan 03, 2026 11:48 am
Forum: General
Topic: PWM ADVICE PLEASE
Replies: 11
Views: 214

PWM ADVICE PLEASE

Hi all, ive been trying to get my head round setting up pwm, im using a pic12f1822, ive set my internal oscillator at 10Mhz and my timer is set at 9765 Hz. my question is have i expressed the code correctly for the pwm or do i just need to put a component macro stating frequency as i believe it is t...
by siliconchip
Wed Dec 17, 2025 4:06 pm
Forum: General
Topic: Pic 12f1572 pwm set up
Replies: 6
Views: 588

Re: Pic 12f1572 pwm set up

hi ben, please find enclosed my program, i can confirm config is ok and i get a led flashing, ive cobbled bits together from other things ive seen and managed to get the duty cycle as i wanted with setting the pwm at 8KHz, however i cannot get the output on hardware at port A 1 to work, ive also tri...
by siliconchip
Tue Dec 16, 2025 8:17 pm
Forum: General
Topic: Pic 12f1572 pwm set up
Replies: 6
Views: 588

Pic 12f1572 pwm set up

Hi all Im currently trying to set the pwm function on my target chip the 12f1572. So far im not achieving any thing i cant get an output and my pwm knowledge is nil. In a previous post i was told to just put set frequency value in and this would suffice but again cannot get it to work. Please can so...
by siliconchip
Mon Dec 15, 2025 12:30 pm
Forum: General
Topic: buzzer tone
Replies: 5
Views: 459

Re: buzzer tone

Hi Martin
i can confirm in hardware that config settings are correct and ive got a led flashing, as for the program there is no output ive changed the timer option of the pwm from FOSC to HFINTOSC and then LFINTOSC still no joy,
cheers bob
by siliconchip
Sun Dec 14, 2025 3:59 pm
Forum: General
Topic: buzzer tone
Replies: 5
Views: 459

Re: buzzer tone

Hi martin
ive not tried in hardware yet just simulation
Cheers bob