Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : PicoMite Firmware Release Version 6.02.01

   Page 5 of 7    
Posted: 12:30pm
05 Apr 2026
Copy link to clipboard
JohnS
Guru

  terekgabor said  Now it’s time to learn how to compile picomite files.
Is there any instructions somewhere how to do it?

Follow the details of the RPi folks for the SDK, including checking you can build their examples, then grab Picomite files from github and it'll be obvious.

Quite an exercise if you've not done such things before.

John
 
Posted: 02:56pm
05 Apr 2026
Copy link to clipboard
Mixtel90
Guru


Huh...  I've never found compiling *anything* to be "obvious". lol
 
Posted: 03:50pm
05 Apr 2026
Copy link to clipboard
toml_12953
Guru

  terekgabor said  Now it’s time to learn how to compile picomite files.
Is there any instructions somewhere how to do it?

Thx,
G@bor


Here are instructions for Linux (I use the Linux subsystem in Windows)

INSTALL PICO SDK
sudo apt update && sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential git

mkdir -p ~/pico && cd ~/pico
git clone https://github.com/raspberrypi/pico-sdk.git
cd pico-sdk
git checkout tags/2.2.0 -b sdk2.2.0
git submodule update --init

echo 'export PICO_SDK_PATH=~/pico/pico-sdk' >> ~/.bashrc
source ~/.bashrc



SETUP PICOCALC FIRMWARE

mkdir -p ~/picocalc && cd ~/picocalc
git clone https://github.com/madcock/PicoMiteAllVersions.git
cd PicoMiteAllVersions
mv ~/pico/pico-sdk/src/rp2_common/hardware_gpio/gpio.c ~/pico/pico-sdk/src/rp2_common/hardware_gpio/gpio.bak
ln -s ~/picocalc/PicoMiteAllVersions/gpio.c ~/pico/pico-sdk/src/rp2_common/hardware_gpio/gpio.c
mv ~/pico/pico-sdk/src/rp2_common/hardware_gpio/include/hardware/gpio.h ~/pico/pico-sdk/src/rp2_common/hardware_gpio/include/hardware/gpio.bak
ln -s ~/picocalc/PicoMiteAllVersions/gpio.h ~/pico/pico-sdk/src/rp2_common/hardware_gpio/include/hardware/gpio.h


EDIT ~/picocalc/PicoMiteAllVersions/CMakeLists.txt TO CHOOSE TARGET
set(PICOCALC true)

# Compile for PICO 1 Board
#set(COMPILE PICO)

# Compile for PICO 2 Board
#set(COMPILE PICORP2350) or, for Web version
set(COMPILE WEBRP2350)


BUILD PICOCALC FIRMWARE
cd ~/picocalc/PicoMiteAllVersions
mkdir build
cd build
cmake ..
make

Edited 2026-04-06 01:51 by toml_12953
 
Posted: 11:12am
09 Apr 2026
Copy link to clipboard
Volhout
Guru

@Peter, Geoff,

Since V6.02.02 is dropping the CAMERA support for the OV7670 in RP2040/WEB builds, I wanted to upgrade my camera to the latest V6.02.01 that supports CAMERA.

But in V6.02.01 the camera does not work.
- the LCD picture is square (not 160x120 or 320x240 as in versions starting V5.08.00), and full of noise. As if the timing is completely wrong.

Pico was run at 252MHz in 5.08.00 and 6.02.01.

I hope this can be repaired, alternatively remove the command form the manual.

Volhout
Edited 2026-04-09 21:13 by Volhout
 
Posted: 11:18am
09 Apr 2026
Copy link to clipboard
terekgabor
Newbie

Thanks Tomi! I will try!
 
Posted: 11:45am
09 Apr 2026
Copy link to clipboard
matherp
Guru

Volhout. Please try setting OPTION SYSTEM I2C sdpin,sclpin,SLOW. There are no obvious differences in the camera code between 5.08.00 and 6.02.01 other than an I2C timeout setting.
 
Posted: 12:12pm
09 Apr 2026
Copy link to clipboard
Volhout
Guru

Hi Peter,

Changing system I2C speed has no impact.

Measured on  V6.02.01
XCLK = 12MHz
PCLK = 3MHz
VSYNC = 15Hz ... ?
HSYNC = 1.9kHz

Volhout
Edited 2026-04-09 22:16 by Volhout
 
Posted: 12:16pm
09 Apr 2026
Copy link to clipboard
matherp
Guru

Are you using exactly the same H/W for both versions and does the change happen each time you swap firmware back and forward?
 
Posted: 12:21pm
09 Apr 2026
Copy link to clipboard
Volhout
Guru

Peter,

Yes, same hardware. Connect USB, FIRMWARE UPDATE, program the same options (manual).
I do not move a wire. All happens behind the console. Below is test 60201rc8 (is fastest 60201)

> option list
PicoMite MMBasic RP2040 V6.02.01RC8
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION SYSTEM I2C GP14,GP15, SLOW
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 252000
OPTION LCDPANEL ILI9341, LANDSCAPE,GP20,GP21,GP22
OPTION SDCARD GP17
OPTION F5 flash run 2
> RUN

