Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 22:55 04 May 2024 Privacy Policy
Jump to

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: Australia
Posts: 22
Posted: 10:31pm 07 May 2016
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9066
Posted: 10:39pm 07 May 2016
Copy link to clipboard 
Print this post

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 Africa
Posts: 280
Posted: 10:41pm 07 May 2016
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9066
Posted: 10:53pm 07 May 2016
Copy link to clipboard 
Print this post

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: Australia
Posts: 3165
Posted: 01:08am 08 May 2016
Copy link to clipboard 
Print this post

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


To reply to this topic, you need to log in.

© JAQ Software 2024