Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:04 04 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 3 of 3    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11934
Posted: 06:48pm 02 Oct 2026
Copy link to clipboard 
Print this post

Version V7.00.00b4 is now available at https://github.com/UKTailwind/PicoMite/releases/tag/PicoMite-V7.0.00b4
This includes more optimisation for the rp2350 and increased user heap for the rp2350 as well as fixing the bugs identified above

Volhout: try la_24_2 on this at 378MHz and have a look at the cycle time.
 
hhtg1968
Senior Member

Joined: 25/05/2023
Location: Germany
Posts: 232
Posted: 09:00pm 02 Oct 2026
Copy link to clipboard 
Print this post

I do not close the housing of my pico 3 any longer...

one beta after the other. but it is so cool to test...
 
karlelch

Guru

Joined: 30/10/2014
Location: Germany
Posts: 358
Posted: 10:23am 03 Oct 2026
Copy link to clipboard 
Print this post

Thanks for the new version, Peter!

I tested Version V7.00.00b4 with my current robot control software (running on a standard Pico2W). It does a lot of math, communicates with digital servos via a COM port, and sends servo data via UDP to a host PC. At first glance, I did not find any issues. The increase in speed is small but detectable, but then I tried to optimize the MMBasic code already.

Options
WebMite MMBasic RP2350A Edition V7.0.00b4
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
Run
Loop   0.364 ± 0.659 ms (n=26811, -0.166..9.877)
Exec   8.926 ms (n=45, 8.853..9.015)
Move   9.803 ms (n=47, 9.301..19.398)


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)



> ?MM.Info$(compile)
NONE 0 REUSED 4 STMTS 2448 RAN 1442659 MISS 156107 CODE 727922 SIZE 66228 OF 636


[PERF] elapsed=13298965 us  statements=575991  findvar=1288427 (locals=903188 [2
[PERF] top commands by dispatch count:
     210515  Let
     165838  If
      39045  Static
      38715  /*
      37870  Local
      19493  Loop
       4713  Inc
       3883  Cat
       1071  Poke
        838  Math
        558  Print
        207  Pause
         83  Const
         76  For
         57  Dim
         47  Read
         25  WEB
         16  Do
          8  Restore
          7  Select Case
[PERF] top SUBs by exclusive (self) time:
      self_us    incl_us     calls   self_us/call  name
[PERF] top SUBs by call count:
      19290  R._timing
      19290  R.updatePosture
      13361  R.spinGaitGen
        357  ST.sendPacket
        150  R._bodyIK
        150  R._legIK
         48  _update_timing
         36  ST.stopServo
         25  R._computeMove
         25  R._executeMove
         25  R.inputUpdate
         25  R.generateGaitSeq
         25  R.Angles2Pos
         25  R._moveAllServos
         15  ST.waitForStop
          9  R.inputBody
          9  R.inputPosition
          9  R.inputWalk
          4  R.resetInput
          4  R.getServoState



Option Compile Shadow does not report any issues.
Option Compile Shadow
Loop   0.352 ± 0.287 ms (n=20497, -0.147..0.857)
Exec   8.795 ms (n=25, 8.718..8.898)
Move  10.506 ms (n=27, 9.856..19.813)


If someone is interested what the software does: I am building a new hexapod robot now with serial servos. To debug the software and improve the movements before the hardware of the robot is finished, Claude helped me to write some ROS2 software that runs on a PC, receives the servo positions from the MMBasic firmware via UDP and applies them to a model of the robot.

https://youtu.be/L64OecLvrtc

Cheers
Thomas
Edited 2026-10-03 20:29 by karlelch
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11934
Posted: 11:31am 03 Oct 2026
Copy link to clipboard 
Print this post

I'm now extending the compiler's capabilities. If you post your code I can analyse it and see what statements aren't being compiled and potentially include them in the next version.
 
karlelch

Guru

Joined: 30/10/2014
Location: Germany
Posts: 358
Posted: 11:49am 03 Oct 2026
Copy link to clipboard 
Print this post

  matherp said  I'm now extending the compiler's capabilities. If you post your code I can analyse it and see what statements aren't being compiled and potentially include them in the next version.

Thanks - the code is in my repository
https://github.com/teuler/walkr-robot/blob/master/code-mmbasic/
`hpx_srv.bas` requires `lib_input.bas` and `lib_st3215.bas` on `A:`. No additional hardware is needed
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 2078
Posted: 12:40pm 03 Oct 2026
Copy link to clipboard 
Print this post

Been out of the MMBasic loop for several weeks due to big-panic work issue.

I return to find this amazing insanity  

Haven't found my feet yet but I tested on my RP2350 DIL module and got an immediate ~84% percent speed increase.

For the sake of comparison, what was happening 20,000 times/sec is now 37,000 times/sec with OPTION COMPILE ON.

But here's what shocked me; I used "crunch" in MMEdit IDE and this jumped to 57,000 times/sec  

This has me confused because I would've though that the compiler would have done similar(???)

Edit: Correction 53,000 times/sec.
Edited 2026-10-03 22:44 by PhenixRising
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11934
Posted: 05:58pm 03 Oct 2026
Copy link to clipboard 
Print this post

karlech
You use types in your program (good) but you also use normal variables with dots in their names (bad). The compiler doesn't support types and doesn't have the ability to scan the program and work out what is an element of a type and what is a simple variable so it doesn't compile any line which include a dot in a name. As an experiment you could bulk edit the program and see what the performance gain would be.

PhenixRising
The impact of comments and blank lines is a limitation in b4 that will be addressed in b5
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 2078
Posted: 06:08pm 03 Oct 2026
Copy link to clipboard 
Print this post

Pete, I am giddy beyond belief.

This development is simply astonishing.

Many thanks X 1,000,000

   
 
Bleep

Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 855
Posted: 06:21pm 03 Oct 2026
Copy link to clipboard 
Print this post

Hi Peter,
Testing various programs, but I've found Chess fails in a very strange way, at a point where it has never had a problem and I can't see anything inherently wrong with it, I've tried giving all the If statements in this Function an EndIf incase that was the problem, but still get the error.
  Quote  PicoMiteHDMI MMBasic USB RP2350A Edition V7.0.00b4
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION SYSTEM I2C GP20,GP21
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD UK
OPTION RESOLUTION 640x480 @ 378000KHz
OPTION DISPLAY 30, 53
OPTION SDCARD GP22, GP2, GP3, GP4
OPTION AUDIO GP10,GP11', ON PWM CHANNEL 5
OPTION RTC AUTO ENABLE
OPTION COMPILE ON
OPTION MODBUFF ENABLE  192
OPTION PLATFORM HDMIUSB
> run
'help' lists commands. TSCP Chess By Tom Kerrigan. Converted MMBasic Ceptimus
bench
[1535] Next i
Error : Cannot find a matching FOR
>

Just run the chess program and then type bench at the prompt.
I get the same error simply playing a game, it sometimes isn't straight away.
Used to work on all previous versions, also works in Fuzix. Because of it's size and complexity, might be a good candidate for your further speed improvements? :-)
Regards Kevin.

chessbas.zip
Edited 2026-10-04 04:24 by Bleep
 
matherp
Guru

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

It is almost certainly running out of stack space. I'll have a look at it. Confirmed - tested on various versions. Is your code recursing more than the original? Do you have the original you can post?
Edited 2026-10-04 05:10 by matherp
 
gadgetjack
Senior Member

Joined: 15/07/2016
Location: United States
Posts: 239
Posted: 07:17pm 03 Oct 2026
Copy link to clipboard 
Print this post

After flashing new firmware , I get "input not supported" on my monitor. This worked good until version 7. Is the start up screen at a higher resolution than it used to be?
Confused....
 
gadgetjack
Senior Member

Joined: 15/07/2016
Location: United States
Posts: 239
Posted: 07:39pm 03 Oct 2026
Copy link to clipboard 
Print this post

update - No version after 6.02 works on hdmi. I had not update for a while. I tried going backwards till it worked again. I tried 3 different monitors in case i had a bad one. Same on all 3.
 
gadgetjack
Senior Member

Joined: 15/07/2016
Location: United States
Posts: 239
Posted: 08:12pm 03 Oct 2026
Copy link to clipboard 
Print this post

Ok , figured it out. I tried my other board and it ran fine. It was the Pimoroni module that would not run it correctly. I guess it was too fast for it. One with the core module runs great. I will stick to the 6.02 version for the other board.
 
     Page 3 of 3    
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