IDE Enhancement ZX-xx MCU Reset & # of Bytes. (2 parts)
Posted: 28 April 2006, 4:42 AM
(Part 1)
There are many times that all I want to do is to reset the ZX-40 or any other ZBasic microcontroller when my PC is serially connected to comport #1.
Under IDE "project" there is a compile selection (F seven) and a Go
(F eight) compile and download/reset.
Where is the microcontroller reset selection?
There are three reasons why I need the separate "ZX-xx microcontroller reset".
#1. For checking multiple times the bootup/restart sequence(s) of the
ZBasic microcontroller.
#2. To keep my ESD "finger of death" from reaching down and reseting
the microcontroller and zapping and destroying thru electro-static
discharge every active semiconductor on the printed circuit card.
I have a lot of static.
Please note: I don't have a reset switch because of this ESD
reason. I depend on the POR - power on reset.
(Many users / boards do have a pushbutton reset switch for this
purpose)
#3. To extract from the ZBasic microcontroller the number of bytes it has
in flash. (See below)
(Part 2)
If you have a running ZBasic microcontroller and you don't want to destroy what is in the program memory (flash) but you need to know how many bytes of program flash are in the ZBasic microcontroller. By performing a microcontroller reset (Above - Part 1) and having the firmware in the microcontroller show the number of bytes of program code along with the firmware revision in the debug window.
You can use this byte count and compare this count with the number of bytes shown when the compile (F7) selection is selected (Offline) This way you can make sure, before downloading and destroying the contents of the microcontroller, that your source program is the same as the program which resides in microcontroller memory.
For example you have source programs A, B & C.
Each has 2005, 3001 & 4500 bytes of code on compile.
If by polling or reseting, the ZBaic microcontroller
produces a byte count of 3001 then the source program is B.
This is not 100% foolproof but having the "byte count"
is better than nothing at all. Checksum(S) or CRC(s) compares would be better.
What are your thoughts?
There are many times that all I want to do is to reset the ZX-40 or any other ZBasic microcontroller when my PC is serially connected to comport #1.
Under IDE "project" there is a compile selection (F seven) and a Go
(F eight) compile and download/reset.
Where is the microcontroller reset selection?
There are three reasons why I need the separate "ZX-xx microcontroller reset".
#1. For checking multiple times the bootup/restart sequence(s) of the
ZBasic microcontroller.
#2. To keep my ESD "finger of death" from reaching down and reseting
the microcontroller and zapping and destroying thru electro-static
discharge every active semiconductor on the printed circuit card.
I have a lot of static.
Please note: I don't have a reset switch because of this ESD
reason. I depend on the POR - power on reset.
(Many users / boards do have a pushbutton reset switch for this
purpose)
#3. To extract from the ZBasic microcontroller the number of bytes it has
in flash. (See below)
(Part 2)
If you have a running ZBasic microcontroller and you don't want to destroy what is in the program memory (flash) but you need to know how many bytes of program flash are in the ZBasic microcontroller. By performing a microcontroller reset (Above - Part 1) and having the firmware in the microcontroller show the number of bytes of program code along with the firmware revision in the debug window.
You can use this byte count and compare this count with the number of bytes shown when the compile (F7) selection is selected (Offline) This way you can make sure, before downloading and destroying the contents of the microcontroller, that your source program is the same as the program which resides in microcontroller memory.
For example you have source programs A, B & C.
Each has 2005, 3001 & 4500 bytes of code on compile.
If by polling or reseting, the ZBaic microcontroller
produces a byte count of 3001 then the source program is B.
This is not 100% foolproof but having the "byte count"
is better than nothing at all. Checksum(S) or CRC(s) compares would be better.
What are your thoughts?