Updating to the latest Picomite 6.02.01

Hi - new poster here. Soft Eng for many years, just starting to get into the IoT and playing with voltages rather than just 1s and 0s in memory.

I have a PicoCalc which I’d like to update to the latest Picomite firmware (6.02.01 from Geoff’s projects) as I want to use some of the new features.

The readme for the picomite says that the firmware should just ‘go’ - detecting it’s attached to the PicoCalc environs, and set itself up. That hasn’t happened. So, I restored the firmware from the Clockwork site (6.00.02RC23), which woke everything back up again. I realized that the options for the firmware setup were being lost in the move, so I captured an ‘option list’ under the old regime, re-upgraded, and using the serial terminal put them back in again:

===
option platform “PicoCalc”

option system spi gp10,gp11,gp12
option system i2c gp6, gp7, slow

option lcdpanel ili9488P,portrait,gp14,gp15,gp13,invert
option lcdpanel console 1,rgb(0,255,0),0

option sdcard gp17,gp18,gp19,gp16
option audio gp26,gp27
option serial console com1,gp0,gp1,b

option display 26,40
option keyboard i2c

This has left me with an almost working system - I can load and run software from the serial terminal, and it appears on the screen, and I can use the keyboard and the screen on the device… mostly. But some of the keys aren’t working. Using the arrow keys in the editor doesn’t seem to work. Mostly they seem to be ignored, but left arrow seems to put the editor into search and replace mode, and neither Escape or Break seems to be doing their jobs, and CTRL seems to be absent as well.

Is there something simple I’m missing to re-enable the keyboard in full? More options to set, or perhaps a config file that needs to go somewhere in the flash or on the SD card? Or is there something special that needs to be done to get the PicoMite FW to recognise the PicoCalc infrastructure. (I tried Nuking the flash first).

I don’t mind typing, so even if it’s fairly long-winded (like setting options for all the key scan codes) I’d like to stick with the new firmware if I can. I’d even happily throw together some python to automate the process, and ease the springs for those coming after me.

TIA

Here’s the OPTION LIST from my PicoCalc. It looks like you’re missing
OPTION KEYBOARD PICOCALC.:

PicoMite MMBasic RP2350B V6.03.00RC6
OPTION SERIAL CONSOLE COM1,GP0,GP1,BOTH
OPTION LCD SPI GP10,GP11,GP12
OPTION SYSTEM I2C GP6,GP7, SLOW
OPTION BAUDRATE 19200
OPTION FLASH SIZE 16777216
OPTION LIBRARY_FLASH_SIZE  4D000
OPTION COLOURCODE ON
OPTION CASE UPPER
OPTION TAB 8
OPTION DEFAULT COLOURS  BLACK
OPTION KEYBOARD PICOCALC
OPTION PICO OFF
OPTION CPUSPEED (KHz) 384000
OPTION LCDPANEL CONSOLE ,, FFCC00
OPTION DISPLAY 26, 40
OPTION LCDPANEL ST7365P, PORTRAIT,GP14,GP15,GP13
OPTION BACKLIGHT LCD 96
OPTION SDCARD GP17, GP18, GP19, GP16
OPTION AUDIO GP26,GP27', ON PWM CHANNEL 5
OPTION RTC AUTO ENABLE
OPTION MODBUFF ENABLE  192
OPTION PLATFORM PicoCalc
OPTION PSRAM PIN GP47

Oooh, thanks for the quick response.

That’s had an effect - more of the keys are working, but my testing is shortened by the fact that the screen goes blank after a few seconds.

I notice I’ve got a different LCDPANEL setup to you as well. Have you upgraded, or are the kits sent out with different hardware sometimes?

I’ve just connected the serial port back in, and I’ve still got control there… I’ll continue having a tinker.

Did you upgrade the keyboard firmware to 1.6? I think the PicoMite firmware relies oin this to do the automatic configuration. It also requires a completely blank Pico so use the nuke S/W first.

The ST7365P came with my kit. It won’t hurt you to try it. The serial port is unaffected. Make sure you leave off INVERT since the 7365 doesn’t need it.

If it turns out worse, just use your serial connection to put it back the way you have it now.

TL

Sorry, I missed this in passing. I’ve seen files for the picomite keyboard firmware, but I can’t find anything definite about how to update it. (I’ve read enough to understand I may need a STM32 programmer dongle thing? That isn’t a problem - I’ve got ST/Links and JTraces with work. But I don’t know where to plug it in).

