Fig.1: when you turn on the Maximite you are greeted with the prompt (>). You can try out the language simply by typing in a command and it will be executed immediately. This example shows the result of running the PRINT command with the argument of 1÷7.
Before you start, it would be worth downloading >the “Maximite User Manual” from the SILICON CHIP website. The following description will give you a summary of the device but the user manual is the ultimate reference.
We suggest too that as you go through this article, if programming is new to you, that you try out each of the examples to get the feel of them.
If your Maximite is completed and ready to go, you can of course use it – but if not, you can get a version of BASIC which will load and run on your personal computer. It should even be available as a free download on the net.
The Maximite has a lot of capability built into a small package. The core component is the PIC32 microcontroller which in addition to running a powerful BASIC interpreter handles the video, keyboard, SD card, USB and sound.
A few bits of BASIC
The Maximite runs the BASIC language (BASIC is an acronym for Beginner’s All-purpose Symbolic Instruction Code), a very common programming language used in many computer systems. There are quite a few versions of BASIC but that used by the Maximite is fairly close to the original.
However, because it does have a couple of minor differences, we’ve called it MMBASIC. Oh, come on now . . . MaxiMite BASIC, OK?
Fig.2: the input protection for the PIC32 consists of two reverse-biased diodes. These are
adequate for most tasks
but will not protect
against a high-voltage
When you first turn on the Maximite you are presented with a prompt as shown in Fig.1. At this point you can type in a command and try it out. This is one of the reasons that MMBASIC is so easy to learn. Almost any command can be entered in this way and you can instantly see what it does. For example:
> PRINT 1/7
The PRINT command will evaluate whatever is on its command line and display the result. In this case it evaluated the result of dividing 1 by 7 and printed the result, just like a pocket calculator.
PRINT is one of the most commonly used commands in the MMBASIC language and it comes in handy when you are experimenting with expressions and functions.
If you prefix the line with a number MMBASIC will save that line in memory along with any other lines prefixed with a line number.
You can then run the program with the RUN command. For example, type in the following:
> 10 A = 1/7
> 20 PRINT A
Hey, you’ve just written your first computer “program”!