Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:32 08 Jun 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 19 of 51    
Author Message
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 427
Posted: 11:20am 02 Apr 2025
Copy link to clipboard 
Print this post

  Quote  
Please post your full option list and a program that when you edit causes a crash

Sorry, as our discussion was just one page before..will take care in future


> option list
PicoMiteVGA MMBasic RP2350B Edition V6.00.02RC9
OPTION FLASH SIZE 16777216
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION PICO OFF
OPTION CPUSPEED (KHz) 360000
OPTION RESOLUTION 800x600
OPTION DISPLAY 50, 100
OPTION SDCARD GP41, GP40, GP39, GP42
OPTION PSRAM PIN GP47


While running:
RAM:
  9K ( 0%) 76 Variables
3282K (52%) General
3001K (48%) Free
Program:
 13K ( 7%) Program (302 lines)
171K (93%) Free

Saved Variables:
 16K (100%) Free

RAM:
  9K ( 0%) 76 Variables
4688K (74%) General
1595K (26%) Free


It runs superb now.

edit:
maybe irrelevant but I mentioned, that "mm.info(fontwidth)" was changed into "DateTime$(fontwidth)" at one line in my program which persisted during update.
Edited 2025-04-02 21:24 by dddns
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2514
Posted: 11:56am 02 Apr 2025
Copy link to clipboard 
Print this post

  Quote  "mm.info(fontwidth)" was changed into "DateTime$(fontwidth)" at one line in my program
Sometimes updates involve changes to the allocation of command tokens so the main program and library routines, which have already been tokenised will have those commands changed.
When that happens it is best to reload them all so they get new tokens.
 
ville56
Senior Member

Joined: 08/06/2022
Location: Austria
Posts: 220
Posted: 12:35pm 02 Apr 2025
Copy link to clipboard 
Print this post

RC9 needs to reload the basic sourcecode, the tokens seem to have changed. Same here with another program, mm.info(pinno gp0) was the troublemaker. Just reloaded and all was good again.
                                                                 
73 de OE1HGA, Gerald
 
mozzie
Senior Member

Joined: 15/06/2020
Location: Australia
Posts: 123
Posted: 01:12pm 02 Apr 2025
Copy link to clipboard 
Print this post

Peter,
Many thanks for RC9 and the MM.FLAGS function, being able to check the state of the entire register is important IMHO.
Also makes checking of multiple flags at once is possible.

Regards,
Lyle.
 
homa

Guru

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

  matherp said  
New Commands and Functions (V6.00.02RC0)

Command BIT(var%,bitno)=0 or 1  'sets a specific bit (0-63) in an integer variable
Function BIT(var%,bitno) 'returns the value of a specific bit (0-63) in a integer variable (0 or 1)
These make it very easy to use flags in a program with minimum memory usage
...


  matherp said  V6.00.02RC9 is available on
https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip

Fixes bug in LIST PINS
Removes BIT command and BIT functions

Adds
FLAG(n)=0/1 'n=0 to 63
? FLAG(n)
? MM.FLAGS

This gives you 64 flag bits without having to allocate a variable. MM.FLAGS returns the value of all 64 flag bits. NB: this will appear as a negative integer is flag 63 is set. All flags are set to zero when a program is run.



Too bad. I think it would be better to use a separate variable. Then you can define the FLAGS at the start of the program in one go.
It is also no longer possible to do simple BIT operations in an integer variable. This is really useful for some interface protocols! Can the BIT command and function also remain?

Matthias
Edited 2025-04-02 23:50 by homa
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10135
Posted: 02:27pm 02 Apr 2025
Copy link to clipboard 
Print this post

  Quote  It is also no longer possible to do simple BIT operations in an integer variable.

b%=1<<n
a% = a% or b%
a% = a% and inv b%
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 427
Posted: 03:34pm 02 Apr 2025
Copy link to clipboard 
Print this post

> option list
PicoMiteVGA MMBasic RP2350B Edition V6.00.02RC9
OPTION FLASH SIZE 16777216
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION PICO OFF
OPTION CPUSPEED (KHz) 360000
OPTION RESOLUTION 800x600
OPTION DISPLAY 50, 100
OPTION SDCARD GP41, GP40, GP39, GP42
OPTION PSRAM PIN GP47


When exiting the editor, it seems to send a escape sequence different to versions before. The console font is set to white/black now for the standard console output. Nothing important, but maybe someone can confirm?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10135
Posted: 03:52pm 02 Apr 2025
Copy link to clipboard 
Print this post

  Quote   The console font is set to white/black now for the standard console output. Nothing important, but maybe someone can confirm?


It does, the firmware tries to protect the user from exiting into an unusable state.
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 427
Posted: 04:47pm 02 Apr 2025
Copy link to clipboard 
Print this post

  Quote  
It does, the firmware tries to protect the user from exiting into an unusable state.


Just to get it right:

I open a putty console with fc=black and bc=white

it was:  open editor with white bc and then leave it and my console stays as configured in putty

it is:  open editor with white bc and then leave it and my console is fc=white bc=black from then on. Opening the editor once more, and the bc within the editor is white again, leaving it turns to fc=white bc=black again

This is wanted now?
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7686
Posted: 06:29pm 02 Apr 2025
Copy link to clipboard 
Print this post

The Pico has no idea how Putty is configured, and never did. They are two different things. The only way that Putty can change it's colours dynamically is if it is sent VT52/VT100 ESC codes by the Pico.

The Editor can be seen via a serial or USB console or via the display device and they are different. When you see it via the console any colours are set by the terminal emulator program. When seen via the display device they are set by the Pico.

MMBasic protects you from dropping out of the program and into the command line with the background and foreground colours the same. It does this by setting FC = white, BC = black. It can't protect against you deliberately doing this on the terminal emulator though. :)

Note that the console display can appear on the default display device as well as on the serial or USB connected terminal emulator. This then puts colour control onto the Pico - just to add to the confusion. :)

.
Edited 2025-04-03 04:31 by Mixtel90
Mick

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

Joined: 20/09/2024
Location: Germany
Posts: 427
Posted: 06:33pm 02 Apr 2025
Copy link to clipboard 
Print this post

  Quote  MMBasic protects you from dropping out of the program and into the command line

red light on :)  ..don't need and wanna be protected by a firmware
This behaviour is new, let's see..
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7686
Posted: 09:04pm 02 Apr 2025
Copy link to clipboard 
Print this post

Dropping out to black text on a black background is confusing to say the least. :)
You don't even know why as you can't see any error messages. In fact, you may not even know the power is still on in some circumstances.
Mick

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

Joined: 03/01/2025
Location: Germany
Posts: 75
Posted: 09:25pm 02 Apr 2025
Copy link to clipboard 
Print this post

  matherp said  
  Quote   The console font is set to white/black now for the standard console output. Nothing important, but maybe someone can confirm?


It does, the firmware tries to protect the user from exiting into an unusable state.


A very good idea in principle!
A suggestion that followers of both "philosophies" might be able to live with: change colors when foreground==background.
And then foreground=complementary_color(background) ?

bfwolf
 
JanVolk
Senior Member

Joined: 28/01/2023
Location: Netherlands
Posts: 231
Posted: 09:29pm 02 Apr 2025
Copy link to clipboard 
Print this post

Still seen some strange things.

1.
The backlight command does not work well with an oled i2c screen.
The dimming should work from 0%-100% but only works up to 10% - 100% with a reduction in brightness and at < 10% I see no change anymore and the display certainly does not turn off.

2.
> option list
PicoMite MMBasic RP2350A Edition V6.00.02RC9
OPTION SYSTEM I2C GP4,GP5
OPTION FLASH SIZE 16777216
OPTION COLOURCODE ON
OPTION HEARTBEAT OFF
OPTION PICO OFF
OPTION CPUSPEED (KHz) 150000
OPTION DISPLAY 44, 96
OPTION SDCARD GP15, GP10, GP11, GP12
OPTION RTC AUTO ENABLE

All list commands work normally again.

After an error message or with Ctrl+C and after leaving edit Tera Term does not go to the saved setup settings regarding my own foreground colors and screen foreground is white and background is black.
When I restart Tera Term I have my own color setup again.

3.
I have been struggling for a while with a problem that a memory leak may occur in the chr$() function
I am working on a program with a 4x20 LCD and normally works fine with an LCDI2C subroutine. When defining characters yourself with a maximum of 8 pieces, you can for example make a degree sign LCDI2C_CMD(64) and LCDI2C_DATA() and read it with LCDI2C LINE,CHAR,Chr$(0).
Normally this works fine but sometimes it doesn't and the Chr$() place is overwritten and cannot be restored by a reset, possibly by a memory leak and by flashing again it works fine again for a while.
No problem with small programs, but with me it is a bit bigger and therefore problems. Has anyone else experienced this or does anyone know a solution for this problem?
It also occurs in the latest firmware version see point 2.

Greetings,

Jan.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2927
Posted: 09:35pm 02 Apr 2025
Copy link to clipboard 
Print this post

I have a really sensible solution to all this but I don't know how it will be received. Let me try explain.

It is based on the fact that MMBASIC has just three 'modes' as follows:
1> Command Prompt
2> Editor
3> Program Running

The user will simply be switching between these modes; for example from 1 to 3 by typing RUN (or F2), or from 1 to 2 by typing EDIT (or F4). Likewise, from 3 to 1 (and only to 1 - not possible from 3 to 2) by either CTRL-C or the program terminating.

