Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 13:05 23 Dec 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 : PicoMite V6.00.01 release candidates - please test thoroughly

     Page 3 of 20    
Author Message
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2183
Posted: 05:50pm 28 Nov 2024
Copy link to clipboard 
Print this post

If vga<>0 Then Print "x"
else Print "y"
end if

actually if condition is not met it skips to next line,good
x=2
if x=2 then inc x+1
if x=4 then inc x-1
if x=3 then inc x-1
end if
Edited 2024-11-29 04:11 by stanleyella
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9286
Posted: 06:02pm 28 Nov 2024
Copy link to clipboard 
Print this post

  Quote  If vga<>0 Then Print "x"
else Print "y"
end if


and you found that syntax in the manual where?
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 296
Posted: 06:13pm 28 Nov 2024
Copy link to clipboard 
Print this post

PicoMiteHDMI MMBasic RP2350A Edition V6.00.01RC3
> ? MM.Info(pin 16)
Boot Reserved : HDMI
> ? MM.Info(pin GP12)
Boot Reserved : HDMI
> ? MM.INFO(pinno GP12)
Error : Invalid pin

Also, when requesting information about the status of an SD card that is not configured with OPTIONS, an error occurs, although I would expect to receive some information about the status.
> ? MM.Info(SDCARD)
Error : SDcard not configured

Edited 2024-11-29 04:18 by javavi
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9286
Posted: 06:18pm 28 Nov 2024
Copy link to clipboard 
Print this post

  Quote  Also, when requesting information about the status of an SD card that is not configured with OPTIONS, an error occurs.


Only if you try to execute a function as a command

What is the point you are making in the first part of the post? pinno take a pin number and returns a GP number giving it a gp number makes no sense hence the error
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 296
Posted: 06:21pm 28 Nov 2024
Copy link to clipboard 
Print this post

  matherp said  
  Quote  What is the point you are making in the first part of the post? pinno take a pin number and returns a GP number giving it a gp number makes no sense hence the error


> ? MM.INFO(pinno 16)
Error : Syntax
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9286
Posted: 06:28pm 28 Nov 2024
Copy link to clipboard 
Print this post

Will look
Edited 2024-11-29 04:30 by matherp
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3824
Posted: 06:31pm 28 Nov 2024
Copy link to clipboard 
Print this post

  stanleyella said  
x=2
if x=2 then inc x+1
if x=4 then inc x-1
if x=3 then inc x-1
end if

Wrong syntax - each inc is missing a comma

John
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 296
Posted: 06:31pm 28 Nov 2024
Copy link to clipboard 
Print this post

> ? MM.INFO(pinno GP11)
15
> ? MM.INFO(pinno GP12)
Error : Invalid pin
>  

Edited 2024-11-29 04:31 by javavi
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3824
Posted: 06:34pm 28 Nov 2024
Copy link to clipboard 
Print this post

  javavi said  PicoMiteHDMI MMBasic RP2350A Edition V6.00.01RC3
> ? MM.Info(pin 16)
Boot Reserved : HDMI
> ? MM.Info(pin GP12)
Boot Reserved : HDMI
> ? MM.INFO(pinno GP12)
Error : Invalid pin


That last one appears OK by the manual.

I guess you were hoping for the same output as from
> ? MM.Info(pin GP12)

or else 16

John
Edited 2024-11-29 04:35 by JohnS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6904
Posted: 06:36pm 28 Nov 2024
Copy link to clipboard 
Print this post

Javavi:
? MM.INFO(PIN 16)  gives pin status
? MM.INFO(PINNO GP0) gives the physical pin number (for a standard Pico board) of GP0 (in this case, 1)

You'll get an error if you use MM.INFO(PINNO GP12) on a HDMI system because GP12 doesn't exist, it's HSTX0 (which you can't use in this command).
Mick

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

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 296
Posted: 06:46pm 28 Nov 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  You'll get an error if you use MM.INFO(PINNO GP12) on a HDMI system because GP12 doesn't exist, it's HSTX0 (which you can't use in this command).

It seems to me somehow wrong to give an error here, let it still return information about the Pico pin number for the requested GPn.
Edited 2024-11-29 04:56 by javavi
 
dddns
Newbie

Joined: 20/09/2024
Location: Germany
Posts: 23
Posted: 06:57pm 28 Nov 2024
Copy link to clipboard 
Print this post

RP2040V6.00.01.RC3:

I use "option lcdpanel console 2" on a ssd1963 display. As long as valid commands are entered the font stays at #2. If a syntax error is done, the font switches to #1 and stays as long as the editor is used or "option lcdpanel console 2" is run again.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6904
Posted: 06:58pm 28 Nov 2024
Copy link to clipboard 
Print this post

There is no GP12. It's probably been disconnected from the GPIO matrix. It's really no problem if you know which sort of display you are using, otherwise you could probably trap it with ON ERROR. I wouldn't call it a deal breaker, you'd know not to use the VGA pins as digital IO anyway, wouldn't you?
Mick

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

Joined: 11/12/2012
Location: United Kingdom
Posts: 9286
Posted: 07:03pm 28 Nov 2024
Copy link to clipboard 
Print this post

  Quote  ?I use "option lcdpanel console 2" on a ssd1963 display. As long as valid commands are entered the font stays at #2. If a syntax error is done, the font switches to #1 and stays as long as the editor is used or "option lcdpanel console 2" is run again.


This is deliberate. The error function has to know that it has a valid font to use so switches to font 1 that can't be overridden. You can switch back just using the font command (font 2)
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 296
Posted: 07:05pm 28 Nov 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  otherwise you could probably trap it with ON ERROR. I wouldn't call it a deal breaker, you'd know not to use the VGA pins as digital IO anyway, wouldn't you?

Yes, it is probably possible. But I don't like that where I expect to receive information I get an error, which I have to accept as information and somehow process. For example:
> ? MM.Info(SDCARD)
Error : SDcard not configured

although the manual says
Returns the status of the SD Card. Valid returns are:
DISABLED, NOT PRESENT, READY, and UNUSED

Edited 2024-11-29 05:11 by javavi
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6904
Posted: 07:09pm 28 Nov 2024
Copy link to clipboard 
Print this post

You can't get the status of something that has no wires to it or that has wires but you don't know which pins they are on. :)
Mick

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

Joined: 11/12/2012
Location: United Kingdom
Posts: 9286
Posted: 07:10pm 28 Nov 2024
Copy link to clipboard 
Print this post

I'll fix both but then you need to make sure you don't try and use the pin because that will definitely cause an error
 
dddns
Newbie

Joined: 20/09/2024
Location: Germany
Posts: 23
Posted: 07:17pm 28 Nov 2024
Copy link to clipboard 
Print this post

  matherp said  
  Quote  This is deliberate. The error function has to know that it has a valid font to use so switches to font 1 that can't be overridden.

I'm using as well the option "default font 2,1". I've seen this behavior for the first time.

Footnote added 2024-11-29 05:25 by dddns
Just checked with v6.00.00RC4 and it stays at font #2 after a command with a syntax error is entered. This is what I'm used to since 5.08
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 296
Posted: 07:17pm 28 Nov 2024
Copy link to clipboard 
Print this post

  matherp said  I'll fix both but then you need to make sure you don't try and use the pin because that will definitely cause an error

I think that other commands for accessing this pin used will in turn return an error, or the program will have to check the access status to the port with which it will work.
For example:

> ? MM.INFO(pinno GP12)
16
> ? MM.Info(pin 16)
Boot Reserved : HDMI

Edited 2024-11-29 05:25 by javavi
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2183
Posted: 09:11pm 28 Nov 2024
Copy link to clipboard 
Print this post

any point
vg=1 'vg=<>1 or 0
If vg<>0 Then Print "x"
Print "y"
end if
 
     Page 3 of 20    
Print this page
© JAQ Software 2024