PiPicoMite03

From Land Boards Wiki
Jump to navigation Jump to search

Tindie-mediums.png

  • Assembled board will ship as

PiPicoMite03 P18397-720px.jpg

Card Versions[edit]

  • There are three versions of this card
    • PiPicoMite01
      • Has 16-bit port I/O expander
      • 120x70mm with (4) 6-32 mounting holes
    • PiPicoMite02
      • Has 32-bit port I/O expander(s)
      • 95x95mm with (4) 6-32 mounting holes
    • PiPicoMite03 (this version)
      • 99.5x69.5mm - Fits into extruded Aluminum Enclosure
      • Fully functional, reduced cost

Features[edit]

  • Raspberry Pi Pico
    • Spare Pico pins brought to headers
      • Spare Pico pin marking on rear
  • VGA
    • 640x480 monochrome resolution
    • 320x240 colour resolution
    • 1:2:1 - R:G:B - 16 colours
  • PS/2 Keyboard
    • 5V to keyboard with voltage translator on clock/data lines
    • Does not require a keyboard that runs at 3.3V
  • SD Card
  • Stereo audio
  • 5V power input on USB B
    • Power only (not data)
    • Measured 40 mA at 5,24V in
  • 99.5mmx69.5mm outline
    • Board is designed to fit into Aluminum Project Box Enclosure DIY 100*76*35mm - ebay search
    • VGA, USB B (Power), 3.5mm Audio on one end
    • Keyboard, SD card on the opposite end
  • Optional DS1307 Real time Clock (RTC) / Digital Thermometer
    • On I2C1 bus (I2C2 from MMBASIC)
    • 27 x 28 x 8.4mm
    • DS1307 RTC
    • DS18B20 Digital Thermometer

BASIC Interpreter[edit]

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, originally written by Geoff Graham and enhanced and ported to the Pico by Peter Mather, who also designed the original PicoMite on which this design is based. 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.

MMBASIC Credits[edit]

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.

Raspberry Pi Pico Pinout (Reference)[edit]

PiPico Pins.PNG

Pin Marking on Rear[edit]

PiPicoMite03 P18400-720px.jpg

Schematic[edit]

Connectors / Headers[edit]

PicoMite03 Rev1 CAD.PNG


J1 - VGA[edit]

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.

Mode 1 (640x480 monochrome) and mode 2 (320x240 16-colours).

OPTION COLOURCODE ON

PiPicoMite03 J1-VGA.PNG

J2 - USB B Power Connector[edit]

PiPicoMite03 J2-5V.PNG

  • Full size USB B connector
  • No USB signal connections, just used for power

J3 - PS/2 Keyboard[edit]

The PS2 keyboard connects 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.

  • 5V keyboard (VSYS)

PiPicoMite03 J3-KBD.PNG

J4 - Audio[edit]

OPTION AUDIO GP6, GP7
PLAY WAV "file.wav"
PLAY STOP

PiPicoMite01 J4 Audio.PNG

H1 - I2C1, RTC[edit]

PiPicoMite03 H1-RTC.PNG

  1. VBAT (N/C)
  2. GND
  3. VCC
  4. I2C1_SDA (GP14)
  5. I2C1_SCL (GP15)
  6. DS (GP5)
  7. SQ (M/C)

RTC / Digital Thermometer[edit]

  • Optional DS1307 Real Time Clocks module
    • DS1307 I2C real time clock chip (RTC)
    • 24C32 32K I2C EEPROM memory
    • LIR2032 rechargeable Lithium battery with charging circuit
    • With new battery, can power DS1307 module for 1 year
    • Compact design 27 x 28 x 8.4mm
    • Can install DS18B20 digital temperature sensor on module
      • Connects to GP5 pin
option system i2c2 gp14, gp15

RTC PartsSide.PNG

  • Installs battery side up

RTC BatterySide.PNG

  • With RTC installed
  • Fits within box with plenty of clearance
  • Can be mounted with either a 7-pin female header or RTC pins soldered directly to board

PiPicoMite03 P18408-720px.jpg

H2-H5 - Pico GVS Connectors[edit]

  • Spare Pico pins are brought out to GVS headers
  • Connectors are adjacent for GVS connections via 1x3 Dupont housings
  • H2/H3 adjacent to each other
    • H3-1 = ADCREF
    • H3-2 = GP28
    • H3-3 = GP27
    • H3-4 = GP26
    • H3-5 = RUN
    • H3-6 = GP22
  • H4/H5 adjacent to each other
    • H4-1 = GP5
    • H4-2 = GP4
    • H4-3 = GP3
    • H4-4 = GP2
    • H4-5 = GP1
    • H5-6 = GP0

