:
,
.
,
.
.
HC(S)12 - FLASH
D-bug12. (,
Hyper Terminal). .
, , ,
486 , (
Windows).
RS232 ( SCI,
Serial cable) , (Baud Rate) 9600 [bps], 8
( 1 ) , , Flow Control (Hand
Shaking, FLASH).
, ,
, :
...AXIOM MANUFACTURING CME12D60, PRESS KEY TO
START MONITOR
, CME12D60 AXIOM.
- Technological Arts (
D-bug12 - FLASH ).
:
Axiom MON12 - HC12 Monitor / Debugger Vxx.x
...Type "Help" for commands
<
, HELP - ENTER,
.
:
1.
2. , .
.
3. ,
.
4. (9600bps), ,
, Parity.
5. . , ,
, .
MON12.
(BUFFELO(tm Motorola.
(PORT S) , SCI0.
- FLASH EEPROM,
, ,
.- dbug12 BUFFALO,
Bit User's Fast Friendly Aid to Logical Operation.
.
MON12 .
MON12 BUFFELO (- kernel
).
- MON12 - 5 :
1. .
2.
3. I/O.
4. (Utility Subroutines)
5.
:
|
(,
) - reset.
- Ram, I/O .
- HC(S)12 .
|
: |
ASCII (American Standard Code for
Information Interchange) carriage
- - - Enter. ,
, .
, . ,
. |
I/O: |
, INPUT, OUTPUT -
INIIT. , , SCI,
: ONSCI,
INSCI , OUTSCI.
9600bps,
, (8 25 ,
).
INSCI INPUT ASCII ( )
. OUTSCI
A, ASCII. |
: |
( Jumps):
Convert
character to uppercase ; |
JMP
UPCASE |
FFAO$
|
Test
character for whitespace ; |
JMP
WCHEK |
$FFA3 |
Check
character for delimiter ; |
JMP
DCHEK |
$FFA6 |
Initialize
I/O device ; |
JMP
INIT |
$FFA9 |
Read
I/O device ; |
JMP
INPUT |
FFAC$ |
Write
I/O device ; |
JMP
OUTPUT |
FFAF$ |
Convert
left nibble to ASCII and output ; |
JMP
OUTLHLF |
$FFB2 |
Convert
right nibble to ASCII and output ; |
JMP
OUTRHLF |
$FFB5 |
Output
ASCII character ; |
JMP
OUTA |
$FFB8 |
Convert
binary byte to 2 ASCII characters and output
; |
JMP
OUTlBYT |
FFBB$ |
Convert
binary byte to 2 ASCII characters and output
;
followed by space ; |
JMP
OUT1BSP |
FFBE$ |
Convert 2 consecutive binary bytes to 4 ASCII
;
characters and output followed by space ; |
JMP
OUT2BSP |
FFCl$ |
Output
ASCII carriage return followed by line feed
; |
JMP
OUTCRLF |
$FFC4 |
Output
ASCII string until end of transmission (EOT
/ ;
$04) ; |
JMP
OUTSTRG |
$FFC7 |
Same as OUTSTRG except leading carriage return
;
and line feed is skipped ; |
JMP
OUTSTRGO |
FFCA$ |
Input
ASCII character and echo back ; |
JMP
INCHAR |
FFCD$ |
|
(
). ( $
) - (
HC12D60 - AXIOM, ,
).
|
: |
- 3 . :
2
characters in command name ; |
2 |
FCB |
ASCII
literal command name string ; |
'MM' |
FCC |
Jump
address for command module ; |
#MEMORY |
FDB |
|
, 2 (Form Constant Byte
2)
, Form Constant Character) CHAR)
, : Form Double Byte)
#MEMORY)
, 3
, .
12,
:
www.axman.com
Support .
, :
ORG $2000
2000 (
Axiom 4000).
,
LOAD, ENTER, (
Page Up) , ( .S19)
. , - command line , :
:> g 2000
GO 2000, 2000
( , ).
D-bug12 MON12,
. - 9S12DP256,
- D-bug12, .
Bootloader.
- HC(S)12
Bootloader, - Bootloader
. - Bootloader
BDM (Background Debug Mode) .
:
1) ASM ( AS12).
AxIde , MiniIde .
2) .
LOAD, ,
- S19.
3) GO ( G 2000 ).
Technological Arts,
, ,
D-bug12 - FLASH, -
Bootloader.
- Bootloader (
' AD0 AD1 - 5 ) , ,
:
D-Bug12 Bootloader v1.0.0
a) Erase Flash
b) Program Flash
c) Set Baud Rate
d) Erase EEPROM
?
d - EEPROM
. ,
a, b, c .
BR 115200 [bps],
, .
, FLOW CONTROL) Hand Shaking)
Xon/Xoff.
- Flash,
. B
. ' AD0 AD1
0 , RESET,
:
start
here! start here! flashit! ; |
ProgStrt |
org |
|
?we'd
want to stack it right ; |
#RamTop |
lds |
|
|
COPCTL |
clr |
|
|
|
:start |
start
of program ; |
start |
bra |
|
|
|
|
|
|
ResetVec |
ORG |
|
|
ProgStrt |
fdb |
|
|
ORG . START $4000 :
, RamTop - 4000 (- On
- Board RAM 4000). ResetVec
.
,
- S19 record, - S912
SRECCVT (
).
2 ,
AxIde, AXIOM :
www.axiom.com
HC(S)12
MiniIde :
www.mgtek.com
.
, Hyper Terminal
.
1. .
2. AS12 ( AxIde)
3. - S19 , :
sreccvt.exe :
sreccvt -m C0000 FFFFF 32 -lp -o outputfile.S19
inputfile.s19
- outputfile.s19
( )
Inputfile.s19 .
, AD0=AD1='1')
Serial Bootloader), , - FLASH,
outputfile.s19 .
( )
AD0=AD1='0') Flash) - reset (
).
.
4. ( ).
|
|
|