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.
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 644
Posted: 06:03pm 24 May 2026
Copy link to clipboard
Print this post
Since the LCD backlight isn't controlled by a GP pin on PicoCalc, I had to change line 229 to read:
Option Backlight LCD CtrlVal(sb_bright)
Of course, the change remains after the program ends so if you want the backlight to be unaffected by the program after it ends, you can save the current value when the program starts and restore it when the program ends.
mozzie Guru Joined: 15/06/2020 Location: AustraliaPosts: 347
Posted: 06:14pm 24 May 2026
Copy link to clipboard
Print this post
G'day Peter, As Phil said, this will keep many playing until late...
This is very close to perfect, HDMI Touchscreen with GUI controls is 99% working, bit() is working again and pos stays as pos.
During the process of writing a long and complicated response regarding the problem you have already updated a fix for, now I have read it and its time for bed.
Thanks again for making all this possible.
Regards, Lyle.
terekgabor Regular Member Joined: 02/01/2026 Location: HungaryPosts: 81
Posted: 06:26pm 24 May 2026
Copy link to clipboard
Print this post
Is it possible somehow to get actual values of LCD/KBD backlight with PicoCalc?
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11367
Posted: 08:40pm 24 May 2026
Copy link to clipboard
Print this post
Is it possible somehow to get actual values of LCD/KBD backlight with PicoCalc?
Yes, it is what you set it to. Or in other words: NO. MMBasic can't spoon feed everything. If you set the backlight to 30 then it is 30. It isn't reasonable for the interpreter to include more and more code and get bigger and bigger to tell the user what they have themselves done.
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 3229
Posted: 09:55pm 24 May 2026
Copy link to clipboard
Print this post
When ever you manually set the backlight follow with VAR SAVE. Make the last line of the program VAR RESTORE.
You could also put VAR RESTORE etc. in MM.STARTUP and save to the library to start with your preferred level. To ensure you never have a blank screen check if the restored value is too low and set a default.
JanVolk Guru Joined: 28/01/2023 Location: NetherlandsPosts: 354
Posted: 01:43am 25 May 2026
Copy link to clipboard
Print this post
Not working properly after WebMite MMBasic RP2350A Edition V6.03.00RC10.
WebMite MMBasic RP2350A Edition V6.03.00RC10 Copyright 2011-2026 Geoff Graham Copyright 2016-2026 Peter Mather
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 644
Posted: 03:29am 25 May 2026
Copy link to clipboard
Print this post
The test and flow rate work if you use D and U pointer trail shouldn't happen if the screen framebuffer is being read properly. Does PicoCalc properly wire the screen MISO and is it properly configured in the options? To change the backlight you would need to change he code to match whatever the correct Basic calls are to do it. I'm testing on a SSD1963_5_BUFF and everything works as expected.
I don't know if you did something specifically to fix it but now the Web version works with both WiFi and PSRAM active and there's no trail left by the mouse cursor in the GUI demo. Thanks for a great job!
mozzie Guru Joined: 15/06/2020 Location: AustraliaPosts: 347
Posted: 05:43am 25 May 2026
Copy link to clipboard
Print this post
G'day, This may be obvious to those with better MMbasic skills but posting it here in case anyone else spends hours trying to figure it out.
The setup is a 5" HDMI-Touch monitor being fed HDMI video from a PicoMiteHDMIUSB with a Pico-Zero connected to the XPT2046 touch panel sending co-ordinates back via the USB-CDC connection.
The Touch co-ordinates are recieved and an interrupt sub (RX_INT) parses the X/Y data and sets CLICK X,Y this is where the fun started.
It appears that if you set CLICK or CLICK X,Y in an interrupt sub (RX_INT) it doesn't fire the TOUCH routine on return. Strangely the GUI elements react as if touched but do not perform there function.
Next step, set CLICK DOWN in the RX_INT sub, this fires the first GUI element but no others.
Add CLICK UP at the end of the TOUCH_INT sub, this works for normal GUI elements but not the NUMBERBOX KEYPAD, only first key touched.
Add CLICK UP at the start of RX_INT now makes everything work but you can tell its a cludge, putting CLICK UP anywhere else or timing it doesn't seem to work.
The final solution was to set a flag in RX_INT and do CLICK X,Y in the main program loop and it all just works, although possibly only with the updated V6.03.00RC12
A question, can you set GUI CURSOR X,Y and call the TOUCH INTERRUPT SUB directly or will that cause headaches?
Regards, Lyle.
mozzie Guru Joined: 15/06/2020 Location: AustraliaPosts: 347
Posted: 05:55am 25 May 2026
Copy link to clipboard
Print this post
G'day Peter, A minor niggle, the GUI CONTROLS option is not shown in OPTION LIST on PicoMiteHDMIUSBV6.03.00RC12, keep forgetting to set it on update.
Regards, Lyle.
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11367
Posted: 07:20am 25 May 2026
Copy link to clipboard
Print this post
A minor niggle, the GUI CONTROLS option is not shown in OPTION LIST
Will fix, works for PicoMite, just not VGA/HDMI
It appears that if you set CLICK or CLICK X,Y in an interrupt sub (RX_INT) it doesn't fire the TOUCH routine on return. Strangely the GUI elements react as if touched but do not perform there function.
This can't work. I will include code so that any attempt to use gui click/up/down from inside an interrupt routine generates an error and document accordingly
If you really really need to queue an interrupt from within an interrupt routine you could configure an I/O pin with gui click pin and loop another pin to it then set the other pin in the interrupt. This will then queue the interrupt.
Not working properly after WebMite MMBasic RP2350A Edition V6.03.00RC10.
Haven't got a RP2350A web board to test with but works perfectly on a rp2350B. Will be mid next week before I can test on a Pico2-W Edited 2026-05-25 17:30 by matherp
homa Guru Joined: 05/11/2021 Location: GermanyPosts: 584
Posted: 08:39am 25 May 2026
Copy link to clipboard
Print this post
Is it possible somehow to get actual values of LCD/KBD backlight with PicoCalc?
Yes, it is what you set it to. Or in other words: NO. MMBasic can't spoon feed everything. If you set the backlight to 30 then it is 30. It isn't reasonable for the interpreter to include more and more code and get bigger and bigger to tell the user what they have themselves done.
In principle, that's correct, but unfortunately, with the PicoCalc, the user can adjust the brightness—and thus the value—using the keyboard. That's why it's definitely worth reading this value within the program. Up until now (<RC9), I wasn't able to dim the screen (turn off the backlight) when I set the value to 0. Is that possible now?
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11367
Posted: 09:21am 25 May 2026
Copy link to clipboard
Print this post
Up until now (<RC9), I wasn't able to dim the screen (turn off the backlight) when I set the value to 0. Is that possible now?
No idea, for the PicoCalc I just incorporated the routines from Ernst and borrowed a unit while I got it all working. As to the behaviour of the stm32 and what it can or can't do - I've no idea. You should assume that the PicoCalc integration is fixed and final although it will benefit from ongoing normal firmware changes.
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 644
Posted: 12:02pm 25 May 2026
Copy link to clipboard
Print this post
Up until now (<RC9), I wasn't able to dim the screen (turn off the backlight) when I set the value to 0. Is that possible now?
Why not try it and see?
Option Backlight LCD 0
only makes the backlight very dim. It doesn't turn it off. Edited 2026-05-25 22:03 by toml_12953