Author |
Message |
Topic: PIC16F877: PWM with less than 250Hz possible? |
oh1jty
Replies: 18
Views: 31911
|
Forum: General CCS C Discussion Posted: Tue Mar 09, 2010 12:32 pm Subject: PIC16F877: PWM with less than 250Hz possible? |
Thanks, i found the problem.
I tried with simpler code and it worked without any problems.
So i went thru the code and found this line:
"setup_counters(RTCC_INTERNAL, RTCC_DIV_8);" whic ... |
Topic: PIC16F877: PWM with less than 250Hz possible? |
oh1jty
Replies: 18
Views: 31911
|
Forum: General CCS C Discussion Posted: Mon Mar 08, 2010 5:57 pm Subject: PIC16F877: PWM with less than 250Hz possible? |
Timer0 is 8 bits wide in the 16F877. It can optionally be 8 or 16 bits
wide in the 18F4620. Look in the Timer0 section of the 18F4620.h
header file to see the constant for setup_timer_0() that co ... |
Topic: PIC16F877: PWM with less than 250Hz possible? |
oh1jty
Replies: 18
Views: 31911
|
Forum: General CCS C Discussion Posted: Mon Mar 08, 2010 3:45 pm Subject: PIC16F877: PWM with less than 250Hz possible? |
Here is an improved program that will give a 50 Hz pwm update rate,
and allow 100 pwm steps.
#include <16F877.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = ... |
|