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 : Booting a program from SD card in MPLUS
Author | Message | ||||
Intellecta Newbie Joined: 07/05/2016 Location: AustraliaPosts: 22 |
Dear All, First post and looking forward to be an active member. Looking at the MicromitePlus as a base for showing embedded coding/programming in schools. The LCD brings many advantages since the initial hardware led examples etc can be done on the touch panel with graphics. Sort of abstract away the hardware for a start. It would be nice to autoboot a program from the SDcard and this may have to be named a special name or be the only program on the sd card. Not sure if the interpreter can read lines from the SD card or it stores into RAM or whatever. May need to look at the source and see if it is possible. Could be a useful way to do program updates on an embedded system such as a robot etc. Looking forward to some feedback. Thanks Tony Pugatschew |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9066 |
Hi and welcome. From what I remember, you just name your program "AUTORUN.BAS", and the MM+ will look in the root of the SD card for this file at startup. If it finds it, that file will be automatically loaded and run at power-on time. I'm pretty sure that's right, but I will look into that now.... Smoke makes things work. When the smoke gets out, it stops! |
||||
Chris Roper Senior Member Joined: 19/05/2015 Location: South AfricaPosts: 280 |
Welcome to the Shed Tony. I wont even attempt to answer, as you are about to be swamped by much more knowledgeable participants, but I certainly think and hope you enjoy your stay. I look forward to more interaction in future. Cheers Chris http://caroper.blogspot.com/ |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9066 |
No, it does not on firmware 4.7. I must have been thinking of the Maximite series. Firmware 5.1 might be different, but I can't find any mention of autorun.bas in the 5.1 PDF's either. I guess with the MM+ being more an embedded controller, you load the code you want, and that is saved in memory, and that is autorun when you fire it up, so I expect there is not really the same need to autorun from the SD card. You can load and run another code from the first one using the LOAD filename.bas,R command - the ',R' on the end means to load the code and run it immediately. Smoke makes things work. When the smoke gets out, it stops! |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3165 |
Hi Tony, This is not needed because the Micromite does not start up with a blank memory. The BASIC program is non volatile so it is never lost when the power is cycled. But, if you still want to do that, the best bet would be to place the command LOAD filename.bas,R into a subroutine called MM.Startup and then save it to the library where it will become part of MMBasic. You could even put a menu and other stuff into MM.Startup. See page 44 of the manual. Geoff Geoff Graham - http://geoffg.net |
||||
Print this page |