I am trying to start learning PWM techniques using 18F452.
The first simple task is to generate a fixed duty cycle- square wave using CCP1 pin of my PIC.
I simply use the following code:
( I am sorry if my question is very simple...)
Code:
#include <18F452.h>
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES HS //High speed Osc (> 4mhz)
#FUSES NOPROTECT //Code not protected from reading
#FUSES BROWNOUT //Reset when brownout detected
#FUSES PUT //Power Up Timer
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
There are several unclear points for me here.
1. This code simply produces a DC offset and there is no variation in this voltage.
2. I just see a square wave-form in the beginning and it converges to a DC offset. If I will "manually" configure PWM, what's the point of all these functions?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum