New: Improved .S header with chip specifications - improved handling with File Caching
New: Improved .S header with chip specifications.
ok. ok. ok. :)
Start with DMA. It is very easy. I made video and demo to show capability. DMA will move data with CPU... it is the best method.
Start with DMA. It is very easy. I made video and demo to show capability. DMA will move data with CPU... it is the best method.
Start with DMA. It is very easy. I made video and demo to show capability. DMA will move data with CPU... it is the best method.
Yes, It has DMA. If I will be able to handle DMA, that is for later.
Maybe. Time will tell. Does the 27Q83 support DMA? That would even faster. Choose a DMA chip.
Combining two PIC18F27Q83 (one could be a slave, sending parallel bytes) then I would have 25kB available and cheap too. For now that is more tempting.
On-board RAM will be a lot faster. A lot faster.
Thanks. I was just trying to find out the options available. For the idea I',m working on it is probably easier to get a processorchip with more built in RAM. I will save this and test later. I could definitely find use for this and if I get it to work, I will ofcourse report back.
Here is an untested method to write. It would be a similar approach to read. I have added page addressing. Do these device need page addressing? This means do you have to write the page address when the page changes? If not remove that part of the method any just keep pushing the data out. Many of the variable names are shared with other methods. But, do retain these names. sub SRAMWriteArray ( in eepAddr as long, in eepArray(), Optional in eepLen as byte = 0 ) dim eep_i as Byte // implies max array...
OK. There is a need to extend the functionality. I assume the existing operations all work?
We are not there yet in terms of getting the money we need. We have a great support for the project, but we are only at 63% of the required funds — and we urgently need your help. Donate Here Please donate to support the operational costs of the GCBASIC Project. Every contribution helps. Whether it’s a small donation or a larger one, your support keeps GCBASIC alive and improving. Thank you! Donate here. Select this URL, choose Send, enter your donation value, and press Next to complete the process....
I looked there first thing and did not find anything on sending receiving sequentially without sending a long address for each byte. Then I searched this forum. Yes, a block of data.
I would look at the Help. https://gcbasic.sourceforge.io/help/_sram_overview.html If you want to add arrays/string/pointers( to send a block of data ) then please extend the existing library. If you need help, just ask. I spotted a typo in the PIC example on the help web page. I am updating the online version at the moment. So, your local Windows Help will have a typo when you compile. Use the online version to get the latest web page.
I would look at the Help. https://gcbasic.sourceforge.io/help/_sram_overview.html If you want to add arrays/string/pointers( to send a block of data ) then please extend the existing library. If you need help, just ask. I spotted a typo in the PIC example on the help web page. I am updating the online version at the moment. So, your local Windows Help will have a typo when you compile. Use the online version to get the latest web page.
Existing methods I had no luck finding. I will try again tomorrow.
Yes, is the answer. You can use the existing methods or write your own.
Sitting here philosophizing, wondering and looking at options... Can GCbasic read and write sequentially to/from a SPI Serial SRAM (like 23LC1024) ? -That is after sending the startadress, continuing without sending the long address for each byte.
Updated policy
My error. I call them CNANO in the Programmer Prefences. They are the Curiosity Nano bo platform.
cant find "cnano" nowhere googli ! that why asking has 8051 family decided?
Privacy Policy for GCBASIC
yes, it made sense.
Cnano/8051. I have to buy boards to test for specific chip families. These come from Microchip Direct or Nuvoton.
cost rising is significant since last year !!!! btw "testing hardware cnano ? whats this ? imho "application certificate" can be removed, i see other small companies/shareware who removed it , as its a ripoff, and only help in a warning of opening app !!! allow it and proceed ... so XOJO goes from 99 to 499 /year... nice pricing guys ;)
cost rising is significant since last year !!!! btw "testing hardware cnano ? whats this ? imho "application certificate" can be removed, i see other small companies/shareware who removed it , as its a ripoff, and only help in a warning of opening app !!! allow it and proceed ...
cost rising is significant since last year !!!! btw "testing hardware cnano ? whats this ?
Did the explaination make sense? The ASM shows the process. In the next release you can walk the program in a real Debugger to see what is happening.
Thanks! That worked
Time to update the compiler... going for the oldest compiler in use award. :-) SMILING Compiled with GCBASIC (2025.11.12 (Windows 64 bit) : Build 1527) using PIC-AS ( not GCASM). dim coef_0 as word coef_0 = FnLSL([WORD]17, 4) print coef_0 Gives 272. Note: You have to case the input variable. The compiler does not really know what the constant 17 is to be treated as. So, the cast tells the compiler to treat as a word.
Correction When I run the code it says coef_0 = 16 not 17
I'm using: GCASM List File (GCBASIC 0.99.01 2022-01-27 (Windows 64 bit) : Build 1073) with an 18F4550. I wrote this simple code: dim coef_0 as word coef_0 = FnLSL(17, 4) print coef_0 When I run the code it says coef_0 = 17. I think it should be 272. What am I doing wrong?
New: Support for 16F175xx by additional isolation of legacy clock sources
New: Add ChipSubFamily = 15006 TX1REG redirection in script section
New PIC16F175xx chipdat files
Fix: Revised 9bit and 10Bit CCP1 support to isolate bits.
New: Add 31k support for 18F4xxx chipfamily
New: Errors in Macros are now reported as the source line in the Macro ( not the calling the method. The implementation extends the metadata model and add new ErrorLog methods.
Donate Here Please donate to support the operational costs of the GCBASIC Project. Thank you! Donate here. Select this URL, then select Send, enter your donation value and then select Next. Follow the process to complete the payment. This year, we are reaching out to anyone and everyone who uses the GCSTUDIO/GCBASIC toolchain to contribute. Please contribute as much as you can afford. If you are a business or are selling products that leverage this project, consider becoming a Platinum supporter....
Donate Here Please donate to support the operational costs of the GCBASIC Project. Thank you! Donate here. Select this URL, then select Send, enter your donation value and then select Next. Follow the process to complete the payment. This year, we are reaching out to anyone and everyone who uses the GCSTUDIO/GCBASIC toolchain to contribute. Please contribute as much as you can afford. If you are a business or are selling products that leverage this project, consider becoming a Platinum supporter....
Fix. Added dependent library to #25: glcd_type_st7735r,glcd_st7735r.h&glcd_st7735.h
Excellent! There have been no functional changes. This was purely the way the libraries were loaded. If you want to see the change. Look at include\glcd.dat This will show you the structure of the libraries being loaded. Enjoy. Please donate to the project. The December fund raising is coming up!!
Thanks! That fixed it and it compiled :) It always me and these LCDs!
No problem. I had missed that specific chip from the post.... so, try a search again. :-)
Greatextraplus! (I did search before asking, but I didn't get any hits on this particular chip. I must have mis-spelled it.)
Chris, All sorted. Download the MPK. Double click the download. If you have the latest GCSTUDIO then it will automatically update applying the fix. Root Cause We change the GLCD library configuration to improve ( decrease ) the compilation time. This optimisation isolated each GLCD library. So, rather than load ALL the GLCD libraries the compiler loads only the GLCD library required. I had missed a dependent GLCD library for your selected GLCD. The file that changed is in the MPK and it will now...
Yes, yes, yes. :-) See https://sourceforge.net/p/gcbasic/discussion/chipfileforum/thread/7859bf7e32/ See https://www.youtube.com/playlist?list=PLN9gcw34mhupJx5YotmF0Ao9O63EbQMFf These chips are great! I am working through the validation by creating the videos/demos but all looks great. Just minor tweaks to the toolchain. :-) Evab
New chipdata files for PIC16F175xx. These are not validated but they will work. PIC16F17524 PIC16F17525 PIC16F17526 PIC16F17544 PIC16F17545 PIC16F17546 PIC16F17554 PIC16F17555 PIC16F17556 PIC16F17574 PIC16F17575 PIC16F17576 Apply using GCSTUDIO and this will be automatically installed.
Also, adding the following to PICKitPlus. Support for 9 new devices to be added: PIC16F17524 PIC16F17525 PIC16F17526 PIC16F17544 PIC16F17545 PIC16F17546 PIC16F17554 PIC16F17555 PIC16F17556 and, PIC16F17574 PIC16F17575 PIC16F17576
Complier: GCBASIC (2025.10.04 (Windows 64 bit) : Build 1523) Chip Model: 16F1778 Great Cow BASIC build version utility (1.06)... Build 319 I am using Synwrite 6.22.2290 The issue: Its been three years since I last looked at this code and in its current state, its running on hardware! I have to make some updates to it and I havent changed the code yet so I figured I'd compile it to make sure things are good. However, I get the following errors: 20:28:23 G+Stool started with parameter 'hex' -> processing...
Hi, Any plans supporting PIC16F17576? It has a 10-bit D/A and is available as a CURIOSITY NANO EVALUATION KIT (EV14L29A). I happen to like these kits, when trying things out. Just asking. Nothing more.
Hi, Any plans supporting PIC16F17576? It has a 10-bit D/A and is available as a CURIOSITY NANO EVALUATION KIT (EV14L29A). I happen to like these kits, when trying things out. Just asking. Nothing more.
Thank you! All uploaded to https://github.com/GreatCowBASIC/Demonstration_Sources/tree/main/Hall_Effect_Solutions/ACS758LCB-100B_Solutions
all in zip
Ok, thank you Anobium for the point out ;correction. i have tested it and it works i attached the reading pictures for more verifications
Ok, thank you Anobium for the point out ;correction. i have tested it and it works i attached the reading pictures for more verifications
Very good work and thank you for sharing. I have adapted for inclusion in the Demos. Can you please review and potentially test if you have time. The ADC setup is not need as the ADC reads does this for you. And, this would look complicated to a new user. I added header etc. Change LCD to SLOW to ensure it works on breadboards. Changed variable i to indexCounter as i can cause issues on chips with a bit called i. Other changes are format.
See the HELP ( press F1 in the IDE ) or see https://gcbasic.sourceforge.io/help/_command_line_parameters.html These two methods will show the same information. They are just different formats.
Cloning GCBASIC Preferences Editor Settings The GCBASIC Preferences Editor saves its configuration in a file called USE.INI. Location Found in the \GCSTUDIO\GCBASIC installation directory It is plain text file, editable with any text editor but use the GCBASIC Preferences Editor to ensure structure is always correct. Purpose Stores compiler, assembler, and programmer preferences. Updated automatically when you change settings in the Preferences Editor.
I have one station in my lab setup to use MELabs Programmer, by using the Preferences Editor. I'd like to clone that setup to all the stations. I can't find the INI file that the Preferences Editor changed, to copy it around. Can someone tell me the best way to do this?
I think this can help some newbie to get started to read current with hall sensor ACS785, the accuracy is 98% ; ============================================================== ; ACS758-100B SENSOR TEST TOOL ; Target: PIC16F886 (20MHz) ; By Samco, maker-brainy ; ============================================================== chip 16F886, 20 option explicit ; --- LCD Setup (Change if your pins differ) --- define LCD_IO 4 define LCD_NO_RW define LCD_Speed fast define LCD_RS PORTB.2 define LCD_Enable PORTB.3...
Very good work! Really nice photos.
Testing new hardware for the tinyscreen. A sandwich with a PIC 16F17115 and programming socket on the back of the screen. One idea is to use the programming socket as game paddle inputs. The whole package measures 15x16x10mm.
Sorry about that. Everything's fine now.
You do need the mpk_build_1526_legcay_pwm_fix.mpk fix. I thought you had applied this. https://sourceforge.net/p/gcbasic/discussion/579125/thread/4c55902b1b/d57d/attachment/mpk_build_1526_legcay_pwm_fix.mpk
Hi Anobium, sorry but the compiler is giving me this error with the new code 18:21:55 G+Stool started with parameter 'hex' -> processing C:\GCstudio\G+Stools\makeHEX.bat Source-File = C:\users\val\0-Motor-Ecoder\Motor-Encoder.gcb WARNINGs / ERRORs reported by GCBASIC (if Syntax Error, doubleclick on the errormessage below) <<< pwm.h ** (460): Error: Cannot store 2.7 in the byte variable DC1B1 (System Include) pwm.h ** (461): Error: Cannot store 2.6 in the byte variable DC1B0 (System Include) Duration:...
Some things were bugging me about this program. The code is fixed at 20mHz The PWM generation is hard coded to the chip Pulls are specific to chip Duplicate and redundant code. Here is an adapted and more modern version. This will work on 100s of PIC chips with CCP1/PWM The changes are 1. Use a script to calculate the INTERRUPT_PERIOD based on the chip frequency. And, make a one line change in the interrupt. 2. Use GCBASIC PWMOn command and the associated constant to set the PWM signal. 3. Isolate...
Some things were bugging me about this program. The code is fixed at 20mHz The PWM generation is hard coded to the chip Pulls are specific to chip Duplicate and redundant code. Here is an adapted and more modern version. This will work on 100s of PIC chips with CCP1/PWM The changes are 1. Use a script to calculate the INTERRUPT_PERIOD based on the chip frequency. And, make a one line change in the interrupt. 2. Use GCBASIC PWMOn command and the associated constant to set the PWM signal. 3. Isolate...
Some things was bugging me about this program. The code is fixed at 20mHz The PWM generation is hard coded to the chip Pulls are specific to chip Duplicate and redundant code. Here is an adapted and more modern version. This will work on 100;s of PIC chips with CCP1/PWM The changes are 1. Use a script to calculate the INTERRUPT_PERIOD based on the chip frequency. And, make a one line change in the interrupt. 2. Use GCBASIC PWMOn command and the associated constant to set the PWM signal. 3. Isolate...
Thank you for your help and explanation.
OSC: HS, 20Mhz (Clock source is not a primary internal oscillator. Ensure the clock source is correctly setup) Chip: 16F628A GCBASIC Warning Explained Message > OSC: HS, 20Mhz (Clock source is not a primary internal oscillator. Ensure the clock source is correctly setup) Chip: 16F628A This is a warning from GCBASIC, not an error. What It Means Part Explanation OSC: HS, 20Mhz Your program is configured to run at 20 MHz using High-Speed Crystal mode. Chip: 16F628A Target microcontroller is the PIC16F628A....
Thank you very much ANOBIUM, it compiles well. In the next few days I will try to assemble and test the mechanics to see if it works. And what does that error mean? OSC: HS, 20Mhz (Clock source is not a primary internal oscillator. Ensure the clock source is correctly setup) Chip: 16F628A
I asked Grok to convert. It gave Grok the rules I wrote. It made one error. ' GCBASIC version of the motor speed control code for PIC16F628A ' Assumes 20MHz clock #chip 16F628A, 20 #option explicit ' Constants #DEFINE MOTOR_PULSE_PERIOD 6944444 #DEFINE MOTOR_PROP_GAIN 10 ' Variables dim rpos as byte ' reference position dim mpos as byte ' actual motor position dim mlag as byte ' amount the motor lags the reference dim enc_new as byte ' holds motor's quadrature encoder data dim enc_last as byte '...
C to GCBASIC Porting Rules High-Level Cheat Sheet for PIC16F628A (MikroC → GCBASIC)) 1. Chip & Clock MikroC C GCBASIC #pragma config FOSC = HS #chip 16F628A, 20 (any config) #option explicit (recommended) Rule: Always start with #chip <model>, <MHz> 2. Functions C GCBASIC void main() Use a label Main: void interrupt() Sub Interrupt Rule: Use Sub and Interrupt End with End Sub 3. Infinite Loop C GCBASIC while(1) { } Do → Loop Rule: No condition needed 4. Variables C Type GCBASIC unsigned char Dim...
I asked Grok to convert. It gave Grok the rules I wrote. It made one error. ' GCBASIC version of the motor speed control code for PIC16F628A ' Assumes 20MHz clock #chip 16F628A, 20 #option explicit ' Constants #DEFINE MOTOR_PULSE_PERIOD 6944444 #DEFINE MOTOR_PROP_GAIN 10 ' Variables dim rpos as byte ' reference position dim mpos as byte ' actual motor position dim mlag as byte ' amount the motor lags the reference dim enc_new as byte ' holds motor's quadrature encoder data dim enc_last as byte '...
original MikroC code // This constant sets the motor speed. The value is in nanoSeconds per pulse, // as we are using a quadrature encoder there are 4 pulses per encoder slot. // My encoder had 36 slots, so that makes 36*4 or 144 pulses per revolution. // Example; 1 motor rev per second = 144 pulses /sec. // nS per pulse = 1 billion / 144 = 6944444 //#define MOTOR_PULSE_PERIOD 1736111 // 4 RPS //#define MOTOR_PULSE_PERIOD 3472222 // 2 RPS define MOTOR_PULSE_PERIOD 6944444 // 1 RPS //#define MOTOR_PULSE_PERIOD...
Thanks Anobium, sorry I posted the wrong version of the code. I asked the AI for help, that's why the AI added all that.
C to GCBASIC Porting Rules High-Level Cheat Sheet for PIC16F628A (MikroC → GCBASIC)) 1. Chip & Clock MikroC C GCBASIC #pragma config FOSC = HS #chip 16F628A, 20 (any config) #option explicit (recommended) Rule: Always start with #chip <model>, <MHz> 2. Functions C GCBASIC void main() Use a label Main: void interrupt() Sub Interrupt Rule: Use Sub and Interrupt End with End Sub 3. Infinite Loop C GCBASIC while(1) { } Do → Loop Rule: No condition needed 4. Variables C Type GCBASIC unsigned char Dim...
C to GCBASIC Porting Rules High-Level Cheat Sheet for PIC16F628A (MikroC → GCBASIC)) 1. Chip & Clock MikroC C GCBASIC #pragma config FOSC = HS #chip 16F628A, 20 (any config) #option explicit (recommended) Rule: Always start with #chip <model>, <MHz> 2. Functions C GCBASIC void main() Use a label Main: void interrupt() Sub Interrupt Rule: Use Sub and Interrupt End with End Sub 3. Infinite Loop C GCBASIC while(1) { } Do → Loop Rule: No condition needed 4. Variables C Type GCBASIC unsigned char Dim...
Also, the original source code. You should share this. As the logic in your code provided does not make sense to me. 'if (enc_new > 1) <> (enc_last & 1) then' this makes no sense. It will compile but the outcome is not what you need. This surely should be a bitwise inspections. The code may not work as expected. Post the C source.
Hello, I am not sure who added this to your code but they gave you good advice. But, not complete. // 1. **Syntax**: GCBasic uses a different syntax than MikroC (Basic-like vs C-like) // 2. **Bit operations**: Used bitwise operators instead of .F0/.F1 notation // 3. **Interrupt handling**: GCBasic uses `oninterrupt` statements // 4. **Variable declaration**: Used `dim` instead of type declarations // 5. **Constants**: Used `const` instead of `#define` // 6. **Delay**: Used `delayms` instead of `Delay_mS()`...
I would be very grateful if someone could help me. I'm trying to compile this code but I can't get it to work. Gbasic version : 2025.10.04 (Windows 64 bit) : Build 1523
Build Note: mpk_build_1527.mpk 📦 Build Identifier Filename: mpk_build_1527_PIC-AS_reverse_fix.mpk Build Number: 1527 Build Type: Library Patch / Config Parser Bugfix Date: 12 November 2025 Author: EvanV 🧩 Components Included Updated configuration file parser for FreeBASIC integration Fix for incomplete loading in ReverseCfgFileLookup array on legacy PIC config files 🛠️ Changes & Fixes Resolved bug where ReverseCfgFileLookup failed to load all relationships during config file parsing Issue previously...
### Changelog Entry
I have added three more devices - remove the existing MPK and reapply the updated MPK.
Build Note: mpk_build_1525 📦 Build Identifier Filename: mpk_build_1525_16F175xx_chipfilles.mpk Build Number: 1525 Build Type: Chipfile Extension / Device Support Update Date: 6 November 2025 Author: Anobium (SourceForge contributor) 🧩 Components Included - added more 11/11/25 New chipdata files for PIC16F175xx series Integration with GCSTUDIO for automatic installation Preliminary support for: PIC16F17524 PIC16F17525 PIC16F17526 PIC16F17544 PIC16F17545 PIC16F17546 PIC16F17554 PIC16F17555 PIC16F17556...
Dang! Embarrassed. I knew that...ahem, more than 10 years ago! Thank you Angel.
hi Lewis and welcome. in deed the compiler is telling you that this part (pic 12f675) didn't have a port B (it's a tinny pic with only 6 IO pins) when you read the datasheet of that part you can see that those pins are called GP0, GP1, GP2, GP3, GP4 and GP5. you can use this designations in GC basic, so for example you can use: dir GP1 out do forever GP1 = 1 wait 1 s GP1 = 0 wait 1 s loop to blink a led on pin 6 happy coding! Angel
I am a Noobie feeling my way around. New GC Studio installation/latest version. Used: first-start-sample.gcb Added #option Explicit No errors were reported using #CHIP 16f886 Changed to an old PIC part in hand. #CHIP 12f675 [{ Line 42 PulseOut PortB.5, 100 ms "resource": "/c:/GCstudio/gcbasic/demos/first-lew-test.gcb", "owner": "gcb", "severity": 8, "message": "Variable PORTB was not explicitly declared", "source": "gcb", "startLineNumber": 42, "startColumn": 1, "endLineNumber": 42, "endColumn":...
Great question. Each is cumulative. Apply each one. If the MPK needs prerequisites then that should be in the package. Want a deep insight? open the MPK in pkzip, 7zip or your favourite archive package. All will be revealed.
Hello, Are the MPK package cumulative? Do we need to install all them one after other, or is always the latest only necessary? Thank
Build Note: mpk_build_1526.mpk 📦 Build Identifier Filename: mpk_build_1526_legcay_pwm_fix.mpk Build Number: 1526 Build Type: Library Patch / PWM Bugfix Date: 5 November 2025 Author: Angel Mier (SourceForge contributor) 🧩 Components Included Updated PWM library for legacy PIC chips Fix for HPWM compilation error on PIC16F876A and similar devices 🛠️ Changes & Fixes Resolved bug where HPWM failed to compile when assigning fractional values to DC1B0 Error previously triggered by code like: Error: Cannot...
Build Note: PWM_build_1526.mpk 📦 Build Identifier Filename: mpk_build_1526_legcay_pwm_fix.mpk Build Number: 1526 Build Type: Library Patch / PWM Bugfix Date: 5 November 2025 Author: Angel Mier (SourceForge contributor) 🧩 Components Included Updated PWM library for legacy PIC chips Fix for HPWM compilation error on PIC16F876A and similar devices 🛠️ Changes & Fixes Resolved bug where HPWM failed to compile when assigning fractional values to DC1B0 Error previously triggered by code like: Error: Cannot...