Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:36 26 Nov 2024 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 : Problem with 'OPTION LCDPANEL CONSOLE'

     Page 1 of 3    
Author Message
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 828
Posted: 09:50am 28 Feb 2024
Copy link to clipboard 
Print this post

Hi,

I have a USB Picomite with a 320x240 ILI9488 display.
Now I have played around a bit with the font sizes and changed the current font size with 'OPTION LCDPANEL CONSOLE 5'.
Now my input line is so short because of the large font size that I can no longer undo this!  
Unfortunately, 'OPTION LCDPANEL CONSOLE' can only be called up in the command line. Otherwise I could have started a program with the text content 'OPTION LCDPANEL CONSOLE 7'...
Does anyone have any ideas?



Frank
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 10:31am 28 Feb 2024
Copy link to clipboard 
Print this post

  Frank N. Furter said  [...] my input line is so short because of the large font size that I can no longer undo this! Unfortunately, 'OPTION LCDPANEL CONSOLE' can only be called up in the command line [...]


hi Frank,
   i have raised this issue before, although in relation to the picomite VGA. the length of the command line is limited to whatever mmbasic 'thinks' the screen width is. the same limitation applies to line lengths when in the editor. and the same limitation also applies to entry via the serial/USB console too - so you can't just plug in a serial terminal and type in a (long) command line that exceeds the VGA or LCD panel width.

the end result is that many of the more complex OPTION lines are impossible to enter unless you carry out some terminal configuration gymnastics first. i've also raised this issue before, but been ignored.

really, the command line length should not be so limited, and you should be able to type in a command line that spans up to several screen/LCD display lines unencumbered.

as far as i can tell, the mx170 verison of mmbasic does not suffer from this limitation:

Micromite MKII MMBasic Ver 5.05.03
Copyright 2011-2020 Geoff Graham

> option display 20, 40
> ? "the quick brown fox jumps over the lazy dog who is asleep all day long"
the quick brown fox jumps over the lazy dog who is asleep all day long
>
>



cheers,
rob  :-)
Edited 2024-02-28 20:43 by robert.rozee
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 828
Posted: 10:43am 28 Feb 2024
Copy link to clipboard 
Print this post

  robert.rozee said  really, the command line length should not be so limited, and you should be able to type in a command line that spans up to several screen/LCD display lines.


Yes, but it is:



The cursor automatically jumps to the next line, but this line is no longer accepted...

Frank
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 10:47am 28 Feb 2024
Copy link to clipboard 
Print this post

  Frank N. Furter said   [...] the cursor automatically jumps to the next line, but this line is no longer accepted


and in my view, that is a bug. or, if one prefers, an 'unreasonable limitation'. what worked on the mx170 version of mmbasic no longer works on the picomite.


cheers,
rob   :-)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 11:04am 28 Feb 2024
Copy link to clipboard 
Print this post

  Quote  what worked on the mx170 version of mmbasic no longer works on the picomite.


Wrong: the MX170 does not support console mode and the MM+, which does, has the same limitation.

The console firmware generates a cr/lf when it reaches the end of the screen width. This is how every version of MMBasic with a console mode works

Clear flash and re-program
Edited 2024-02-28 21:07 by matherp
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 828
Posted: 11:11am 28 Feb 2024
Copy link to clipboard 
Print this post

  matherp said  Wrong: the MX170 does not support console mode and the MM+, which does, has the same limitation.


I'm not saying it's a bug, but do you have any idea what I could do?
Is there any other possibility besides 'OPTION RESET'? That would be the only thing I could think of...  

Frank
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 896
Posted: 11:31am 28 Feb 2024
Copy link to clipboard 
Print this post

Try
FONT 2
Latest F4 Latest H7
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 11:33am 28 Feb 2024
Copy link to clipboard 
Print this post

  matherp said  Wrong: the MX170 does not support console mode [...]


not quite sure what planet you are living on Peter, but the mx170 only supports console mode; all interaction is via a serial console. here is a screen capture:



as you can see, the command line wraps but is still interpreted correctly when the enter key is pressed.


cheers,
rob   :-)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9115
Posted: 11:37am 28 Feb 2024
Copy link to clipboard 
Print this post

OPTION LCDPANEL CONSOLE only relates to LCD/VGA displays a serial console is completely different. The MM2 DOES  NOT SUPPORT OPTION LCDPANEL CONSOLE.
Frank used OPTION LCDPANEL CONSOLE to get the problem
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 11:56am 28 Feb 2024
Copy link to clipboard 
Print this post

  matherp said  [...] a serial console is completely different [...]


nope Peter, it is not completely different.

Frank typed in a command (OPTION LCDPANEL CONSOLE 5) that reconfigured the VGA/LCD output to use a font that results in mmbasic thinking that it is talking to a screen that looks to be 21 (13, see below) columns wide by 10 (7, see below) lines high (based upon his screen capture of a TeraTerm window). mmbasic, in error (in my opinion), then decided it would thereafter limit the command line to a maximum length of around 18 characters.

the 18 (11) character (or thereabouts) limit on the command line length prevented Frank from being able to type in anything to recover from the situation. this is, in technical terms, what a reasonable person would consider a BUG.


cheers,
rob   :-)

addendum: Frank mentions his attached screen is 320x240. using font 5 this would give, by my calculations, a screen size of a mere 13 columns by 7 lines. of these 13 columns, 2 are consumed with the command prompt, so only 11 are usable for typing a command.
Edited 2024-02-28 22:22 by robert.rozee
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 11:57am 28 Feb 2024
Copy link to clipboard 
Print this post

Not sure if this will fit but worth a try.
On another Pico set the options you want then make an .OPT file with the shortest name. (if you don't use an extension it will add .OPT)

Option Disk Save"x.o"

Copy that to an SD card:- copy "x.o"to"b:x.o"
transfer that to the problem Pico:-

b:
copy "x.o"to"a:x.o"
then
Option Disk Load"x.o"

Edit.
If the width is only 18 characters as Rob says then it is still too long.
Edit 2.
I count 21 so perhaps it can just be done, removing as many spaces as possible.
Edited 2024-02-28 22:08 by phil99
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6786
Posted: 01:24pm 28 Feb 2024
Copy link to clipboard 
Print this post

>>Puzzled<<
Why would anyone want such a short console line? Console is a programming & debugging environment, not a user display. A user shouldn't see it, so even if a short display is to be shown to the user the console can still be a long line length.
Mick

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

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 02:01pm 28 Feb 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  >>Puzzled<<
Why would anyone want such a short console line? Console is a programming & debugging environment, not a user display. A user shouldn't see it, so even if a short display is to be shown to the user the console can still be a long line length.


the problem is that when the font that mmbasic uses for the VGA or LCD screen is set to something wide, then the length of command line that mmbasic accepts from an attached terminal is shortened. i first observed this some months back with a picomite VGA.

try the following:
1. take a brand new picomite VGA and attach a VGA screen to it,
2. now also connect it via USB to your PC and run TeraTerm or some other terminal emulator,
3. just to be sure, type into your terminal emulator OPTION RESET so that we are in a fresh-out-of-the-box state.
4. and then type in OPTION LCDPANEL CONSOLE 5
5. now try typing into your terminal emulator something like:
? "the quick brown fox jumps over the lazy dog who is asleep all day long"

you will find that the print statement you type in is not accepted. you will also find that you can not type in:
OPTION LCDPANEL CONSOLE 1

the same holds for a picomite configured with an LCD panel. however, an mx170 does not exhibit this behaviour; if it is configured for a screen width of, for instance, 40 columns, you can still type in up to an 80 character command line without an error occurring.


cheers,
rob   :-)
Edited 2024-02-29 01:02 by robert.rozee
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6786
Posted: 05:51pm 28 Feb 2024
Copy link to clipboard 
Print this post

But why have a *console* narrower than 40 characters? I can understand why you might want the user display to have especially wide characters, but the console isn't for the user and shouldn't use a wide font. Ideally, on an error, the system should drop out into mode 1 or, at least, into the default font.
Mick

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

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 08:00pm 28 Feb 2024
Copy link to clipboard 
Print this post

i'm sorry Mick, but i can't make a simpler explanation of the problem for you and Peter. perhaps someone else could have a go at explaining this?


cheers,
rob.
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2127
Posted: 08:12pm 28 Feb 2024
Copy link to clipboard 
Print this post

teraterm window can be dragged bigger to any size??
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 08:28pm 28 Feb 2024
Copy link to clipboard 
Print this post

  stanleyella said  teraterm window can be dragged bigger to any size??


i'm afraid it has nothing to do with the terminal window size. it is to do with mmbasic on the picomite truncating the command line someone types in to, in some circumstances, just a dozen characters or so.


cheers,
rob   :-)
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2127
Posted: 09:03pm 28 Feb 2024
Copy link to clipboard 
Print this post

you mean use the lcd as a console? says in the manual you can but why?
on a 320x240? a 7" vga is ok as a minimum to read easy
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 09:19pm 28 Feb 2024
Copy link to clipboard 
Print this post

Console on serial (SPI) LCDs is a recent addition but is very slow, which is why it was not available in the past. More pixels = slower still, An ILI8488 takes a long time to scroll.
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 09:15am 29 Feb 2024
Copy link to clipboard 
Print this post

  stanleyella said  you mean use the lcd as a console? says in the manual you can but why?
on a 320x240? a 7" vga is ok as a minimum to read easy


a picomite VGA, as it is initially configured, sends the output from PRINT statements to both the attached VGA screen and out the USB serial port. if you are running a terminal emulator on your PC that can handle 80 columns by 40 lines, when you type in EDIT at the command prompt the editor's screen will appear on both the attached VGA monitor and within the terminal emulator.

the important point: the picomite VGA tries to keep the number of columns and rows on your terminal emulator set the same as the number of columns and rows it thinks the attached VGA screen can display, so as to be able to display the same information in both places while editing.

if you have previously typed in OPTION LCDPANEL CONSOLE 5 at the command prompt, the picomite VGA will, when starting up the editor, send a non-VT escape sequence to your terminal emulator to try and set it to display 26 columns by 15 lines. TeraTerm and some other terminal emulators know about this particular escape sequence, some other terminal emulators do not.


now, lets say you have at some time typed in OPTION LCDPANEL CONSOLE 5 at the command prompt of your picomite VGA. then, just after doing this, lets say you have taken a small picaxe and buried the business end of it into the middle of your VGA monitor's screen. you will, undoubtedly, no longer see anything meaningful displayed on the VGA screen thereafter.

however, your PC is still working fine, and it is likely still running the terminal emulator. but if you try to type into the terminal emulator something like:
PRINT "the quick brown fox jumps over the lazy dog who is asleep all day long"
the picomite VGA will respond, within the terminal emulator, with the message:
Error : Unknown command

if, instead of a picomite VGA, you have a regular picomite configured to drive a 320x240 LCD module, from what Frank has observed you have bricked it, and the only option is to power up with the bootsel button pressed and wipe the flash clean to get rid of the errant OPTION you had entered.


the reason for the above sticky situation: whatever number of columns the picomite thinks you have available to you, dictates the maximum number of characters that will be accepted at the command prompt - be that prompt displayed on a VGA monitor, LCD module, or terminal window.

this IS a pretty major design flaw, and as it happens one that is pretty trivial to fix!


cheers,
rob   :-)
Edited 2024-02-29 19:36 by robert.rozee
 
     Page 1 of 3    
Print this page
© JAQ Software 2024