I’m definitely seeing a ‘thing’ where doing ‘Option keyboard picocalc’ does something good (arrow keys jump into operation), but then stops the display working after a few seconds. In my original setup, it was definitely ‘Option Keyboard I2C’, so I guess that’s something that has been changed since 6.00.02RC32?

I’m also struggling to get a connection with the USB-C port, even under Linux. Windows just says that the device has malfunctioned (I’ve installed a serial driver using Zadig to no help.)

Linux shows the device as a ttyUSB, but doesn’t do anything with it - everything I type is just sunk.Setting ‘Option serial console COM1,GP0,GP1’ just gives me a ‘Bad pin’ error.

Connecting direct to the Pico’s USB allows me control in both Windows and Linux (as a ttyACM…?), but seems to nixx I2C operations (presumably a timer or interrupt’s being re-used somewhere).

Thanks for all of this. I’ll have a further look around, but if someone can point me at a programming guide for the keyboard chip, it’d be a great help.

You don’t need an external programmer. You just need to move SW1 (found on the main board inside the PicoCalc) to the ON position and connect to the STM32 Cube Programmer (program on the PC) via the Pico’s USB port and send the file. Remember to return the switch back to OFF when you’re done.

Great, thanks. And, sorry, before I bork anything - that’s PicoCalc_BIOS_v1.6.bin - or the ‘factory’ 1.6 hex file? I’ve checked through the SD readme and also the release notes on the wiki, and I can’t see anything that specifies. :frowning:

Aha! Never mind. Found it!

OK - it took a couple of goes,

  • resetting the keyboard with the 1.6 firmware, as per the method above (using the 1.6_factory_hex file and STM32Programmer)
  • nuking the main flash using the UF2 file downloadable from the RPi pico website
  • restoring the newest Picomite firmware from Geoff’s Projects
  • I didn’t get any sort of auto config still… but Working through the options below worked to restore the settings, including the ‘picocalc’ keyboard…

seems to have worked. For anyone trying this after me, MAKE SURE you take a screenshot of your ‘options list’ output to make sure you know the settings for your LCD panel, as they appear to vary. Alto take careful note of any double commas, as I missed one out transcribing from the screenshot to the first post in this thread…

option platform “PicoCalc”

option system spi gp10,gp11,gp12
option system i2c gp6, gp7, slow

option lcdpanel ili9488P,portrait,gp14,gp15,gp13, ,invert
option lcdpanel console 1,rgb(0,255,0),0

option sdcard gp17,gp18,gp19,gp16
option audio gp26,gp27
option display 26,40
option keyboard picocalc

I’m still getting no joy trying to connect to the serial through USB-C: ‘Error 31 - A device attached to the system is not functioning’, and ‘option serial console com1,gp0,gp1’ is still giving me ‘invalid pin’. The two may be related… But connecting direct to the pico USB works - and I was able to update the keyboard driver over the USB-C - so I know the port is physically OK…

Anyway, I can get back to doing BASIC on the train.

A massive thanks to toml and picouser for their help. I probably have more questions off the back of this, but I’ll open up threads with proper headings.

1 Like

OR

I could just use the ‘OPTION RESET PICOCALC’ command… which does all of that ^^ for me.

:facepalm:

2 Likes

I’m know talking to myself here, but notes I’ve discovered since using the Picocalc under the new firmware that may cause others some unhappiness.

1) As noted elsewhere NOSCROLL is forced ON for the ST7365P panel in the firmware (which is the default if you use OPTION RESET PICOCALC).

If you instead use the old setting for the ILI9488P from my OPTION LIST stuff:

option lcdpanel ili9488P,portrait,gp14,gp15,gp13, ,invert

(don’t forget the double comma!) you can get rid of the NOSCROLL if such is your wish, without having to recompile the firmware. You need to use OPTION LCDPANEL DISABLE first to change it, so be prepared to use your serial connection to make the change - and then you’ll need to reset OPTION LCDPANEL CONSOLE to what you want. (I use font 7 because I like lots of text and I’m short sighted anyway)

2) The reason OPTION SERIAL CONSOLE was failing was that I was following what was in the OPTION LIST output, and putting the COM1 parameter in there - when all you’re supposed to use is the two pin IDs…

OPTION SERIAL CONSOLE GP0, GP1

I still have a driver issue on my Win11 desktop, but my Win11 laptop now connects happily to the USB-C and uses it as a serial device after the firmware update.

2 Likes

No, no, you are not just talking to yourself!

You are sharing information that I myself just used to get my PicoCalc unwedged and working again, after months of it sitting unusable.

Thank you.

I built on the shoulders of giants. But you are very welcome :slight_smile: