Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:57 01 Aug 2025 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 : PicoMite Autorun

Author Message
cosmic frog
Guru

Joined: 09/02/2012
Location: United Kingdom
Posts: 302
Posted: 06:21pm 02 Apr 2022
Copy link to clipboard 
Print this post

Hi all.

I'm probably missing something really simple here, but,

How do I get my program to autorun on the PicoMite?

The manual says I need to make a subroutine with the name MM.STARTUP.
"When the MicroMite is first powered up it will search for this subroutine and, if found, it will be run once"

Where do I put this subroutine? Is it stored on a file on the SD card or in flash?

I just want my program to run from power up. How do I do this?

Thanks.

Dave.
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 633
Posted: 06:42pm 02 Apr 2022
Copy link to clipboard 
Print this post

Simply set the option
OPTION AUTORUN ON
Along with any of your other options.
The program you are currently working on will then start as soon as power is applied.
Regards
 
cosmic frog
Guru

Joined: 09/02/2012
Location: United Kingdom
Posts: 302
Posted: 06:54pm 02 Apr 2022
Copy link to clipboard 
Print this post

Ha! That simple.  

So it's just like all the other 'Mites then.
I don't know how I missed that.

Anyway, Thankyou for your help.  

Dave.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2640
Posted: 09:53pm 02 Apr 2022
Copy link to clipboard 
Print this post

Just to be different, you could do this:-

Sub  MM.STARTUP

 Your Program Here.

End Sub

Another Program Here.

When the first ends the second starts.
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1132
Posted: 02:24am 03 Apr 2022
Copy link to clipboard 
Print this post

I was pondering something along these lines:

Is it possible for a particular SD card to be 'Autorun'?
Ie, stick the card in, turn on the 'mite, and the configured program runs automatically. Replace the card with a 'normal' one and the 'mite just boots to the usual command prompt.
Visit Vegipete's *Mite Library for cool programs.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2640
Posted: 08:02am 03 Apr 2022
Copy link to clipboard 
Print this post

I have not tried this but give it a shot anyway, just to see what happens.

Sub  MM.STARTUP
    Load "Your-Program.BAS"
    Run
End Sub

Or

Sub  MM.STARTUP
    Run "Your-Program.BAS"  
End Sub

.
Edited 2022-04-03 18:09 by phil99
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 11:26am 03 Apr 2022
Copy link to clipboard 
Print this post

PMJI but this thread just reminded me:

I had read, some time ago that OPTIONs should be command line only but I have seen AUTORUN in the source. Is this kosher?

I messed-up one time where I had modified code, using MMEdit and apparently it wiped-out the AUTORUN. When they cycled the power, the program didn't start and so I had to re-visit (200 mile round-trip).



Craig
 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025