![]() |
Forum Index : Microcontroller and PC projects : PicoMite V6.00.02 release candidates - all versions
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 971 |
The commands used for PIO compiling don't seem to be checked when variables are assigned. If you try to used a normal command as a variable it complains about the name, but in%() get through and fails when its treated as a command. > > list Dim in%(5) In %(1)=7 'was in%(1)=7 > > run [2] In %(1)=7 Error : Missing Program statement > Saved 43 bytes [2] Cat %(1)=2 Error : Variable name Latest F4 Latest H7 FotS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
You can't use variables in PIO instructions just unquoted literal strings |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 971 |
Just to clarify, this was not about PIO itself. Its about the error if you happen to try to use one of the commands used in PIO as a normal variable. The illegal use of the command name as a variable is not trapped until is is seen as an invalid command. e.g. DIM in%(5) 'declare a variable. In is now a command supporting PIO so should complain about it. DIM cat%(5) is trapped as an invalid variable name. Edited 2025-03-21 19:09 by disco4now Latest F4 Latest H7 FotS |
||||
electricat![]() Senior Member ![]() Joined: 30/11/2020 Location: LithuaniaPosts: 295 |
@Peter, I always was hestitate to ask some minor (from user`s perspective), but maybe not so easy to implement thingie. VGA/HDMI versions. It would make editing so much , much, much faster if we could jump editing cursor whole word using Ctrl+LeftArrow, Ctrl+RightArrow inside of EDITOR. Maybe I`m not alone who`s would like to have this. Sure there is no any rush with this. Only would be nice to have some day ![]() My MMBasic 'sand box' |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 529 |
@ electricat, Why not using the mouse in the editor to position the cursor? I am using the ps2 mouse for that and it is a great experience :) Greetings Daniel |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
It's a feature of the way the PIO assembler has to spoof the tokeniser to get the assembler to work - one you will just have to live with |
||||
electricat![]() Senior Member ![]() Joined: 30/11/2020 Location: LithuaniaPosts: 295 |
I am using mouse. For large jumps. It was long wanted and excelent addition! But fingers in most cases are just faster. Did not tested RC6 yet, but in RC5, if program uses MODE 3 , after returning to editor MOUSE is not active. Must enter cmd prompt MODE1 to see it again. My MMBasic 'sand box' |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4854 |
@Peter, RC6 is solid on RP2040 VGA for the main programs I tested. Volhout PicomiteVGA PETSCII ROBOTS |
||||
electricat![]() Senior Member ![]() Joined: 30/11/2020 Location: LithuaniaPosts: 295 |
HDMI/USB/2350 RC6 All this week I was missing mouse in editor. But usually I mostly use hotkeys to move arround, in any text editors so not a big deal. Later I faund it`s becouse program works in MODE3 and I always break ctrl+C , so must enter command prompt MODE 1 if I want mouse. But running/breaking while in coding process happens quite often, so I just does ignored it and cotinued use keyboard. I see manual talks about mouse appearence inside editor, when in MODE 1. So means returning to editor I`m still in MODE 3 ? If it is By design, then OK. But if it should return to MODE 1, maybe it needs some fix. Edited 2025-03-22 00:08 by electricat My MMBasic 'sand box' |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
The editor switches to mode 1 if the horizontal resolution is less than 512 otherwise it leaves you in the current mode |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
I've updated RC6 if you want to download. This includes a much better implementation of diagonal line drawing with a width > 1. Prior to this release diagonal lines could only be 1 pixel wide. This version implements the ability to specify the line width. Previously horizontal and vertical lines could have a defined width and the x1 and y1 coordinate define the top-left pixel of the thick line. i.e. the line is to the right of the specified position or below it on the screen. This makes no sense for thick diagonal lines where the line should be centered on the origin pixel. To maintain compatibility with existing code you specify this by setting the width as a negative number as in the example below. This will display a clock in colour on the RP2350 but only in black and white on the RP2040. ![]() Option explicit Option default none Option milliseconds on If Instr(MM.DEVICE$,"RP2350") Then MODE 3 Else MODE 1 EndIf FRAMEBUFFER create FRAMEBUFFER write f Const sw=-5,mw=-9,hw=-11 Const sl=220,ml=190,hl=160 Const xc=MM.HRES\2,yc=MM.VRES\2 Dim t$ Dim integer s,m,h Do show s,sw,sl,0 show m,mw,ml,0 show h,hw,hl,0 t$=Time$ s=Val(Mid$(t$,7,2))*6+Val(Right$(t$,3))/1000*6 m=Val(Mid$(t$,4,2))*6 h=Val(Left$(t$,2))*30 show h,hw,hl,RGB(yellow) show m,mw,ml,RGB(green) show s,sw,sl,RGB(red) Circle xc,yc,-mw,,,RGB(blue),RGB(blue) FRAMEBUFFER copy f,n,b Do Loop Until Time$<>t$ Loop ' Sub show(byval angle As integer, byval w As integer,byval l As integer, byval c ol As integer) Local integer x=l*Sin(Rad(angle))+xc Local integer y=yc-l*Cos(Rad(angle)) Line xc,yc,x,y,w,col End Sub Edited 2025-03-22 02:37 by matherp |
||||
toml_12953 Guru ![]() Joined: 13/02/2015 Location: United StatesPosts: 390 |
OK for me now. Thanks! |
||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
on RP2040, if you connect an 16bit parallele TFT like SSD1963, DB0 to DB15 use GP0 to GP15. Is it possible to use GP31 to GP47?? with RP2350B. Edited 2025-03-22 03:59 by goc30 |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
https://www.thebackshed.com/forum/ViewTopic.php?TID=17631&PID=234989#234989 |
||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
https://www.thebackshed.com/forum/ViewTopic.php?TID=17631&PID=234989#234989 the ref is OPTION LCDPANEL display, orientation [,backlightpin] [,DCpin] [,NORESET] [,DB0pin] but in your example you write e.g. OPTION LCDPANEL SSD1963_4_16, LANDSCAPE,,,GP36,,GP2 this mean: OPTION LCDPANEL SSD1963_4_16, orientation=LANDSCAPE,backlightpin=no pin,DCpin=no pin,No reset pin,DB0pin=GP36,???=???,???=GP2 what are the 2 last functions Edited 2025-03-22 04:31 by goc30 |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
The specification is correct. There is an extra comma in the example OPTION LCDPANEL SSD1963_4_16, LANDSCAPE,,GP36,,GP2 |
||||
goc30![]() Guru ![]() Joined: 12/04/2017 Location: FrancePosts: 435 |
ok for "NORESET", the choice is "NORESET/RESET" or "NORESET/GPxx" ?? other question: where I specify other pins (CS, RD, WR) ? Edited 2025-03-22 13:05 by goc30 |
||||
toml_12953 Guru ![]() Joined: 13/02/2015 Location: United StatesPosts: 390 |
OPTION MILLISECONDS doesn't appear in OPTION LIST whether it's on or off. Should it? I'm using WebMite MMBasic RP2350A Edition V6.00.02RC6 Edited 2025-03-22 15:48 by toml_12953 |
||||
ville56 Senior Member ![]() Joined: 08/06/2022 Location: AustriaPosts: 217 |
@Peter, Function FIELD$ does not always return the right field values. I do not have any logical explanation for the result. I also would prefer to have some means to find out whether the end of the input string was reached, e.g. by throwing an error or with a variable e.g. a variable like mm.eol set to 1 or something. Currently it is not possible to reliably find out if you have reached the last field. Attached is a small test program showing the behaviour. Result is: ---------------------------------------------------- Fields/strings are delimited by >< field # expected 1 2 3 4 5 6 7 8 Input string >aaa bbb '' ccc ' ' 'ddd eee' fff ggg< Field# value 1 >aaa< <- ok 2 >bbb< <- ok 3 >''< <- ok 4 >''< <- not ok, twice 5 >ccc< <- wrong field # 6 >ccc< <- not ok, twice 7 >' '< <- wrong field # 8 >'ddd eee'< <- wrong field # 9 >'ddd eee'< <- not ok, twice 10 >fff< <- wrong field # 11 >ggg< <- wrong field # 12 >< <- after last field, should be recognizable somehow 13 >< 14 >< 15 >< ' OPTION EXPLICIT OPTION DEFAULT NONE dim string a, b dim integer idx '# 1 2 3 4 5 6 a = "aaa bbb ccc 'ddd eee' fff ggg" for idx = 1 to 10 print ">"; field$(a, idx, " ", "'"); "<" next idx Environment ist: RP2350, MMBasic V6.00.2RC6 Regards, Gerald ----------------------------------------------------- Edited 2025-03-22 17:16 by ville56 73 de OE1HGA, Gerald |
||||
phil99![]() Guru ![]() Joined: 11/02/2018 Location: AustraliaPosts: 2416 |
I think it is a temporary option that does not get saved. In a program put it near the start. If you want it all the time put it in Sub MM.StartUp. |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |