Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:57 02 Aug 2025 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 : Warp speed PicoMite

     Page 1 of 2    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 02:57pm 20 Jun 2022
Copy link to clipboard 
Print this post

Bleep (Kevin Moore) has discovered how to underclock the flash memory on the RP2040 at boot allowing the system clock to run faster while still reliably reading the flash. I've then worked out how to make this flexible depending on the CPU speed.

Together these mean that we can now clock the PicoMite and PicoMiteVGA at up to 378MHz.

Testing the PicoMite at this speed I'm now seeing The simple speedtest showing more than 257,000 basic lines a second and grainbench at 6441

I've attached the files below for testing - please let me know if you see any issues on any peripherals (I2C, SPI, PWM, etc.)



PicoMite_Beta.zip



Edited 2022-06-21 01:00 by matherp
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 03:20pm 20 Jun 2022
Copy link to clipboard 
Print this post

Just because it happens to be what I'm doing right now, reading of 10 DS18B20 sensors at a gulp, with timer in seconds:

> AUTOSAVE
' DS18B20x10.bas
Dim string s: Timer =0
Do
 Print Fix(Timer/1000);
 s=Str$(TEMPR(9))+" "+Str$(TEMPR(10))+" "+Str$(TEMPR(11))+" "+Str$(TEMPR(12))+" "+Str$(TEMPR(14))+" "+Str$(TEMPR(15))
 s=s+" "+Str$(TEMPR(34))+" "+Str$(TEMPR(32))+" "+Str$(TEMPR(31))+" "+Str$(TEMPR(29))
 Print "! "+s
 TEMPR START 9,3:TEMPR START 10,3:TEMPR START 11,3:TEMPR START 12,3:TEMPR START 14,3:TEMPR START 15,3
 TEMPR START 34,3:TEMPR START 32,3:TEMPR START 31,3:TEMPR START 29,3
 Pause 1000
Loop
Saved 303 bytes
> run
0! 25.125 28.25 25.75 27 23 27.75 24.375 25.625 25 25.4375
3! 28.0625 27.9375 25.9375 27.25 23 27.875 22.6875 24.1875 23.5625 23.875
4! 28.125 27.9375 25.9375 27.25 23 27.9375 22.75 24.125 23.625 23.875
5! 28.125 28 25.9375 27.25 23 27.9375 22.75 24.1875 23.625 23.9375
6! 28.125 28 25.9375 27.25 23 27.9375 22.75 24.1875 23.6875 23.875
7! 28.125 28 26 27.25 23.0625 27.9375 22.75 24.25 23.625 23.9375
> ?mm.device$,mm.ver
PicoMite         5.07051
>

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 03:43pm 20 Jun 2022
Copy link to clipboard 
Print this post

Something now fubar with sub-directories:

PicoMiteVGA MMBasic Version 5.07.05b10
Copyright 2011-2021 Geoff Graham
Copyright 2016-2021 Peter Mather

> option list
OPTION KEYBOARD UK
OPTION SDCARD GP13, GP11, GP12, GP10
OPTION AUDIO GP6,GP7, ON PWM CHANNEL 3
> ? MM.Device$
PicoMiteVGA
> ?MM.Ver
5.07051
> files
A:
  <DIR>  basic-challenge
  <DIR>  cmm2-welcome
  <DIR>  forth
  <DIR>  kingdom
  <DIR>  mick
  <DIR>  mmbasic-lazer-cycle
  <DIR>  picomite-vga
  <DIR>  polar-snake
  <DIR>  saaint-private
  <DIR>  saaint-public
  <DIR>  scratch
  <DIR>  sptools
  <DIR>  tmp
  <DIR>  welcome
  <DIR>  zmim
04:33 01-01-2000        158  bug.bas
00:39 01-01-2000         31  foo
00:17 01-01-2000         32  foo.BAS
00:02 01-01-2000        161  key-bug.bas
00:13 01-01-2000       1095  LICENSE.BAS
05:44 01-01-2000       5193  manual_serial.bas
04:32 01-01-2000       1192  receive-bug.bas
00:11 01-01-2000       2016  receive.bas
03:51 01-01-2000       1906  transmit.bas
01:45 01-01-2000        316  transmit_simple.bas
15 directories, 10 files
> chdir "tmp"
> files
A:tmp
Error : Could not find the path


Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 04:42pm 20 Jun 2022
Copy link to clipboard 
Print this post

  Quote  Something now fubar with sub-directories:


I updated FatFS to the latest and it seems to have broken something - will backout/investigate
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 05:23pm 20 Jun 2022
Copy link to clipboard 
Print this post

Back to the old FatFS


PicoMite_Beta.zip
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 06:06pm 20 Jun 2022
Copy link to clipboard 
Print this post

  matherp said  Back to the old FatFS


Thanks, that seems to fix the directory issue.

The performance improvement is very impressive.

On a probably unrelated issue I am having some problems with poor keyboard responsiveness which I suspect may be related to playing my multi-channel "The Entertainer" music - it seems to be fine the first time round and then very poor the second. This however may predate today's updates as I've not really been using the PicoMite much (I've been using MMB4W as a proxy). There are however quite a few other moving parts to the game/program that's playing the music so more information when I have time to pin down the actual problem area.

Best wishes,

Tom
Edited 2022-06-21 04:12 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 633
Posted: 06:30pm 20 Jun 2022
Copy link to clipboard 
Print this post

Hi Lizby,
in the manual it says:-
0 = 0.5ēC resolution, 100ms conversion time.
1 = 0.25ēC resolution, 200ms conversion time (this is the default).
2 = 0.125ēC resolution, 400ms conversion time.
3 = 0.0625ēC resolution, 800ms conversion time

You are setting 10 off together so that is that's at least 0.8s, probably more.
The print will have to wait for the conversion to finish, before it can print.
So If you remove the Pause, each loop will be approximately 0.8s (it actually seems to be slightly longer) you could probably try fine tuning this with a smaller Pause and move it to just after the Print "! "+s Pause 129 looks good, but at some point you will loose or gain a second every now and then in your print out.
I suspect that the first run takes longer, because it's doing some extra setting up, hence the jump to 3.
Regards, Kevin.
Edited 2022-06-21 04:37 by Bleep
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3378
Posted: 06:44pm 20 Jun 2022
Copy link to clipboard 
Print this post

  Bleep said   ... You are setting 10 off together so that is that's at least 0.8s, probably more.
The print will have to wait for the conversion to finish, before it can print.


The first pass through the DO loop takes as long as the uninitialized TEMPR reads take.

The subsequent passes return nearly instantaneously because the PAUSE 1000 has allowed all the TEMPR STARTs to complete. It might be possible to shave a hundred milliseconds or more off of the PAUSE 1000, but for the purpose for which this is intended, there would be no real benefit to doing so.

Other code will be calling this TEMPR & TEMPR START sequence. This was just intended to show that it could all be done in about a second as opposed to the maybe 8 seconds if each TEMPR was done individually, waiting for the result. The calling code will be able to immediately begin to process the temperature readings.

(Congrats on the "warpspeed" idea.)

~
Edited 2022-06-21 04:51 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 07:12pm 20 Jun 2022
Copy link to clipboard 
Print this post

Hi Peter,

Not the bug I'm looking for but nevertheless:
> new
> load "tick_bug.bas"
> list
SetTick 100, my_tick

Do
 Print Inkey$;
Loop

End

Sub my_tick
 For j% = 1 To 1000 : Next
End Sub
> run
<Press a key or two>
[4] Print Inkey$;
Error : 1000 is invalid (valid is 1 to 10)


Am I doing something foolish ?

EDIT: OK, doesn't happen from a reset ... something else is at play, will investigate further.

Best wishes,

Tom
Edited 2022-06-21 05:15 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 07:25pm 20 Jun 2022
Copy link to clipboard 
Print this post

OK, found what I suspect is the same issue but reproducible from a reset:

1. Reset PicoMite

2.
Copyright 2011-2021 Geoff Graham
Copyright 2016-2021 Peter Mather

> load "on_key.bas"
> list
On Key on_key()
End

Sub on_key()
Print Inkey$
End Sub
> load "tick_bug.bas"
> list
SetTick 100, my_tick

Do
 Print Inkey$;
Loop

End

Sub my_tick
 For j% = 1 To 1000 : Next
End Sub
> run "on_key"
> run "tick_bug"


3. Type "a", "b", "c", "Ctrl-C"

4.
> run "on_key"
> run "tick_bug"


5. Type "a", "b", "c", "Ctrl-C"

6. Repeat steps 4 and 5 until this happens - usually happens on the first or second time:
[5] Loop
Error : LOOP without a matching DO


What a palava,

Tom
Edited 2022-06-21 05:26 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 09:38pm 20 Jun 2022
Copy link to clipboard 
Print this post

  Quote  OK, found what I suspect is the same issue but reproducible from a reset:

Anything to do with the performance tweak or unrelated? Happens in 5.07.04?
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 09:47pm 20 Jun 2022
Copy link to clipboard 
Print this post

  matherp said  
  Quote  OK, found what I suspect is the same issue but reproducible from a reset:

Anything to do with the performance tweak or unrelated? Happens in 5.07.04?


Just tested and it also happens in 5.07.04 release version from Geoff's website - looks like some corrupt piece of state so just possibly might be related to why I don't have keyboard issues the first time I run my game after a reset, but do on subsequent runs ... tenuous I know.

Best wishes,

Tom
Edited 2022-06-21 07:48 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 04:23am 21 Jun 2022
Copy link to clipboard 
Print this post

@Matherp and @Bleep

Many thanks and congratulations for the speed breakthrough, guys    




Craig
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 04:45am 21 Jun 2022
Copy link to clipboard 
Print this post

Whoa!

I have been playing with a non-blocking debounce, based on the Cap'n's Fruit-of-the-shed principle. It needs to see a steady-state for 40ms to be valid. Within this 40ms, I increment a counter just to see how many scans occurred.

Prior to the speedup: 124-129
Now: 491-499

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 07:37am 21 Jun 2022
Copy link to clipboard 
Print this post

  Quote  Just tested and it also happens in 5.07.04 release version from Geoff's website


Please try attached and if OK I'll do a proper release


PicoMiteVGA.zip
 
fred777
Regular Member

Joined: 01/07/2021
Location: United Kingdom
Posts: 57
Posted: 08:07am 21 Jun 2022
Copy link to clipboard 
Print this post

Very impressive speed increase, nice!

I don't know when the change happened but the keyboard pins seem to have changed
This is the NON-vga version, after a clear_flash, no other options

PicoMite MMBasic Version 5.07.05b10
Copyright 2011-2021 Geoff Graham
Copyright 2016-2021 Peter Mather

> OPTION KEYBOARD US, 0, 0, 0, 0
> SETPIN 11 , DOUT
Error : Pin 11 is reserved on startup

From the Manual:
The keyboard must be connected as follows:
Connect GP8 to PS2 socket CLOCK pin.
Connect GP9 to PS2 socket DATA pin.

I'm pretty sure I had a PS/2 keyboard working on GP8 and GP9.
And now it looks like GP11 is used.
I can't seem to find any mention of new pin assigments, are there more changes?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 08:12am 21 Jun 2022
Copy link to clipboard 
Print this post

There are no pin changes

GP8 == pin 11

Try
SETPIN GP11,dout == setpin 15,dout
 
fred777
Regular Member

Joined: 01/07/2021
Location: United Kingdom
Posts: 57
Posted: 08:17am 21 Jun 2022
Copy link to clipboard 
Print this post

Aaaaargh, I constantly get pin numbers and GP numbers mixed up... sorry  
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 08:34am 21 Jun 2022
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Just tested and it also happens in 5.07.04 release version from Geoff's website


Please try attached and if OK I'll do a proper release


Thanks Peter, that seems to fix the reported issue and also, at least on preliminary testing, addresses the problem I was having with keyboard read performance after the first run.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5091
Posted: 11:34am 21 Jun 2022
Copy link to clipboard 
Print this post

@peter,

Do we still get the 252 MHz option, or only 126 and 378?

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025