Loader.PDF
(
269 KB
)
Pobierz
ATm8LD 1 AT Mega8 128Words Boot Loader
The Boot loader is only 128 words of code. It require one pin to tell when to boot.
In this case PinC.1 is used. The aumont of memory needed for loader is only 256
bytes . The Code for boot loader is modification of program written by David
Moran - BootM8.Bas. I chose this code because of the small size and simplicity.
In my edition of the loader boot process starts when PinC.1 is short to GND.
Other wise processor starts the main code without any wait.
The speed of sending data to CPU is setup for 19,200 bps what is optimum to
Use with internal 4 or 8 Mhz oscillator.
The fusebits need to be set for 128 bytes for the boot code,
starting at $F80
Fusebits: Boot Application Bootloader End of Boot Reset
BOOTSZ1 BOOTSZ0 Size Flash Section Flash Section Application Address
1 1 128 $000 - $F7F $F80 - $FFF $F7F $F80
Standard Intel hex file can be sent: (spaces added for readability)
All record sizes must be even, AVR uses WORDs, not bytes
:Size Address Type Data Bytes Checksum
:10 00 00 00 26 C0 B3 C0 B3 C0 B3 C0 B3 C0 C5 C0 C5 C0 D0 C0 A4
:10 00 10 00 DB C0 E4 C0 ED C0 30 31 32 33 34 35 36 37 38 39 E7
-
-
:10 05 30 00 55 DF 08 95 57 E5 57 DF 52 E5 55 DF 54 E5 53 DF A2
:10 05 40 00 5C E2 51 DF 53 2F 52 95 49 DF 53 2F 47 DF 01 D0 33
:0B 05 50 00 08 95 5D E0 48 DF 5A E0 46 DF 08 95 A2 DC
:00 00 00 01 FF
Program for sending data to CPU is written in Visual Basic V6.0
ATm8LD 2 AT Mega8 128Words Boot Loader
ATm8Ld require to select com port . The message box will prompt you to set the
port number on first run. If you want to change port any way change the number
In text box , than hit CHANGE, Program will finish rewriting registry with new
port number. After next start up program is ready to operate on the port.
The Intel hex code of the program must be preloaded by using LOAD
Program use widows file picker and full path will be remember in registry also
The internal buffer will be fill with file . After next start up the same file will be
used until you load other.
ATm8LD 3 AT Mega8 128Words Boot Loader
After Loading the file, set the switch in boot position.
Power off ,and power on the board .Program will respond with
Labels B ? instead of labels @ @
ATm8LD 4 AT Mega8 128Words Boot Loader
Now hit the SEND to send hex file to board.
ATm8LD 5 AT Mega8 128Words Boot Loader
Board will receive record by record hex code of micro program.
Each record starts with labels B ? . I case of error the labels can change
B ! for header mismatch and B C for bad check sum.
Each record will be program into flash memory. The loader is only
For flash code.
Plik z chomika:
bobw1
Inne pliki z tego folderu:
BASCAVR.PDF
(15905 KB)
bascom8051.pdf
(4210 KB)
Loader.PDF
(269 KB)
labplc.pdf
(76 KB)
labplc_circuit.pdf
(15 KB)
Inne foldery tego chomika:
Article
Zgłoś jeśli
naruszono regulamin