On a 16F886 I am using RC2 described as PWM1 on datasheet.
What isβ€PWM Count=2’ and 'use alternate pin' in your menu. And nldx(BYTE)?
Can I slow PWM frequency to less the minimum of 7 Hz it is giving me, like to 0.1Hz? E.g. use prescalers more than 16? My clock is the 125KHz internal clock.
PWM slowing
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: PWM slowing
"PWM Count = 2" means that there are 2 PWM outputs available on this chip.
The "Use Alternate Pin" is on some chips where there is a choice of pin that the PWM output can be on (if you select this alternate setting, you will also need to set it up correctly in the chip configuration data).
nIdx refers to which PWM output you are accessing. It's 1 or 2 for those chips with 2 PWM outputs (or just 1 for those with 1 output).
You cannot slow the PWM down any further (unless you use a really slow master clock). An alternative approach is to generate the PWM output by hand using a timer interrupt.
The "Use Alternate Pin" is on some chips where there is a choice of pin that the PWM output can be on (if you select this alternate setting, you will also need to set it up correctly in the chip configuration data).
nIdx refers to which PWM output you are accessing. It's 1 or 2 for those chips with 2 PWM outputs (or just 1 for those with 1 output).
You cannot slow the PWM down any further (unless you use a really slow master clock). An alternative approach is to generate the PWM output by hand using a timer interrupt.
Re: PWM slowing
Thanks. I will have to use a timer instead. There was a post form you guys some months ago about how to do this. Need to look it up again.