| Menu | JAQForum Ver 19.10.27 |
Forum Index : Microcontroller and PC projects : MMBasic V6.03.00 release candidates
There still seems to be a problem with beautifying. Lines 100-120 should line up with line 20 since the FOR N=... loop is now finished. 10 ' Ahl's Simple Benchmark 15 TIMER =0 20 FOR N=1 TO 100: A=N 30 FOR I=1 TO 10 40 A=SQR(A): R=R+RND(1) 50 NEXT I 60 FOR I=1 TO 10 70 A=A^2: R=R+RND(1) 80 NEXT I 90 S=S+A: NEXT N 100 PRINT ABS(1010-S/5) 110 PRINT ABS(1000-R) 120 PRINT TIMER/1000;" seconds" |
||||||
You need to put next n on a separate line. I won't comment on the programming style ![]() |
||||||
Sorry Peter, That did not solve it. Volhout |
||||||
I wouldn't feel bad. It's David Ahl's code! ![]() |
||||||
@Peter: I have a vague recollection that several months ago you provided an option or command which could vary the allocation of heap vs regular memory, but I can't find it in the manual or in my code or options or by searching posts. Do I imagine it? Once again, I need more heap. Webmite, no PSRam. (Note: I asked Claude Code if it had introduced any string arrays without LENGTH values. It had, and adding LENGTH fixed the heap problem. But I'd still like to know if there is a way to adjust heap/regular.) |
||||||
It did for me so I need absolutely explicit instructions as to how to get a RP2040 into the state where it fails. I nuked it, powered off, and then loaded and it ran your quadrature encoder S/W perfectly - I even wired up a real encoder to make sure the test was properly valid There is no trade-off between heap and "ordinary memory". An amount of memory is allocated for global and local variables, the rest is heap. What you can do is trade between global and local within the total allowed variables Edited 2026-06-11 03:29 by matherp |
||||||
Peter, The most obvious is when you start the program, and the count is not zero. Volhout |
||||||
But I can't reproduce that. If I can't get a Pico into that state I can't possibly fix it. |
||||||
Peter, I understand. Currently I am trying to try to find a relation between USB (console) and the problem. Repairing it happens by interacting with the pico (either MMCC or Putty) and editing (Either MMEdit or built in Editor). So repairing always involves (for me) with USB / USB console. So I have a few Pico's set up with autorun enable. I power them every few days. When they show the problem again, I could try to power them from 5V on Vsys (not USB) and see if it repairs, or the problem persists (*). Waiting for the problem to re-appear. Volhout (*) When the problem shows, a cold boot (pulling/re-inserting USB power) does NOT repair. Let's see if repower without connecting USB repairs. P.S. I see 2 explanations for this: #1=non initialized RAM, #2=overlapping buffers. #1 can be diagnozed by wiping all RAM at earliest start point with 0, or &hffffffff, before starting anything. Even before USB. #2 is what I am trying to analyze now. Edited 2026-06-11 16:56 by Volhout |
||||||
You can try this version and see if it makes any difference. I have removed all MIN specific differences in optimisations levels compared to normal PicoMite PicoMiteRP2040V6.03.00RC18.zip |
||||||
@Peter, a/ rc18 does not fix it, so your speed optimizations are sound. b/ once the problem shows, powering from 5V does not fix it. c/ when the problem is not showing, powering from 5V does not change that. b/ and c/ there is no obvious relation between USB and the problem. Regards, Volhout P.S. tested on a pico zero with WS2812, green is PIO FIFO ok, red PIO FIFO wrong. Edited 2026-06-11 17:45 by Volhout |
||||||
Hello Peter, somewhere earlier I asked this, but it came up again during programming. Is it possible in future versions to have possibility to jump forward/backward in a MP3/FLAC/WAV file which is currently playing? For example with extra instructions like PLAY REWIND/FORWARD n (where n is in seconds). G@bor |
||||||
No: the codec has to proceed linearly though the file |
||||||
Peter, I hadn't noticed this before. Load a program with more than 100 lines. Go to edit. Go to line 100 or higher. Use the arrow keys or mouse to position 9 and then to 10 or higher and look at the bottom info line. Fortunately, nothing shocking. This only occurs with OPTION RESOLUTION 848. Another point that may have been noted before, but I can't find it. If a program has been run in MODE 3, the mouse no longer works in EDIT. This is only the case for MODE 3; the others work normally. > option list PicoMiteHDMI MMBasic USB RP2350A Edition V6.03.00RC17 OPTION SERIAL CONSOLE COM1,GP0,GP1 OPTION SYSTEM I2C GP20,GP21 OPTION FLASH SIZE 16777216 OPTION COLOR CODE ON OPTION MOUSE SENSITIVITY 1.0000 OPTION KEYBOARD US OPTION HEARTBEAT OFF OPTION PICO OFF OPTION RESOLUTION 848x480 @ 336000KHz OPTION DISPLAY 40, 106 OPTION HDMI PINS 1, 3, 7, 5 OPTION GUI CONTROLS 100 OPTION SDCARD GP22, GP6, GP7, GP4 OPTION AUDIO GP26,GP27', ON PWM CHANNEL 5 OPTION RTC CAR ENABLE OPTION MODBUFF ENABLE 192 OPTION F1 help OPTION F5 list commands OPTION F6 list functions OPTION F7 list pins OPTION F8 option list OPTION F9 fm OPTION PLATFORM OLIMEX USB Thanks for the nice and very useful additions to the current firmware. Jan. |
||||||
This behaviour is correct. The status line shows the most information that it can. When the combination of the line number and the column number increase that field enough to collide with the status line the next smallest version of the status line is then used. This is a S/W limitation. In the editor, the mouse works by flipping the tile colours. There is no such mechanism available in mode 3, the character would have to be rewritten. The workaround is to switch back to mode 1 before editing. |
||||||
Peter, Thanks for the explanation. I understand. Jan. |
||||||
V6.03.00RC18 PicoMiteRP2040V6.03.00RC18.zip PicoMiteRP2350V6.03.00RC18a.zip PicoMiteRP2350V6.03.00RC18b.zip New HDMIWEB build - Web, HDMI and USB host rolled into one CPU SPEED command - change the cpu speed without a reboot RESOLUTION command - change the HDMI resolution without a reboot Various bugs fixed as identified previously in this thread See the updated manual for full details PicoMite_User_Manual.pdf Use the HDMIWEB build with a touch screen 1024x600 HDMI monitor and the On screen keyboard, print a case and you have a fully functional self-contained MMBasic tablet computer |
||||||
PicoMite MMBasic RP2040 V6.03.00RC18 Copyright 2011-2026 Geoff Graham Copyright 2016-2026 Peter Mather > option list PicoMite MMBasic RP2040 V6.03.00RC18 OPTION SYSTEM I2C GP20,GP21 OPTION COLOURCODE ON OPTION HEARTBEAT OFF OPTION PICO OFF OPTION CPUSPEED (KHz) 200000 OPTION DISPLAY 50, 100 OPTION F1 help OPTION F5 list commands OPTION F6 list functions OPTION F7 list pins OPTION F8 list system i2c OPTION F9 fm > list pins GP0 1 OFF GP1 2 OFF GP2 4 OFF GP3 5 OFF Press any key to continue GP4 6 OFF GP5 7 OFF GP6 9 OFF Press any key to continue GP7 10 OFF GP8 11 OFF GP9 12 OFF Press any key to continue > list pins [LIBRARY] Dim _q% Error : _Q already declared Jan. |
||||||
PicoMite MMBasic RP2040 V6.03.00RC18 Copyright 2011-2026 Geoff Graham Copyright 2016-2026 Peter Mather > option list PicoMite MMBasic RP2040 V6.03.00RC18 OPTION SYSTEM I2C GP20,GP21 OPTION COLOURCODE ON OPTION HEARTBEAT OFF OPTION PICO OFF OPTION CPUSPEED (KHz) 200000 OPTION DISPLAY 50, 100 OPTION F1 help OPTION F5 list commands OPTION F6 list functions OPTION F7 list pins OPTION F8 list system i2c OPTION F9 fm > list pins GP0 1 OFF GP1 2 OFF GP2 4 OFF GP3 5 OFF Press any key to continue GP4 6 OFF GP5 7 OFF GP6 9 OFF Press any key to continue GP7 10 OFF GP8 11 OFF GP9 12 OFF Press any key to continue > list pins [LIBRARY] Dim _q% Error : _Q already declared Also with RP2350. Jan. Edited 2026-06-13 08:17 by JanVolk |
||||||
I can't make either of my PicoCalcs do that with the Web 2350 version. |
||||||
| The Back Shed's forum code is written, and hosted, in Australia. |