Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:48 21 Oct 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite MMbasic V7.00.00 betas:  

     Page 6 of 6    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12034
Posted: 11:23am 08 Oct 2026
Copy link to clipboard 
Print this post

Lyle
Is it possible to get a bluetooth status on the car radio while playing and then during the dropout. I'm using one of the cheap Aliexpress car radios as my bench amplifier and that doesn't drop out.
You can also try this version on the M12 which may solve it completely
PicoMiteHDMIBTHV7.0.00b8.zip
 
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6184
Posted: 11:35am 08 Oct 2026
Copy link to clipboard 
Print this post

Peter,

Is there any change in 2040 between b6 and b7 ? It feels this is BT only.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12034
Posted: 11:46am 08 Oct 2026
Copy link to clipboard 
Print this post

Probably nothing worth worrying about. I would next update to the first release candidate

changes in what VGA does

"Not enough memory" no longer repeats forever (db140a5, core/Commands.c). Before, a program that stopped with that error made the prompt print it again and again until a hardware reset. This was found on a PicoMiteRP2040VGA (COM20). Now the error appears once.
Reset code cleared after a non-watchdog reset (9d918ea, PicoMite.c). After the reset switch or a brown-out, MM.INFO(BOOT) no longer says "Restart", and the sign-on banner shows again.
OPTION AUDIO refuses a second output when I2S is set (7f7d9db, core/MM_Misc.c). This applies to the VS1053, SPI and PWM forms. Before, they were accepted on top of I2S.
CALL keeps its arguments' symbols (b494e10, core/Symbols.c). CALL by name is faster; the commit measured 40 → 29 µs on a PC3.
Code placement only
5. Two splice functions grouped in flash (0bffba8, core/Stream.c). The two RBSplice functions now sit together. This changes the flash layout, not behaviour.

USB console
6. TinyUSB moved from 0.21.0 to master e42fa9357. VGA uses only the device side: usbd.c, dcd_rp2040.c, cdc_device.c, tusb.c, tusb_fifo.c and rp2040_usb.c. The patch changes there are host-only.
7. Those five console files are now built at -Os on VGA too (09eb0b6). The CMake block covers every build without USB host, so it isn't limited to PICO. The commit only records tests on a PICO. I found no record of the b8 USB console being tested on a VGA board, so this is the change most worth a check there.
 
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6184
Posted: 06:54pm 08 Oct 2026
Copy link to clipboard 
Print this post

Peter,

On 7.00.00b7 (but this is not new, might have been there for ages).
The 2040MIN version for Game*Mite.

While playing MOD file (music) and during loading a picture from SD card, the music is distorted (interrupted some 20 times per second during picture load). It does not matter if it is a BMP or JPG picture. The larger the picture, the longer the distortion is.

The picture is loaded in framebuffer F, and in the background transferred to screen (FRAMEBUFFER COPY F,N,b) The background copy to screen is not audible, so it must be the reading of SD card.

Note that the copy from F to N is 20 times per second, but I have changed that to 4 times per second, and that does not change the distortion (frequency/duration).

It feels like the priority for SD card is higher thank MOD music play. The MOD file is  also on SD card, but since it is smaller than the MOD buffer, it should be playing from MOD buffer. Not a conflict between 2 reads from SD card.

It is not a show stopper. The system remains stable. But if you know what causes it, and have a simple fix ...
Is it caused by smaller audio buffers ?

Regards,

Volhout


MaxiTrek_menu.zip
If you unzip this and run "Maxitrek_gm.bas" and in the console type "i" it brings up the help menu. Type "i" again, and it reloads the whole screen. Then it is most audible. You need an LCD screen and option platform "Game*Mite".
Edited 2026-10-09 05:01 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12034
Posted: 06:58pm 08 Oct 2026
Copy link to clipboard 
Print this post

MOD files play from flash - hence OPTION MODBUFFER so it isn't SDcard contention. It is probably just that the routine player update doesn't take place during picture reads and they take some time - will have a look.
 
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6184
Posted: 07:11pm 08 Oct 2026
Copy link to clipboard 
Print this post

@Peter,

I just ran everything from A:/ drive, and the behaviour is the same. So it is not SD card specific.

As you can read from above, I am developing using the console, using Xmodem, and all works fine in b7.

