Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:50 30 May 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 : PicoMite V6.00.02 release candidates - all versions

     Page 28 of 48    
Author Message
mace
Newbie

Joined: 04/03/2023
Location: Finland
Posts: 9
Posted: 03:05pm 16 Apr 2025
Copy link to clipboard 
Print this post

  circuit said  
  mace said  
Something is different in PORT command in versions picomite_firmware v5.08.00 and picomiterp2040v6.00.01.
Test:
Port(gp4,4)=15 in V5 Works ok.
Port(gp4,4)=15 in V6 not working right.
Something changed between versions?


I have just tried it in v.5.08.00 and in version 6.00.02RC15 and it works identically.  No problems observed.

Edit. And Peter answered it in the couple of minutes that I took to test.



Hi!

Manipulating decoder CD4514BC.

V6,odd behavior on output.
V6 beta,not working at all.
V5,exellent and right output.

So,what is changed?

Thanks your answers.
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 462
Posted: 03:46pm 16 Apr 2025
Copy link to clipboard 
Print this post


> option list
PicoMiteHDMI MMBasic USB RP2350A Edition V6.00.02RC15
OPTION SERIAL CONSOLE COM2,GP8,GP9
OPTION SYSTEM I2C GP20,GP21
OPTION FLASH SIZE 4194304
OPTION COLOURCODE ON
OPTION KEYBOARD GR
OPTION CPUSPEED (KHz) 252000
OPTION RESOLUTION 640x480
OPTION SDCARD GP22, GP26, GP27, GP28
OPTION AUDIO GP10,GP11', ON PWM CHANNEL 5
OPTION RTC AUTO ENABLE
OPTION MODBUFF ENABLE  1024
OPTION PLATFORM HDMIUSB
> list
arg$=MM.CMDLINE$
Print "cmdline   : ";arg$
mytest(arg$)
End
Sub mytest(arg1$)
 Print "mytest sub: ";arg1$
End Sub
> run ,"cachedArg"
cmdline   : cachedArg
mytest sub: cachedArg
> edit                    --> EXIT with F2 RUN  
cmdline   : cachedArg
mytest sub: cachedArg     --> cmdline from history! This behaviour is good for testing!
> mytest "newArg"
mytest sub: newArg
> mytest TestError
Error : Incompatible type: TestError
> mytest "Test2"
[5] Sub mytest(arg1$)
Error : ARG1 Local variable already declared
> clear                   --> Only this helps, or RUN. But if in the LIBRARY ...
                             Catching errors is necessary, how?
> mytest "Test2"
mytest sub: Test2
>


Is this behaviour normal? Shouldn't the program continue to run anyway if it's called correctly?

Matthias
Edited 2025-04-17 01:47 by homa
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4943
Posted: 04:07pm 16 Apr 2025
Copy link to clipboard 
Print this post

  mace said  
  circuit said  
  mace said  
Something is different in PORT command in versions picomite_firmware v5.08.00 and picomiterp2040v6.00.01.
Test:
Port(gp4,4)=15 in V5 Works ok.
Port(gp4,4)=15 in V6 not working right.
Something changed between versions?


I have just tried it in v.5.08.00 and in version 6.00.02RC15 and it works identically.  No problems observed.

Edit. And Peter answered it in the couple of minutes that I took to test.



Hi!

Manipulating decoder CD4514BC.

V6,odd behavior on output.
V6 beta,not working at all.
V5,exellent and right output.

So,what is changed?

Thanks your answers.


Hi Mace’,

What is your program ? How did you Connect the 4514. What do you get with OPTION LIST
We van only help you if you provide information.

Thank you

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10106
Posted: 05:21pm 16 Apr 2025
Copy link to clipboard 
Print this post

  Quote  Is this behaviour normal? Shouldn't the program continue to run anyway if it's called correctly?


I suspect this is the same in all versions of MMbasic (untested). The error in the subroutine causes the firmware to longjmp back to the command prompt but has no way of deleting any local variables. These are normally cleaned up when you RUN  the program. However, you are not running a program, rather, you are just calling the subroutine again from the command line. If you RUN the program you won't get the error.
 
Elijah 2
Newbie

Joined: 08/03/2025
Location: United States
Posts: 6
Posted: 07:54pm 16 Apr 2025
Copy link to clipboard 
Print this post

I'd like to report an issue with WebMiteRP2040V6.00.02RC15.uf2 with my pico W.
Mysteriously, the text starts to invert when using TeraTerm after I enter and then exit Edit.  I use a white background and black text that changes to a black background and white text.
I tried reflashing but had the same behavior.
I've reverted back to: WebMiteRP2040V6.00.01.uf2 and all is well.
Edited 2025-04-17 06:08 by Elijah 2
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 462
Posted: 09:19pm 16 Apr 2025
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Is this behaviour normal? Shouldn't the program continue to run anyway if it's called correctly?


