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 KingdomPosts: 2183 |
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 KingdomPosts: 9286 |
and you found that syntax in the manual where? |
||||
javavi Senior Member Joined: 01/10/2023 Location: UkrainePosts: 296 |
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 KingdomPosts: 9286 |
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: UkrainePosts: 296 |
|
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9286 |
Will look Edited 2024-11-29 04:30 by matherp |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3824 |
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: UkrainePosts: 296 |
> ? 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 KingdomPosts: 3824 |
> ? 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 KingdomPosts: 6904 |
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: UkrainePosts: 296 |
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: GermanyPosts: 23 |
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 KingdomPosts: 6904 |
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 KingdomPosts: 9286 |
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: UkrainePosts: 296 |
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 KingdomPosts: 6904 |
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 KingdomPosts: 9286 |
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: GermanyPosts: 23 |
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: UkrainePosts: 296 |
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 KingdomPosts: 2183 |
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 |