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
  • Raspberry Pi Pico BASIC
  • Windows/DOS MMBasic
  • ASCII Video Terminal
  • Utility Power Supply
  • Precise Voltage Reference
  • ISM Band Scanner
  • Game of Pong
  • GPS Synchronised Clock
  • Simple GPS Based Clock

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

  • General Articles
  • 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)

    BASIC Interpreter for the Raspberry Pi Pico

     

    The PicoMite is a Raspberry Pi Pico running the free MMBasic interpreter.

    MMBasic is a Microsoft BASIC compatible implementation of the BASIC language with floating point, integer and string variables, arrays, long variable names, a built in program editor and many other features.

    Using MMBasic you can use communications protocols such as I2C or SPI to get data from a variety of sensors. You can save data to an SD card, display information on colour LCD displays, measure voltages, detect digital inputs and drive output pins to turn on lights, relays, etc. All from inside this low cost microcontroller.

    The PicoMite firmware is totally free to download and use.


    Program Development

    Program development is done on the Raspberry Pi Pico using a terminal emulator on a PC (Windows, Linux or MacOS) connected via a serial over USB interface to the Pico's USB connector.  No special software or hardware is required other than the terminal emulator which is free.  Over this USB interface the programmer can configure features, test BASIC commands, edit the program and run the program.

    When the program is complete it can be set to automatically run on power up and the PC connection removed.  The Pico will then independently run its program forever.  The terminal emulator and PC can be reconnected at any time to modify or update the running program.

    The emphasis with MMBasic is on ease of use and development. The development cycle is very fast with the ability to instantly switch from edit to run. Errors are listed in plain English and when an error does occur a single keystroke will invoke the built in editor with the cursor positioned on the line that caused the error.

    Hardware Support

    MMBasic supports all the hardware features of the Raspberry Pi Pico (serial, I2C, SPI, CPU clock, ADC, etc) and adds support for:

    All these features are built into the BASIC interpreter, there is no need to load libraries or write special code.

    Compatibility

    MMBasic on the Raspberry Pi Pico implements a large subset of Microsoft's GW-BASIC plus some more modern programming structures documented in the ANSI Standard for Full BASIC (X3.113-1987) or ISO/IEC 10279:1991.

    It is also compatible with the version of MMBasic running on the Micromite and most programs written for the Micromite can be run with little or no change.

    Example Program

    The following is the full program for a three channel temperature logger.  Every second it will record on an SD card the date, time and temperature (in °C) from three DS18B20 temperature sensors.  The file is Excel compatible and it can be read by a PC or laptop computer for analysis or graphing.  To terminate the program press any key on the console keyboard.

    Open "TemperatureLog.xls" for Output as #1

    Do While Inkey$ = ""

      Print #1, Date$ "," Time$ "," TEMPR(GP0) "," TEMPR(GP1) "," TEMPR(GP2)

      Pause 400

    Loop 

    Close #1

    Credits

    Peter Mather ported the MMBasic interpreter to the Raspberry Pi Pico and wrote the hardware device drivers. Geoff Graham wrote the MMBasic interpreter and the manual.  Mick Ames wrote the PIO compiler and its corresponding documentation.

    Help and Support

    Support questions should be raised on the Back Shed forum (http://www.thebackshed.com/forum/Microcontrollers) where there are many enthusiastic MMBasic users who would be only too happy to help. The developers of this firmware are also regulars on this forum.

    Source Code

    The compiled object code (the .uf2 file) for the PicoMite is free software: you can use or redistribute it as you please. The source code is available from GitHub ( https://github.com/UKTailwind/PicoMite ) and can be freely used subject to some conditions (see the header on the source files).

    Downloads

    User Manual (160 pages including a BASIC programming tutorial) DOWNLOAD
    PicoMite firmware V5.07.00 (includes the above manual). DOWNLOAD
    Known bugs and issues DOWNLOAD

    Previous versions of the firmware can be found in the archive.

    Other Downloads

    Beta Test Version of the Firmware
    This is the latest test version of the next firmware release (may include bugs).
    DOWNLOAD
    MMEdit, a full featured editor for MMBasic (it runs on your PC).  By Jim Hiley WEB SITE