Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:32 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 : usb vga prob?

Author Message
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2127
Posted: 07:55pm 19 Mar 2024
Copy link to clipboard 
Print this post

hi. if I power up vga usb and autorun on then prog starts, cls.. prints message but then message about keyboard gets printed.
a pause needed in user code or in firmware?

 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6786
Posted: 08:38pm 19 Mar 2024
Copy link to clipboard 
Print this post

Are you relying on the screen to start up blank? You can't use CLS on the console as it's a graphics command,

Try:
print chr$(27);"[2J"
to clear the console screen.
Mick

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

Guru

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

Hi Mick, simple code but only power up autorun prob. code "works" when a key pressed.
if autorun off then just uk kb message until I reflash from win mmedit pc or mmcc or type on pico usb kb.

'lunar lander vga 640x480
OPTION EXPLICIT
OPTION BASE 1
option autorun on

dim integer lx(43)=(0,5,9,13,3,18,25,30,48,53,57,47,32,11,5,9,57,89,108,149,170,220,262,300,320,400,447,493,510,545,572,600,638,605,590,577,560,513,495,470,457,500,639)
dim integer ly(43)=(0,7,15,25,40,70,100,130,130,160,193,253,298,346,420,430,430,400,370,457,450,400,440,466,424,400,460,460,452,403,373,320,240,210,190,170,130,120,137,110,60,26,0)
dim integer l,o,fno,fnc,spnum
dim lander_x,lander_y,last_lander_x,last_lander_y,gravity,inertia,antigravity,k$
lander_x=260:lander_y=10:gravity=0.0001:inertia=0
'
mode 1
cls
'
sprites 'set up lander sprites
text 170,180,"d      shift s   shift f      s         f"
for l=1 to 6
sprite WRITE l,l*80,200
NEXT
'
text 200,120,"Press any key to start"
do
loop until inkey$<> ""
'


PicoMiteVGA MMBasic USB Edition  5.09.00b5
PTION SERIAL CONSOLE COM2,GP8,GP9
OPTION AUTORUN  ON
OPTION COLOURCODE ON
OPTION KEYBOARD UK
OPTION CPUSPEED (KHz) 252000
OPTION SDCARD GP13, GP10, GP11, GP12
>
no console afaik
Edited 2024-03-20 07:23 by stanleyella
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6786
Posted: 09:22pm 19 Mar 2024
Copy link to clipboard 
Print this post

The USB message would normally be sent to the console. If you are using a VGA monitor then I wouldn't expect to see this unless you were using OPTION LCDPANEL CONSOLE. Try entering OPTION LCDPANEL NOCONSOLE at the prompt and see if that works.
Mick

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

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2127
Posted: 10:07pm 19 Mar 2024
Copy link to clipboard 
Print this post

nocosole worked. I don't remember setting it on, messing with lcd terminal.
mmcc different and nothing on the vga I didn't put there. control c stops code but no >
thanks stan
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2350
Posted: 01:30am 20 Mar 2024
Copy link to clipboard 
Print this post

  stanleyella said  nocosole worked. I don't remember setting it on, messing with lcd terminal.
mmcc different and nothing on the vga I didn't put there. control c stops code but no >
thanks stan


hi stanleyella,
   the default out-of-the-box configuration for all picomite VGA variants (both USB and PS/2) is for both keyboard/VGA and serial console to be active. this corresponds to OPTION LCDPANEL CONSOLE being set.

this is necessary so that the VGA picomites can be initially turned on and will operate as a standalone boot-to-basic computer, just like it was 1985 again. at the same time, you can still attach via a serial console (or serial over USB) and operate the picomite VGA via a terminal emulator such as TeraTerm or GFXterm if you wish to.

in this default configuration mmbasic sends text to the VGA screen, as well as to the (serial) console. and mmbasic also responds to both an attached keyboard as well as data received from a console - just like what happens when you plug two keyboards or mouses into a PC.


with the picomite VGA+USB, whenever a USB keyboard is connected or unplugged mmbasic generates a message, as you have seen. in the default configuration this message is displayed on both the VGA screen as well as being sent to the serial console. it could be argued that these keyboard attach/detach messages are diagnostic messages that should be removed from mmbasic, but if i were to ask Peter about this it would simply ensure that said messages would be retained in perpetuity.


the instructions Mixtel90 have given you (setting OPTION LCDPANEL NOCONSOLE) severs the link to the VGA screen; PRINT statements will no longer be displayed on the VGA screen, error messages will no longer be displayed on the VGA screen, keypresses (from keyboard or serial) will no longer be echoed to the VGA screen.

when configured in this way, the only way of sensibly operating the picomite and writing BASIC programs on it is via a tethered PC running a terminal emulator of some sort (MMedit is essentially a terminal emulator, but with quite a few added extras).


note that OPTION LCDPANEL ... in this instance does not specifically refer to just an "LCD panel", it refers to any screen attached directly to a picomite, be it a tiny LCD panel running over an I2C interface, right up to a full-sized VGA monitor. the word LCDPANEL is a carryover from the early days of the picomite and retained for reasons of <warm fuzzy feelings>.


cheers,
rob   :-)
Edited 2024-03-20 11:34 by robert.rozee
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9114
Posted: 08:37am 20 Mar 2024
Copy link to clipboard 
Print this post

The messages should be suppressed while running a program - just haven't implemented this yet. I'm intending to do a full release at the weekend which will include this.
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2127
Posted: 01:40pm 20 Mar 2024
Copy link to clipboard 
Print this post

option list does not show option lcdpanel console status, or I would have known. Yes, it would be obvious... to many people but I'm new to "a console" and inbuilt editor and a stand alone basic computer.
You still need a pc to flash firmware and use xmodem to save files.
If I code a non vga pico not using a lcd display then a pc needed for editing code and mmedit is easier than inbuilt editor and using xmodem (which I've never used) and sending files to pc and sending them back to pico, imho. stan
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024