Hello,
I need help with writing the source code for PIC16F877A. I need it to generate PWM signal to the triac I would like to control. The PWM signal duty cycle are to be controlled using a potentiometer. I've tried to read through a lot but am still not sure. I've written only this so far and would need help. Pls.
DEFINE OSC 20
define ADC_BITS 8
VAR ani
TRISA = 255
ADCON1 = 0
ADCIN 0, ani
IF (PORTA.2==0) THEN PWM PORTB.3,0,1000
.
.
.