So, at the time of switching from one of the three modes above to another one, the following simple logic would give the user full control:

When entering 1 - the two default 'Command Prompt' colours are used (see *** below)
When entering 2 - IF Colourcode ON then use those colours, otherwise use the two default 'Editor' colours (see *** below)
When entering 3 - the program code controls the colours (and uses 'Command Prompt' colours by default (i.e. if non defined in program code).


Ideally, something like OPTION TERMINAL COLOUR fcolour,bcolour and OPTION EDITOR fcolour,bcolour to set those two settings (noting that the EDITOR defined colours are only relevant if COLOURCODE OFF).

IF in 1 (command prompt), then typing any colour command will dynamically act dynamically as it currently does.

To clarify - the logic above is just when 'entering' into 1, 2, or 3.

The above may seem complex to read/follow, but I believe this logic is bullet-proof logic and satisfies all scenarios whether using a console, a display-module, or VGA/HDMI monitor/screen; and also not broken by the MODE or RESOLUTION commands (VGA/HDMI).
 
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 427
Posted: 09:49pm 02 Apr 2025
Copy link to clipboard 
Print this post

  Quote  the firmware tries to protect the user from exiting into an unusable state.

Why not falling back to the default it was coming from? Or, even better, falling back to one which can be set.
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2927
Posted: 10:10pm 02 Apr 2025
Copy link to clipboard 
Print this post

  dddns said  Or, even better, falling back to one which can be set.


Exactly what I propose above.

To emphasise the benefits:

1. The program code can do whatever it wants with colours - it is up to the programmer to avoid 'errors'.

2. When a running program is exited/terminates, the user is always returned to a command prompt in the preferred colours they have defined (OPTION TERMINAL COLOUR). and hence the user will never be left in a 'unknown' state (i.e. the program code will not define the command-prompt colours!).

3. When using the editor, different colours (than what is used for the command prompt) can be defined (OPTION EDITOR COLOUR) and are ignored if COLOURCODE ON
 
JanVolk
Senior Member

Joined: 28/01/2023
Location: Netherlands
Posts: 231
Posted: 11:42pm 02 Apr 2025
Copy link to clipboard 
Print this post

The problem may be in LCDI2C, LINE, CHAR, Chr$(Status_KAS) , Chr$(Status_Meteo) , Chr$(Status_Arrow_DOWN) , Chr$(Status_Arrow_UP) or Chr$(Status_RAAM) because after turning off these Chr$() functions the disturbance stopped?

Greetings,

Jan.
 
guma1975
Newbie

Joined: 13/01/2023
Location: Poland
Posts: 16
Posted: 07:04am 03 Apr 2025
Copy link to clipboard 
Print this post

Do you have the same? Fresh install.. RC7 ok above files shows strange amount of available memory...

PicoMite MMBasic RP2350B Edition V6.00.02RC7
Copyright 2011-2025 Geoff Graham
Copyright 2016-2025 Peter Mather

> files
A:/
  <DIR>  .
  <DIR>  ..
00:00 01-01-2024          4  bootcount
2 directories, 1 file, 167936 bytes free
> memory
Program:
  0K ( 0%) Program (0 lines)
256K (100%) Free

Saved Variables:
 16K (100%) Free

RAM:
  0K ( 0%) 0 Variables
  0K ( 0%) General
304K (100%) Free
>
PicoMite MMBasic RP2350B Edition V6.00.02RC9
Copyright 2011-2025 Geoff Graham
Copyright 2016-2025 Peter Mather

> files
A:/
  <DIR>  .
  <DIR>  ..
00:00 01-01-2024          4  bootcount
2 directories, 1 file, 36864 bytes free
> memory
Program:
  0K ( 0%) Program (0 lines)
288K (100%) Free

Saved Variables:
 16K (100%) Free

RAM:
  0K ( 0%) 0 Variables
  0K ( 0%) General
336K (100%) Free
>
 
58kk90
Regular Member

Joined: 14/06/2023
Location: United Kingdom
Posts: 61
Posted: 07:43am 03 Apr 2025
Copy link to clipboard 
Print this post

Question for Peter really, in an earlier post he wrote

Command BIT(var%,bitno)=0 or 1  'sets a specific bit (0-63) in an integer variable
Function BIT(var%,bitno) 'returns the value of a specific bit (0-63) in a integer variable (0 or 1)
These make it very easy to use flags in a program with minimum memory usage

I tried this and found it extremely useful and have used it several pieces of code, but it now appears that it has been removed in the latest beta, so the question is, will it come back? if not where can I still download the version that has it?
I unfortunately downloaded the latest beta and deleted the old downloaded zip file on my PC and I wish to use the version having the bit function but no longer have it nor can I seem to find it to download.

Tony
 
     Page 19 of 51    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025