Page 4
IMPORTANT NOTICE Texas Instruments (TI) reserves the right to make changes to its products or to discontinue any semiconductor product or service without notice, and advises its customers to obtain the latest version of relevant information to verify, before placing orders, that the information being relied on is current.
How to Use This Manual This manual describes how to use and operate the TMS370 Microcontroller Programmer and the TMS370 Gang Programmer. Chapter 1 gives an over- view of each programmer and describes the correct way to install your specific programmer.
The following TMS370 documents are available through Texas Instruments Incorporated: The TMS370 Family Data Manual (literature number SPNS014) describes the hardware aspects of the TMS370, such as pin functions, architec- ture, stack operation, and interface; the manual also includes the TMS370 assembly language instruction set.
The information in a caution or a warning is provided for your protection. Please read each caution and warning carefully. Trademarks MS-DOS is a trademark of Microsoft Corp. XDS is a trademark of Texas Instruments Incorporated. PC/AT is a trademark of International Business Machines Corporation. Information About Cautions and Warnings...
Introduction and Installation ........... . . Microcontroller Programmer Overview and Description Gang Programmer Overview and Description 1.2.1...
Page 10
Contents 2.12 Saving Configuration Parameters and the Device Table to a File — the Save Command ............2.13 Showing the Display Window —...
(that is, 2.1, 2.2, 3.5, etc.) , is specific to the program- mer symbolized by the icon. Texas Instruments provides a hotline to assist you with technical questions about the TMS370 family products and development tools. Phone (713) 274-2370 between the hours of 8:30 a.m.
40-pin to 28-pin converter, which is sold separately. Figure 1–1. Microcontroller Programmer Personality Module To operate the programmer, create a COFF file using the TMS370 Assembler and Linker on a PC. The programmer loads the object code from the COFF file into PC memory and programs a device from the data in PC memory.
Page 17
Microcontroller Programmer Overview and Description The base unit of the programmer contains two LEDs. The red LED is marked program or device power and is lit whenever power is applied to device sockets. The green LED is marked power and indicates that the base is turned on.
Gang Programmer Overview and Description Gang Programmer Overview and Description The TMS370 Gang Programmer is an interactive, menu-driven system that provides programming support for on-chip EEPROM or EPROM of TMS370 microcontrollers in production environments. The gang programmer has the following features: Two modes of operation—PC mode and standalone mode.
Page 19
Gang Programmer Overview and Description alone mode; it is ignored in PC mode. The red LED built into this switch is marked TMS370 power on and indicates that power is being supplied to the sockets on the gang programmer. Do not insert or remove devices from the programmer while the red...
Operating the Gang Programmer in PC Mode In PC mode , the gang programmer is an interactive, menu-driven system that facilitates programming TMS370 family devices and EPROMs. The system al- lows you to perform any or all of the operations listed below.
Page 21
Gang Programmer Overview and Description 1) Position the toggle switch to either the program position or the verification position. 2) Press the push button on the programmer. While you press the push button, all 16 LEDs turn on, and remain on to verify LED operation, until you release the push button.
PDS base unit and the required power connec- tions for connecting your programmer to a PC or TMS370 XDS. Also included in these subsections is a description of how to properly insert DIPs and PLCCs.
1.3.2 Power Connection Connect the female end of the power cord to the PDS base unit. The programmer can handle a power range of 105 to 265 volts AC at 47 to 440 hertz. All units are equipped with two power cords. If you are in the U.S.A., use the power cord with a male connector that can be plugged directly into a 120-V, 60-Hz power socket.
Properly Installing the Programmer Hardware 2) Connect port A of the XDS to the PC by using the cable supplied with the XDS. 3) Ensure that the switches on the XDS Communications board are set as in Table 1–1. Table 1–1. XDS Memory Expansion/Communications Board Switch Settings Switch No.
1.3.5 Integrated Circuit (IC) Insertion ICs may be inserted or removed while power is applied to the programmer; however: 1) When using the microcontroller programmer, never use more than one IC socket at a time. Damage to the IC or the programmer could result.
Page 26
Properly Installing the Programmer Hardware To install a DIP device: 1) Align the IC so that pin 1 is oriented in the upper-left corner, indicated on the printed circuit board by a circled number 1: 2) Raise the locking arm, pulling it toward you to the upright position. 3) Insert the IC.
Page 27
Properly Installing the Programmer Hardware To install a PLCC device: With this release of the programmers, the PLCC sockets do not have a lid; therefore, they are not sensitive to the device package height. These new sockets also have the pin 1 orientation at the top of each socket, making it less likely for you to insert a device backwards.
Properly Installing the Programmer Software Properly Installing the Programmer Software Installing software is exactly the same whether you are using the Microcontrol- ler Programmer or the Gang Programmer. Insert the diskette supplied with the programmer into the PC disk drive and use one of the following methods to copy the contents of the diskette to a directory in your hard disk.
Page 29
Properly Installing the Programmer Software table. The order in which the programmer looks for the device table is out- lined below. a) First, it looks for a device table file specified in the configuration/batch file if the configuration/batch file was included in the command line to invoke the programmer software.
Invoking the Programmer Software Invoking the Programmer Software Before activating the programmer, be sure that it is plugged in and correctly connected as described in Section 1.3. Turn on the programmer’s power switch (and the gang programmer’s external power) before invoking the pro- grammer software.
We assume that you are familiar with the TMS370 Assembler and Linker soft- ware and that a COFF file has been created that contains object code with which a device can be programmed.
Page 32
Getting Started—Example Sessions Object file: 6) Enter the name of the COFF file containing the object code with which the device is to be programmed. Press Object base address: all where all is the default, meaning that the entire object code address range is to be used.
1.6.2 Interactive Programming Example 2 This sample session illustrates entering the interactive mode with the COFF file automatically loaded into PC memory. If the programmer software is active, that is, in the display or configuration windows, press mer and verify your choice. This returns the DOS environment. 1) At the DOS prompt, type the following command: C:\>prgrm370 where xyz.out is the name of the COFF file containing the object code with...
Operating in the Configuration Window This chapter describes the commands offered in the configuration window of the programmer’s display. The first part of this chapter explains how the command menus and function keys work; it also has a short section on entering information at the cursor prompt.
How Command Menus Work How Command Menus Work The interactive mode of the programmer is driven by command menus that are displayed on the top line of the screen. A command menu is a list of command names, each of which is displayed with one highlighted letter, usually the first character in the name.
Using the Special Function Keys Function keys depending on your location in the command menu structure. The valid function keys and their definitions for each mode are displayed on the bottom line of the screen for reference. Press the highlighted key for the desired action. Another special function key is return to the next higher command menu level, press this function key.
Understanding Your Input at the Cursor Prompt Understanding Your Input at the Cursor Prompt The programmer software often requires you to enter a response to a prompt or to move the cursor to a value on the screen and modify it. The previous or default value for the prompted parameter value is always dis- played.
27256 TMS27C256 2732 TMS2732A 2764 TMS2764 TMS27C64 7742 TMS7742 TMS370 16K_PE 256_DEE 4K_PEE 512_DEE C010 C050 The configuration window consists of three different areas—a command line, a program configuration area, and the device table. The command line lists the available commands you can use to manipulate the data in the configuration window.
Page 40
TI updates the DEVICE.TBL file and makes it available through our microcontroller bulletin board system. For infor- mation on how to use the bulletin board, contact the TMS370 hotline at the number indicated on page 1-1.
TMS27C256 2732 TMS2732A 2764 TMS2764 TMS27C64 7742 TMS7742 TMS370 16K_PE 256_DEE 4K_PE 512_DEE C010 C050 The show ranges window does not neccesarily default to show the ranges of the chosen device. Instead, it shows the ranges of the device that the cursor is next to in the device table.
0s and 1s. For all other types of memory, writing 0s is the only programming mode. The three modes provided for the TMS370 allow the selection of the most efficient programming. When the 1s and 0s mode is used, the programmer makes two passes through the address range, programming the 1s in one pass and the 0s in the other pass.
Device family name: Device first name: Legal device family names supported by the programmers are TMS370, 2732, 2764, 27128, or 27256. Device first names are names that distinguish different versions of the same device family. The programmer software checks the device table to make sure the new device is not a duplication.
Block Erase: Using the block erase parameter for devices with a family code of 10h (TMS370 EEPROM range) allows the array to be erased to 1s or 0s. The block erase parameter is ignored for any other family code and should be set to none for clarity.
Program Algorithm: If the family code is 10h (TMS370 EEPROM range), one of three pro- gramming algorithms can be chosen— program 1s, program 0s, or program 1s and 0s. Using this parameter along with the block erase parameter, you can optimize for programming speed or can mini- mize the number of write erase cycles.
Editing the Configuration Parameters and Device Table 2.9.2 Editing the Device Table The device table is a list of devices catagorized by family name and device first name . The software diskette provides a device table file, device.tbl , that con- tains a list of devices and their configuration parameters.
Page 47
Editing the Configuration Parameters and Device Table Pressing causes this temporary window to disappear, and the previous window is resumed. Pressing from the device table selects the device on the line where your cursor is positioned. The device you have chosen is highlighted when se- lected.
Loading the Device Table and Configuration Parameters From a File 2.10 Loading the Device Table and Configuration Parameters From a File — the Load Command When you select the L command, a submenu displays options for choosing a file to load. The commands in this submenu are listed below; the letter that invokes the command is printed in bold type.
Selecting a Current Device/Saving the Configuration Parameters and Device Table to a File 2.11 Selecting a Current Device — the Choose Device Command The choose device command moves the cursor directly to the device table. Use the cursor control keys to move the cursor to the device you will be pro- gramming and press returns you to the configuration command line.
Showing the Display Window/Ending Your Current Session and Returning to DOS 2.13 Showing the Display Window — the Display Command When you choose the display command , the programmer software checks to to see if a current device type has been selected. If you have selected a current device type, the programmer sets up the configuration and briefly displays the following message before returning to the top level command.
Operating in the Display Window This chapter describes the commands offered in the display window of the programmer’s display. The first part of this chapter explains how the command menus and function keys work; it also has a short section on entering information at the cursor prompt.
How Command Menus Work How Command Menus Work The interactive mode of the programmer is driven by command menus that are displayed on the top line of the screen. A command menu is a list of command names, each of which is displayed with one highlighted letter, usually the first character in the name.
Using the Special Function Keys Function keys depending on your location in the command menu structure. The valid function keys and their definitions for each mode are displayed on the bottom line of the screen for reference. Press the highlighted key for the desired action. Another special function key is return to the next higher command menu level, press this function key.
Understanding Your Input At the Cursor Prompt Understanding Your Input at the Prompt The programmer software often requires you to enter a response to a prompt or to move the cursor to a value on the screen and modify it. The previous or default value for the prompted parameter value is always dis- played.
00A0 00 00 00 00 00 00 00 00 PgDown Current Device: TMS370 C256 PCMODE All the commands are described briefly in Table 3–2. A complete description of all display window commands can be found in Sections 3.6 through 3.17.
The disassembler key allows you to inspect the reverse- assembled code window. The display is the same as the code window of the TMS370 XDS Debugger, except that the display is not symbolic and the code is disassembled from the PC memory instead of the emulator memory.
F2 (Pg Up) F3 (Address) The programmer can not disassemble backwards through the PC memory. For this reason, you cannot scroll up past the lowest address that was used when the virtual buffer was initially filled with disassembled code. If you scroll down past the limit of the buffer, the buffer wraps around, and you will not be able to scroll back to the original starting address.
Filling a Block of PC Memory With a Value Filling a Block of PC Memory With a Value — the Fill Command Use the fill command to fill a block of PC memory with a value. Step 1: Define the size of the block by answering the following two prompts: Fill Start Address: Size (in bytes) : 0000h Enter the start address in the range (0000h–FFFFh).
If the file is not recognized as a TMS370 object file, another error message is displayed. You will be asked if you want to load the file anyway.
Page 60
Outputting a COFF File From PC Memory Outputting a COFF File From PC Memory — the Output COFF Command Use the output COFF command to create a COFF object file from the PC memory. This command allows you to specify the block(s) of PC memory to be used to create the COFF file.
For example, you can create a COFF file from device location 7000h to 7FFFh with a section address 0000h in the COFF file. Refer to the TMS370 Family Assembly Language Tools User’s Guide for more information on COFF files. The COFF file created by the pro- grammer does not have the symbolic information that would be available after an assembly.
Moving Blocks of PC Memory Moving Blocks of PC Memory—the Move Command Use the move command to move a block of PC memory from one location to another PC memory location. Step 1: Identify the size of PC memory to be moved. Move Size (in bytes) : Enter the start address of the block to be moved and then enter the...
3.10 Programming a Device From PC Memory — the Program Command When you use the program command, the microcontroller and gang programmers display different prompts and messages. The microcontroller programmer is discussed in sub-section 3.10.1, and the gang programmer is discussd in subsection 3.10.2.
Page 64
B4h , but the value read back from the device is FFh . 3-14 key to abort the process and return to the display programming. (hit any key) TMS370 EEPROM Programmer v3.20 Verification output by byte: Byte Value Byte Value...
Gang pro- grammer. If this is the case, the following error message is displayed: unable to communicate with TMS370 device – Retry, Abort You should inspect all of the devices for misalignment or bent pins. You may have to remove devices until the bad device is found.
Page 66
Programming a Device From PC Memory Once the programming begins, it proceeds packet by packet in180-byte seg- ments. Before a packet is programmed, the programmer verifies that the desti- nation device address is inside the valid address ranges defined for the current device type.
3.11 Showing and Operating Within a Text File—the Show Command Use the show command to show a text file. This command uses the entire screen below the second line as the file display window. When you select the show command, the programmer prompts for a file name: File: Type the pathname of the file to be displayed.
Showing and Operating Within a Text File 3.11.1 Finding Character Strings Within a Text File — the Find Command The find command allows you to search for a string of characters in the text file. When the programmer prompts you for a character string, type a string up to 30 characters long.
3.12 Uploading a Device’s Contents Into PC Memory– the Upload Command When you use the upload command, the microcontroller and gang program- mers display different prompts and messages. The microcontroller program- mer is discussed in sub-section 3.12.1, and the gang programmer is discussd in sub-section 3.12.2.
Uploading a Device’s Contents Into PC Memory During the uploading process, the programmer displays a status message on the bottom line of the screen to indicate the address currently being read. Reading at address 7000 This message is updated when the programmer starts to upload the next pack- If you want to terminate the uploading process before it has completed, press to abort the process and return to the display command menu.
Page 71
Uploading a Device’s Contents Into PC Memory unable to communicate with TMS370 device – Retry, Abort You should inspect all of the devices for misalignment or bent pins. You may have to remove devices until the bad device is found.
Verifying the Contents of a Device 3.13 Verifying the Contents of a Device – the Verify Command When you use the verify command, the microcontroller and gang programmers display different prompts and messages. The microcontroller programmer is discussed in sub-section 3.13.1, and the gang programmer is discussd in subsection 3.13.2.
rent device type. If the address is not in the range, the following error message is displayed. Address out of During the verification process, the programmer displays a status message on the bottom line to indicate the beginning address of the packet currently being programmed.
Page 74
If this is the case, the following error message is displayed: unable to communicate with TMS370 device – Retry, Abort You should inspect all of the devices for misalignment or bent pins. You may have to remove devices until the bad device is found.
Page 75
Verifying the Contents of a Device Once the actual verification begins, it proceeds packet by packet (180-byte segments). Before a packet is read, the programmer verifies that the source device address is inside the valid address ranges defined for the current de- vice type.
Editing the Contents of PC Memory 3.14 Editing the Contents of PC Memory—the Edit Command The edit command puts the programmer in a special mode that allows you to overwrite the contents of the PC memory by typing new values. When you press can scroll up and down through the PC memory with the cursor and function keys, and modify individual bytes.
3.15 Using the Master Mode Menu—the Master Command The master command mode allows you to program and manipulate data with a master device as the source of the data manipulation. This command brings up a menu simliar to the display window command menu. All the commands, except program, upload, and copy, work identically to the display window commands;...
Suspending the Program and Entering DOS/Quitting the Program and Exiting to DOS 3.16 Suspending the Program and Entering DOS—the System Command The system command temporarily suspends the programmer software so that you can use DOS commands and functions. When you are ready to leave DOS and return to the programmer software, enter EXIT and press 3.17 Quitting the Program and Exiting to DOS—the Quit Command The quit command exits the programmer software and returns to DOS.
Page 79
Operating the Programmer in Batch Mode In the batch control mode, the execution flow is defined in a configuration/ batch file, and all messages are displayed in line-oriented mode. The configu- ration/batch file consists of a set of commands that define the current configu- ration and give direction of execution.
If you want to use this file as a batch control file, you must add batch commands to control programmer operation. Details about the valid batch commands are explained in Section A.2. ;Use device table ’dev220.tbl’. ;Device family is ’tms370’, device ;first name is ’C756’. ;Use COFF file ’test.out’. ;Use communication port 1.
To eliminate extra data ranges (ranges that would be later pro- grammed in an external EPROM, for example) from the COFF output file, mark them as NOLOAD in the link command file. Refer to the TMS370 Assembly Language Tools User’s Guide for more information on the linker and the NOLOAD section type.
DV = device family @ device first name This command specifies the device type to be used for the program/verify op- erations. The choices for device family are TMS370, 2732, 2764, 27128, 27256, or 7742. The device first name is any name defined in the current de- vice table.
Batch Mode Status Messages A.3 Batch Mode Status Messages When programming begins, a status message informs you: Programming at device address where device address is the location on the device that is currently being pro- grammed. This message is updated every time the programmer starts on the next packet of data.
Appendix B Error Messages This appendix briefly describes the error messages associated with the programmers. It also gives reasons why the error occurred and sugges- tions on how to fix the error. The messages are arranged in alphabetic order.
– Retry, Abort The programming range is not valid for the device to be programmed. This is often caused when you try to program a TMS370 device at the register or peripheral file address locations. You cannot program to these locations.
Page 87
5, 12, 12.5, or 21 volts. unable to communicate with TMS370 device – Retry, Abort The programmer is unable to communicate with the TMS370 microcon- troller. The microcontroller may have bent pins, may be inserted incorrect- ly, or may be inoperable. If you are using the gang programmer, a single bad microcontroller can prevent the programmer from communication with any of the devices.
Page 88
Error Message Descriptions These error messages are specific to the gang programmers. checksum error in master device – Retry, Abort The data in the master device is corrupt. Replace the master EPROM. illegal memory type detected in master – Retry, Abort The master EPROM device has illegal configuration data.
Page 91
In the following example, it is assumed that the program is contained in the file a.out, which is in the directory DEMO on the current drive. The device selected is TMS370 16K_PE, the seventh entry in the default device table. The key- stroke file used is example.key.
Using Keystroke Capture Files Example D–1. Keystroke File Example.key C$DARW $DARW $DARW $DARW $DARW $DARW $ESC d$F3 40000h$CR f4000h$CR 4000h$CR 0ffh$CR 1\demo\a.out$CR $SRECORD To replay this keystroke file, invoke the programmer with a /k option followed immediately by the filename. prgrm370 /kexample.key From the code above, nonprintable characters are recorded as text names preceded with $.
Page 93
Using Keystroke Capture Files Text Name $INS $LARW $RAWR $SRECORD $TAB $UARW Actual Keystroke insert left arrow arrow right arrow stop record space up arrow...
Page 99
IMPORTANT NOTICE Texas Instruments (TI) reserves the right to make changes to its products or to discontinue any semiconductor product or service without notice, and advises its customers to obtain the latest version of relevant information to verify, before placing orders, that the information being relied on is current.
Need help?
Do you have a question about the TMS370 and is the answer not in the manual?
Questions and answers