📄 hc05load.usc
字号:
Program Memory_Reader_68hc05B;
// This script reads first 1024 bytes of the memory
// of 68hc05 and then saves results to a Hex Editor
// Conections:
// RTS to Reset /pin 18/
// TxD to RDI /pin 50/
// RxD to TDO /pin 52/
// IRQ /pin 19/ to 2 x Vdd /
// PD4 /pin 9/ to GND
// PD3 /pin 11/ to Vdd
// TCAP1 /pin 22/ to Vdd
// Before running the script open a new hex editor /file/new
const ReadPr = '$39$A6$00$B7$0E$A6$0C$B7$0F$A6$C0$B7$0D$AE$01$0B$10$FD$B6$10$B7'
+'$10$B6$11$E7$7E$AE$02$9D$0B$10$FD$B6$10$B7$10$B6$11$E7$7E$AE$00$9D$0F$10$FD'
+'$D6$FF$FF$B7$11$B6$10$B7$10$20$D4';
var i, size, n: integer;
s: string;
d: Byte;
begin
PowerOn;
ConfigCom( 9600, 8, 0, 0 );
RTS_lo; // Reset MCU
Wait( 1000 );
RTS_hi; // Start MCU in serial ram loader mode
size := Length( readPr );
i := 1;
while i < size do //Transmit a programme to MCU
begin
s := copy( ReadPr, i, 3);
n := StrToInt( s );
WriteByteCom( n );
i := i + 3;
end;
ShowHexEdit; // Open Hex Editor
SetSizeHexEdit( 1024 );
for i := 0 to 1023 do SetByteHexEdit( i, 0 );
for i:= 0 to 1023 do
begin
n := i shr 8;
writeByteCom( n );// TxD High address
writeByteCom( i ); // TxD Low address
if ReadByteCom( d ) = True then //RxD Data
SetByteHexEdit( i, d )
else
begin
ShowMsgs;
AddMsg( 'No Connection!'+' Address:'+IntToHex( i, 2 ) );
break;
end;
end;
RefreshHexEdit;
PowerOff;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -