Posted: 03:05pm 16 Apr 2025 Copy link to clipboard
mace Newbie
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.
Posted: 03:46pm 16 Apr 2025 Copy link to clipboard
homa Guru
> 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
Posted: 04:07pm 16 Apr 2025 Copy link to clipboard
Volhout Guru
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
Posted: 05:21pm 16 Apr 2025 Copy link to clipboard
matherp Guru
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.
Posted: 07:54pm 16 Apr 2025 Copy link to clipboard
Elijah 2 Newbie
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
Posted: 09:19pm 16 Apr 2025 Copy link to clipboard
homa Guru
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
Posted: 09:41pm 16 Apr 2025 Copy link to clipboard
matherp Guru
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.
Posted: 11:24pm 16 Apr 2025 Copy link to clipboard
Elijah 2 Newbie
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!
Posted: 04:22am 17 Apr 2025 Copy link to clipboard
electricat Senior Member
@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.
Posted: 07:24am 17 Apr 2025 Copy link to clipboard
Mixtel90 Guru
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". ;)
Posted: 09:45am 17 Apr 2025 Copy link to clipboard
circuit Senior Member
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.
Posted: 10:00am 17 Apr 2025 Copy link to clipboard
matherp Guru
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
Posted: 11:09am 17 Apr 2025 Copy link to clipboard
toml_12953 Guru
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
Posted: 12:46pm 17 Apr 2025 Copy link to clipboard
electricat Senior Member
@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 ?
Posted: 03:48pm 17 Apr 2025 Copy link to clipboard
electricat Senior Member
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
Posted: 04:03pm 17 Apr 2025 Copy link to clipboard
Mixtel90 Guru
It's easy enough to test for the presence of a file using MM.INFO(exists file "myfile.txt")
Posted: 04:11pm 17 Apr 2025 Copy link to clipboard
matherp Guru
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
~command:command param,[optional param]:multi-line if required text description
Posted: 04:38pm 17 Apr 2025 Copy link to clipboard
karlelch Senior Member
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:
[...] 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
Posted: 04:41pm 17 Apr 2025 Copy link to clipboard
toml_12953 Guru
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
~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
Posted: 05:36pm 17 Apr 2025 Copy link to clipboard
matherp Guru
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
~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 38
The Back Shed's forum code is written, and hosted, in Australia.