PiPicoMite03 GVS.PNG

SD Card[edit]

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.

OPTION SDCARD GP13, GP10, GP11, GP12

PiPicoMite03 SD1-SDCARD.PNG

Configuration Options[edit]

> OPTION LIST
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION SDCARD GP13, GP10, GP11, GP12
OPTION AUDIO GP6, GP7, ON PWM CHANNEL 3
OPTION SYSTEM I2C GP14, GP15

PicoMiteVGA Software[edit]

Download MMBASIC[edit]

  • Tested with "VGA only" versions
  • TheBackshed forum - support
  • If the Pico does not already have MMBASIC installed
  • Hold button on Pico while plugging in USB Micro to PC
  • Drive will open
  • Drop VGA uf2 onto Drive
  • System will reboot
> print mm.ver
 5.070502
  • Run TeraTerm
    • Connect to Serial

Configure MMBASIC[edit]

  • Setups
    • Can copy-paste a line at a time into TeraTerm
    • Some options will reboot the card
OPTION SDCARD GP13, GP10, GP11, GP12
OPTION AUDIO GP6, GP7
OPTION SYSTEM I2C GP14, GP15
OPTION COLOURCODE ON
OPTION KEYBOARD US
  • Remove USB power
  • Install SD card
  • Apply USB power

PicoMite Source code[edit]

CircuitPython on PiPicoMite0x Cards[edit]

  • The PiPicoMite0x cards can run CircuitPython with some limitations
  • Card features for CircuitPython application
    • SD support
    • 5V input
    • External I2C
  • CircuitPython does not have built-in support for
    • VGA
    • PS/2
    • Audio

Factory Test Procedure[edit]

  • Test assembled cards using this procedure
  • MMBASIC is already set up on the card

Equipment[edit]

  • Unit Under Test (UUT)
  • VGA monitor
  • Stereo amplified speakers
  • PS/2 keyboard
  • MMBASIC SD card with contents
  • Raspberry Pi Pico with MMBASIC installed
  • PC running TeraTerm

Test SD card interface[edit]

  • Type
files
  • Returns
A:/
   <DIR>  basic
   <DIR>  bmps
   <DIR>  demos
   <DIR>  games
   <DIR>  jpegs
   <DIR>  lbcards
   <DIR>  performance
   <DIR>  wave
8 directories, 0 files

Test Sound[edit]

chdir "/wave"
play wav "sample4.wav"

  • Sound should come out of speakers
  • Stop with
play stop

Test Keyboard[edit]

  • Type on keyboard
  • Verify keys show up on VGA

Test VGA[edit]

  • Type
chdir "/demos"
load "Colours.bas"
run

  • Verify 16 distinct colors on VGA
  • Type
mode 1

Test 5V in[edit]

  • Connect USB B to 5V (or PC)
  • Remove USB Micro cable
  • Card should continue to run

Test I2C (Optional)[edit]

  • Use DS1307 RTC attached to I2C J1
option system i2c gp14, gp15
rtc gettime
print time$

Combined Copy/Paste[edit]

  • Above tests can be copy/pasted
files

chdir "/wave"
play wav "sample4.wav"

play stop

chdir "/demos"
load "Colours.bas"
run

mode 1

option system i2c gp14, gp15
rtc gettime
print time$

Enclosure[edit]

PiPicoMite03 PanelCutouts.PNG

  • 99.5mmx69.5mm outline
    • Board is designed to fit into Aluminum Project Box Enclosure DIY 100*76*35mm - ebay search
    • VGA, USB B (Power), 3.5mm Audio on one end
    • Keyboard, SD card on the opposite end

PiPicoMite03 Enclosure.PNG

  • Enclosure cross-section

PiPicoMite03 Enclosure Mechs.PNG

Mechanicals[edit]

  • Dimensions to approx. connector centers (and SD adapter slot)
  • Enclosure fits 70mmx100mm card
    • The PiPicoMite03 card is slightly undersized (0.5mm)
    • Still fit in slots but allows for some enclosure mechanical variances

PicoMite03 Rev1 MECHS.PNG

Issues[edit]

Rev 1[edit]

  • Tested, working, no issues

Assembly Sheet[edit]