Volhout
Edited 2026-10-09 05:15 by Volhout
PicomiteVGA PETSCII ROBOTS
 
JanVolk
Guru

Joined: 28/01/2023
Location: Netherlands
Posts: 420
Posted: 11:43pm 08 Oct 2026
Copy link to clipboard 
Print this post

Can anyone help me?
I have a quick question about the help.txt file V7.00.00b7.
In the file, "---" appears above the link to "Full details: xxxxxx.pdf".
Can I omit those dashes, or do they serve a specific purpose?
Another question: when I use characters with a diaeresis (umlaut)—which we use in Dutch, among other languages—they look fine in the Notepad file. However, when I retrieve them from the microcontroller via a USB-COM connection using Tera Term, the characters appear garbled.
Is this a Tera Term setting or a firmware issue?
I know standard characters transmit correctly, but the degree symbol doesn't display properly on a Tera Term terminal, whereas it does display correctly on a screen using VGA or HDMI firmware.
I haven't yet tested whether the same issue occurs with the VGA or HDMI firmware.

Jan.
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2297
Posted: 12:07am 09 Oct 2026
Copy link to clipboard 
Print this post

Morning Peter this morning decided to do some benchmark testing so one board with your V7b7 uf.2 and one board with HDMIBTHWEB uf.2

Below is claudes report

## PicoMite V7.0.00b7: BT + WiFi together - speed, memory and audio results

Peter, you said BT and WiFi will never run together in MMBasic because
there's not enough room left for large programs. I wanted numbers, so I
benchmarked two Pico Computer 3 boards (RP2350, HDMI, 640x480) with the same
program and the same Bluetooth speaker (JBL Flip 6). Short version: speed is
unaffected, the memory cost is small, and the one real problem (dropped
audio with WiFi up) has a workaround and looks fixable.

**Board A:** your release `PicoMiteHDMIBTHV7.0.00b7.uf2` (BT, no WEB).
**Board B:** my own build, one image with BT and WEB together (`HDMIBTHWEB`,
1.62 MB, gcc 13). It is built from the public git tag PicoMite-V7.0.00b7
(commit b40e71f) plus my CMake changes to add the combined variant. A plain
BT-only build from that same tag does not contain the Bluetooth status
counters your release has (send errors, stream starts, bitpool lowered), so
the release is newer than the tag.

Both report `MM.VER = 7.000007`. Timing program: `bench.bas` (about 50
lines, attached), using `TIMER` around each loop. Times are in milliseconds,
so lower is faster. Idle results are the mean of 5 runs; the figure in
brackets is half the min-to-max spread.

### 1. Speed and memory, idle (no music, no network traffic)

| Test | A: release BT | B: BT + WiFi | B vs A |
|  
| Integer loop, 300k | 3852 (±3) | 3708 (±2) | -3.7% |
| Float SQR/SIN, 50k | 1250 (±1) | 1110 (±1) | -11.1% |
| Array fill, 10 x 10k | 1309 (±1) | 1264 (±2) | -3.5% |
| String ops, 4000 | 82 (±1) | 80 (±1) | -2.3% |
| Full-screen fills, 40 | 60 (±1) | 60 (±0) | +1.4% |
| Text draws, 300 | 70 (±1) | 73 (±1) | +5.7% |

| | A: release BT | B: BT + WiFi | Difference |
|---|---|---|---|
| Free RAM (heap) | 6437 KB | 6392 KB | -45 KB |
| Free program space | 179 KB | 155 KB | -24 KB |
| Firmware image | 1.42 MB | 1.62 MB | +216 KB |

- Having WiFi compiled in costs no measurable speed. I would not read the
 11% float gain as a feature: the two builds also differ in toolchain.
- The memory difference is partly my own choice. I set the combined build's
 heap to 184 KB and program size to 156 KB as provisional values (the BT
 build uses 228 KB and 180 KB). Treat 24 KB / 45 KB as an upper bound until
 those are tuned against what the linker allows.

### 2. Streaming music while running the benchmark

Same speaker and MP3 (Stairway to Heaven, SBC 44100 Hz), benchmark run over
the console while it plays. These runs used the speaker's default bitpool 40.

