Uuprogs
Uuprogs
Table of Contents
     Part I Overview                                                                                                                                                                                  1
                                                                                                                                                                                                             I
 II      UPA-USB Device Programmer-S
                              ..........................................................................................................................................................
                  MC68HC(9)12B32    QFP80                                                                                                                                                34
                              ..........................................................................................................................................................
                  MC68HC(9)12D60(A)      QFP80                                                                                                                                           35
                              ..........................................................................................................................................................
                  MC68HC(9)12D60(A)/DG128(A)              QFP112                                                                                                                         36
      10 Motorola/Freescale
             ...................................................................................................................................
                                     HCS08                                                                                                       37
      11 Motorola/Freescale
             ...................................................................................................................................
                                     HCS12                                                                                                       38
                             ..........................................................................................................................................................
                  MC9S12Dx64/128/256      QFP80                                                                                                                                         38
                             ..........................................................................................................................................................
                  MC9S12Dx64/128/256      QFP112                                                                                                                                        39
                              ..........................................................................................................................................................
                  MC9S12H(Z)128/256      QFP112                                                                                                                                          40
                              ..........................................................................................................................................................
                  MC9S12XHZ128/256       QFP112                                                                                                                                          41
                             .......................................................................................................................................................... 42
                  MC9S12HY64 QFP100
      12 Motorola/Freescale
             ...................................................................................................................................
                                     MAC                                                                                                         43
                              .......................................................................................................................................................... 43
                  MAC7241/2 QFP100
      13 Motorola/Freescale
             ...................................................................................................................................
                                     MPC                                                                                                         44
                             .......................................................................................................................................................... 44
                  MPC5604P QFP100
      14 STMicroelectronics
             ...................................................................................................................................
                                     ST6                                                                                                         45
                  ST6240 QFP80.......................................................................................................................................................... 45
                  ST6245 QFP52.......................................................................................................................................................... 46
                  ST6249 QFP68.......................................................................................................................................................... 47
      15 Infineon
               ...................................................................................................................................
                     XC2300                                                                                                                        48
                             .......................................................................................................................................................... 48
                  XC2336B QFP64
                             ..........................................................................................................................................................
                  XC236x QFP100  JTAG Default position                                                                                                                                  49
                             ..........................................................................................................................................................
                  XC236X QFP100   JTAG position C                                                                                                                                       50
      16 NEC/Renesas
             ................................................................................................................................... 51
      17 78K0/HC912
             ...................................................................................................................................
                         Adapter                                                                                                                 51
                              ..........................................................................................................................................................
                  Jumpers and Connectors          Description                                                                                                                            52
                              .......................................................................................................................................................... 53
                  uPD780824/6/8A
                  uPD780973/4 .......................................................................................................................................................... 54
                  uPD780948/9 .......................................................................................................................................................... 55
                             .......................................................................................................................................................... 55
                  68HC912 QFP112
      18 TMS Adapter
             ................................................................................................................................... 56
                                .......................................................................................................................................................... 56
                  Socket Description
                                ..........................................................................................................................................................
                  Additional Adapter    Schematics                                                                                                                                         57
                                 .........................................................................................................................................................
                         TMS370cx36   Adapter Schematic                                                                                                                                    57
                                 .........................................................................................................................................................
                         TMS370cx42   Adapter Schematic                                                                                                                                    58
             3 Hex Editor
                    ................................................................................................................................... 59
                                   .......................................................................................................................................................... 59
                       GetByteHexEdit
                                   .......................................................................................................................................................... 59
                       GetSizeHexEdit
                                    .......................................................................................................................................................... 60
                       RefreshHexEdit
                                    .......................................................................................................................................................... 60
                       SelectAllMemoryRange
                                   .......................................................................................................................................................... 60
                       SelectEEPROMRange
                                   .......................................................................................................................................................... 60
                       SetByteHexEdit
                                   .......................................................................................................................................................... 60
                       SetProgramModifiedOnly
                                   .......................................................................................................................................................... 60
                       SetProgramRange
             4 Message
                   ...................................................................................................................................
                          and Input Boxes                                                                                                              60
                       AddMsg                .......................................................................................................................................................... 60
                       ClearMsg              .......................................................................................................................................................... 60
                       InBox                 .......................................................................................................................................................... 60
                       MsgBox                .......................................................................................................................................................... 61
             5 Miscellaneous
                    ................................................................................................................................... 62
                       Application           .......................................................................................................................................................... 62
                       InputForm             .......................................................................................................................................................... 62
                       IntToHex              .......................................................................................................................................................... 62
                       SetProductInfo.......................................................................................................................................................... 62
             6 RemObjects
                  ...................................................................................................................................
                               Pascal Script                                                                                                          62
                       Library               .......................................................................................................................................................... 62
                                   .......................................................................................................................................................... 63
                       Reserved words
                       Statements .......................................................................................................................................................... 64
                       Types                 .......................................................................................................................................................... 65
