![]() |
Forum Index : Microcontroller and PC projects : PicoMite V5.07.00b0 - beta firmware
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4249 |
I'm sure I've asked this before, but I've slept since then. What does the CALL() function achieve that EVAL() doesn't, is it just a performance thing because EVAL() has to go through the tokenzier et. al, ... that's assuming the PicoMite even has EVAL(). Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10041 |
Faster and much easier to have the function name and parameters as variables ? call(fname$,param1$ [,param...]) |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4249 |
Thanks Peter. If it isn't already too late could I ask you to "leave the door open" to the PicoMite getting CSUB support, i.e. reserve a command-slot for that purpose - I'm not asking if you will implement it ... yet ![]() Thanks, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7490 |
Have you had a look at 00b11 yet, Tom? Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4249 |
No, why, did I miss something? My hardware bench still looks like an explosion in a Chinese PCB factory ... need to tackle it this weekend, kids permitting. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7490 |
I know what you mean. :) List Commands shows CSub and End Csub. And the Eval( function by the way. I suspect that, with a total of 257 commands and functions (including UPDATE FIRMWARE) that might be the PicoMite fully stuffed now. :) Very well done, Peter! Edited 2021-08-07 19:40 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10041 |
They are just markers - not implemented |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7490 |
It's a good start, Peter. Tom got his reservations so he'll be happy. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4249 |
I'm certainly not complaining ... though when anyone says to me "I can't complain", I always reply "then you aren't trying hard enough." ![]() Incidentally Peter have you considered the possibility of changing the CSUB/CFUNCTION syntax to something like: SUB C foo_sub(params) ... END SUB FUNCTION C foo_fn(params) ... END SUB Possibly replacing "C" with "NATIVE" or some other more generic term? In theory I think this would free up 2 command slots, and allow CFUNCTIONs to also be fitted onto the CMM2. Of course it is easy for me to "make this sh*t up" from the comfort of my study without any expectation of having to do it myself ... though I do intend to see whether I can get the DOS/Windows version of MMBasic to build on Linux later in the month - wish me luck. Best wishes, Tom Edited 2021-08-08 04:48 by thwill MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3306 |
Good luck indeed. (Best wishes) Lance PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
led-bloon![]() Senior Member ![]() Joined: 21/12/2014 Location: AustraliaPosts: 207 |
@Mixtel90 A correction for the TINAM 0803.rtf doc: Raspberry Pi Pico C/C++ SDK: Section 3.2.1.2 para.2 ...Each PIO block has a 32-slot instruction memory, which is visible to the four state machines in that block." TINAM 0803.rtf: Appendix 3 Correction plus possible addition: Sub heading: "What happens..." should perhaps explicitly state "for each PIO block" Hence all further references to state machines will be definitive to one of the two blocks. Miss you George |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7490 |
Thanks. I'm glad someone is reading this stuff - it's very difficult to find your own errors in your own work, as I discovered in my years as a designer. lol I'll probably be doing a lot more with the PIO sections anyway. I keep rewriting chunks because I'm not happy with them. I'm still making changes to the software too. The Raspberry Pi documentation is very good but in some parts it seems a little lacking. e.g. chapter 3 on the PIO tells you about the assembler directives .wrap .wrap target .word and a couple more. It doesn't mention one to control the side function, I don't think. That seems to be elsewhere in the book. Consequently, although the assembler is currently dealing with side there's no way of controlling it via a directive. I suspect there are other traps awaiting me. :) I've also been playing with running PASM, PREDIT and PREVAS in three flash slots to keep the user's program as clean as possible. It's a headache. A CHAINed program doesn't know where to return to (I may be able to get round that by telling it in a variable) but it knows where it is. VAR SAVE etc. loses everything when a new program is loaded and run. The easiest way is to use a data file on a SD card and the three modules can work with that, but it means that the user needs to have an SD card attached. Personally I don't see that as a huge disadvantage, particularly as simply copying a short list of numbers around is hardly a massive task anyway. Edited 2021-08-12 17:55 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 4837 |
Tom I would like that. I hope you succeed (and make it portable). It would be great if you could also keep the serial port support in the linux version. For me MMBasic is a tool to interface with hardware. So you need at least a serial port. I wish it was already "later this month".... Volhout Edited 2021-08-12 20:23 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10041 |
The Picromite code (not PicoMite) is a full linux implementation. I can let you have the source subject to you agreeing Geoff's Ts+Cs. You would just need to strip out the I/O code and it should work pretty easily |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4249 |
Discussion of Linux version spun off to http://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=14063. MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Plasmamac![]() Guru ![]() Joined: 31/01/2019 Location: GermanyPosts: 572 |
HI ; Dear Matherp what do think about to put Date and Time automatically to a the saved Flash Slot? Even witout an rtc we know the last storage ? Slot 1 in use: "'-#ports" /date ,time <--- ??? or using a counter for such like : Slot 1 in use: "'-#ports" /100 Slot 1 in use: "'-#ports" /101 thx Plasma |
||||
led-bloon![]() Senior Member ![]() Joined: 21/12/2014 Location: AustraliaPosts: 207 |
@Mixtel90 Mick - PASM sub suggestions: 1. The main select case code should probably have a case else "error message" for any unknown garbage in the DATA statements. 2. Just after the select case code - you look for and extract any delay value. You should check that this value is < 32 before adding it to the existing code. Probably another "error message" 3. Make all assembler statements "case insensitive": DATA "Set pins 1 [1]" >>> does not compile with the capital 'S' (ouch!) For info: Was the command "PIO PROGRAM pio,data_array%()" dropped? I don't see it in TINAM and I don't seem to be able to get it to work. Still playing, and having fun... led Edited 2021-08-16 16:53 by led-bloon Miss you George |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7490 |
Thanks led, I'll have a lok at it. I did wonder about putting more error checking in, actually. The thing is, it's probably not going to be used by beginners so there's no point in doing too much. I *was* trying to keep PASM as small as possible too, as the intention was for it to be in memory with the users program. Every bit I add to it is a bit less for them. :) However, I'm now *very* tempted to get the user to do the necessary setup of the arrays etc. and put the data statements into PASM in a flash slot then chain it from their prog. PASM will then stuff the array for them and their memory space is hardly effected. I can't think of a reason to keep PASM in user space. It would probably only get deleted after use (and the PIO tested, of course!) anyway. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
led-bloon![]() Senior Member ![]() Joined: 21/12/2014 Location: AustraliaPosts: 207 |
Mick - updates to TINAM for PicoMite 1. SETPIN PIN, DEVICE - missing device type PIOn n=0/1 Reserve pin(s) for PIO functions 2. PIO PROGRAM PIOn, data_array%() PIO program pio0,ax%() works ok now, not sure what I was doing wrong. Interesting to note that the integer array MUST be dim'd to 7, anymore will give an "Error: array size"! led Miss you George |
||||
led-bloon![]() Senior Member ![]() Joined: 21/12/2014 Location: AustraliaPosts: 207 |
@matherp - Peter A bug that probably is not a big deal now, but may have other ramifications. I set a PIO program running on pin 1 (250khz vs 50khz). Runs great! I stop the program then issue a PIO clear 0. This stops pin 1 either hi or lo. I then try this at the command prompt: setpin 1,dout ' accepted ok pin(1)=0 ' (or 1) to toggle whatever state it's currently in. No effect on pin 1 output with several tries. Load and run a short simple basic program that toggles pin 1 on and off - now works ok! led Miss you George |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |