BASIC on Raspberry Pi Pico and Raspberry Pi Pico 2
  • BASIC Interpreter
  • BASIC with VGA/HDMI
  • BASIC with WiFi & Internet
  • MMEdit IDE for MMBasic

  • Maximite Family
  • Colour Maximite 2
  • Original Colour Maximite
  • Monochrome Maximite
  • The Maximite Story

  • Micromite Family
  • Micromite Summary
  • Standard Micromite
  • Micromite Plus
  • The Microbridge

  • Micromite LCD Backpack
  • Micromite LCD Backpack
  • Air Quality Monitor
  • DDS Signal Generator
  • Super Clock
  • Boat Computer MkII
  • Parking Assistant

  • Other Projects
  • Pico Gamer Console
  • Precision Analog Clock
  • Watering Controller
  • Windows/DOS MMBasic
  • ASCII Video Terminal
  • Utility Power Supply
  • Precise Voltage Reference
  • ISM Band Scanner
  • Game of Pong
  • Simple GPS Based Clock

  • Useful Techniques
  • 3D Printed Cases
  • Measuring Capacitor ESR
  • Surface Mount is Easy
  • Programming PIC Micros
  • Custom PC Boards
  • The Gerber Format

  • General Articles
  • A History of MMBasic
  • Problems in Open Source
  • Hantek DSO-2250 Scope
  • Rigol DS1000 Scope
  • Brickbats

  • WEB Site
  • Home
  • Old or Obsolete Projects
  • About



  •  

     

     

    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Australia (CC BY-NC-SA 3.0)

    MMBasic History

     

    This is my personal history of the MMBasic interpreter covering its conception through to the present day (March 2025).  In it I will try to follow the development of the language itself rather than the associated hardware - but the two are very much linked, so the hardware will figure as well. 

    This account is written for anyone who was not around in the early days and has an interest in how MMBasic came to be what it is today.  In it I will try to mention the key moments and people, but it is certain that some will be left out… so, before I start, my apologies for any omissions and errors.  If you do spot an error, please email me at projects@geoffg.net

                                                                          Geoff Graham

    In the Beginning

    I started writing MMBasic in late 2010 for a computer that I had designed called the Maximite. This was to be a small self contained computer that included its own BASIC interpreter and would boot up directly to the BASIC command prompt - similar to the computers of the 70s and 80s like the Apple II, Tandy TRS-80 and Commodore 64.

    The Original Maximite

    This was destined to become a "build it yourself" project for Silicon Chip magazine and was designed around the PIC32, a new 32-bit microcontroller produced by Microchip. The Maximite development is described in this web page: https://geoffg.net/Maximite_Story.html

    From the start it was obvious that a good BASIC interpreter was critical for the Maximite’s success.  Initially I planned to port an open source BASIC interpreter called Bywater BASIC to the PIC32 processor.  But this turned out to be much harder than I envisioned and, because I find it difficult working with other people’s code, I decided to change course and write my own interpreter.

    Many years earlier I had written a simple BASIC interpreter using 8080 assembler for the Heathkit H8 computer so I was confident in doing this.  Also, because I had spent so much time working with Bywater BASIC, I could see some of the traps that the authors of that interpreter had fallen into.  So, when I started on my own code, I had firm ideas on how it should be constructed and this involved five important concepts:

    But, before I start describing the history of MMBasic, it is worth describing the introduction of the Maximite and MMBasic which was nothing short of amazing and helped give MMBasic an enormous head start.

    A Very Successful Project

    During the development of the Maximite I worked with an Australian parts supplier called Altronics to supply a kit of parts for the project.  The availability of a kit makes it easy for constructors as they do not have to hunt for parts.  I also arranged with Altronics to ensure that the PIC32 chip (a 64-pin surface mount chip) would be pre programmed with the firmware and pre soldered to the PCB.  That left constructors with just the job of soldering the through hole components, an easy thing to do, even for a novice.

    Normally Altronics would make up kits in batches of 100 kits but, to reach a reasonable price (Aust $79.95), they decided to put together 200 kits.  This was unusual for them but, at the time, they hoped that they would sell that many over the next 12 months or so and not be left with unsold stock.

    The magazine article describing the Maximite was published in three parts with the first appearing in March 2011.  The reaction was instant and amazing.  Almost from the moment the issue hit the newsstands visitors to my website (which was mentioned in the article) jumped by ten times and I received a veritable flood of emails regarding the project. 

    The first batch of Altronic’s kits (all 200) sold out in under two weeks, even though delivery was still months away.  Altronics then started a second batch of 200 kits and that immediately sold out again.  The same happened a third time and a fourth time.  At one point Altronics had back orders for well over 600 kits and they still had not been able to deliver the first of them to eager readers.

    Over time I estimate that at least 3,000 to 5,000 Maximites have been built around the world and probably double this.  This easily made it the most popular project that Silicon Chip magazine had published in recent memory. 

    Its popularity seemed to be due to a number of factors… firstly, the concept of an easy to use computer that booted straight to the BASIC prompt is very appealing in these days of complex desktop computers costing thousands of dollars.  The project was also easy to build – all that you need do was solder a handful of components and it just worked.  The Maximite also appealed to oldsters who had cut their teeth on similar computers in the 70s and 80s.

    The editor of Silicon Chip found out how popular the project was when he and his sidekick visited a high school.  While there they were approached by a 14 year old who proudly showed off his Maximite computer that he had assembled himself.  He told the editor that there was so much competition between him and his 12 year old sister for access to the computer that they built a second one, especially for her!

    This huge burst of popularity ensured that MMBasic had a wide audience from the moment it appeared on the public stage,

    Early MMBasic

    The original MMBasic was version 2.0 (V1.0 was never released) and this was the version used for the release of the Maximite in March 2011.  It was positively archaic compared to later versions.  Line numbers were mandatory and you had to enter a program into memory by typing it in, one line at a time, at the console prompt.  This was done by prefixing each program line with a number, which caused MMBasic to insert it into the appropriate sequential position in program memory. 

    It took a lot of tedious typing to enter anything so a 100 line program was considered HUGE.  This was how the original BASICs worked and it seemed normal at the time.  The saving grace was that MMBasic included support for an SD card from the beginning - so you could always enter the program on your PC, save it to an SD card and walk that over to the Maximite.  Also tedious but it worked.

    The first version was missing many features that we now take for granted.  There were no user subroutines or functions.  All you had was GOTO and GOSUB.  You could set an I/O pin high or low but there were no communication protocols (not even serial ports), there were no PWM, timers, etc.  There were some graphics commands to draw a line or circle, etc but not a lot.

    However, the one thing that the first version did have was a lot of bugs.  Before its release I had done a huge amount of testing and I thought that I had eliminated all the bugs but when it got into the hands of the early adopters new bugs came out in force.  Due to the magazine’s lead time I had done the development a few months prior to publication and, by the time the first users started to find the bugs, I was in the middle of an extended six month camping trip through the interior of Australia.  So, there I was, in the heat of central Australia, with the laptop on a camping table hunting bugs in MMBasic.

    There were so many bugs that my view of MMBasic became quite distorted, I expected bugs and I was surprised if a program ran without falling over.  Even today I am still faintly amazed when a modern complex program runs all the way through without hitting some hidden bug.  However, over the years these bugs have been eliminated with the help of many people on The Back Shed forum.  So much so that it has been years since I have had a valid bug report involving the core MMBasic interpreter.

    The Back Shed

    In March 2011 I had some correspondence with Glenn Littleford who subsequently bought and built one of the early kits and documented his experience here: https://www.thebackshed.com/windmill/articles/Maximite.php

    Glenn ran a website called The Back Shed which supported a number of forums, mostly dealing with windmills.  With the huge interest in the Maximite I thought that a forum for people to exchange ideas and programs would be popular, so I suggested to Glenn that he start one for the Maximite.  This was in June 2011 and it has since grown to be bigger than all his other forums and is still going strong, covering microcontrollers and MMBasic. 

    Many thanks to Glenn, as this forum and his ongoing support is one of the factors behind the success of the Maximite, MMBasic and their descendants.  If you are new to MMBasic you should check out Glenn’s forum at: https://www.thebackshed.com/forum/ViewForum.php?FID=16

    Version 2.x

    Over the next eight months following the introduction of the Maximite I released a series of updates (numbered V2.1, V2.2, etc) which added many needed features to MMBasic as well as numerous bug fixes.  This was made easy because I had included a bootloader in the Maximite firmware which enabled users to update the firmware via USB, even though the PIC32 processor was firmly soldered to the PCB.

    The new features mostly consisted of communications protocols including asynchronous serial, SPI, one wire and I2C.   I had made the source code to the firmware (including MMBasic) freely available on my website which encouraged various people to suggest or add features.  An example was the one wire and I2C protocols which were written by Gerard Sexton.

    However, the freely available source code and the ease of which commands could be added to the interpreter caused problems when some people added one or two new commands and then released the firmware as “their improved version”.  This confused users with multiple conflicting versions and was quite annoying to me personally because 99% of the code was still mine.

    Even worse was a group who moved in and adopted the Maximite and MMBasic as theirs.  In particular they took my source code for MMBasic, made some modifications and removed my name from the copyright banner and assigned the copyright to themselves.  This struggle is documented here:  https://geoffg.net/OpenSource.html

    To overcome these problems I made a massive upgrade to MMBasic called Version 3 and released it with a licence that required my agreement before modified versions could be released by others.

    Version 3.x

    Version 3.0 was released in late 2011 and had the key feature that line numbers were no longer required. This prompted many other changes including labels for GOTOs and a built-in full screen editor for entering and editing the program.  Using the editor meant that the old, tedious method of entering a program by typing it in, line at a time (prefixed with a line number) was gone.  All of a sudden, large programs were practical.

    A few months later with Version 3.1 I added defined subroutines which was a big improvement over the old GOSUB/RETURN commands and in May 2012 I released Ver 3.2 which added support for defined functions.  With the elimination of line numbers and the ability to define subroutines and functions MMBasic was now a modern implementation of the BASIC language suitable for large and complex programs.

    Ver 3.1 and 3.2 also marked the first time for me that MMBasic was ported to new hardware.  With V3.1 I added support for the DuinoMite which was an alternate version of the Maximite hardware produced by Olimex.  Ver 3.2 included support for a Windows/DOS version of MMBasic.  This could run in a DOS box in Windows and made a convenient method for testing MMBasic programs as well as a handy programming tool.

    Ver 3.2 also added support for dynamic memory management.  This feature, which was not appreciated by most MMBasic users, was an important improvement to the internals of MMBasic.  Previously, memory areas such as program memory, variable space, space for arrays, etc were of a fixed size.  Now, with dynamic memory management, these were dynamically allocated and resized from a central memory pool meaning that the RAM on the PIC32 was efficiently used allowing for much larger programs with varying memory requirements.

    The Colour Maximite

    In the middle of 2012 Dr Kilian Singer, a Maximite fan at the University of Mainz in Germany wrote to me describing a method that he had developed for generating a colour VGA video output with the Maximite.  In part this was possible because of the performance improvements in MMBasic in handling the video output over the various releases to date.  He had built a prototype on a breadboard that demonstrated that it would work.

    With his agreement I used this technique in the Colour Maximite which was published by Silicon Chip magazine in September 2012, 18 months after the original monochrome Maximite.  The Colour Maximite could generate eight colours and used the 100 pin version of the PIC32 chip so it had many more I/O pins for users to experiment with.  This version started a new rush of fans who built the kit, also produced by Altronics.

    To support the Colour Maximite I produced Ver 4.0 of MMBasic.  This was mainly concerned with supporting the colour video but it also included a raft of smaller features like stereo audio output, a music synthesiser and the ability to play WAV files.  I still supported the monochrome Maximite and DuinoMite so MMBasic for these platforms was also upgraded to V4.0 and they inherited most of these features.

    Subsequent V4 releases were mostly bug fixes although some notable new features were added.  For example the LIBRARY and WATCHDOG commands.  V4.4 introduced support for yet another hardware variant of the Maximite - the TFT Maximite which was a design using a TFT LCD panel created and published by c't Hardware Hacks magazine (in Germany). See http://geoffg.net/tft-maximite.html for details.

    In May 2014 I released Ver 4.5 which was the last release of MMBasic for the Maximite, Colour Maximite and DuinoMite hardware platforms.  Three years after the original Maximite which had started the whole thing I had eliminated nearly all the bugs and taken MMBasic about as far as it could go on these hardware configurations.

    The Micromite

    At the end of 2013 I had some spare time so I experimented with squeezing MMBasic into the PIC32MX150 chip recently released by Microchip.  This is a 28-pin chip in an easy to use dual in line plastic package that used the same MIPS32 processor core as the larger chips used in the Maximite.  This was a tremendous squeeze and I needed to use all the tricks that I could find to reduce the firmware’s size.

    The 28-pin Micromite and the 44-pin version which followed later.

    I called the result the Micromite and it ran MMBasic Ver 4.5.  Unlike the Maximite series it did not have video or keyboard support so all programming and interaction with the chip was via a serial interface and a terminal emulator running on a desktop or laptop computer.  However, it still ran the full MMBasic interpreter, supported all the communication protocols (serial, SPI, etc) and had full control over the I/O pins.

    The Micromite was designed to be an embedded controller.  This is a computer that is intended to be built into some device like a burglar alarm, heating controller, etc.  This is different from the Maximite which is a self contained computer with a user communicating with it via a keyboard and video monitor.

    One notable feature of the Micromite is that the program is held in flash memory which means that it will not be lost if the processor is reset – unlike the Maximite where the program is held in volatile RAM.  All versions of MMBasic which have followed the original Micromite retain this feature of holding the program in non volatile memory.

    In late 2012 Peter Mather joined the Back Shed forum and was one of the first to experiment with the Micromite.  He has the remarkable ability to take code from multiple sources, understand it, then integrate it with his own code to create something new – this is something that is difficult to do.  In the beginning Peter found bug after bug in MMBasic and even pointed me to the fixes.  Over time he has become a huge contributor to MMBasic as will become evident later in this narrative.

    MMBasic V4.5 for the Micromite ran through a few minor releases which mostly included bug fixes and added support for the 44-pin version of the chip.  However, in mid 2014 Microchip released the PIC32MX170 which had double the RAM and flash memory and was still available in the very handy 28-pin dual in line plastic package.

    Micromite MkII

    The doubling of RAM and flash memory in the PIC32MX170 gave me the freedom to add much needed features to the Micromite and also optimise the code for speed rather than reduced size.  The result was MMBasic Ver 4.6 released in December 2014, about 3½ years after MMBasic first appeared.  I called the combination of the PIC32MX170 and MMBasic the Micromite MkII.

    The list of features added to the Micromite MkII was huge so I will only summarise them here:

    Along with the elimination of line numbers and subroutines/functions introduced in V3.0 these additions made MMBasic into a robust and modern programming language that was good for writing large and complex programs.  As a bonus, the number of bugs being found in the core MMBasic interpreter had by now dwindled to an insignificant trickle.

    The next release for the Micromite MkII (Ver 5.0 in November 2015) was significant in that it incorporated support for touch sensitive LCD panels using the ILI9341 controller.  This was based on display drivers that Peter Mather had written for V4.6 of MMBasic and marked a big improvement in the ability to use MMBasic and the Micromite in practical applications.  With an LCD panel a large amount of information can be legibly displayed and with the touch sensitive feature many of the knobs and switches associated with a typical project could be eliminated.

    The ability to display graphics also marked the introduction of many related commands and functions such as LINE, CIRCLE, TEXT, embedded fonts, loadable display drivers and so on. 

    Micromite Plus

    In early 2015 Microchip released a more capable version of the chip used in the Micromite called the PIC32MX470 and Peter Mather ported the Micromite code to it as a demonstration.  Using his port as the base and with extra code I created MMBasic Ver 4.7 in July 2015.  This, along with the new chip, was titled the Micromite Plus.

    The Micromite Plus supported high resolution full colour images on LCD panels.

    This had many improvements over the standard Micromite MkII including almost three times the speed, double the program and RAM memory, many more I/O pins, USB console interface, support for SD cards, support for many more LCD panels and a sophisticated library for on screen “controls” such as switches, checkboxes, etc that could used to implement a sophisticated industrial control panel.

    Ver 5.0 for the Micromite (described above) and a few months later Ver 5.1 were released in early 2016 and were the stable release for both the Micromite and Micromite Plus (by then the Micromite MkII was simply called the Micromite).  Later there was a succession of releases for these leading to version 5.05.04 in June 2021.  These releases incorporated bug fixes and many improvements such as support for extra displays and new commands/functions but there was nothing groundbreaking or revolutionary.  This was because (nearly) all the bugs in the MMBasic interpreter had been tracked down and there were no important features that needed (or could) be implemented.

    The code for the Micromite Plus V5.05.0x became the base version that Peter Mather used for the Colour Maximite 2 and the PicoMite.  Because this code is stable and I do not want to make Peter’s life any harder, I have not made any significant changes to the core MMBasic interpreter since 2019. 

    Experimental Ports

    Over the years Peter Mather has ported MMBasic to many different platforms.  These are listed below from my memory, so it is possible that I have missed some or got some details incorrect:

    Most of these were experimental and have since languished however the Armmite H7 and Armmite F4 versions are now supported by Gerry Allardice and are currently at Version 5.07.02.

    While all of these started with the Micromite Plus version as their base, Peter used the extra flash memory in these processors for making some improvements to the core MMBasic interpreter such as a hashed variable table, extended tokens and so on.  These improvements have been carried on to his later projects.

    Colour Maximite 2

    In late 2019 Peter came up with the idea of using a module made by Waveshare that held the STM32H743IIT6 processor to create an updated version of the original Colour Maximite.  The Waveshare module contained all the complex surface mount components leaving the rest of the circuit as easy to solder through hole parts.  At the time Peter confessed that he was poor at documenting his creations so we agreed that he would design the computer and port MMBasic while I would document it (ie, write the manual, host it on my website and write a series of articles in Silicon Chip magazine to publicise it).

    The new computer was called the Colour Maximite 2 and it was released in July 2020 to an enthusiastic reception.  Peter started with MMBasic V5.05.04 and then, over subsequent releases, incremented this to V5.07.01 (mostly bug fixes).  MMBasic for this was based on the Micromite Plus code but with many additions, mostly related to the video output and associated functions (sprites, video layers, etc).

    In early 2021 Peter proposed a second version of the project called the Colour Maximite 2 Generation 2 and following our previous arrangement it appeared in Silicon Chip magazine in July 2021.  This design was compatible with the first generation, so it ran the same versions of MMBasic.

    PicoMite

    In January 2021 the Raspberry Pi foundation released the Raspberry Pi Pico and Peter Mather was quick to port MMBasic to this new processor and by May 2021 he had the first cut of MMBasic V5.07.00 running on it and called the result the PicoMite. 

    The PicoMite includes all the features of the Micromite Plus and then much, much more.

    Following our agreement I wrote the manual and magazine article and it appeared in the January 2022 issue of Silicon Chip.  Compared to the Micromite Plus the Raspberry Pi Pico has an enormous amount of flash memory (up to 20 times more) which has allowed Peter to add an equally enormous amount of functionality including video output, graphics functions, support for many display panel types, internal disk drive, etc. 

    The next major release was in March 2022 with V5.07.04 for a version of the PicoMite with VGA output.  This used an ingenious scheme involving the second CPU in the Raspberry Pi Pico and a PIO port to generate VGA video with a few resistors.   After a few releases which were mostly bug fixes, Peter released V5.07.07 in April 2023 which added support for the Pico W with WiFi/Internet capability.   This was another major advance squeezing a full TPC/IP protocol stack and other internet protocols into the processor used in the Raspberry Pi Pico.

    After a few interim releases the next major release in late 2024 provided support for the recently introduced Raspberry Pi Pico 2 which included HDMI video output.  The PicoMite now is feature rich with support for video output (HDMI and VGA), keyboards (PS2 and USB), a mouse (PS2 and USB), gamepads and WiFi/Internet connectivity (with the Pico W).  The current version is now at 6.00.01 but there will no doubt be more versions to come.

    However, at the core, there is still the much modified original MMBasic interpreter written almost 15 years ago.