I was using Great Cow Graphical Basic to make a simple timer program for a project. Everything was going well and the complied code worked.
I then I wanted to change the clock speed from 4 MHz to 125KHz to reduce power so I made the configuration setting change in the PROGRAM>HARDWARE SETTINGS menu of great cow graphical basic.
I then decided it would be nice to make sure the oscillator was really running at 125KHz so I also changed from INTRC_OSC_NOCLKOUT to INTRC_OSC_CLKOUT. After compiling and burning the hex into the 12F683, I then checked the frequency output on the CLK OUT pin of the 12F683 and found it was around 1 MHz. This should be 125KHz/4 or 31.25Khz so I looked at the assembly file generated by great cow and noticed that it did not generate the oscillator configuration part of the code that it did when I selected INTRC_OSC_NOCLKOUT.
The assembly code for the OSCCON register was completely missing. I was able to get things working by adding the OSCCON code in and using MPLAB to create the working HEX file but that is extra work that is a hassle to do so wanted to point out this bug. Attached are some screen shots to help clarify my settings. I highlighted the code that is missing when I tried to configure the clock as INTRC_OSC_CLKOUT.
apply all files to your installation replacing all the existing files
then, rename the compiler EXE for your operating system - you need to ensure either GCBASIC64.exe or GCBASIC32.exe is renamed as GCBASIC.exe for your operating system
Enjoy
Using single files may make your installation unstable. Use all the patch files.
apply all files to your installation replacing all the existing files
then, rename the compiler EXE for your operating system - you need to ensure either GCBASIC64.exe or GCBASIC32.exe is renamed as GCBASIC.exe for your operating system
Enjoy
Do not use single files from the zip - this may make your installation unstable. Use all the patch files.
I was using Great Cow Graphical Basic to make a simple timer program for a project. Everything was going well and the complied code worked.
I then I wanted to change the clock speed from 4 MHz to 125KHz to reduce power so I made the configuration setting change in the PROGRAM>HARDWARE SETTINGS menu of great cow graphical basic.
I then decided it would be nice to make sure the oscillator was really running at 125KHz so I also changed from INTRC_OSC_NOCLKOUT to INTRC_OSC_CLKOUT. After compiling and burning the hex into the 12F683, I then checked the frequency output on the CLK OUT pin of the 12F683 and found it was around 1 MHz. This should be 125KHz/4 or 31.25Khz so I looked at the assembly file generated by great cow and noticed that it did not generate the oscillator configuration part of the code that it did when I selected INTRC_OSC_NOCLKOUT.
The assembly code for the OSCCON register was completely missing. I was able to get things working by adding the OSCCON code in and using MPLAB to create the working HEX file but that is extra work that is a hassle to do so wanted to point out this bug. Attached are some screen shots to help clarify my settings. I highlighted the code that is missing when I tried to configure the clock as INTRC_OSC_CLKOUT.
Last edit: Anobium 2022-05-11
Opps. Can you post the errant program?. So, we can reproduce and fix.
Post the GCB and the ASM GCGB created to the post, as attachments.
However, I have resolved in build 1120
As a user of GCGB I have no idea how you installed but you need to update to the latest build regardless to get build 1120.
Last edit: Anobium 2022-05-11
How can I check which build I have?
The Great Cow Basic code I used was very short just to test this. It is:
The assembly generated by Great Cow Basic was:
Thank you. You have
(0.99.01 2022-01-27 (Windows 64 bit) : Build 1073)
build 1073.You need build 1121.
Goto https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/Patches/
Using single files may make your installation unstable. Use all the patch files.
See https://1drv.ms/x/s!Ase-PX_n_4cvhJAysbPF3VJAnYaj3A for changelog.
There was an issue in build 1120... it always set the CLOCKOUT.. you need 1121. I will post when I have uploaded.
Last edit: Anobium 2022-05-12
Uploaded build 1121
Goto https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/Patches/
Do not use single files from the zip - this may make your installation unstable. Use all the patch files.
See https://1drv.ms/x/s!Ase-PX_n_4cvhJAysbPF3VJAnYaj3A for changelog.
Everything worked smoothly with the new 1121 build. Thanks for the fast update!
Pleasure, a worthwhile change. I will expand this change over the next few weeks.