DS5000TK Microcontroller Evaluation Kit www.dalsemi.com DESCRIPTION The DS5000TK is a development support system which allows immediate evaluation of the DS5000(T) Soft Microcontroller Module. It can also be easily modified to work with the DS2250(T) and DS2252T Microcontroller module as described later in this document. Materials provided with the kit include a DS5000T with 32 kilobytes of RAM, In-System Loader hardware, KIT.EXE evaluation kit software, demonstration software, and full documentation on the DS5000 and DS5000T. With the Evaluation Kit, the user can quickly configure the DS5000T for operation in the target system without detailed knowledge of the operation of the DS5000's bootstrap loader interface. The DS5000TK Evaluation Kit not only serves as a first-time evaluation system for the DS5000 or the DS5000T, but also performs the equivalent function of an EPROM programming system throughout the prototyping phase of the design cycle. The software diskette supplied with the Evaluation Kit includes KIT.EXE as well as utilities that allow you to read/set the date and time in a system using a Soft/Secure microcontroller and time in your PC. See the README.TXT file included on the disk for more information. SYSTEM REQUIREMENTS The DS5000TK Evaluation Kit requires a PC or compatible with at least 128 kilobytes of free memory. KIT.EXE has been tested under DOS, Windows 3.x, and Windows 95. The hardware requires an RS-232 port on the PC for communication with the RS-232 fixture. The DS5000TK hardware requires external power to operate. Power (+5V, GND) must be applied to VCC and GND pins of the target cable of the RS-232 fixture. Failure to do so will result in a "Cannot talk to Kit" or "Prompt not seen" message. A user-selected crystal must be attached to appropriate target cable pins if code is to be run by the DS5000TK hardware. ELECTRICAL SPECIFICATIONS FOR IN-SYSTEM LOADER HARDWARE Operating Temperature Range 0°C to +50°C Power Supply Requirements from Target System 5V @ 100 mA max IN-SYSTEM LOADER The In-System Loader hardware allows application software to be loaded into the microcontroller while it is connected to the target system, eliminating the need for removal of the device when reprogramming is required. It consists of an RS-232 fixture with a 40-pin socket for the microcontroller, with cables to attach it simultaneously to a PC communications port and the microcontroller’s target system. The hardware provides the mechanism for the KIT.EXE software to take control of the microcontroller via the RS-232 cable, place the device in its Serial Program Load Mode, and upload or download code or data to the device. The main components of the In-System Loader hardware are described in detail below: 1 of 5 032000 DS5000TK RS-232 Connector Adapter (with cable). Provides connector for connection to an RS-232C PC COM port on one side and RJ11 female on the other side. Cable carries RS-232 signals required by the kit with two male RJ11 jacks on either end. (Note that although this cable resembles an ordinary telephone cable, it is not the same, and a telephone cable will not work properly.) RS-232 Serial Interface Fixture. Provides RJ11 female for RS-232 signal connection, 40-pin DIP IC socket for microcontroller, and 40-pin PC edge connector for connection to target cable. Target Cable. 40-pin adapter cable that connects the 40-pin edge connector on the RS-232 fixture to the target system microcontroller socket. DS5000TK SOFTWARE The software diskette included with the DS5000TK evaluation kit contains a set of programs which allow you to read and set the date and time in a DS5000T and to compare it with the clock in your PC. KIT.EXE is the software environment supplied with the DS5000TK Evaluation Kit. It provides a high-level interface to any Soft/Secure Microcontroller, allowing the uploading or downloading of application software or setting configuration parameters. For more advanced users, KIT.EXE provides a number of commands which allow individual manipulation of the microcontroller’s resources, including the direct initialization of memory configuration registers, and direct access to general purpose I/O ports 0, 1, 2, and 3. The software allows the examination or editing of memory locations on a byte-by-byte basis. After loading, the device can be released on command from the PC to run the application software. A dumb terminal emulator is included in the software, allowing direct access to the serial port of the microcontroller. DS5000TK INSTALLATION To install the In-System Loader hardware, first turn power off to the target system. Next, the RS-232 Cable adapter should be connected to either the COM1 or COM2 port of the PC. Note that although this cable resembles an ordinary telephone cable, it is not the same, and a telephone cable will not work properly. The RJ11 plug should then be inserted into the RJ11 jack on the RS-232 fixture. Finally, the 40pin Target Cable should be connected between the edge connector of the RS-232 fixture and the 40-pin socket of the target system. The user should check to insure that the switch on the RS-232 fixture is in the "A" position for initial checkout. INITIAL DS5000TK CHECKOUT USING DS5000T MICROCONTROLLER The following procedure will download a sample program, TEST.HEX, to the microcontroller and verify that the Evaluation Kit has been installed correctly. This exercise also demonstrates the most common steps involved in loading new application software. After performing the installation procedure described above, run the KIT.EXE software on your PC. The software will respond with the following banner: 2 of 5 DS5000TK Dallas Semiconductor Secure Microcontroller Evaluation Kit Software Kit - Version 4.0 Copyright (C) 1992,1994,1997 Dallas Semiconductor Corporation kit> First, specify the PC COM port to which the hardware is connected, and the communication speed. Assuming that this is COM 1 the user would enter the following, where <CR> means <ENTER>: kit> com 1 <CR> kit> speed 9600 <CR> Next, verify that the PC and In-System Loader Hardware are communicating correctly by typing: kit> status <CR> The program should respond with a status report similar to the following. Ignore any memory settings, or warnings at this point because the microcontroller has not yet been initialized. Com: 1 Baud Rate: 9600 Dtr: ON Microprocessor: DS5000FP ROM Version: 2.3 Variable - Range: 8000 (32K) Partition: 8000 (32K) Code: 8000 (32K) Data: 0 (0K) If an error message appears asking if the device is connected or powered up, recheck the physical connections between the In-System Loader and the PC, and be sure that power is applied to the appropriate pins on the end of the gray ribbon cable. Set the memory range and partition using the following two commands: kit> range 32k <CR> kit> partition 1000 <CR> Now that the microcontroller’s memory registers are correctly configured, download the file TEST.HEX to the DS5000T by typing: kit> load test.hex <CR> If the load was performed correctly without errors, the kit> prompt will be returned. To verify that the file was received correctly, type: kit> verify test.hex <CR> If the verify was successful, the message No Verification errors will be returned. You can examine the memory contents by using the display command. At this stage you have successfully configured and loaded a DS5000T Soft Microcontroller Module. IN-SYSTEM LOADER OPERATIONAL DETAILS The DTR signal on the COM port interface is activated by the KIT.EXE software to signal the hardware in the RS-232 fixture that serial downloading is in effect. In addition, RTS is activated for the duration of the time that KIT.EXE is in execution. When DTR is activated, the hardware isolates the serial download signals on the DS5000 from the target system circuitry. This includes RST, TXD (P3.1), RXD (P3.0), and XTAL1. RST is then driven high to initiate a reset within the DS5000. Following this action, XTAL1 is then driven with the RS-232 fixture's internal 11.0592 MHz clock oscillator. Finally, PSEN is driven low. This sequence of actions causes the DS5000 to begin operation in its Serial Program Load Mode at a clock frequency from which standard baud rate frequencies may be derived. None of the activity on the RST, TXD, RXD, and XTAL1 pins is driven out to the target system lines while the DTR signal is active. DTR will remain active until either the "Run" or the "Exit" command is executed from KIT.EXE. 3 of 5 DS5000TK When DTR is released, the In-System Loader causes the DS5000 to be reset and begin execution of the application code. When this occurs and the In-System Loader's switch is in the "A" position, all communication performed on the TXD and RXD pins on the target system is isolated from the PC. If the switch is placed into the "B" position, then the TXD and RXD pins are connected to the PC and not to the target system during the execution of the application program. This capability is provided for applications that require that the target system have the ability to communicate to the PC through the COM port used by DS5000TK. In general, however, the "Run" command cannot be used to initiate the execution of DS5000 application software which communicates to the PC, since KIT.EXE will still be in execution and will have control of the COM port. When operating the serial loader, the user should insure that the port pins P2.7 and P2.6 are not externally pulled to a low state. If this condition were to occur, the Parallel Load Mode's Verify cycle would be invoked. As a result, serial communication between the KIT.EXE program on the PC and the serial loader on the DS5000 would not function. This is due to the fact that since RST and PSEN are being pulled high and low respectively to invoke the DS5000's Serial Load Mode operation, the addition of P2.7 and P2.6 being pulled low would satisfy the condition for a Verify cycle on the device. The easiest way to insure that this does not occur is to assign either P2.7 or P2.6 as an output from the target system. This will insure that at least one of these pins will be pulled high by its internal pull-up while the Serial Load Mode is in effect, as all port pins are set to a 1 (reset) state during this time. KIT.EXE OPERATIONAL DETAILS When KIT.EXE is invoked from MS-DOS, communication is automatically established with the DS5000T via its on-chip Serial Loader. KIT.EXE always configures the COM port with 8 data bits, 1 stop bit and no parity, and activates RTS. Communication with the DS5000T is then attempted by asserting DTR and sending a carriage return (<CR>) at the currently selected baud rate (default value is 9600 bps). If no response is detected, then an error message to this effect is displayed to the user. After the baud rate is determined, KIT.EXE holds both the DTR line and the RTS line at their active levels until either a "Run" or an "Exit" command is executed. When the "Run" command is executed, DTR is taken inactive., Both DTR and RTS are de-asserted and control is returned to the MS-DOS operating system when the "Exit" command is issued. DS5000T DEMONSTRATION SOFTWARE The DS5000TK diskette contains a set of programs which work together to allow you to read and set the date and time in a DS5000T and to compare it with the clock in your PC. The program DEMODS5T.HEX runs in the DS5000T, and is used to pass date and time information back and forth between the DS5000T and the PC over the serial port. The program DEMODS5T.EXE runs in the PC, and allows you to read or set the time in the DS5000T and compare it with the PC clock. RUNNING DEMO.BAT DEMO.BAT automatically loads the DS5000T with the DEMODS5T.HEX program to read the time and then runs a program in the PC (DEMODS5T.EXE) to set or display the time sent back by the DS5000T. The following steps are required to run this demo: A. Place your DS5000T in the socket of the RS-232 fixture and turn the socket lock screw to the "C" position. Make sure the small recessed switch below the Load LED is in the "B" position. B. Connect the fixture using the ribbon cable to a socket providing VCC and Ground. The socket must also supply an 11.0592 MHz crystal connected across pins 18 and 19, with pins 18 and 19 also each 4 of 5 DS5000TK connected through a 30 pf capacitor to pin 20 (VSS). Finally, the socket should insure that pin 31 (EA\) is tied to pin 40 (VCC). C. Connect the Fixture to the COM1 serial port of your PC using the modular cable provided. (Note that although this cable resembles an ordinary telephone cable, it is not the same, and a telephone cable will not work properly.) D. Execute DEMO.BAT to begin execution of the batch file. This batch file first runs KIT.EXE, using it to load the Intel Hex program DEMODS5T.HEX into the DS5000T. The batch file then executes the PC program DEMODS5T.EXE. E. Within a few seconds, the program should report that it has found the DS5000T, and it will ask you if you want to set the time. If you answer N, the program will begin reading the date and time information from the DS5000T and comparing it with the date and time from the PC clock. If you answer Y, the program will synchronize the date and time in the DS5000T with the PC clock, then it will display both times. The program will continue running until any key is pressed. DEMODST.HEX OPERATION DEMODS5T.HEX is the program that responds to commands received over the serial I/O port to send or receive the date/time information between the embedded clock/calendar in the DS5000T and the serial I/O port. This allows an external program access to the date/time information. DEMODS5T.LST is an assembly language listing of this program. The program first sets up the serial port for transmission at 9600 baud with eight data bits, no parity, and one stop bit. Next, the program begins execution of a loop waiting for an instruction from the serial port. Two valid instructions, R and W, are recognized. Receipt of the R character causes the DEMODS5T program to read eight bytes of date/time information from the embedded clock/calendar and send them out over the serial port. Receipt of the W character causes the DEMODS5T program to wait for eight bytes of date/time information from the serial port and write them to the embedded clock/calendar. Any other byte received from the serial port is incremented and then sent back out to the serial port. USING THE DS5000TK WITH THE DS2250(T) AND DS2252T The DS5000TK In-system Loader hardware can be easily adapted to work with the DS2250(T) and DS2252T microcontroller modules. The DS9075-40V adapter allows the SIMM to be connected to the 40-pin DIP socket on the DS5000TK In-system Loader hardware without any additional work. The DS9075-40V adapter also allows the DS2252T to be used with the DS5000TK In-system Loader, with one minor modification. Before placing the DS9075-40V into the In-system Loader, it is necessary to remove pin 31 of the DIP pins on the bottom of the connector using wire cutters. This will isolate the SDI pin of the DS2251T from the EA signal of the In-system Loader, allowing the device to be programmed. 5 of 5