Microcontroller Tool Kit

[overview] [loader] [interface]

Microcontroller Tool Kit is a collection of utilities to aid in the programming and debugging of microcontrollers manufactured by Dallas Semiconductor. This software requires Windows 95/98/2000/ME/NT or more recent operating system, and an open COM port (COM1/COM2/COM3/COM4). The program supports the following functions:

Loader

The Loader function of Microcontroller Tool Kit communicates with the internal bootstrap loader of Dallas Semiconductor devices. It allows an embedded system designer to quickly and easily communicate with the bootstrap loader of the Secure Microcontroller family or other Dallas Semiconductor Flash-based microcontrollers through the serial port of a PC.

Programmer

This is the PC host software to interface to the Dallas Semiconductor DS87000 Microcontroller Programmer. It can only be used in conjunction with the DS87000.

FEATURES

· Program Intel hex file to target device

· Verify contents of Intel hex file against target device

· Erase target device

· Configure Lock bits

---------------------------------------------------------------------------------------------------------------

Loader:

The Loader function of Microcontroller Tool Kit communicates with the internal bootstrap loader of Dallas Semiconductor devices.

Allows an embedded system designer to quickly and easily communicate with the bootstrap loader of the Secure Microcontroller family or other Dallas Semiconductor Flash-based microcontrollers through the serial port of a PC. The program acts as a high-featured front-end to the bootstrap loader, simplifying the task of uploading and downloading code while still in the application. Minimal external hardware interfaces the PC to the target device and activates the bootstrap loader. This also serves as the PC host software for the DS5000TK Evaluation Kit.

FEATURES

· Load Intel hex file to target device

· Verify contents of Intel hex file against device memory.

· Erase target device

· Dump/display specified range of device memory to screen (Intel hex record format)

· Calculate CRC over specified memory range

· Configure memory settings (Secure Microcontroller Family)

· Configure security settings (Secure Microcontroller Family)

· Configure/read SFRs related to Flash programming and I/O ports

· Control external loading hardware via COM port DTR signal

The following features/commands are supported by the Loader; various commands and buttons are active or disabled based on the current device selection.

Toolbar

File

Load File to Target

Prompts for a file, then loads that file into memory of the target device.

Clear Flash, RAM

Add or remove a COM Port

Verify File

Verifies target memory against the specified file.

Exit

Terminate Microcontroller Tool Kit.

Options

Auto-Scroll

When selected, causes the active prompt to always remain at the bottom of the main window.

Parse backspaces

When selected, backspaces will be parsed.

Break before autobaud

When selected, sends a breaking character to the target device before attempting to autobaud.

Show hints

Shows a brief description of the button functions on mouseover.

Fix bad checksums on load

When selected, automatically recalculates the checksum when loading files into MTK. If the checksum is incorrect, it will assume the file contents are correct, recalculate the checksum and update the file’s checksum. This feature is particularly useful if one wishes to edit the contents of an Intel Hex file, which almost always changes the checksum, but omit the time consuming process of recalculating the new checksum.

Load blind (LB) on Flash Loads

This forces the DS89C420 to disable its internal data verification when receiving a downloaded Intel Hex file. On earlier revisions of the DS89C420 this allowed faster downloads.

Printing Mode

Selects the mode in which data will be displayed in the main window. "ASCII" displays only ASCII characters, "HEX" shows all characters in hexadecimal format, and "MIXED" shows both ASCII and non-ASCII characters.

Ports

Add Port / Remove Port

Add or remove a COM Port.

Select Port Settings

Choose the active COM port and select the baud rate from commonly used values.

Set Reload Value

Allows user to directly set the reload rate of the 16550 UART embedded in the PC. This permits the selection of non-standard baud rates.

Applications

Selects the active function of Microcontroller Tool Kit. Note that the COM port is automatically closed when switching functions and will have to be reopened.

Device Selection

Selects the target device. Most commands are not available until the target device has been selected.

Debug

Debugger

This feature is reserved for debugging the internal operation of Microcontroller Tool Kit only and should not be enabled except under direction of a Dallas Semiconductor applications engineer.

Capture log

Logs the contents of the main window to a user-specified file.

Stop logging

Terminates logging the main window contents and closes the previously specified log file.

Dump/display to file

When selected, the results of dump and display commands will be sent to a user-specified file instead of the main window.

Help

Options such as documentation for this program, technical support information, and the indispensable "About" page.

Memory commands bar

RELOAD

A shortcut button that reloads the last file selected.

Load

Transmits a file to the target microcontroller via the PC port. This can be used either to load an Intel Hex file to the target via the bootstrap loader or transmit data to the serial port of the target running under a user application.

Verify

Verifies the selected Intel Hex file against target memory locations with the same address. Memory locations not contained in Intel Hex file will not be compared.

Erase

Clears the contents of Flash memory to FFh. Clears the contents of Secure Microcontroller program and data memory to 00h. [????]

Configure

Allows the setting of the partition address for Secure Microcontrollers

Key

Allows the setting of the encryption key for DS5000FP. The user can input their own 5-byte key or have MTK select a pseudo random one.

