Part I Overview 4 Part II User Guide 4
Part I Overview 4 Part II User Guide 4
Part I Overview 4 Part II User Guide 4
Table of Contents
Part I Overview 4
I
II UPA-USB Device Programmer
MC68HC(9)12B32
..........................................................................................................................................................
QFP80 34
MC68HC(9)12D60(A)
..........................................................................................................................................................
QFP80 35
MC68HC(9)12D60(A)/DG128(A)
..........................................................................................................................................................
QFP112 36
10 Motorola HCS12
................................................................................................................................... 37
MC9S12Dx64/128/256
..........................................................................................................................................................
QFP80 37
MC6S12Dx64/128/256
..........................................................................................................................................................
QFP112 38
11 78K0/HC912 ...................................................................................................................................
Adapter 39
Jumpers and ..........................................................................................................................................................
Connectors Description 40
uPD780824/6/8A
.......................................................................................................................................................... 41
uPD780973/4 .......................................................................................................................................................... 42
uPD780948/9 .......................................................................................................................................................... 43
68HC912 QFP112
.......................................................................................................................................................... 43
Types .......................................................................................................................................................... 51
Index 0
III
4 UPA-USB Device Programmer
1 Overview
Features
Hex Editor
Over write or insert mode
Support hexadecimal, decimal, octal and binary systems
File size up to 2GB (depends on the virtual memory of the computer)
Grouping bytes
Print the whole file or selected part of it
Unlimited Undo/Redo
Ajustable bytes per line
Fast searching/replacing hex or text data
Compare files
Font and colour options
Opening/Saving Intel Hex Format files
Opening Motorola S Record files
Swap even and odd bytes
Copy dump to clipboard
Copy part of a file to another file or to a text editor
Go to specified offset
Fill a selected part of the file in 0 or 255 (FFh)
2 User Guide
2.1 Hex Editor
The hexadecimal editor (HexEdit) allows customer to edited binary files, for programming a memory or
micro controller. Maximal size of the file is theoretical 2 GB, but actually depends on available virtual
memory of the computer. Editor works in overwriting or insert mode, switched by Insert key or by the
button Insert/Over located on the bottom of the window status bar. Hex Edit allows a few files to be
opened and various operations to be done with them. Hex Edit has 3 areas: offset, numerical and text.
000000: 61 62 73 64 65 66 67 68 absdefgh
000008: 6A 6B 6C 6D 6E 6B 70 71 jklmnkpq
Status Bar
Status bar displays the offset of the pointer position from the beginning of the file, the current value
located at this offset and the size of the file. There are few buttons available:
Offset button - Toggles hexadecimal, decimal or octal representing of the offset
Data button - Toggles hexadecimal, decimal, octal or binary representing of the numbers
Size button - Toggles hexadecimal, decimal or octal representing of the file size
Find/Replace button - Show/Hide Find/Replace Bar
Monitor button - Show/Hide Data Monitor Bar
Two editing controls allows translating the pointer position at specified offset and data editing (Press
Enter in the end)
Find/Replace Bar
This bar allows searching/replacing of text or hexadecimal number forward or backward. Text
searching is not case sensitive. If a case sensitive searching is required, click Text button to convert
entered text to ASCII codes. Hexadecimal searching is always case sensitive.
Monitor Bar
There are two buttons on the Monitor Bar. First one specifies the size of the number- 8, 16, 32 or 64
bits. The second button changes the order of the bytes - Intel (less signed byte first); Motorola (most
signed byte first). The number are displayed as unsigned integer, signed integer and a real number
Working with Clipboard
Hex edit clipboard to copy numbers or text from one file to another one. It's possible copying from UPA
to a text editor (Notepad, Word). In this case, the caret position specifies the form of the copied data.
It's possible to copy text from a text editor to UPA's hex editor
000000: 49 74 27 73 20 70 6F 73 It's pos
000008: 73 69 62 6C 65 20 74 6F sible to
000010: 20 63 6F 70 79 20 74 65 copy te
000018: 78 74 20 66 72 6F 6D 20 xt from
000020: 61 20 74 65 78 74 20 65 a text e
000028: 64 69 74 6F 72 20 74 6F ditor to
000030: 20 55 50 41 27 73 20 68 UPA's h
000038: 65 78 20 65 64 69 74 6F ex edito
Keyboard Shortcuts
Left, Right, Up, Down Moves the caret
End Moves the caret to the end of the line
Home Moves the caret to the start of the line
CTRL+End Moves caret to the end of the file
CTRL+Home Moves caret to the start of the file
Tab Toggles between hex and text area
PgDn Moves the caret down by one page
PgUp Moves the caret up by one page
Shift+Arrow keys, Home,End, Selects an area
PgDn, PgUp
Ins Toggles between Insert and Over write
modes
Ctrl+Ins, Ctrl+C Copy
Shift+Ins, Ctrl+V Paste
Ctrl+X Cut
Backspace, Del Delete
Ctrl+Z Undo
Ctrl+Y Redo
EEPROMs SPI: M35080, 25C010, 25C020, 25C040, 25C080, 25C128, 25C160, 25C256, 25C320,
25C640, M25P05, M25P10, M25P20, M25P40, M25P80, ST95010, ST95020, ST95040, ST95080,
ST95160, ST95320, ST95640, ST95P02, ST95P04, ST95P08
EEPROMs Miscellaneous: CXK1011, CXK1012, CXK1013, M6M80011, M6M80021, M6M80041,
SDE2506, TC89101, TC89102
*EEPROM Only
3.5 EEPROMs
3.5.1 I2C and SPI
3.5.2 Microwire
3.5.3 M35080
3.5.4 SDA(E)2506
78K0 in circuit programming via 14 wire connection using J2 connector (Pins 15 and 16 are not used)
uPD780828A connections
uPD780973/4 connections
uPD780948/9 connections
3.11.2 uPD780824/6/8A
3.11.3 uPD780973/4
3.11.4 uPD780948/9
Desolder the MCU from the target board by hot air solder.
Solder the MCU on the 912D60/DG128 testing board according the picture below
Note:
It's possible the original software (in the MCU internal flash) to enable BDM Lockout again after
soldering of the MCU back on the target board.
Such MCU can be read/program by BDM Lockout Adapter only
4.1.1 AddAction
function AddAction( Caption, ProcName, DeviceName: string ): boolean
4.1.2 AddDevice
function AddDevice( DeviceName, Description, GroupName, InheritedDeviceName: string ): boolean
4.1.3 AddDeviceGroup
function AddDeviceGroup( GroupName, Description: string ): boolean
4.1.4 BlankCheckDevice
function BlankCheckDevice: boolean
4.1.5 GetDevice
function GetDevice( DeviceName: string; var DevBase: TDevice ): boolean
4.1.6 HideDeviceOrGroup
procedure HideDeviceOrGroup( DeviceOrGroupName: string )
4.1.7 ProgramDevice
function ProgramDevice: boolean
4.1.8 ReadDevice
function ReadDevice: boolean
4.1.9 ShowDeviceOrGroup
procedure ShowDeviceOrGroup( DeviceOrGroupName: string )
4.1.10 VerifyDevice
function VerifyDevice: boolean
4.2.1 AddOpenFileAction
function AddOpenFileAction( Caption, DeviceName, FileName: string ): boolean
4.2.2 OpenFile
function OpenFile( FileName: string ): boolean
4.3.1 GetByteHexEdit
function GetByteHexEdit( Offset: integer ): byte
4.3.2 GetSizeHexEdit
function GetSizeHexEdit: integer
4.3.3 RefreshHexEdit
procedure RefreshHexEdit
4.3.4 SelectAllMemoryRange
function SelectAllMemoryRange: boolean
4.3.5 SelectEEPROMRange
function SelectEEPROMRange: boolean
4.3.6 SetByteHexEdit
procedure SetByteHexEdit( Offset: integer; Value: byte )
4.3.7 SetProgramModifiedOnly
procedure SetProgramModifiedOnly( Value: boolean )
4.3.8 SetProgramRange
function SetProgramRange( StartVal, EndVal: integer ): boolean
4.4.1 AddMsg
procedure AddMsg( Text: string )
4.4.2 ClearMsg
procedure ClearMsgs;
4.4.3 InBox
function InBox( Caption, EditLabel: string; var Value: string ): boolean
Displays a prompt in a dialog box, waits for the user to input text or click a button, and
returns the contents of the text box to Value parameter.
Parameters
Caption: string
string that contains the input box title
EditLabel: string
string that contains the edit control label
Value: string
Return Value
If the user clicks OK or presses ENTER, the InBox function returns True and Value
parameter, whatever is in the text box. If the user clicks Cancel, the function returns False.
4.4.4 MsgBox
function MsgBox( Text, Caption: string; Flags: integer ): integer
The MsgBox function creates, displays, and operates a message box
Parameters
Text: string
string that contains the message to be displayed
Caption: string
string that contains the dialog box title
Flags: integer
Specifies the contents and behavior of the dialog box. This parameter can be a combination of
flags from the following groups of flags. To indicate the buttons displayed in the message
box, specify one of the following values.
MB_OK
The message box contains one push button: OK. This is the default.
MB_OKCANCEL
The message box contains two push buttons: OK and Cancel.
MB_ABORTRETRYIGNORE
The message box contains three push buttons: Abort, Retry, and Ignore.
MB_YESNOCANCEL
The message box contains three push buttons: Yes, No, and Cancel
MB_YESNO
The message box contains two push buttons: Yes and No.
MB_RETRYCANCEL
The message box contains two push buttons: Retry and Cancel.
To display an icon in the message box, specify one of the following values.
MB_ICONHAND
A stop-sign icon appears in the message box.
MB_ICONQUESTION
A question-mark icon appears in the message box.
MB_ICONEXCLAMATION
An exclamation-point icon appears in the message box.
MB_ICONASTERISK
An icon consisting of a lowercase letter i in a circle appears in the message box.
MB_ICONWARNING
An exclamation-point icon appears in the message box.
MB_ICONERROR
A stop-sign icon appears in the message box.
MB_ICONINFORMATION
An icon consisting of a lowercase letter i in a circle appears in the message box.
MB_ICONSTOP
A stop-sign icon appears in the message box.
Return Value
If the function fails, the return value is zero.
If the function succeeds, the return value is one of the following menu-item values.
4.5 Miscellaneous
Application: TApplication
InputForm: TForm
function IntToHex( Value: Integer; Digits: Integer ): string
procedure SetProductInfo( ProductName, Description: string )
4.5.1 Application
Application: TApplication
4.5.2 InputForm
InputForm: TForm
4.5.3 IntToHex
function IntToHex( Value: Integer; Digits: Integer ): string
4.5.4 SetProductInfo
procedure SetProductInfo( ProductName, Description: string )
4.6.1 Library
function FloatToStr( e: extended ): string
function IntToStr( i: Longint ): string
function StrToInt( s: string ): Longint
function StrToIntDef( s: string; def: Longint ): Longint
function Copy( s: string; ifrom, icount: Longint ): string
function Pos( substr, s: string ): Longint
procedure Delete( var s: string; ifrom, icount: Longint ): string
procedure Insert( s: string; var s2: string; ipos: Longint ): string
function GetArraylength( var v: array ): Integer
procedure SetArrayLength( var v: array; i: Integer )
function StrGet( S : String; I : Integer ) : Char
function StrSet( c : Char; I : Integer; var s : String ) : Char
function Uppercase( s : string ) : string
function Lowercase( s : string ) : string
function Trim( s : string ) : string
function Length( s : String ) : Longint
procedure SetLength( var S: String; L: Longint )
function Sin( e : Extended ) : Extended
function Cos( e : Extended ) : Extended
function Sqrt( e : Extended ) : Extended
function Round( e : Extended ) : Longint
function Trunc( e : Extended ) : Longint
function Int( e : Extended ) : Longint
function Pi : Extended
function Abs( e : Extended ) : Extended
function StrToFloat( s: string ): Extended
function FloatToStr( e : Extended ) : String
function Padl( s : string; I : longInt ) : string
function Padr( s : string; I : longInt ) : string
function Padz( s : string; I : longInt ) : string
function Replicate( c : char; I : longInt ) : string
function StringOfChar( c : char; I : longInt ) : string
CONSTRUCTOR
DESTRUCTOR
DIV
DO
DOWNTO
ELSE
END
EXCEPT
EXIT
EXPORT
EXTERNAL
FINALLY
FOR
FORWARD
FUNCTION
GOTO
IF
IMPLEMENTATION
IN
INHERITED
INTERFACE
IS
LABEL
MOD
NIL
NOT
OF
OR
ORD
OUT
OVERRIDE
DEFAULT
PRIVATE
PROCEDURE
PROGRAM
PROPERTY
PROTECTED
PUBLIC
PUBLISHED
RECORD
REPEAT
SET
SHL
SHR
THEN
TO
TRY
TYPE
UNIT
UNTIL
USES
VAR
VIRTUAL
WHILE
WITH
XOR
4.6.3 Statements
begin statement1; ... statementN; end
if expression then statement1 else statement2
for counter := expression1 to|downto expression1 do statement
case expression of caseList1: statement1; ... caseListn: statementN; end
repeat statement until expression
while expression do statement
with object do statement
uses
try statement except|finally statement end
exit
continue
break
4.6.4 Types
Byte, Shortint, Word, SmallInt, Cardinal, Longint, Integer
Char
String
Real, Double, Single, Extended,Comp
Boolean
Array
Record
Variant
Enumerations
Classes