What is a Microcontroller?
PHILMOND
Posts: 6
Thanks to PJ Allen for the response to my previous query (on GUI)
To re-formulate my question:
Is it right that the Editor on a click of a RUN button:
For example I cannot break an infinite loop from the Editor, however I can PAUSE in the CONTROL window (if it shows up).
I would imagine having a STOP button in the editor with an in-built sequence erasing the MC ROM and stopping execution. Seemingly it does not exist.
Any reference on how PC interacts with MC?
I could not find this info in the "What is a Microcontroller?"
Thanks,
Phil
To re-formulate my question:
Is it right that the Editor on a click of a RUN button:
- translates the listing into machine codes
- sends the code (and data) to the MC ROM
- starts execution.
For example I cannot break an infinite loop from the Editor, however I can PAUSE in the CONTROL window (if it shows up).
I would imagine having a STOP button in the editor with an in-built sequence erasing the MC ROM and stopping execution. Seemingly it does not exist.
Any reference on how PC interacts with MC?
I could not find this info in the "What is a Microcontroller?"
Thanks,
Phil
Comments
The PAUSE in the CONTROL window just pauses the display. The Stamp program continues to run and any debug output is ignored.
The microprocessor on the Stamp module (a PIC for the BS2 or an SX for the other models) is preprogrammed with the Stamp interpreter and download manager in ROM. The Stamp program is stored in a separate EEPROM on the Stamp module. The ROM can only be reprogrammed by Parallax.
Thank you, Mike - an excellent explanation.
Now - what happens on the push of a RESET button on the Stamp?
Thanks,
Phil
Essentially, on a reset when initiated by the Stamp Editor, the Editor asks the Stamp module what model and version it is. If there's no response, the Editor assumes there's no Stamp module present. Whenever a reset is caused by something else like pushing the reset button or initially powering up the Stamp, the download program doesn't hear a request for the model and version within a specific period of time and it times out, therefore assuming that there's no Stamp Editor there.
Thanks, Phil
A reset, whether caused by pressing a button or by the Stamp Editor toggling the DTR line, is a hardware function and overrides anything else other than lack of adequate power (brown-out).
Mike, what is the time limit?
I ran:
' {$STAMP BS2}
' {$PBASIC 2.5}
DO
HIGH 15
PAUSE 250
LOW 15
PAUSE 400
LOOP
Then I disconnected the Board from PC, pressed Reset button <REALLY HARD> for 5 seconds and 10 hours later the LED is still blinking.
The timeout is the maximum allowed time from when /RESET becomes high until a specific character is received from the PC. I don't know the exact character or time involved. The ROM loader for the Propeller is similar and has been published, so you could look at how that works.
Thanks a lot for your explanation.
You are immensely patient.
... and the LED is still blinking ...