I suspect this is the same in all versions of MMbasic (untested). The error in the subroutine causes the firmware to longjmp back to the command prompt but has no way of deleting any local variables. These are normally cleaned up when you RUN  the program. However, you are not running a program, rather, you are just calling the subroutine again from the command line. If you RUN the program you won't get the error.


I know :-) But I stumbled across this because I want to call a routine from the "LIBRARY" from the command line and may need to intercept the user input here.
For example, add a direct input to the new "offline help" ... >help "display" ;-)
Unfortunately, I am running into this problem and wonder if and how the error could be intercepted.

Matthias
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10106
Posted: 09:41pm 16 Apr 2025
Copy link to clipboard 
Print this post

  Quote  Mysteriously, the text starts to invert when using TeraTerm after I enter and then exit Edit.  I use a white background and black text that changes to a black background and white text.


This is deliberate behaviour to avoid users leaving the console in an unusable state.
 
Elijah 2
Newbie

Joined: 08/03/2025
Location: United States
Posts: 6
Posted: 11:24pm 16 Apr 2025
Copy link to clipboard 
Print this post

  matherp said  
This is deliberate behaviour to avoid users leaving the console in an unusable state.


Unusable, I presume, by having the background and foreground color from being the same.  Makes sense; thanks!
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 299
Posted: 04:22am 17 Apr 2025
Copy link to clipboard 
Print this post

@homa

Not elegant or clean way, but

clear : help "display"


I know this problem and rised questions twice.

Peter kindly tried to help or advice, but with minor success.

While I understand,  any changes might lead to unpredicted system unstabilities etc., I think LIBRARY would be even more interesting feature, if variables would be cleared every time IF SUB FROM LIBRARY, is called FROM CMD LINE.
My MMBasic 'sand box'
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7643
Posted: 07:24am 17 Apr 2025
Copy link to clipboard 
Print this post

erm...
The Library is *supposed* to contain bits of code to be called from within programs, not additional command line commands. It happens to be working perfectly. :)  There is a special name for commands that you call from the command line. They are called "programs". ;)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
circuit
Senior Member

Joined: 10/01/2016
Location: United Kingdom
Posts: 271
Posted: 09:45am 17 Apr 2025
Copy link to clipboard 
Print this post

  Mixtel90 said  erm...
The Library is *supposed* to contain bits of code to be called from within programs, not additional command line commands. It happens to be working perfectly. :)  There is a special name for commands that you call from the command line. They are called "programs". ;)


That is not quite my understanding of the Library.  I quote from Geoff's original manual, topic 'The Library';
"However, the saved subroutines and functions can be called from within the main program and can even be run at the command prompt (just like a built in command or function)"
I certainly regard the Library as a most effective and ingenious way of adding commands and functions to a customised version of the language. I frequently use such commands from a command line.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10106
Posted: 10:00am 17 Apr 2025
Copy link to clipboard 
Print this post

You can run subroutines in the library from the command prompt. The issue is that if one of them creates an error you will have to manually clear down any hung variables before you can use that subroutine again. This is not an issue if you run a program as that does the clear automatically.
Moreover, this is nothing to do with the library. The same thing happens with a subroutine that errors in the main program space. You will not see the issue if a subroutine takes no parameters and doesn't declare any local variables
Edited 2025-04-17 20:04 by matherp
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 397
Posted: 11:09am 17 Apr 2025
Copy link to clipboard 
Print this post

  circuit said  
  Mixtel90 said  erm...
The Library is *supposed* to contain bits of code to be called from within programs, not additional command line commands. It happens to be working perfectly. :)  There is a special name for commands that you call from the command line. They are called "programs". ;)


That is not quite my understanding of the Library.  I quote from Geoff's original manual, topic 'The Library';
"However, the saved subroutines and functions can be called from within the main program and can even be run at the command prompt (just like a built in command or function)"
I certainly regard the Library as a most effective and ingenious way of adding commands and functions to a customised version of the language. I frequently use such commands from a command line.


If you want to run library commands such as CONST or OPTION ESCAPE, type RUN at a command prompt, even if there's no program in main memory. You will then be able to use those constants and call the SUBs. If you type NEW then all links are off until the next RUN. At least that seems to be the way it works for me.
Edited 2025-04-17 21:13 by toml_12953
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 299
Posted: 12:46pm 17 Apr 2025
Copy link to clipboard 
Print this post

@Peter, all you said is 200% correct.

If kind of "CLEAR" could be silently done at firmware side after user calls sub from library, exceptionally from command prompt, then manual statment would be not only correct as IT IS now, but also side benefit as LIBRARY subroutine could take parameters and declare local variables and call other LIBRARY subroutines, without fear of any possible errors. Would`nt it be more powerfull, questions free feature then ?
My MMBasic 'sand box'
 
electricat

Senior Member

Joined: 30/11/2020
Location: Lithuania
Posts: 299
Posted: 03:48pm 17 Apr 2025
Copy link to clipboard 
Print this post

Oh I see now, Homa is talking different thing I had imagined  
s**t
When I first time found list commands and list functions I was excited I will be able to check syntax if I need. But it was not.

But if calls could be made from firmware to A: or B: where TXT database is stored and if not present, then returns "there is no database present" or if it is, then returns syntax and descriptions etc... then it would be full inbuilt help... and easy maintained if TXT database structure well thinked and easy to change/add by user needs
My MMBasic 'sand box'
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7643
Posted: 04:03pm 17 Apr 2025
Copy link to clipboard 
Print this post

It's easy enough to test for the presence of a file using MM.INFO(exists file "myfile.txt")
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10106
Posted: 04:11pm 17 Apr 2025
Copy link to clipboard 
Print this post

I can easily add a "HELP arg$" command. This would look on the A: drive for a file "help.txt" search down the file for a line starting with "~"+arg$ and output everything from the end of arg$ until the next "~" to the console. However, I am not volunteering to create help.txt. I would propose a syntax of each command something like

  Quote  ~command:command param,[optional param]:multi-line if required text description
 
karlelch

Senior Member

Joined: 30/10/2014
Location: Germany
Posts: 232
Posted: 04:38pm 17 Apr 2025
Copy link to clipboard 
Print this post

Hi Peter,

First of all, the latest beta works for me w/o any problem - thanks!
I did run a few performance tests with my hexapod code for the v6 beta versions that I had at hand. It measures the time needed for a full inverse kinematics loop (18 DOF), which updates the calculations for the leg positions. Here are the results:

With the RP2040:
PicoMite MMBasic RP2040 Edition V6.00.02b6
OPTION LIBRARY_FLASH_SIZE  20000
OPTION HEARTBEAT OFF
OPTION CPUSPEED  150000 'KHz
comp=56.206 (56.944, n=29)

[...]
OPTION CPUSPEED  252000 'KHz
comp=33.277 (34.030, n=17)

[...]
OPTION CPUSPEED  315000 'KHz
comp=26.409 (27.569, n=10)

PicoMite MMBasic RP2040 Edition V6.00.02RC15
OPTION LIBRARY_FLASH_SIZE  20000
OPTION HEARTBEAT OFF
OPTION CPUSPEED (KHz) 150000
comp=53.280 (54.949, n=14)

[...]
OPTION CPUSPEED (KHz) 252000
comp=31.767 (32.467, n=15)

[...]
OPTION CPUSPEED (KHz) 315000
comp=25.349 (26.066, n=12)

[...]
OPTION CPUSPEED (KHz) 315000
OPTION FAST TRIG ON
comp=25.300 (25.857, n=17)


With the RP2350B:
PicoMite MMBasic RP2350B Edition V6.00.02RC15
OPTION FLASH SIZE 16777216
OPTION LIBRARY_FLASH_SIZE  48000
OPTION PICO OFF
OPTION CPUSPEED (KHz) 315000
OPTION PSRAM PIN GP47
OPTION FAST TRIG OFF
comp=13.070 (13.351, n=17)

[...]
OPTION FAST TRIG ON
comp=13.102 (13.439, n=13)


For the RP2040, the performance is nearly the same for b6 and RC15; it scales with the CPU speed, unsurprisingly.

It is much faster on the RP2350B. Interestingly (maybe unsurprisingly for you), PSRAM  on vs. off did not make a significant difference (not shown). What surprises me was that `OPTION FAST TRIG ON` did not have any effect although the code makes some use of trigonometry ...

Best
Thomas
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 397
Posted: 04:41pm 17 Apr 2025
Copy link to clipboard 
Print this post

  matherp said  I can easily add a "HELP arg$" command. This would look on the A: drive for a file "help.txt" search down the file for a line starting with "~"+arg$ and output everything from the end of arg$ until the next "~" to the console. However, I am not volunteering to create help.txt. I would propose a syntax of each command something like

  Quote  ~command:command param,[optional param]:multi-line if required text description


Like this?

~RESTORE:[lineno]:Restores data pointer to first DATA statement or, if optional lineno is included, to the beginning of the DATA statement on that line.
Edited 2025-04-18 02:43 by toml_12953
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10106
Posted: 05:36pm 17 Apr 2025
Copy link to clipboard 
Print this post

  Quote  Like this?

~RESTORE:[lineno]:Restores data pointer to first DATA statement or, if optional lineno is included, to the beginning of the DATA statement on that


nearly

  Quote  ~RESTORE:RESTORE [lineno]:Restores data pointer to first DATA statement or, if optional lineno is included, to the beginning of the DATA statement on that line.
 
     Page 28 of 48    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025