View Full Version : autostart question
omnivore
07-29-04, 06:54 PM
From the PDF manual for the ServoPod:
6. Finally you can set the autostart vector in Program Flash. You need to provide an address on a 400h boundary, within unused Program Flash, thus after the end of the application program. (Right now 1400-3FFF and 8000-EFFF is available for applications.) I often use EC00, near the end of Flash. Then type
<address> AUTOSTART <wordname>
E.g., HEX EC00 AUTOSTART MAIN
The board should now reset into the application program.
My question concerns the term <wordname>. What name is this? What is its function?
dan donaldson
omnivore
07-29-04, 06:59 PM
Let's try that again - I hit the send button when I meant to hit preview. Here's the excerpt:
6. Finally you can set the autostart vector in Program Flash. You need to provide an address on a 400h boundary, within unused Program Flash, thus after the end of the application program. (Right now 1400-3FFF and 8000-EFFF is available for applications.) I often use EC00, near the end of Flash. Then type
< address > AUTOSTART < wordname >
E.g., HEX EC00 AUTOSTART MAIN
The board should now reset into the application program.
The question was, what is < wordname > ?
nmitech
07-29-04, 09:20 PM
< address > AUTOSTART < wordname >
E.g., HEX EC00 AUTOSTART MAIN
The question was, what is < wordname > ?
"wordname" is the word that contains the startup address of your application. Similar to function main(){....} in C program.
omnivore
07-30-04, 10:30 AM
OK - I think I see what is going on.
So for the benefit of other novices, am I right in thinking that the state machines I build need to be invoked with some procedural code that (eg) sets the frequency of their invocation, and that that's the autostart code's function?
I realize that this is obvious to some people so bear with me.
And I presume that the way to do that is define a Forth word and pass it to the autostart as the wordname?
RMDumse
07-31-04, 01:37 PM
Yes, you have the concept.
You autostart a "MAIN" like word. It is in Forth. It will generally do initialization of variables, ports, etc., then activate the STATE-MACHINE chains. When this work ends, it turns control back to the outer interpreter, and then you can type interactively in the foreground while the state machines run periodically in the background.
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.