Index 0
                                                                                                                                                                                                             III
      1      UPA-USB Device Programmer-S
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
          Supported Devices (Please visit http://elrasoft.com/uusps.htm for full list of supported devices)
          Renesas RL78: R5F100LEx, R5F10DGDx, R5F10DLDx, R5F10DMEx, R5F10CMEx, R5F10DPJx
          NXP S12ZVH: MC9S12ZVHL32, MC9S12ZVHY32, MC9S12ZVHL64, MC9S12ZVHY64,
          MC9S12ZVH64, MC9S12ZVH128
          NXP S12VR: MC9S12VR16, MC9S12VR32, MC9S12VR48, MC9S12VR64
          Renesas RH850: R7F701002x, R7F701003x, R7F701006x, R7F701007x, R7F701008x,
          R7F701009x, R7F701010x, R7F701011x, R7F701012x, R7F701013x, R7F701014x, R7F701015x,
          R7F701016x, R7F701017x, R7F701018x, R7F701019x, R7F701020x, R7F701021x, R7F701022x,
          R7F701023x, R7F701024x, R7F701025x, R7F701028x, R7F701029x, R7F701030x, R7F701032x,
          R7F701033x, R7F701034x, R7F701040x, R7F701041x, R7F701042x, R7F701043x, R7F701044x,
          R7F701045x, R7F701046x, R7F701047x, R7F701048x, R7F701049x, R7F701050x, R7F701051x,
          R7F701052x, R7F701053x, R7F701054x, R7F701055x, R7F701056x, R7F701057x, R7F7010623,
          R7F7010643, R7F7010673, R7F7010713, R7F701330, R7F701401, R7F701402, R7F701403,
          R7F701A033, R7F701A223, R7F701A313
          Renesas/NEC R8C: R5F212DC, R5F21344P, R5F21344R, R5F21346P, R5F21346R,
          R5F21346W, R5F21347W, R5F21348W, R5F2134AW, R5F2134CW, R5F21546E, R5F21546F,
    *EEPROM only
    **D-Flash Memory only
3.5        EEPROMs
3.5.1      I2C and SPI
3.5.2 Microwire
3.5.3 M35080
3.5.4 SDA(E)2506
3.6.6 MC68HC05K3
3.16   NEC/Renesas
       The connections for V850 devices are available in the UUPROG-S software v2.2.3 and later.
       - Select a V850 device in programmer page, then click connections tab on the bottom right corner of
       the window.
       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.17.2 uPD780824/6/8A
3.17.3 uPD780973/4
3.17.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.
           IDABORT                 Abort button was selected.
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
           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
4.6.4   Types
        Byte, Shortint, Word, SmallInt, Cardinal, Longint, Integer
        Char
        String
        Real, Double, Single, Extended,Comp
        Boolean
        Array
        Record
        Variant
        Enumerations
        Classes