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: GermanyPosts: 828 |
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 ZealandPosts: 2350 |
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: GermanyPosts: 828 |
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 ZealandPosts: 2350 |
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 KingdomPosts: 9115 |
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: GermanyPosts: 828 |
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: AustraliaPosts: 896 |
Try FONT 2 Latest F4 Latest H7 |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
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 KingdomPosts: 9115 |
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 ZealandPosts: 2350 |
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: AustraliaPosts: 2135 |
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 KingdomPosts: 6786 |
>>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 ZealandPosts: 2350 |
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 KingdomPosts: 6786 |
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 ZealandPosts: 2350 |
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 KingdomPosts: 2127 |
teraterm window can be dragged bigger to any size?? |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
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 KingdomPosts: 2127 |
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: AustraliaPosts: 2135 |
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 ZealandPosts: 2350 |
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 |