PicoMite Firmware Version 6.02.00a for use on ClockWorkPi PicoCalc

These are the notes for the above firmware, please read everything before use/commenting.

Official MMBasic (PicoMite/WebMite) release notes ( TheBackShed.com - Forum )

  • New commands:
    TYPE
    END TYPE
    STRUCT
    BITSTREAM command with dual pin capability
    I2CLCD
  • New Functions:
    STRUCT(
  • Other changes:
    Memory footprint of MODFILE playback reduced
    Improved handling of errors during tokenising the code
    Removed constraint on number of case statements in SELECT CASE block
    Enhancements to SPRITE command and function
    COLOUR MAP now available for framebuffers on PicoMite versions
    COPY command now allows copying a single file to a directory without specifying the destination filename
    Includes the SUN in ASTRO and STAR commands
    Major rework of the interaction between foreground and background I2C tasks on the SYSTEM I2C to avoid conflicts
    Reduced memory overhead of various systems if not used: Turtle graphics, PLAY MP3, Sprites, Virtual Displays
    MM.INFO(LCDPANEL) now returns the current mode for VGA and HDMI versions
    XMODEM now always pads with NULL characters and terminates lines with CR/LFEdititor Mark enhancements ( TheBackShed.com - Forum )

Changes for PicoCalc:

  • I2C clock now default 100Khz, changable to 400Khz
  • Options persistent on restart
  • Fix for Edit with non-black background
  • Serial console fix for UART0 block caused in SPI-LCD
  • Initial backlight setting for KBD and LCD
  • Bad Pico option for RP2040 (see below)
  • Replaced CheckI2CKeyboard to improve I2C protocol handling
  • Implement Backlight control for LCD and Keyboard
  • Clear screen and position cursor after changing default color(s)
  • Implement MM.INFO(BIOS) to show BIOS version, requires compatible bios
  • New/Changed Option commands:
    • OPTION SYSTEM I2C [SLOW|FAST] allows changing I2C clock speed (handle with care)
    • OPTION BACKLIGHT KBD [0-255] change keyboard backlight
    • OPTION BACKLIGHT LCD [0-255] change LCD backlight
      The above options are synced with the PicoCalc, Keyboard backlight changes using the keyboard are synced every second. Note that using the keyboard causes irregular changes due to a bug in the BIOS 1.4 (1.2?)
    • OPTION BADPICO [0|1] useful if bad RP2040 is used, not intended for normal use. The BADPICO option is intended as a work around for Pico (RP2040) boards that crash after a reboot with the message
      ā€œInvalid Address - Resettingā€. It is not intended as a cure for
      bad boards because other functions can be affected.
  • Known problems:
    • Copyright banner still shows 2025
    • Version number does not show the prefix ā€œaā€
    • I2C sometimes locks up and reboot is required
    • Available RAM / Disk size can be reduced compared to the original firmware
    • UF2 Loader operation has not been tested and can not be guaranteed
    • The new editor enhancement causes problems if the marked size exceeds the buffer, scrolling fails and ESC must be used to escape to the command line, changes made can be lost in this process
  • Unconfirmed problems:
    The sprite(b,…) command did not handle mirrored sprites. ( TheBackShed.com - Forum )
  • Original versions and documentation ( TheBackShed.com - Forum ) see Geoff’s Projects - BASIC Interpreter for the Raspberry Pi Pico
  • Reporting problems/errors:
    These version are almost identical to what has been implemented in the original software. If you notice a problem please adhere to the following:
    • Do not report the problem in the PicoCalc forum ( PicoCalc - clockworkpi ) unless you are sure that it is caused by the PicoCalc changes.
    • Do not report the problem in the Backshed forum ( TheBackShed.com - Forum ) unless you are sure that it can be reproduced on the original firmware.
    • NEVER report problems involving PicoCalc in the Backshed forum
    • NEVER mention PicoCalc in the Backshed forum (can be bad for your health)

If you need assistance please deliver the following information (PicoCalc & Backshed forum):

  • What is the platform (Pico,Pico2)
  • What type of firmware (PicoMite on Pico/Pico2, Webmite on PicoW/Pico2W)
  • Version number of the firmware (this version is V6.02.00a)
  • Show which actions cause the problem to appear, what is the result, what is the expected result.
  • Try to provide a reduced version of the code that shows the problem.
  • Can the problem be reproduced using the official firmware ?!!!
  • Do not be offended if you are ignored or if you receive a crystal ball reply.

The official firmware/documentation can be found at Geoff’s Projects - BASIC Interpreter for the Raspberry Pi Pico
The PicoCalc adapted firmware can be found at http://raspi1.mypi.co/download (Note: http and not https)

The PicoCalc zip archive contain the source and the UF2 files in the uf2 directory. For normal use you can download the UF2 files directly, the archive is not needed.

8 Likes

Working very well here. The 10x i2c speed increase especially appreciated. Thanks @ernst !

Cool! As much as I don’t use PicoMite (I am married to my zeptoforth :smiley: ) it is good to see an update to PicoMite on the PicoCalc (which I can direct new users who make posts to the effect of ā€œI just got my PicoCalc ─ what now?ā€ to).

I should note that it is good to know that the spontaneous keyboard lockup problems aren’t limited to zeptoforth. zeptoforth often doesn’t respond to the keyboard after first being compiled from source, and on rare occasions I’ll come to my PicoCalc after it’s been sitting unattended for a long period of time and it won’t respond to keypresses; in both of these cases a power cycle is necessitated.

I’ve just got my PicoCalc (comes with standard original pico) and assembled it today. It comes with Picomite_cbf6d71.bin (picomite mmbasic RP2040 edition V6.00.02) on the included SD CARD. I’ve just downloaded the picocalc_v6.02.00a_pico.uf2 file from the link above. Even though the file extension is different (bin vs uf2) is it OK to install this new version? Thanks.

From the manual (page 11)

ļ‚· Using a USB cable plug the Raspberry Pi Pico into your computer (Windows, Linux or Mac) while holding down the white BOOTSEL button on the top of the module.
ļ‚· The Raspberry Pi Pico should connect to your computer and create a virtual drive (the same as if you had plugged in a USB memory stick). You can ignore any files that may be on this ā€œdriveā€
ļ‚· Copy the firmware file (with the extension .uf2) to this virtual drive.
ļ‚· When the copy has completed the Raspberry Pi Pico will restart and create a virtual serial port over USB on your computer. See the chapter Serial Console below for the details of using this.
ļ‚· The LED on the Raspberry Pi Pico will blink slowly indicating that the PicoMite firmware with MMBasic is now running.

While the virtual drive created by the Raspberry Pi Pico looks like a USB memory stick it is not, the firmware file will vanish once copied and if you try copying any other type of file it will be ignored.
Loading the PicoMite firmware may erase all the flash memory including the current program, any files in drive A: and all saved variables. So make sure that you backup this data before you upgrade the firmware.

Note that PicoMite IIRC has an UPDATE FIRMWARE command to put the Pico into BOOTSEL mode. This may be easier than pressing the BOOTSEL button of your Pico through the back grate (and I don’t recommend unnecessarily opening up your PicoCalc due to the ease of breaking the screen even when taped down).

Edit: It is also recommended you obtain a ā€˜flash nuke’ UF2 file before significant upgrades to PicoMite on your Pico; flashing your Pico with a ā€˜flash nuke’ will erase the flash and then put it back in BOOTSEL mode to accept another UF2 file.

You can get a universal flash nuke UF2 (it will work on both the RP2040 in the Pico 1 and Pico 1W and the RP2350 in the Pico 2 and Pico 2W) from here:

I have been notified that there is a problem with the file(s) that were downloaded. This problem is very likely be caused by caching some where, could be Chrome, causing contents of an older beta version to replace the file being downloaded. This primarily affects the download of the zip archive. You can identify the old contents by having an additional line under the banner message ā€œBETA: Revision Aā€ after booting. To circumvent I have renamed all files by attaching ā€œ_finalā€ to the version portion. The contents of the files has not changed, if you have not noticed any problems then there is no need to refresh the download

Hi All,

My PicoCalc (Pico H) is working well with version V6.00.02RC23.

I have downloaded V6.02.00a; on power on the version and copyright banner is displayed for a couple of seconds and then blanks. The PicoCalc is working OK via serial.

Any suggestions as to what I have done wrong?

Thanks,

Malc

This is a difficult problem because the display code is identical to the original version. If it is a display problem then it could be the hardware at fault.

One thing that could be is that the LCD backlight has been set to zero, if the command OPTION LIST does not show ā€œOPTION BACKLIGHT LCD nnā€ then this is most likely the case. In this case the solution is to change the backlight using the keyboard combination ALT+. (. = full stop) or the command ā€œOPTION BACKLIGHT LCD 30ā€.

Thanks for your fast response Ernst.

Your suggestion is definitely in the right area - when I input the ā€˜option backlight lcd 30’ via serial the picocalc display works for a couple of seconds then blanks.

However that option setting is not then retained in the ā€˜option list’.

These are the options that are set at first power on:

PicoMite MMBasic RP2040 V6.02.00
OPTION SYSTEM SPI GP10,GP11,GP12
OPTION SYSTEM I2C GP6,GP7, SLOW
OPTION COLOURCODE ON
OPTION DEFAULT COLOURS GREEN, BLACK
OPTION KEYBOARD I2C
OPTION CPUSPEED (KHz) 200000
OPTION LCDPANEL CONSOLE , FF00
OPTION DISPLAY 26, 40
OPTION LCDPANEL ST7796SP, PORTRAIT,GP14,GP15,GP13,INVERT
OPTION SDCARD GP17, GP18, GP19, GP16
OPTION AUDIO GP26,GP27’, ON PWM CHANNEL 5
OPTION PLATFORM PicoCalc

This points to two possible problems:

  1. The flash memory on your pico is faulty, unlikely but can happen.
  2. Something in the flash memory is causing this.

The backlight option is stored in flash and is persistent, meaning next reboot the setting is reloaded from flash.

Please reset the flash memory (see link below) and then reload the uf2 image, note that with both operations you have to wait for the onboard LED to flash before removing the USB cable.

https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html#resetting-flash-memory

UPDATE: There might be another problem with the PicoCalc BIOS, did you update the BIOS with some other version then 1.2 or 1.4 ?

Not sure about the PicCalc BIOS - could you please point me to the correct file. I can then rebuild from scratch.

If you do not know how to change the BIOS then I can assume that you have not changed to another version. I must do some more investigation, in the meanwhile nuke the flash and reload the image to see if that helps.

Thanks Ernst. I nuked the flash and reloaded v6.02.00a_final.

Still the same. Sending the option backlight lcd 30 from either the PicoCalc keyboard or serial shows the display content perfectly for a second, then blanks.

Only difference I can see between the earlier V6.00.02RC23 firmware (which is working) is the Option lcdpanel being ILI9488P rather than ST7796SP.

In which case try changing the driver. OPTION LIST to get the current settings. OPTION LCDPANEL DISABLE to remove the old driver then OPTION LCDPANEL ILI9488SP …… (add the settings from OPTION LIST here)

To everybody in the thread: Please stay calm, drink tea and wait for instructions.

I know what is happening, I think I know why it is happening, but I do not yet know the root cause that is inflicting this damage. I will be back soon.

1 Like

Pm’d you sir with an observation…

I did see and I ignored you :grinning_face:

Lol

(Post must be at least 20 characters)