The CGMMSTICK and CGCOLORMAX have the Maximite BASIC (MMBasic) interpreter programmed into the PIC32 microcontroller. This powerful interpreter runs a version of BASIC based on the BASICs that ran on Home Computers and PCs, but has extensions suitable to interfacing to electronics.
MMBasic provides more than 200 language constructs (BASIC commands and functions). Features of the language like PRINT and GOTO are very familiar to people that program in BASIC.
What do you suppose the following code does?
10 Print “Hello World!”
Yes, when it is run it prints “Hello World!” to the display. (The display might be MMIDE, a PC terminal program, or a VGA display.)
There it is! The “Hello World!” program done on the CGMMSTICK. In this case the display is MMIDE. You could also get the output on a VGA monitor if it is part of your setup.
If you explore the MMBasic section of this document you will notice all of the very familiar BASIC commands such as PRINT, FOR/NEXT, IF/THEN, and others. But it isn’t these standard BASIC commands that make MMBasic great for interfacing to electronics, it is the additional powerful commands that deal with the input and output lines that are the real power for the CGMMSTICK and CGCOLORMAX.
These additional commands include SETPIN to control the input and output characteristics of the I/O pin, and PIN() to write to and read from the pin. These general purpose I/O commands have an assortment of digital, analog, and frequency measuring capabilities.
In addition to direct reading and writing, MMBasic has the ability to set some of the port pins to act as standard serial I/O, CAN, PWM, I2C bus interfacing, and SPI bus interfacing.