Demonstration files for Great Cow BASIC - a compiler for Microchip and AVR 8-bit microcontrollers
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
7 Segment LED Soutions Updated Demos for Linux naming conventions Jun 7, 2018
ADC Read Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Binary Address Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Bitwise Addressing Solution Updated Demos for Linux naming conventions Jun 7, 2018
Compass Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Converter Solutions Updated Demos for Linux naming conventions Jun 7, 2018
EEPROM Solutions Updated Demos for Linux naming conventions Jun 7, 2018
FVR Solutions Add files via upload Aug 29, 2017
GLCD Solutions MPLAB® Xpress PIC16F18446 board Jul 10, 2018
Game Controllers No commit message Aug 29, 2017
HEFM Solutions Fix definition of HEF - high ENDURANCE flash memory, not EXTENDED Sep 13, 2018
I2C Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Interrupt_and_Timer_Solutions Updated Demos for Linux naming conventions Jun 7, 2018
KeyPad Solutions Updated Demos for Linux naming conventions Jun 7, 2018
LCD Solutions Updated Demos for Linux naming conventions Jun 7, 2018
LED Matrix Solutions Updated Demos for Linux naming conventions Jun 7, 2018
LED Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Light Meter using ADC Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Line Follower Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Maths Solution Updated Maths solutions and improved string for output Sep 19, 2017
Mechanical Rotary Encoder Solutions Updated Demos for Linux naming conventions Jun 7, 2018
MicroChip GetID Solutions Add files via upload Aug 29, 2017
MultiPort Sensor Solutions Updated Demos for Linux naming conventions Jun 7, 2018
New Add GCGB_Demos_Readme.GCB Sep 9, 2017
PWM Solutions More PWM demos Aug 28, 2018
Publication Solutions/Full Circle Update readme.md Sep 14, 2018
Radio Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Railway Level Crossing Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Real PIC Simulator Added Real PIC Simulator examples Mar 13, 2018
Real Time Clock Solutions No commit message Jul 10, 2018
SMT Timer Solutions Updated Demos for Linux naming conventions Jun 7, 2018
SPI Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Serial Communications Solutions Hardware Serial Serial Buffer Ring for 18F47K42 Jul 26, 2018
Servo Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Sleep Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Sound Solutions Updated Demos for Linux naming conventions Jun 7, 2018
String Handling Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Temperature Sensor Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Time Based Task Switcher Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Traffic Lights Solutions Updated Demos for Linux naming conventions Jun 7, 2018
USB Solutions Upload of the USB demos Jun 13, 2018
UltraSonic Sensor Solutions Updated Demos for Linux naming conventions Jun 7, 2018
Vendor Boards Fixed typo in LED name (D1 -> D4) Sep 13, 2018
_Welcome to Great Cow BASIC No commit message Sep 16, 2018
README.md Better PPS porting explanation Aug 25, 2018
Sample Header.gcb Updated Demos for Linux naming conventions Jun 7, 2018
first-start-sample.gcb Updated Demos for Linux naming conventions Jun 7, 2018

README.md

Great-Cow-BASIC

This GIT contains the latest user contributed demonstrations.

The baseline set of demonstrations was created at version 0.98.xx of the Great Cow BASIC distrubution.

Please add your demonstrations and improve those that have been posted.

Enjoy

Documentation of Demonstration Programs

Key Point: Try to provide a complete reference, describing all relevant aspects of the demonstration, and putting code-related terms in code font.

When you are documenting a demonstration, provide a complete reference, typically generated from source code using documentation comments that describe all public constants, methods, local constants, and other variables.

Use the basic guidelines in this document as appropriate for the Great Cow BASIC language.

This page also does not cover libraries. The style suggestions below may be useful to keep in mind while documenting Great Cow BASIC demonstrations. Libraries are covered by a Library Developer Guide.

Overall Program Layout

This is the standard program. This is included in every Great Cow BASIC installation. See IDE/Snippets.


'''A program  for GCGB and GCB the demonsations......
'''--------------------------------------------------------------------------------------------------------------------------------
'''This program [todo] a decription of the demonstration
'''
'''@author     [todo]
'''@licence    GPL
'''@version    [todo]
'''@date       [todo]
'''********************************************************************************

; ----- Configuration
 #chip [todo]
 #config [todo]
 #include [todo]

 #option explicit
 
; ----- Constants
  ' No Constants specified in this example.
  ' [todo]

; ----- Define Hardware settings
  ' [todo]

; ----- Variables
  ' No Variables specified in this example. All byte variables are defined upon use.
  ' [todo]

; ----- Quick Command Reference:
  [todo]

; ----- Main body of program commences here.

end
; ----- Support methods.  Subroutines and Functions

The template should be completed with the sections marked [todo] being updated as appropiate.

The header is strict. Great Cow Graphical BASIC and Great Cow BASIC test routines use the header to determine parameters and key information.

Language Style

It is Great Cow BASIC always not any variant.

The license is for Great Cow BASIC and not any other variant.

Do not use slang and do not use contractions - for example use do not do not use don't. Great Cow BASIC users may not have English as their first language.

Use microcontroller not part, chip, pic or any other variant.

Method Support for Peripheral Programming Support (PPS)

The PPS method needs to go at the top of the program.

The PPS method must show the version of the PPSTool used to generate the method.

Porting to another microcontroller is easier as the user can locate the PPS method and modify or remove.

Coding Good Practice

The Great Cow BASIC demonstration must provide a description for each of the following:

  • Every constant, variable, etc.
  • Every method, with a description for each parameter, the return value, and any exceptions thrown.

#option explicit should be used to ensure all variables are defined.

Variables should be defined to respresent the variable type such as myADCValueByte, myOutPutString etc.

Placing a Do forever-loop at the end of the program is a good practice. Serial transmission can be messed up if the program executes ‘end’ before the completion of a serial transmssion.

All serial communications need to be at 9600 BPS. Assume a standard dumb terminal with no suport for ANSI etc.

Enjoy

Change log.

  1. First release. A dump of an email to this document.
  2. Added Strict header
  3. Fixed some typos