Thanks for your interest and for taking your time.
I hope it helps you fix this error.
I hope it helps you fix this error.
Hi, I am a beginner at GCBasic, so please accept my apologies if I am making a silly mistake. To clearly replicate the issue I experienced from the very beginning, I did a fresh install of GCB Studio. I have also taken screenshots so you can see the error first-hand.
Unfortunately, I've already edited the original file. I was getting a compilation error around lines 461 and 462 in the pwm.h file. The error was occurring for either the 12F683 or the 16F877A. Then I edited the pwm.h file to support both microcontrollers properly. You can try generating PWM on the 16F877A and 12F683 with the original library to see the compilation error.
Here is the adapted pwm.h file. I have attached it to this post. Thanks for your interest.
Hi GCBASIC community, The current pwm.h library causing compilation errors on devices like PIC12F683. To fix this, we updated pwm.h using if condition. #if def(DC1B0) ' For devices like PIC12F683 that use DC1B1/DC1B0 definitions DC1B1 = DutyCycleL.7 DC1B0 = DutyCycleL.6 #else def(CCP1X) ' For devices like PIC16F877A that use CCP1X/CCP1Y definitions CCP1X = DutyCycleL.7 CCP1Y = DutyCycleL.6 #endif
GCBASIC compiler has a bug for PIC10F200 OSCCAL.FOSC4 = 1 modifies CAL0 (bit 1) instead of bit 0 I checked the generated .asm file and found the bug.