MSC12xx Serial Programmer Guide
MSC12xx Serial Programmer Guide
ABSTRACT
The MSC12xx series of microcontrollers consists of microsystem products containing
analog-to-digital converters (ADCs) and digital-to-analog converters (DACs) with
embedded flash memory. The flash memory ranges in size from 4K to 32K and can be
used for both code development as well as applications. Some applications commonly
require programming the flash one time only; in such cases, it may be possible to use
high-speed parallel programmers. Other applications require the flash to be updated.
The serial programming function of the MSC12xx products can be used to program the
flash for development, system applications and updates. A high-speed serial program-
ming board can be constructed for this purpose without the need for installing
unnecessary interface components on every system board. This application report
discusses building and using a proven serial programmer as well as circuit design
descriptions sufficient for the user to build his or her own programming board. TI does
not sell or build any version of this board.
Contents
1 Features ............................................................................................. 2
2 Overview ............................................................................................. 2
3 Hardware ............................................................................................ 3
4 Usage ................................................................................................ 5
5 USB Driver........................................................................................... 9
6 References ......................................................................................... 10
Appendix A MSC12xx Serial Programming Board Schematic ................................... 11
Appendix B Silk Screen ............................................................................... 12
Appendix C Bill of Materials .......................................................................... 13
List of Figures
1 Block Diagram ...................................................................................... 2
2 TI Downloader Installation Screen ............................................................... 5
3 TI Downloader Start-up Screen ................................................................... 7
4 Terminal Window ................................................................................... 8
5 TUSB Driver Installation Screen ................................................................ 10
List of Tables
1 TI Downloader Shortcut Operands ............................................................... 6
2 TI Downloader Terminal Command Icons ....................................................... 9
C-1 MSC12xx Bill of Materials ........................................................................ 13
Features
1 Features
• Single device programming for any MSC12xx product
• RS-232 or high-speed USB serial communication
• Hot switching of target systems
• Possible download speed of 921.6K baud with USB
• Status and reload features when using the TI Downloader software
2 Overview
Some applications may only require a single programming of the flash on a MSC12xx device. This is often
done using parallel programmers prior to PCB assembly. There are times, however, when applications
may need updating in the flash. This may occur as a program change, a bug fix, or during application
development. The MSC12xx Serial Programmer described in this application report allows a simple means
of updating the target device while allowing the target system to have minimal components for
communication. This is achieved by placing the necessary communication hardware on the MSC12xx
Serial Programmer. A ribbon cable can then be used to connect the programmer to the target system. In
this way, a single programmer can be used to program many target devices without the cost of having
each target system built with the necessary communication components. Figure 1 shows a block diagram
of the MSC12xx Serial Programmer.
RS−232
Buffer Reset Reset
Transceiver
MSC12xx
TI Downloader Target
PSEN
Running on PC Program
Load
RX
USB−Serial
Buffer
Converter
VDD
Enable
The programmer consists of both a RS-232 DB-9 and a USB type B connector for serial communication
from a PC or terminal device. You can enable the mode of communication that best suits your needs. The
programmer converts the incoming signals to logic levels and buffers the output. Serial data moves to and
from the target device through a switch to a header. A cable connects the header on the programmer to
the target system.
When using RS-232, an external power supply must be connected to the programmer. If USB is used,
power can be supplied from the USB interface device.
The programming header to the target device contains +VDD and GND. This allows for the option of
powering the target from the programming board, or vice-versa. Signals also going to the header include
PSEN, RESET, RXD and TXD. A switch is available to disconnect the power and signal lines to the target
device while leaving the programmer in a powered state.
The serial flash programming mode is initiated when PSEN is logic low (0) and ALE is logic high (1) when
reset has completed. This is accomplished by using handshake signals from the communication terminal
to derive the reset and program load functions. Communication with the device occurs via serial port 0
using port pins P3.0(RXD) and P3.1(TXD).
Timing for PSEN and RESET are determined by preset values of supervisor devices connected to the
RTS and DTR handshake signals. The output of the supervisors are connected through the switch to the
programming header.
A number of commands can be communicated to the device such as Flash Erase, Flash Read and Flash
Write. Download format is Intel hex. (For additional information, see Application Note SBAA076, available
for download at [Link].)
Hardware
The TI Downloader program is the easiest way to communicate with and download the desired program to
the target device. However, any terminal device and program can be used. (See Application Note
SBAA089A, available at [Link].) One of the advantages of the TI Downloader is the ability to use the
setup, status and programming capabilities built into the software. This software also allows for flexible
user configuration. The TI Downloader software runs on any Microsoft Windows®-equipped PC; however,
in order to use the USB functions, you will need a PC that is using Microsoft Windows98SE® or higher.
3 Hardware
Hardware
The transceiver used is a MAX3243 (U7.) Only one half of the transceiver pair is needed for
communication. The FORCEON and FORCEOFF lines are configured so that the transceiver is in the
always-on condition when JMP4 is not installed. When JMP4 is installed, the buffers for U7 are disabled
and the transceiver is forced off by pulling pin 22, the FORCEOFF pin of U7, low.
Transmit data from the PC or terminal device is translated to the proper logic levels then buffered through
the tri-state buffer connecting to the target device as RX through J4 pin 3. TX data from the target device
follows a reverse path through J4 pin 5 to the transceiver that translates the signal to RS-232 levels. This
is the receive data to the PC or terminal device.
Control signals for resetting or programming the target device follow control signals through the control
lines RTS and DTR. These signals are also buffered to the target device. DTR controls the Reset and
RTS controls PSEN for program load.
Usage
There is a diode (D5) connected between the outputs of the open drain buffers (U8 and U9.) The
orientation of the diode allows the reset function to have no effect on the PSEN line. However, the
program load function will activate both the RESET function and the PSEN function by pulling pin 3 low for
both U10 and U11.
SW1 and SW2 allow for manual operation of the reset and program load functions.
For more detailed information on the required timing for RESET and PSEN for program loading, see the
product data sheet for the specific device of interest.
4 Usage
4.1 TI Downloader
The TI Downloader software allows communication between the PC and the target device via the
programming board. The software will utilize the DTR and RTS signals to either reset the device or set the
device into serial programming mode. The software will also allow the PC to act as a terminal device for
loading the Intel hex files into the MSC12xx flash memory.
4.2 Installation
The easiest way to install and set up the TI Downloader software is by using the MSC products CD-ROM.
This CD-ROM comes will all MSC12xx evaluation modules. The drivers can also be downloaded from the
TI website at [Link] by searching for MSC1210. On the product page, look under Related Software.
If using the CD-ROM, select the checkbox for TI Downloader and press the Install Checked Items button
(see Figure 2).
Usage
Follow the setup prompts. The installation of the program defaults to the Windows directory. The shortcut
to the TI Downloader program defaults to the Texas Instruments group.
4.3 Usage
Shortcuts to the TI Downloader program may include command line arguments in the form of:
• [Link] [/Ffilename] [/Xfrequency] [/Pport] [/Bbaud] [/H] [/Tbaud] [/S] [/D]
A list of the available operands is found in Table 1. Each operand should immediately follow the switch
character with no spaces. As an example, the shortcut may appear as:
• [Link] /[Link] /B9600 /P1
If the filename, crystal frequency or port are not included, then a pop-up box will appear to prompt for the
necessary information.
If the /F or /X command line operators are missing, the TI Downloader program will wait for input on a
screen similar to that shown in Figure 3. A separate box will pop up, prompting the user for the filename.
To use the drop-down menu for baud rate selection, the appropriate checkboxes must be selected for
opening the terminal screen or setting the download baud rate. The same is true for limiting the flash
erase. To enter a flash erase value, the checkbox must be selected for limiting the flash erase. There are
additional checkboxes for erasing the hardware configuration and for skipping the file download altogether.
Faster downloads can occur when the /B option is selected because it determines the actual internal clock
frequency and sets the timer register. When autobaud is not used, the communication speed can be much
faster.
Usage
Once the file download process begins, a progress and status bar will appear at the top of the display
window. If the download completes successfully and either the /T option was selected or the open terminal
screen option was selected, then a terminal window will open. There are a number of icon options at the
top of the window, as shown in Figure 4. Table 2 lists the icons as they appear from left to right in the
terminal window.
Usage
USB Driver
One icon of particular interest is the one for reloading the hex file (see the sixth bullet in Table 2). When
using the serial programming board, this icon will allow the repeated operation of loading the program.
This is useful when changing target devices so that there is no need to restart the TI Downloader program
each time. It is also helpful when using a compiler that only generates a new hex file but does not call the
downloader.
Open Log File Opens a file to record terminal activity as a log file.
Close Log File Discontinues terminal logging and closes the log file.
Load Basic File Used to retrieve a file and send it to the COM port. Starts with NEW command.
Save Basic File Issues the LIST command and copies the result to a file.
Reload Hex file Resends the hex file previously sent to the MSC12xx device.
Power Cycle Cycles the power for MSC1210-DAQ-EVM. It has no effect on the MSC12xx Serial Programmer.
5 USB Driver
References
6 References
• MSC1210 In-Application Flash Programming (SBAA087)
• Building and Using the MSC1210 Versatile Programmer (SBAA093)
• TUSB3410 Data Sheet (SLLS519)
• TUSB3410UART EVM User’s Guide (SLLU043)
• MAX3243 Data Sheet (SLLS350)
• MSC1210: Precision ADC with 8051 Microcontroller and Flash Memory Data Sheet (SBAS203F)
• MSC1200: Precision ADC and DAC with 8051 Microcontroller and Flash Memory Data Sheet
(SBAS289E)
+3.3V C23
1uF
26
U7 J3
VCC
DIN2 DOUT2
12 11 2 RD
DIN3 DOUT3
+3.3V 19 7 RTS
ROUT1
18 4 3 TD
ROUT2 RIN1
20 5 8 CTS
ROUT2B RIN2
17 6 4 DTR
ROUT3 RIN3
RA1 16 7 9 RI
100K ROUT4 RIN4
15 8 5 SG
ROUT5 RIN5
+3.3V
23 21 RS232−DB9−F
FORCEON INVALID
22 GROUND BOARDLOCKS
FORCEOFF
3
V−
TP3 27
V+
TP4
C2+
C2−
C1+
C1−
GND
C3 C4
1
2
28
24
25
MAX3243 0.1uF 0.1uF
+3.3V
C5 C6
C20
0.1uF 0.1uF
+3.3V
1uF
C17 U4 Vdd
SW 1
2 14
1A VCC R16
1uF +3.3V 5
2A
C18 9 3 10K
R5 R6 3A 1Y RE SET
C21 12 6
4A 2Y
1 8 +3.3V
5
5
5
3OE 100K
FERRITE BEAD
10
11
4
3
25
2 4 13 7 2 4 3
VDD
U3 4OE GND MR
L1 X1 4
3
3
26 RESET
X2 SN74LVC125APW 1
27 CT
SCL
D5
SDA
VDD
VCC
VCC
X1/CLKI
GND
CLKOUT SOUT/IR_SOUT
J1 R1 33pF 33pF 17 TPS3837L30DBVT
SIN/IR_SIN
1uF C7 BAT54
4 1.5K 13 U5 0.1uF 10ms Pulse
GND R2 CTS
3 20 2 14
D+ RTS 1A VCC
2 33 5 16 5
D− PUR RI/CP 2A R17
1 6 21 9 3
VCC R3 DP DTR 3A 1Y
7 14 12 6 10K
DM DSR 4A 2Y Vdd
L2 33 15 1 8 DTR R12
FERRITE BEAD DCD 1OE 3Y
USB SLAVE CONN 8 4 11 RTS
GND 2OE 4Y +3.3V 100K
CF1 +5V USB C13 C14 18 10
5
2 24 C8 100K
TEST1 2 4 3
VDD
SN74LVC125APW MR R14
JMP1 4
3
VREGEN
RESET
SUSPEND
WAKEUP
P3.0
P3.1
P3.3
P3.4
JPR−1X3 1
2 Amp CT 1K
SN74LVC1G07DBV
TUSB3410VF
1
9
2
GND
12
32
31
30
29
3
2
1
C2 +3.3V
2
+3.3V C24
0.1uF C10 R7 R9 TPS3838L30DBVT
SW 2 1uF
Appendix A MSC12xx Serial Programming Board Schematic
Vdd
10K 10K 200ms Pulse
47uF
1
D2 JMP4 R15 P ROG L O AD
+5V JPR−2X1 100K
R4
330 2
M A XI M U M I N PU T 1 0 VD C GREEN
D1 U1 U2 +3.3V C26
J2 R8
1 5 1 5 Vdd
VIN VOUT VIN VOUT
3 3 10K SW3
ENABLE ENABLE 0.1uF
DL4001 2 4 2 4 D4
GND NR/ADJUST GND NR/ADJUST J4
2
C9 C1 JMP3
CUI−STACK PJ−102 JPR−2X1
47uF 0.1uF REG113NA−5 C15 REG113NA−3.3 C16 C25 RX 1 2
0.01uF 0.01uF 100uF
1
BAT54 3 4
R10 TX
C19 5 6
220 1uF PRGLD 7 8
9 10
TP2
+3.3V PROGRAMMING
D3 RESET CONNECTOR
GREEN
Vdd
JMP2 ESW_EG4208
1
2 +5V
3
JPR−1X3
11
[Link]
Appendix B
Appendix C
Appendix C
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications,
enhancements, improvements, and other changes to its products and services at any time and to discontinue
any product or service without notice. Customers should obtain the latest relevant information before placing
orders and should verify that such information is current and complete. All products are sold subject to TI’s terms
and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in
accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI
deems necessary to support this warranty. Except where mandated by government requirements, testing of all
parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for
their products and applications using TI components. To minimize the risks associated with customer products
and applications, customers should provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right,
copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process
in which TI products or services are used. Information published by TI regarding third-party products or services
does not constitute a license from TI to use such products or services or a warranty or endorsement thereof.
Use of such information may require a license from a third party under the patents or other intellectual property
of the third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without
alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction
of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for
such altered documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that
product or service voids all express and any implied warranties for the associated TI product or service and
is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.
Following are URLs where you can obtain information on other Texas Instruments products and application
solutions:
Products Applications
Amplifiers [Link] Audio [Link]/audio
Data Converters [Link] Automotive [Link]/automotive
DSP [Link] Broadband [Link]/broadband
Interface [Link] Digital Control [Link]/digitalcontrol
Logic [Link] Military [Link]/military
Power Mgmt [Link] Optical Networking [Link]/opticalnetwork
Microcontrollers [Link] Security [Link]/security
Telephony [Link]/telephony
Video & Imaging [Link]/video
Wireless [Link]/wireless