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

  • BASIC on Raspberry Pi Pico
  • BASIC Interpreter
  • Boot to BASIC Computer

  • Other Projects
  • 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)

    "Boot to BASIC" on the Raspberry Pi Pico

     

    The PicoMiteVGA is a Raspberry Pi Pico with VGA output, PS2 keyboard input, SD card storage and running the free MMBasic interpreter.

    This turns the Raspberry Pi Pico into a low cost self-contained desktop computer, similar to the “boot into BASIC” computers of the 1980s like the Commodore 64, Apple II and Tandy TRS-80.

    You can draw grapics in 16 different colours, show text in multiple fonts and save your programs to an SD card.

    You can have fun writing programs to balance your checkbook, entertain/teach children about computing and play simple computer games (to name a few activities).

    The PicoMiteVGA firmware is totally free to download and use.

    MMBasic Interpreter

    The PicoMiteVGA boots straight into the MMBasic prompt. At which point you can enter, edit and save the program, test BASIC commands and run the program.

    MMBasic is a Microsoft BASIC compatible implementation of the BASIC language. It is full featured with floating point, 64-bit integers and string variables, long variable names, arrays of floats, integers or strings with multiple dimensions, extensive string handling and user defined subroutines and functions. Typically it will execute a program up to 100,000 lines per second. Embedded compiled C programs can be used for even higher performance.

    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, measure voltages, detect digital inputs and drive output pins to turn on lights, relays, etc.

    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.

    Documentation

    The User Manual is a comprehensive description of the PicoMiteVGA including circuits for interfacing the VGA monitor, keyboard and SD card. It details all the BASIC commands supported by MMBasic and includes a full tutorial on programming in the BASIC language including plenty of examples.

    The User Manual is over 140 pages and can be downloaded from the bottom of this page.

    VGA Output

    The VGA output is 640 x 480 pixels in monochrome mode or 320 x 240 pixels in colour mode with 16 colours (1 bit for red, 2 bits for green and 1 bit for blue). The VGA output is generated using the second CPU on the RP2040 processor plus one PIO channel so it does not affect the BASIC interpreter which runs at full speed on the first CPU. A handfull of components (resistors and a couple of diodes) is all that is required to connect the VGA monitor.

    From within your BASIC program you can turn pixels on/off and draw lines, boxes and circles in any colour. Text can be positioned anywhere on the screen and displayed in any colour in a variety of fonts.

    The built-in editor within MMBasic works perfectly with the VGA monitor and PS2 keyboard to allow programs to be edited (with colour coded text) and saved to an SD card.

    Keyboard Input

    The PS2 keyboard connects directly to the Raspberry Pi Pico (via a level shifter) and works as a normal keyboard with the function keys and arrow keys fully operational. It can be configured for the standard US layout used in the USA, Australia and New Zealand or specialised layouts used in the United Kingdom, Germany, France and Spain.

    Program Storage

    The PicoMiteVGA firmware reserves eight program storage "slots" in the Raspberry Pi Pico flash memory. Programs can be saved and retreived from these without the need for any additional storage.

    For more storage SD cards can be connected with full support for these built into MMBasic including the ability to open files for reading, writing or random access and loading and saving programs. SD cards connect directly to the Raspberry Pi Pico and the firmware will work with cards up to 32GB formatted in FAT16 or FAT32. The files created can be read and written on personal computers running Windows, Linux or the Mac operating system.

    Construction Pack for the PicoMiteVGA

    The interfaces to the VGA monitor and keyboard can be built on a small piece of strip board (eg, Veroboard) however a PCB designed for the task makes construction much easier. The Construction Pack (see the download section below) includes four PCB designs that you can use.

    The PCB illustrated on the right is included in the Construction Pack (as Design #1). This is an easy to assemble PCB that implements the VGA output, PS2 keyboard interface and the SD card socket as described in the User Manual. 

    It uses easy to source thru-hole components and can be assembled in under an hour. 

    All 40 pins on the Raspberry Pi Pico are routed to the 40-way connector on the rear of the PCB in the same configuration as that used by the Pico.  This makes it easy to connect external devices as you can consult the pin out diagram in the user manual and then select the corresponding pins on the 40-way connector.

    Getting a PCB made is easy and cheap so using this design is a convenient option. The Construction Pack also includes schematics, parts list, construction notes and everything that you need to build this simple computer.

    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.

    Credits

    Peter Mather led the project, 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. The VGA driver code was derived from work by Miroslav Nemecek.

    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 VGA is free software: you can use or redistribute it as you please. The source code is available from GitHub ( https://github.com/UKTailwind/PicoMite-VGA-Edition ) and can be freely used subject to some conditions (see the header on the source files).

    Downloads

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

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

    Other Downloads

    PicoMite VGA Construction Pack.
    Includes assembly instructions, parts list, schematic, PCB design files, etc.
    DOWNLOAD
    MMEdit, a full featured editor for MMBasic (it runs on your PC).  By Jim Hiley WEB SITE