![]() |
Forum Index : Microcontroller and PC projects : PicoMite V6.00.02 release candidates - all versions
![]() ![]() |
|||||
Author | Message | ||||
jkdelauney Newbie ![]() Joined: 03/06/2025 Location: United StatesPosts: 4 |
Thanks. I compared your current repo state to the last pull I had and I see what you're talking about. I might not be able to learn from my own mistakes, but I can at least learn from other's. ;) Edited 2025-06-06 01:53 by jkdelauney |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 603 |
Alternatively, allow the same x, y, x, y, w, h parameters in the Framebuffer copy? which already has the background option. Edited 2025-06-06 02:20 by Bleep |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 988 |
Peter, What do you think about the CHAIN command not running the normal code in the library. All other resources in the library (SUBs,FUNCTIONs,FONTs CSUBs) are still available to the chained program just the normal code it not run. The FLASH CHAIN command does not run the normal code. i.e. comment this line in do_chain() if(Option.LIBRARY_FLASH_SIZE == MAX_PROG_SIZE) ExecuteProgram(LibMemory ); // run anything that might be in the library Gerry Latest F4 Latest H7 FotS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10134 |
This discussion stems from, IMHO, incorrect use of the library. It should be a repository of subroutines and functions that are , in effect extending the language. Again, IMHO, it should never contain executable main program code and definitely should not be declaring global variables without ON SKIP protection. Disabling the library would mean that anything in the library would be inaccessible in the chained program. FLASH CHAIN is very different as it runs a pre-tokenised image. CHAIN loads from source and has to tokenise which means it rebuilds the subroutine tables. In any event, unless any critical bugs are found in the next few days, the release is completely closed and I have already sent the binaries to Geoff ready for release. |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7679 |
I can't understand why you would even consider having executable code in the Library, especially trying to Chain to it as the Library routines (like all well-behaved subroutines and functions) should all be using their own local variables so there's no need for them to access the variables area of the previous program. The only reason to try that I can see is to see if it breaks. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
toml_12953 Guru ![]() Joined: 13/02/2015 Location: United StatesPosts: 405 |
I like to initialize constants to be used in every program such as TRUE=-1, FALSE=0, etc. I also like to set OPTION BASE 1, OPTION ESCAPE and other temporary options. The only problem is declaring the constants but now I get around it by doing this: ON ERROR SKIP 2 CONST TRUE=-1 CONST FALSE=0 OPTION ESCAPE OPTION BASE 1 : : : |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10134 |
Much better, in my view, to have a template that you use to create any new program and put these in the template rather than the library. No need for ON ERROR then. I seem to remember MMEDIT supports such a template? |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7679 |
If you don't use MMEDIT then it's easy enough to LOAD "template.bas" from SD card before you start programming. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 548 |
Hello, I think I found a bug... can anyone confirm this? I was trying the Keypad feature, see for yourself: ![]() ![]() ![]() I tried also tried a different syntax, always the same. I am using as you can see a 128x64 LCD... Because of the "display error" in Putty I also tried to do something like: option display 24,80 Problem persists. I have a 2 row by 3 column keypad.. I don't know what I am doing wrong. row1 is: GP20 row2 is: GP21 col1 is: GP22 col2 is: GP19 col3 is: GP18 Greetings Daniel |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10134 |
Obviously the error isn't right but manual page 55 |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 548 |
Hello Peter, thank you a lot for your reply! Ahh this is my bad. My PCB is already designed for an 2 by 3 row Keypad... Hm.. Ok. Then I have to do a redesign. I assumed, that it would be no problem to allow a smaller keypad. Sorry my bad ![]() Or is there a work-around possible? ![]() ![]() I have some pins left, that I initially wanted to use for GPIO... Greetings Daniel Edited 2025-06-07 01:34 by Amnesie |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10134 |
If you have two unassigned pins then just include these in the keypad command and your PCB will work fine. Otherwise just run the scan in a timed Basic interrupt Edited 2025-06-07 01:36 by matherp |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 548 |
Ah, thanks, good Idea! I know that a 2 by 3 keypad seems a bid odd, but I am saving one single pin at least ![]() Greetings Daniel |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7679 |
Of course, in some cases you can get several buttons on a single ADC input by switching resistors. You can save a lot of pins like that. In practice you can probably get 4 or 5 buttons easily, more if your resistor tolerances are good. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |