FAQs - THe common questions and answers 

Want to go directly to Windows specific FAQ   or  Linux specific FAQ, select the links.

 

We are always wanting to improve the FAQ.   If you feel you want a question answered and it should be shared.   Please tell us here current FAQ Thread

 

And.... It is always a good idea to consult the Help System first.     Many questions are answered in the Help.

 

 

 


 

1. Installing Great COW BASIC

crying What distribution of Apple Os is supported?

enlightenedShould support all operating systems. When we get specific operating system information we will publish.

crying Can I use Great Cow BASIC on a Mac?

enlightenedYes, Great Cow BASIC and the IDE (SynWrite) can be run on a Mac, with some limitations.   Great Cow BASIC, the IDE and Compiler must be installed into a 'WINE' environment.  More detailed instructions can be found here:   https://sourceforge.net/p/Great Cow BASICasic/discussion/629990/thread/2dc2255b/#4985

This well (the author uses this configuration at home and at work) but the context sensitive help does not work as expected and WINE does not seem to recognise a PicKit3 in this way. I use MPLAB IPE to program my chips (a Mac version of this is available from MicroChip).

Install SumatraPDF to open the help files. Sumatra PDF works almost as well as the original help system, with context sensitive results displayed when F1 is pressed. Installing this requires a little work, I have detailed some of the steps required on the forum.   See here https://sourceforge.net/p/Great Cow BASICasic/discussion/579125/thread/764409f8/#8c40 

Compilation is slower under WINE,  see details here: https://sourceforge.net/p/Great Cow BASICasic/discussion/629990/thread/2dc2255b/#4985

 

2. Configuration

crying What configuration is there?

enlightenedThe software needs very little configuration.   You need to link your programmer to the IDE or to Great Cow Graphical BASIC - this is detailed in the Help and discussed in this page.

3. Compiling, Running

crying Oh dear...Error!    foobar. Great Cow BASIC (nn): Error: Invalid variable name: 0THEN:

enlightenedCarefully search downwards for missing end if, the Error line nn is not  the real Reason!

crying A program compiles and downloads fine, but will not run

enlightenedAre you using external or internal Oscillator? select which suits your situation.    See here : http://Great Cow BASICasic.sourceforge.net/help/_configuration.html

crying I an trying to use "On Interrupt PortBChange Call My_Interrupt_Handler" but, the Interrupt Routine (My_Interrupt_Handler) is not triggered, Why?

enlightenedLook at the datasheet for the specific microcontroller, i. e. a PIC18F25K22, look for the 'Interrupt-On-Change' (IOC) specification.   The PIC18F25K22 shows PortB.4 to PortB.7 are useable for IOC.   Therefore, you must use  PortB.4 to PortB.7 for IOC all the other ports will never trigger the interrupt.
So, in your user code you must set the Interrupt with IOCB4 to IOCB7, as shows below:

Set IOCB4 On

crying Why does my #IfDef Define not work?

enlightened When an '#IfDef' statement is set, it is important that the 'Then' word is not included as part of the statement or the Define will not be correctly interpreted.

This should work:

#Define MyDefinition 
#IfDef MyDefinition 
Do 
'MyStuff here 
Loop 
#EndIf 

This won't work:

#Define MyDefinition 
#IfDef MyDefinition 
Then Do
 'MyStuff here 
Loop 
#EndIf 

[The #Define is misinterpreted as: #IfDef MyDefinitionthen]

A2. It seems not to be possible to encase an entire SubRoutine (or SubRoutines) within an '#IfDef' statement.

This should work:

#Define MyDefinition 
Sub MySub 
#IfDef MyDefinition 
Do
 'MyStuff here 
Loop 
#EndIf End Sub 

This won't work:

#Define MyDefinition 
#IfDef MyDefinition 
Sub MySub 
 Do 'MyStuff here
 Loop 
End Sub
#EndIf 

[The SubRoutine seems never to compile]

cryingI am still having problems programming my microcontroller!!!

enlightenedIn most cases, this is not a problem of the programmer software, but, a problem of the programmer hardware or the connection to the microcontroller.
Some hints, tips and tricks which can be used for troubleshooting such problems.
• Check all Vdd (supply voltage) and Vss (0v) pins of the microcontroller have to be connected to the corresponding power supply pins.
• Each Vdd pin should be connected to a decoupling capacitor, i.e. a capacitor between Vdd and VSS. The capacitor shall be placed as close as possible to the Vdd pin. A typical value for a decoupling capacitor is 100nF.
• For Low-Voltage programmers, make sure that the PGM pin of the microcontroller is tied to ground via a pull-down resistor (~10k).
• For High-Voltage programming, it also might be necessary to connect the PGM pin to GND. So if programming fails, try to connect the PGM pin to ground via a 10k resistor.
• Microcontrollers that can be programmed either in High-Voltage or Low-Voltage mode may make problems during programming in High-Voltage mode if the LVP bit (Low Voltage ICSP Enable bit) in the configuration memory is enabled. Also, if you program a microcontroller the first time, the LVP bit (Low Voltage ICSP Enable bit) in configuration memory is set, i.e. LVP enabled. Issues also happen when using the MCLR pin is used as Input I/O pin. 
If the LVP configuration fuse is enabled, PGM should be held low to prevent inadvertent entry into LVP mode.
• If you are using a High-Voltage programmer, make sure that the programming voltage on MCLR pin is within the voltage thresholds specified in the programming specification of the microcontroller to be programmed.

crying Where can I see how big my Program is, how much memory/eeprom/ RAM it uses etc.

enlightened Look at the Compilation Report in your current project folder. The File with the html extension has a vast amount of information.

4. other Questions

crying What is the Difference between  GLCDPrint and GLCDDrawString?

enlightened GlcdPrint can print Variables, GLCDDrawString can print only Strings.   You can minimize program  a bit if you are only use one kind.

crying How do i find examples of Great Cow BASIC code and commands? 

enlightened Try searching for text using this URL. https://github.com/Anobium/Great-Cow-BASIC-Demonstration-Sources At the top is a search dialog.  Try typing a search there.  The results are the same as in your local installation. If you search for 'Stan' you will see "Stan's" contributions, if you search for ‘ds18b20' you will see all the demos with ’ds18b20’.

crying Why are my ports floating at start up, neither inputs or outputs? I've set the direction in my header file, but this doesn't seem to work. Why?

enlightenedIf the port direction is attempted to be set from within a header file, it may not be set correctly leaving the port in an ambiguous state. If the port direction is set from within a SubRoutine then called with the 'StartUp' directive within the header file, this will work.

This won't work:

[Header file saved as MyHeaderFile.h]
#Define MyPort  PortA.0

Dir MyPort Out

[End Header file]

[Program file]
#Include MyHeaderFile.h

Let MyPort = 1
[End program file]

This will work:

[Header file saved as MyHeaderFile.h]
#Define MyPort  PortA.0

#StartUp SetPortDir

Sub SetPortDir
    Dir MyPort Out
End Sub

[End Header file]

[Program file]
#Include MyHeaderFile.h

Let MyPort = 1
[End program file]

crying Any support for 16bit PIC24 family support in the near future?

enlightened Short Answer: No. Long Answer: Discussion in Forum

crying Does Great Cow BASIC support Graphic Display XY, Sensor foobar?

enlightened Please look here for an answer:  hardware. For Graphic Displays is here an actual Table: glcd_overview. Always a good Idea is to go on Discovery Tour in our Help system, searching for Overview will reveal interesting Things, we promise!

crying Where comes the name  Great Cow BASIC  come from?

enlightened Now the history of the Name is simple.  No-one else had that name, it had no meanings that could offend, and it was something odd enough to be memorable, so Great Cow BASIC it was.

crying What is ICSP?

enlightened ICSP means In-system programming (ISP), also called in-circuit serial programming (ICSP), is the ability of some programmable logic devices, microcontrollers, and other embedded devices to be programmed while installed in a complete system, rather than requiring the chip to be programmed prior to installing it into the system. (description copied from Wikipedia, see here or more Info

 

Back to Top