Dump

Memory contents from Range:Begin to Range:End are displayed on the PC as Intel Hex Data.

Example:

kit> dump 0 2f

:20000000B29080FC3C2D5465737420436F646520202020202020202020202020202020205E
:100020005465787420666F7220446973706C6179CE
:00000001FF

Display

Memory contents from Range:Begin to Range:End is displayed in hex and ASCII format.

Example:

kit> display 0 7f

0000 B2 90 80 FC 3C 2D 54 65 - 73 74 20 43 6F 64 65 20 ....<-Test Code
0010 20 20 20 20 20 20 20 20 - 20 20 20 20 20 20 20 20
0020 54 65 78 74 20 66 6F 72 - 20 44 69 73 70 6C 61 79 Text for Display
0030 50 75 72 70 6F 73 65 73 - 2E 20 41 42 43 44 45 46 Purposes. ABCDEF
0040 47 48 49 4A 4B 4C 4D 4E - 4F 50 51 52 53 54 55 56 GHIJKLMNOPQRSTUV
0050 57 58 59 5A 20 20 61 62 - 63 64 65 66 67 68 69 6A WXYZ abcdefghij
0060 6B 6C 6D 6E 6F 70 71 72 - 73 74 75 76 77 78 79 7A klmnopqrstuvwxyz
0070 2A 20 20 31 32 33 34 35 - 36 37 38 39 30 20 20 2A * 1234567890 *

CRC

Calculates a CRC value over memory contents from Range:Begin to Range:End.

Range

Allows the user to enter the begin and ending ranges used by the functions mentioned above.

SFR bar

SFRs

Displays the contents of the SFRs. This display is only updated when the Update SFRs from Target button is depressed. The contents of the SFRs can be edited in these windows, but will only be updated in the target when the Write SFRs to Target button is depressed.

Write SFRs to Target

Copies the values of all the active SFRs to the target device.

Update SFRs from Target

Reads the values of all the active SFRs from the target device and updates the display windows.

Freshness

Selecting this button places the a DS5001FP, DS5002FP, DS2251T, or DS2252T into Freshness mode. Remove power from the device immediately. This command has no effect on a DS5000FP, DS5000(T), or DS2250(T).

Main window

Results of various operations are displayed here. This window also functions as a terminal emulator, as commands typed in this window are transmitted directly out the selection COM port.

Loader bar

Device Name

Displays the currently selected device.

Loader

This button asserts the DTR signal of the selected COM port, activating the loader mode of the target system.

Run

This button de-asserts the DTR signal of the selected COM port, deactivating the loader mode of the target system, which in most cases will allow the target application to begin running application software.

Com port control

Open Serial Port

Opens the selected serial port.

Close Serial Port

Closes the selected serial port.

Clear Window

Clears the main windows.

--------------------------------

--------------------------------

--------------------------------

Quick start

1. Connect the microcontroller to the PC via an external hardware interface.

2. Select the COM port and baud rate.

3. Select the device type

3. Activate the DTR signal by pressing the Loader button at the bottom of the window. The target device should return its sign-on banner in the main window.

5. Select the Intel hex file (.hex) to be loaded

File -> Load File

The application will show percent completion as it loads and respond with "Done loading file" when complete.

6. If desired, you can verify the load by clicking the Verify button on the memory access bar and selecting the same file you loaded.

On subsequent loads of the same file, the Reload button is a shortcut.

Interface Hardware

Interfacing the PC to the DS89C420

The external hardware interface to the DS89C420 is quite simple. To activate the internal bootstrap loader of the DS89C420, the RST pin must be pulled high and the EA\ and PSEN\ pins must be pulled low. Communication to the bootstrap loader is performed via serial port 0. Loader420 is designed to use the COM port DTR signal (active low) to activate/deactivate the bootstrap loader, which greatly simplifies the loading process. The following illustration shows one possible hardware configuration that will interface the DS89C420 to the PC. This configuration allows in-application programming, as it is completely transparent when the DTR signal is not active.

{bmc 420hardware.bmp}

Interfacing the PC to Secure Microcontrollers without the DS5000TK

The external hardware interface is different depending on whether the microcontroller is a DS5000FP (or DS5000FP-based such as the DS5000T or DS2250T) or DS5001FP/DS500FP (or DS5001FP/DS5002FP-based such as the DS2251T or DS2252). To activate the internal bootstrap loader of the DS5000FP, the RST pin must be pulled high and the EA\ pin must be pulled low. To activate the internal bootstrap loader of the DS5001FP or DS5002FP, the PROG pin must be held low for at least 48 oscillator clocks and remain low throughout the bootloader session. Communication to the bootstrap loader is performed via the serial port. MTK uses the COM port DTR signal (active low) to activate/deactivate the bootstrap loader, which greatly simplifies the loading process. The following illustration shows one possible hardware configuration that will interface the DS89C420 to the PC. This configuration allows in-application programming, as it is completely transparent when the DTR signal is not active.

{bmc 500xhardware.bmp}

Interfacing the PC to the DS5000TK

Follow the directions included in the DS5000TK.