papaonn
Newbie level 5
Hi there i have some problem with PWM control,
I am using PIC16F877A microchip.
I have read some articles online and found that there is a PSTRCON register to control the output of PWM, which are P1A, P1B, P1C, & P1D.
however, i compiled my code in MPLAB (HI-TECH C compiler), it gave me an error saying that 'PSTRCON undeclared identifier'.
I have searched thru the internet and found no result about why it gave me undeclared identifier,
I included both <pic.h> & <htc.h> and got no results still.
I am wondering if there is necessary to switch on PSTRCON register,
or there is another way to generates output from PWM,
ALL I want to do is just 'Get some output from PWM signals to drive motors',
can somebody show me the way?
Thanks so much!
Regards,
Daniel.
I am using PIC16F877A microchip.
I have read some articles online and found that there is a PSTRCON register to control the output of PWM, which are P1A, P1B, P1C, & P1D.
however, i compiled my code in MPLAB (HI-TECH C compiler), it gave me an error saying that 'PSTRCON undeclared identifier'.
I have searched thru the internet and found no result about why it gave me undeclared identifier,
I included both <pic.h> & <htc.h> and got no results still.
I am wondering if there is necessary to switch on PSTRCON register,
or there is another way to generates output from PWM,
ALL I want to do is just 'Get some output from PWM signals to drive motors',
can somebody show me the way?
Thanks so much!
Regards,
Daniel.