> list
'demo for OV7670 camera on PicoMite 6.02.01
'OPTION SYSTEM I2C GP14,GP15

'details    XCLK PCLK HSYN VSYN REST D0base
Camera open  GP8, GP9,GP10,GP11,GP12, GP0

'display colorbars
Camera test 2
Camera capture 2
Pause 1000

'display picture
Camera test 0
Do
Camera capture 2
Loop
>


On 5.08.00 I used BITBANG CAMERA.

Volhout

P.S. is the camera code using memory that is not completely in heap ? Memory map has changed I recall.
Edited 2026-04-09 22:27 by Volhout
 
Posted: 02:25pm
09 Apr 2026
Copy link to clipboard
matherp
Guru

There are no relevant changes to the memory handling. Can you try with a RP2350 just out of interest?
 
Posted: 02:58pm
09 Apr 2026
Copy link to clipboard
Volhout
Guru

Peter,

I can try tonight, when I get access to a Game*Mite with 2350. At work atm.
Not sure if dupont wires will cause problems.

Volhout
 
Posted: 06:40pm
09 Apr 2026
Copy link to clipboard
Volhout
Guru

Hi Peter,

The RP2350 CAMERA works correct.
It is only the RP2040 that behaves weird.

In the RP2040 it looks as if only 240 or 255 of the 320 pixels are shown (square picture), and there is noise. Lot of noise. But when you use SCALE 1 (should be 160x120) also a small square picture is shown, same noise level. It is not "truncating" the picture as if horizontal is a byte in stead of a 16 bit value.

The camera signals (XCLK,PCLK,HS,VS) look the same on the 2350, so it is not in the signals to/from the pico (I guess pico only outputs XCLK, camera generates the rest).

Regards,

Volhout
Edited 2026-04-10 04:49 by Volhout
 
Posted: 06:44pm
09 Apr 2026
Copy link to clipboard
matherp
Guru

So the code is correct and the RP2040 is now somehow too slow in some part of the processing. This is all about this issue of cache hit rates and how tiny code changes affect specific routines depending on their exact location in memory relative to 4 or 16K boundaries
 
Posted: 06:54pm
09 Apr 2026
Copy link to clipboard
Volhout
Guru

Peter,

Yes, that must be it. When I run the 2350 at 150MHz, I get the same behaviour.
At 200MHz it is correct. I don't have the 2040 wit me at home, so I can't confirm, but I estimate your are correct.

What should Geoff do ? Remove CAMERA from the 2040 manual ? Or (I still have to test that) indicate you need at least 300MHz CPU speed ?

Volhout
Edited 2026-04-10 04:59 by Volhout
 
Posted: 06:59pm
09 Apr 2026
Copy link to clipboard
matherp
Guru

Try the RP2040 at 378MHz - be interested to know the result
 
Posted: 07:02pm
09 Apr 2026
Copy link to clipboard
Volhout
Guru

Peter,

Will do so tomorrow.

RP2350 in Game*Mite
CPUSPEED      LCD
150000       1/2 picture + noise
160000       2/3 picture + noise
180000       full picture with lines
190000       full picture with some lines
200000       full picture OK

Volhout
Edited 2026-04-10 05:04 by Volhout
 
Posted: 03:28am
10 Apr 2026
Copy link to clipboard
mozzie
Senior Member

oops, wrong thread  
Edited 2026-04-10 13:41 by mozzie
 
Posted: 07:07am
10 Apr 2026
Copy link to clipboard
Volhout
Guru

Peter,

RP2040 V6.02.01 CAMERA command.

CPUSPEED       PICTURE
252000       3/4 screen noisy picture
272000       5/6'th screen, noisy picture
280000       Camera configuration error (*)
288000       OK
290000       invalid clock frequency
300000       OK
315000       OK
350000       invalid clock frequency
360000       OK
372000       OK
378000       Camera configuration error (*)

The invalid clock frequency is an error message from the MMBasic core. You simply can't set these clock frequencies.
The "Camera configuration error" shows (repeatable) when opening the camera. Maybe the 12MHz cannot be generated ?  It is not I2C related since it is not an I2C error.

Anyway... 378MHz does not work, but 372MHz works.


EDIT: At frequencies where the picture is okay (i.e. 288/300MHz) the pico shows a white screen on LCD after few minutes. This can only be fixed by a restart. At 252MHz (where the picture is corrupted) the system still runs after 20 minutes. I will investigate a bit further.

EDIT2: I checked the original camera configuration (before I tried converting it to V6.02.01) and confirm this morning again. The old config (V5.08.00) ran at 133MHz flawless. This is just to confirm the white screen is not a result of my setup.

Volhout
Edited 2026-04-10 17:40 by Volhout
 
Posted: 08:44am
10 Apr 2026
Copy link to clipboard
matherp
Guru

Volhout
Please try the attached and let me know if it works

PicoMite.zip
 
Posted: 10:06am
10 Apr 2026
Copy link to clipboard
Volhout
Guru

Hi Peter,

Has been running for 15 minutes now. Stable picture at 2040 252MHz

200MHz is 2/3 screen
230MHz has lines in the picture.
252MHz is fine

Will leave this running (at 252) for the rest of the afternoon.

What has changed ?

Volhout
 
   Page 5 of 7    
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026