| Test | A idle | A streaming | B idle | B streaming |
|---|---|---|---|---|
| Integer loop, 300k | 3852 | 4582 | 3708 | 4235 |
| Float SQR/SIN, 50k | 1250 | 1412 | 1110 | 1299 |
| Array fill, 10 x 10k | 1309 | 1559 | 1264 | 1443 |
| String ops, 4000 | 82 | 97 | 80 | 93 |
| Full-screen fills, 40 | 60 | 71 | 60 | 69 |
| Text draws, 300 | 70 | 83 | 73 | 87 |

A: mean of 3 runs while streaming. B: mean of 7. Streaming slows both boards
by 14-21%, and the audio encoder uses 7-11% of the CPU.

### 3. Audio quality: dropped samples with WiFi up

The dropped-sample count comes from `BLUETOOTH STATUS` (it resets each time
it is printed). Board B was flashed with two images in turn, so those two
columns are the same board, speaker and MP3 with only the firmware changed.

| | A: release (BT) | B: tag, BT only | B: tag + WiFi |
|---|---|---|---|
| Samples dropped | 0 | 0 | about 3,700-3,900 per second |
| Underruns | 0 | 0 | 0 |
| Longest send wait | 13-48 ms | 15 ms | 114-172 ms |
| Audible static | none | none | yes |

What I found:

- Bluetooth audio from the b7 source is clean on its own, on both boards.
- With WiFi connected (even idle), each audio packet sometimes waits
 100-170 ms for the radio. The encoder falls more than 250 ms behind and
 discards audio, which is the static.
- It is not the CPU: the encoder's timer is never late by more than 23-28 ms,
 and the drop rate is the same with or without the benchmark running.
- Not the heartbeat LED either. I made the WiFi heartbeat leave the LED alone
 while a speaker streams (as `bt_keyboard_poll` already does) and tried
 `OPTION HEARTBEAT OFF`; the drops remained.
- Capping the SBC bitpool at 28 instead of the speaker's 40 gives 0 dropped
 samples over 36 s with WiFi connected, and it sounds fine. So it looks like
 a throughput limit on the shared CYW43 radio, and a lower bitrate fits.

My guess, not checked: your release's "bitpool lowered" counter suggests it
already backs off the bitrate when sending falls behind, which would fix this
properly (full quality when the radio is quiet, lower only when needed).
Peter, is that right, and which commit is the b7 BTH release built from?

### 4. File transfer while streaming

On board B (bitpool 28, WiFi connected, song playing from USB):

- TFTP PUT of a 1.7 MB file to the SD card: about 65 KB/s, 0 dropped samples,
 0 underruns, longest send wait about 100 ms.
- I could not verify the file bytes (the TFTP read-back failed with
 "Connect request failed"), only that TFTP reported success and the size
 matched.
- Playback stopped during or after the transfer. The Bluetooth link stayed up
 and its counters were clean, so I suspect the MP3 player stopped, not
 Bluetooth. Not yet understood.
- Separately, listing and running files on the SD card while a song played
 caused a 593 ms send wait and about 120,000 dropped samples once, and later
 the board hung until a hard reset. I have not reproduced that yet, so
 treat it as a lead, not a conclusion.

### Method

Flashed over SWD with OpenOCD. Programs were loaded over telnet (B) and
serial (A). Results were read from the console. Nothing else was running
apart from the music where stated.


Here is the HDMIBTHWEB uf.2

PicoMiteHDMIBTHWEB_V7.0.00b7_bitpool28.zip


Regards Bryan
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3412
Posted: 01:00am 09 Oct 2026
Copy link to clipboard 
Print this post

  JanVolk said  when I retrieve them from the microcontroller via a USB-COM connection using Tera Term, the characters appear garbled.
Is this a Tera Term setting or a firmware issue?
It's Tera Term. It has no idea what font the Pico is using so uses it's own.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6624
Posted: 05:02am 09 Oct 2026
Copy link to clipboard 
Print this post

  Quote  Another question: when I use characters with a diaeresis (umlaut)—which we use in Dutch, among other languages—they look fine in the Notepad file. However, when I retrieve them from the microcontroller via a USB-COM connection using Tera Term, the characters appear garbled.
Is this a Tera Term setting or a firmware issue?


First thing to remember. MMBasic uses 7 bit ASCII, not extended ASCII or utf8 or unicode.

With the help file you might get away with extended characters.
TeraTerm needs to be configured with a font that has the extended /unicode characters.
Try Lucidia Console.

The degree symbol is a special case. MMBasic fonts use a modified ASCII with the ` (back tick)  replaced with the degree symbol.

Someone on the forum created a font for use by Windows/Linux/MAC with the MMBasic characters.
I recommend installing that font and setting TeraTerm to use it.

Found the post:https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=19131&LastEntry=Y#259702#259696

Jim
VK7JH
MMedit
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12034
Posted: 07:00am 09 Oct 2026
Copy link to clipboard 
Print this post

  Quote  | Free RAM (heap) | 6437 KB | 6392 KB | -45 KB |
| Free program space | 179 KB | 155 KB | -24 KB |
| Firmware image | 1.42 MB | 1.62 MB | +216 KB |

QED, too limiting without PSRAM and MMbasic does not ship PSRAM only versions. If it works for you that's good but I won't be including it.
 
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6184
Posted: 07:06am 09 Oct 2026
Copy link to clipboard 
Print this post

@Peter,

The MOD play distortion during load of a picture is present in all versions (also 2350 and VGA/HDMI versions). Only 2350 is much faster than 2040, and the distortion is more like a single interrupt to the ear.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 2297
Posted: 07:13am 09 Oct 2026
Copy link to clipboard 
Print this post

Today got to fully road test it out and got on porting over 3D Model Editor and told claude lets try 1024 and after the port was done it was like everything I asked for in the beginning so after an afternoon good work done all round the this 3D Model Editor

Now having TFTP and wifi going really speeds thing up when working with claude as usb swaps for programming are a thing of the past as the 2040w debug/programmer works nicely and having the probe does find the bugs at firmware level.

Thanks for the headsup Peter as this mornings benchmark tests were fun to watch as the PC3 was put thru it's paces, now my github has been updated and the uf.2 file is there for anyone to use.

Regards Bryan
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12034
Posted: 08:22am 09 Oct 2026
Copy link to clipboard 
Print this post

Volhout, what version do you want to test with?
 
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6184
Posted: 09:15am 09 Oct 2026
Copy link to clipboard 
Print this post

Peter,

Easiest at this moment is 2040 VGA (since that is at my desk).

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 12034
Posted: 09:40am 09 Oct 2026
Copy link to clipboard 
Print this post

Here you go

PicoMiteRP2040VGAV7.0.00b8.zip
 
Volhout

Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 6184
Posted: 10:35am 09 Oct 2026
Copy link to clipboard 
Print this post

   
PicomiteVGA PETSCII ROBOTS
 
karlelch

Guru

Joined: 30/10/2014
Location: Germany
Posts: 361
Posted: 06:54am 11 Oct 2026
Copy link to clipboard 
Print this post

@Peter:
Update on my calculation-heavy robot firmware: b8 made a huge different! The `Move` section is where many calculations happen, its runtime almost halved. Thanks!

Current version and options:
WebMite MMBasic RP2350A Edition V7.0.00b8
OPTION FLASH SIZE 4194304
OPTION LIBRARY_FLASH_SIZE  34000
OPTION COLOURCODE ON
OPTION HEARTBEAT OFF
OPTION CPUSPEED (KHz) 315000
OPTION DISPLAY 64, 80
OPTION WIFI Elchland3, ****************, PICO3A71AD2F089
OPTION PLATFORM walkr|server


Option Compile Off
Loop   0.468 ± 0.648 ms (n=24863, -0.071..10.044)
Exec   9.498 ms (n=43, 9.390..10.100)
Move   8.640 ms (n=45, 8.074..18.925)

Option Compile On
Loop   0.206 ± 0.290 ms (n=47835, -0.294..0.710)
Exec   7.027 ms (n=41, 6.973..7.096)
Move   4.362 ms (n=43, 4.097..11.779)


Compared to earlier with b4:
Option Compile On
Loop   0.304 ± 0.288 ms (n=61485, -0.190..0.809)
Exec   8.824 ms (n=93, 8.746..8.910)
Move   8.310 ms (n=94, 7.903..17.666)
 
     Page 6 of 6    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026