1989_TI_First Generation_TMS320_Users_Guide 1989 TI First Generation TMS320 Users Guide

User Manual: 1989_TI_First-Generation_TMS320_Users_Guide

Open the PDF directly: View PDF PDF.
Page Count: 598

Download1989_TI_First-Generation_TMS320_Users_Guide 1989 TI First-Generation TMS320 Users Guide
Open PDF In BrowserView PDF
I

"TEXAS

INSTRUMENTS

First-Generation
TAfS32 0

1989

1989

Digital Signal Processor Products

First-Generation
TAfS320
User's Guide

~

TEXAS

INSTRUMENTS

1M PO RTAI\IT NOTICE
Texas Instruments (TI) reserves the right to make changes to or to discontinue
any semiconductor product or service identified in this publication without
notice. TI advises its customers to obtain the latest version of the relevant information to verify. before placing orders, that the information being relied
upon is current.
TI warrants performance of its semiconductor products to current specifications in accordance with Tl's standard warranty. Testing and other quality
control techniques are utilized to the extent TI deems necessary to supportthis
warranty. Unless mandated by government requirements. specific testing of
all parameters of each device is not necessarily performed.
TI assumes no liability for TI applications assistance. customer product design,
software performance. or infringement of patents or services described herein.
Nor does TI warrant or represent that license. either express or implied. is
granted under any patent right, copyright. mask work right. or other intellectual property right of TI covering or relating to any combination, machine, or
process in which such semiconductor products or services might be or are
used.

Copyright © 1988. Texas Instruments Incorporated

iii

iv

Contents
Section

Page

1
1.1
1 .2
1.3
1.4
1.5

Introduction
General Description
Key Features
Typical Applications
How To Use This Manual
References
...... .

1-1
1-4
1-6
1-8
1-9
1 -11

2
2.1
2.2
2.3

Pinouts and Signal Descriptions
TMS320C1 x Pinouts . . . . . . . . . . . . .
TMS3201 0/C1 0/C15/E15 Signal Descriptions
TMS320C17/E17 Signal Descriptions

2-1

3
Architecture
3.1
Architectural Overview
Functional Block Diagrams
3.2
3.3
Internal Hardware Summary
3.4
Memory Organization
3.4.1
Data Memory
3.4.2
Program Memory
3.4.3
Data Movement
3.4.4
Memory Maps
Auxiliary Registers
3.4.5
3.4.6
Memory Addressing Modes
Central Arithmetic Logic Unit (CALU)
3.5
3.5.1
Shifters. . . . . . . . . . .
3.5.2
ALU and Accumulator
3.5.3
Multiplier, T and P Registers
3.6
System Control . . . . . . . .
3.6.1
Program Counter and Slack
3.6.2
Reset
...... .
Status Register
3.6.3
3.7
Input/Output Functions
Input/Output Operation
3.7.1
3.7.2
Table Read/Table Write Operation ..
3.7.3
General-Purpose I/O Pins (BIO and XF)
Interrupts . . . . . . . . . . .
3.8
Serial Port (TMS320C17/E17)
3.9
3.9.1
Receive Registers . . . . . . . . . . . .
.......... .
3.9.2
Transmit RE';gisters
3.9.3
Timing and Framing Control . . . . . .
3.10 Companding Hardware (TMS320C17/E17)
IJ-Law/A-Law Encoder . . . . . . . . .
3.10.1
3.10.2
IJ-Law/A-Law Decoder . . . . . . . . .
3.11 Coprocessor Port (TMS320C17/E17)
3.12 System Control Register (TMS320C17/E17)

2-2
2-3
2-5

3-1
3-3
3-5
3-7
3-10
3-10
3-11
3-13
3-13
3-14
3-16
3-17
3-18
3-19
3-21
3-22
3-22
3-24
3-25
3-27
3-28
3-30
3-31
3-32
3-36
3-36
3-39
3-41
3-43
3-44
3-45
3-46
3-51
v

4

Assembly language Instructions
4.1
Memory Addressing Modes
4.1.1
Direct Addressing Mode
4.1.2
Indirect Addressing Mode
4.1.3
Immediate Addressing Mode
4.2
Instruction Set . . . . . . . .
4.2.1
Symbols and Abbreviations
4.2.2
Instruction Set Summary
4.3
Individual Instruction Descriptions

4-1

5

5-1

5.1
5.1.1
5.1.2
5.2
5.2.1
5.2.2
5.2.3
5.2.4
5.3
5.3.1
5.3.2
5.3.3
5.3.4
5.4
5.4.1
5.4.2
5.5
5.5.1
5.5.2
5.5.3
5.5.4
5.5.5
5.5.6
5.5.7
5.5.8
6.6
5.6.1
5.6.2
5.6.3
5.6.4
5.6.5
5.6.6

vi

Software Applications
Processor Initialization
........ .
TMS3201 0/C1 0/C15/E15 Initialization
... .
TMS320C17E1V Initialization
Interrupt Managem~nt
" ....... .
TMS3201 0/C1 0/C15/E15 Interrupt Service Routines
TMS320C17/E17 Interrupt Service Routines
BIO Polling
Context Switching
Program Control.
Software Stack Expansion
Subroutine Calls
Addressing and Loop Control with Auxiliary Registers
Computed GOTOs
Memory Management
........ .
Moving Data
. . . . . . . . .
Moving Constants into Data Memory
Logical and Arithmetic Operations
Bit Manipulation
Overflow Management
Scaling
....... .
Convolution Operations
Multiplication
Division . . . . . . . .
Addition . . . . . . . .
Floating-Point Arithmetic
Application-Oriented Operations
Companding
FIRIIIR Filtering
..... .
Adaptive Filtering . . . . . .
Fast Fourier Transforms (FFT)
PID Control .,
Selftest Routines . . . . . .

4-2
4-2
4-4
4-6
4-7
4-7
4-8
4-11

5-3
5-3
5-4
5-7
5-7
5-10
5-12
5-13
5-16
5-16
5-17
5-19
5-22
5-23
5-23
5-25
5-29
5-29
5-30
5-31
5-32
5-33
5-36
5-39
5-40
5-42
5-42
5-46
5-47
5-50
5-55
5-56

6
6.1
6.1.1
6.1.2
6.2
6.3
6.4

Hardware Applications
Expansion Memory Interface
Program ROM Expansion
Data RAM Expansion
Codec Interface . . . .
A/D and 0/ A Interface
I/O Ports
..... .
6.5
Coprocessor Interface
6.6 System Applications
6.6.1
2400 bps Modem . . .
Speech Synthesis System
6.6.2
Voice Store-and-Forward Message Center
6.6.3

A

8
C

D
E
F
G

First-Generation TMS320 Data Sheet
SMJ32010/C10 Data Sheets
ROM Codes
Quality and Reliability
Development Support/Part Order Information
Memories, Analog Converters, Sockets, and Crystals
Programming the TMS320E15/E17 EPROM Cell

6-1

6-2
6-2

6-4
6-6
6-8
6-10

6-11
6-13
6-13
6-13
6-15
A-1
8-1
C-1
D-1
E-1
F-1
G-1

vii

Illustrations

Figure
1-1
2-1
3-1
3-2

3-3
3-4
3-5
3-6
3-7
'3-8
3-9
3-10
3-11
3-12
3-13
3-14
3-15
3-16
3-17
3-18
3-19
3-20
3-21
3-22
3-23
3-24
3-25
3-.26
3-27
3-28
3-29
3c30
3-31
4-1
5-1
6-1
6-2
6-3
6-4
6-5
6-6
6-7
6-8
6-9
6-10
6-11
6-12
C-1
E-1

viii

Page

TMS320 Device Evolution
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. 1 -2
TMS320C1 x Pin Assignments
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 2-2
TMS3201 0/C1 0/C15/E15 Block Diagram
. . . . . . . . . . . . .. . . . . . . . . . .. 3-5
TMS320C17/E17 Block Diagram
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ,3-6
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 3-11
On-Chip Data Memory
External Program Memory Expansion Example ., ................... , 3-12
Memory Maps for the TMS3201 0/C1 0 ............................ , 3-13
Memory Maps for the TMS320C15/E15 and TMS320C1 7 /E17.
. ....... '3-14
Auxiliary Register Counter ...................................... 3-15
Indirect Addressing Autoincrement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 3-15
Indirect Addressing Autodecrement
. . . . . . . . . . . . . . . . . . . . . . . . . .. . .. 3-16
Methods of Instruction Operand Addressing
........' . . . . . . . . . . . . . .. 3-16
Central Arithmetic Logic Unit (CALU)
........................... , 3-17
Instruction Pipeline Operation ...'................................ 3-23
Status Register Organization ............. . . . . . . . . . . . . . . . . . . . . . .. 3~26
TMS320C1 x External Device Interface
. . . . . . . . . . . . . . . . . . . . . . . . . . .. 3-28
Input Instruction Timing
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 3-29
Output Instru.ction Timing ...................................... 3-29
TBLR Instruction Timing ................... . . . . . . . . . . . . . . . . . . .. 3-30
TBLW Instruction Timing
........•............................ , 3-30
TMS320C1 x Simplified Interrupt Logic Diagram
. . . . . . . . . . . . . . . . . . .. 3-33
Interrupt Timing
. . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 3-34
Interrupt Latch and Multiplexer .................................. 3-35
Serial Port and Companding Hardware ............................ 3-37
Receive Timing for External Framing .............................. 3-37
Fixed-Data Rate for Internal Framing
............................ , 3-38
Variable- Data Rate for Internal Framing
. . . . . . . . . . . . . . . . . . . . . .. . . .. 3-39
Transmit Timing for External Framing
. . . . . . . . . . . . . . . . . . . . . . . . . . . .. 3-40
Serial:Port Timing and Framing Control
. . . . . . . . . . . . . . . . . . . . . . . . . .. 3-41
TMS320C17/E17 Simplified Coprocessor Port Logic Diagram
........ , 3-46
External Write Timing to the CoprocessOi Port .. . . . . . . . . . . . . . . . . . . .. 3-50
External Read Timing from the Coprocessor Port
.. . . . . . . . . . . . . . . . . .. 3-50
System Control Regist~r
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 3-51
Direct Addressing Block Diagram
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 4-3
Long Division and SUBC Division
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5-37.
Minimum Program ROM Expansion
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 6-3
EPROM Interface to the TMS320C1 0-14 .. . . . . . . . . . . . . . . . . . . . . . . .. 6-4
Data RAM Expansion
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. 6-5
Codec Interface for Standalone Serial Operation
. . . . . . . . . . . . . . . . . . .. 6-7
AID Converter to TMS320C1 0/C15/E15/C17 /E17 Interface ........... 6-8
D/A Converter to TMS320C1 0/C15/E15/C17 /E17 Interface ........... 6-9
I/O Port Interface Circuit ....................................... 6-10
TMS320C17 /E17 to TMS70C42 Interface
. . . . . . . . . . . . . . . . . . . . . . . .. 6-11
TMS320C17/E17 to TMS320C25 Interface
. . . . . . . . . . . . . . . . . . . . . . .. 6-12
2400 bps Modem
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 6-13
Speech Synthesis System
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 6-14
Answering Machine
. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 6-15
TMS320 ROM Code Flowchart
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. C-2
TMS320C1 x Development Tools
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. E-2

E-2
E-3
E-4
E-5
E~6

E-7
F-1
G-1

G-2
G-3
G-4
G-5
G-6
G-7

TMS320C1 x Development Tools
............................... .
TMS320C1 x EVM/Single-User System
.......................... .
TMS320C1 x XDS/22 System Configuration
...................... .
TMS320 AlB System Configuration
............................. .
TMS320 Device Nomenclature
................................. .
TMS320 Development Tool Nomenclature ........................ .
.......................................... .
Crystal Connection
EPROM Adaptor Socket
...................................... .
EPROM Programming Data Format
............................. .
TMS320E15/E17 EPROM Conversion to TMS27C64 EPROM Pinout
.................................. .
Fast Programming Flowchart
..................................... .
Fast Programming Timing
EPROM Protection Flowchart .................................. .
EPROM Protection Timing
.................................... .

E-2
E-5
E-7
E-9
E-17
E-18
F-144
G-1

G-2
G-3
G-6
G-7
G-9
G-10

Tables

Table
1 -1

1-2
2-1

2-2
3-1
3-2
3-3
3-4
3-5
3-6
4-1
4-2
5-1
5-2
0-1
0-2
E-1
E-2
E-3
F-1
G-1

G-2

Page
TMS320C1 x Processors Overview
.............................. .
....................... .
Typical Applications of the TMS320 Family
TMS3201 0/C1 0/C15/E15 Signal Descriptions
.................... .
TMS320C17/E17 Signal Descriptions
........................... .
TMS320C1 x Internal Hardware ................................. .
....................... .
Accumulator Results of a Logical Operation
Status Register Field Definitions ................................ .
........ .
Serial Clock (SCLK) Divide Ratios (X2/CLKIN = 20.48 MHz)
...................... .
Serial- and Parallel-Mode Bit Configurations
................................ .
Control Register Bit Definitions
......................................... .
Instruction Symbols
Instruction Set Summary ...................................... .
................................ .
Control Register Bit Definitions
Program Space and Time Requirements for IJ-/A-Law Companding
........................ .
Microprocessor and Microcontroller Tests
TMS320C1 x Transistors
...................................... .
TMS320C1 x Digital Signal Processor Part Numbers
................ .
TMS320C1 x Support Tool Part Numbers
......................... .
................. .
Development Tool Connections to a Target System
............................ .
Commonly Used Crystal Frequencies
TMS320E15/E17 Programming Mode Levels ...................... .
TMS320E15/E17 EPROM Protect and Protect Verify Mode Levels

1-4
1-8
2-3
2-5
3-8
3-20
3-25
3-42
3-44
3-52
4-7
4-9
5-5
5-42
0-5
0-5
E-13
E-14
E-15
F-144
G-4
G-8

ix

x

Section 1

Introduction

The TMS320 family of 16/32-bit single-chip digital signal processors ,combines the flexibility of a high-speed controller with the numerical capability of
an array processor, offering an inexpensive alternative to custom VLSI and
multichip bit-slice processors.

The TMS3201 0, the first digital signal processor in the TMS320 family, was
introduced in 1983. During that year, the TMS32010 was named "Product
of the Year" by the magazine, Electronic Products. Its powerful instruction set,
inherent flexibility, high-speed number-crunching capabilities, and innovative
architecture have made this high-performance, cost-effective processor the
ideal solution to many telecommunications, computer, commercial, industrial,
and military applications.

The TMS320 family has now expanded into three generations of processors:
TMS320C1 x, TMS320C2x, and TMS320C3x (see Figure 1-1). Many features
are common among these generations. Some specific features are added in
each processor to provide different cost/performance tradeoffs. Software
compatibility is maintained throughout the family to protect the user's investment in architecture. Each processor has software and hardware tools to facilitate rapid design.

1-1

Introduction

",

4.

r

32OC3O

~

TMS320C2x

32OE2&

.2T1.....
• DMA

.II44W_RAM
.4KW ROM/EPROM

.---

IL
• 128KWtoteI_
• 18 • 18 - 32-b1t ............

._portond_

TMS320C1x

.,---

• 32-b1t ftt-pt cJiU

.1_toteI_
·32.32- _ _
.2 _ _

• 18132-l1li
·80
... _CPU
_

320C2&

32010
320CiO
320C14
320E14
320Cll
3ZOEli
320C17
320E17

._1_-

• ZKWRAM
·4KW'ROM
• 84W _ _

32020

~

TMS320C3x

• _ _ UF

• 18J32-bIt CPU

• _ _ RAM

.--

.4KWROM/EPROM
• 4kW ext prog l1*li

/

• 18 • 18 - 32-b1t_

·TImon

....

/

TIME

Figure 1-1. TMS320 Device Evolution

Throughout this document, the first-generation device group within the
, TMS320 family will be referred to as TMS320C1 x. The specific 'members of
the first-generation TMS320 include:
•

TMS32010, the first 20- M Hz digital signal processor

•

TMS320C10, a CMOS 20-MHz version of the TMS3201 0

•

TMS320C1 0-14, a 14- M Hz version of the TMS320C1 0

•

TMS320C10-25, a 25- M Hz version of the TMS320C1 0

•

TMS320C14, aI TMS320C15 designed for a control system

•

TMS320E14, an EPROM version of the TMS320C14

•

TMS320C15, a TMS320C1 0 with expand~d ROM and RAM

•

TMS320C15-25, a 25-MHz version of the TMS320C15

•

TMS320E15, an EPROM version of the TMS320C15

•

TMS320E15-25, a 25- M Hz version of the TMS320E15

•

TMS320C17, a TMS320C15 with serial and coprocessor ports

•

TMS320E17, an EPROM version of the TMS32QC17

r

1-2

,

Introduction

This document describes the core CPU, memory, and basic I/O port architecture of the first-generation devices (TMS320C1 x) in the TMS320 family. The
peripherals for the TMS320C17/E17 devices are also described. For descriptions of the TMS320C14/E14 as well as software and hardware
applications/examples, refer to the TMS320C14/TMS320E14 User's Guide
(literature number SPRU032).
The TMS320 family combines the high performance and specialized features
necessary in digital signal processing (DSP) applications with an extensive
program of development support, including hardware and software development tools, product documentation, textbooks, newsletters, DSP design
workshops, and a variety of application reports. See Appendix E for a discussion of the wide range of development tools available.
Plans for expansion of the TMS320 family include more spinoffs of the existing generations as well as more powerful future generations of digital signal
processors.

1-3

Introduction - General Description

1.1 General Description
The combination of the TMS320's Harvard-type architecture (separate program and data buses) and its special digital signal processing (DSP) instruction set provides speed and flexibility to pr6duce a microprocessor family
,capable of executing 6.25 MIPS (million instructions per second). While
other. processors implement functions through software or microcode, the
TMS320 family optimizes performance by implementing functions within the
hardwarEl. This hardware-intensive approach provides the design engineer
with power previously unavailable on a single chip.
Table 1-1 provides an overview of the TMS320C1 x group of processors with
comparisons of technology, memory, I/O, cycle timing, package type, and
military support.

Table 1-1. TMS320C1x Processors Overview
MEMORY
I/O»
ON-CHIP
OFF-CHIP
RAM ROM EPROM
PROG
SER PAR
4K
NMOS 144 1.SK
8li16

DEVICE

TECH

-

TMS32010:t
TMS320C10:t
TMS320C10-14
TMS320C10-25
TMS320C14§
TMS320E14§

CMOS
CMOS
CMOS

144
144
144

1.5K
1.5K
1.5K

CMOS 256
CMOS 256

4K

TMS320C1S§
TMS320C1S-25
TMS320E15§
TMS320E15-25

CMOS ,256
CMOS 256
CMOS 256
CMOS 256

4K
4K

-

--

-

4K
4K
4K

4K
4K
4K

-

4K
4K

1
1

4K
4K
4K
4K

-

-

CYCLE
PACKAGE
TYPEt
TIME
(ns)
DIP PLCC CER
200

40

-

8x16
8)(16 .
8x16
7x16'!T
7x16'!T

200
280
160
160
160

40
40
40

44
44
44

-

68

8x16
8x16
8x16
8x16
6x16.r
6x16.r

200
160
200
160
200
200

40
40
40
40

-

-

44
44

-

-68

-

44
44

-

TMS320C17
CMOS 256
4K
2
44
40
TMS320E17
CMOS 256
4K
2
40
44
»SER = serial; PAR = parallel.
tOIP = dual in-line pin; PLCC = plastic leaded chip carrier; CER = surface mount ceramic leaded chip
carrier (CER-QUAO).
:tMilitary version available.
§Military versions planned; contact nearest TI Field Sales Office for availability.
'!Ton-chip 16-bit I/O, four capture inputs, and six compare outputs are available .
.rOn-chip 16-bit coprocessor interface is optional by pin selection ..

-

-

The first generation of the TMS320 family includes both NMOS and CMOS
products. The TMS32010 microprocessor is the only NMOS device. The
other members are processed in CMOS technology:
TMS320C10,
TMS320C10-14, TMS320C10-25, TMS320C14/E14, TMS320C15/E15,
TMS320C15-25/E15-25, and TMS320C17 /E17.
The TMS3201 0, the first TMS320 family member, is a microprocessor capable
of achieving a 16 x 16-bit multiply in a single 200-ns cycle. On-chip data
memory of 144 words is available. Up to 4K words of off-chip program
memory can be executed at full speed. The TMS3201 0 is also available in a
microcomputer version, with 1.5K words of on-chip program ROM and up to
2.5K words of off-chip program memory for a total of 4K words. This ROM1-4

Introduction - General Description

code version can also operate entirely from off-chip ROM for ease of prototyping, code update, and field upgradeability.
The TMS320C10 has a 200-ns instruction cycle time and is object-code and
pin-for-pin compatible with the TMS3201 o. The TMS320C1 0 is processed in
CMOS technology, achieving a power dissipation less than one-sixth that of
the NMOS device. Because of its low-power dissipation (165 mW), the
TMS320C10 is ideal for power-sensitive applications such as digital telephony and portable consumer products. A masked ROM option is available for
the TMS320C1 O.
The TMS320C10-14, a 14-MHz version of the TMS320C10, provides a
low-cost alternative for DSP applications not requiring the maximum operating frequency of the TMS320C10. The device can execute 3.5 million instructions per second and has a 280-ns instruction cycle time.
The TMS320C10-25, a 25-MHz version of the TMS320C10, has a 160-ns
instruction cycle time. Its lower power and higher speed make it well suited
for high-performance DSP applications.
The TMS320C14 and TMS320E14 are microcontrollers with an instruction
cycle time of less than 160-ns, 256 words of on-chip RAM, and 4K words of
on-chip program ROM (TMS320C14) or EPROM (TMS320E14). The
TMS320C14/E14 feature an event manager with four capture inputs and six
compare outputs, a bit-selectable I/O port, a serial port with programmable
protocols and timer, a watchdog timer, and two general-purpose timers. These
devices are object-code compatible with the TMS32010 and processed in
CMOS technology.
The TMS320C15 and TMS320E15 are fully object-code and pin-for-pin
compatible with the TMS32010. Each offers an expanded on-chip RAM of
256 words and an on-chip program ROM (TMS320C15) or EPROM
(TMS320E15) of 4K words. The devices are processed in CMOS technology.
Both are also available in the 160-ns versions, the TMS320C15-25 and
TMS320E15-25.
The TMS320C17 and TMS320E17 are dedicated microcomputers. Each offers 256 words of on-chip RAM and 4K words of on-chip program ROM
(TMS320C17) or EPROM (TMS320E17). The TMS320C17/E17 features a
dual-channel serial interface, on-chip companding hardware (Il-Iaw/A-Iaw),
a serial port timer, and a latched 16-bit coprocessor port for direct microprocessor I/O interface. The devices are object-code compatible with the
TMS32010 and processed in CMOS technology.

1-5

Introduction - Key Features

1.2 Key Features
Some of the key features of the TMS320C1 x devices are listed below and on
the following page. Specific devices for a particular feature are enclosed in
parentheses.

•
•
•
•
•
•
•
•
•
•
•
•

•
•
•
•
•
•
•
1-6

Instruction cycle timing:
160 ns (TMS320C10-25/C14/E14/C15-25/E15-25)
200 ns (TMS3201 0/C,1 0'/C15/E15/C17 /E17)
.
280 n$ (TMS320C10-14)
144-/256-word on-chip data RAM
1.5K-/4K-word on-chip program ROM
4K-wOid on-chip program EPROM
(TMS320E14/E15/E15-25/E17)
EPROM code protection for copyright security
4K-word total external memory at full speed
(TMS32010/C1 0/C1 0-14/C1 0-25/C14/
E14/C15/C15-25/E15/E15-25)
16-bit bidirectional data bus at 50-Mbps transfer rate
32-bit ALU/accumulator

16~ x 16-bit parallel multiplier with a 32~bit prodUct
O~

to 16-bit barrel shifter

On-chip clock generator
Eight input and eight output channels
Dual-channel seria,l port with timer
(TMS320C17/E17)
Direct interface to combo-codecs
(TMS320C17/E17)
On-chip IJ-Iaw/A-Iaw companding hardware
(TMS320C17/E17)
16 c bit coprocessor interfac~
(TMS320C17/E17)
16-pin bit-selectable I/O ports
.
(TMS320C14/E14)
Serial. port with programmable protocols
(TMS320C14/Ef 4)
Event manager with capture inputs and compare outputs
(TMS320C14/E14)

Introduction - Key Features

•

Four independent timers (TMS320C14/E14)
General-purpose (2)
Serial port
Watchdog

•

15 external/internal interrupts
(TMS320C14/E14)

•

Single 5-V supply

•

Device packaging:
40-pin DIP (TMS3201 O/C1 O/C1 0-14/C1 0-25/C15/
C15~25/E15/E15-25/C17/E17)
,
44-lead PLCC (TMS320C1 O/C1 0-14/C1 0-25/C15/
C15-25/C17)
68-lead PLCC (TMS320C14)
'44-lead CER-QUAD (TMS320E15/E15-25/E17)
68-lead CER-QUAD (TMS320E14)

•

Technology:
NMOS (TMS32010)
CMOS (TMS320C1 O/C1 0-14/C1 0-25/C14/E14/C15/
C15-25/E15/E15-25/C17/E17)

•

Commercial and military versions available.

1-7

Introduction - Typical Applications

1.3 Typical Applications
The TMS320 family~s unique versatility and realtime performance offer flexible
design approaches in a variety of applications. In addition, TMS320 devices
can simultaneously provide the multiple functions often required in those
complex applications. Table 1-2 lists typical TMS320 family applications.

Table 1-2. Typical Applications of the ,TMS320 Family
GENERAL-PURPOSE DSP
Digital Filtering
Convolution
Correlation
Hilbert Transforms
Fast Fourier Transforms
Adaptive Filtering
Windowing
Waveform Generation

GRAPHICS/IMAGING
3- D Rotation
Robot Vision
Image Transmission/
Compression
Pattern Recognition
Image Enhancement
Homomorphic Processing
Workstations
Animation/Digital Map

VOICE/SPEECH
Voice Mail
Speech Vocoding
Speech Recognition
Speaker Verification
Speech Enhancement
Speech Synthesis
Text-to-Speech

CONTROL
Disk Control
Servo Control
Robot Control
Laser Printer Control
Engine Control
Motor Control

TELECOMMUNICATIONS
Echo Cancellation
ADPCM Transcoders
Digital PBXs
Line Repeaters
Channel Multiplexing
1200 to 19200-bps Modems
Adaptive Equalizers
DTMF Encoding/Decoding
Data Encryption

FAX
Cellular Telephones
Speaker Phones
Digital Speech
Interpolation (DSI)
X.25 Packet Switching
Video Conferencing
Spread Spectrum
Communications

CONSUMER
Radar Detectors
Power Tools
Digital Audio/TV
Music Synthesizer
Educational Toys

INDUSTRIAL
Robotics
Numeric Control
Security Access
Power Line Monitors
I

1-8

INSTRUMENTATION
Spectrum Analysis
Function Generation
Pattern Matching
Seismic Processing
Transient Analysis
[)igital Filtering
Phase-Locked Loops

MILITARY
Secure Communications
Radar Processing
Sonar Processing
Image Processing
Navigation
Missile Guidance
Radio Frequency Modems

AUTOMOTIVE
Engine Control
Vibration Analysis
Antiskid Brakes
Adaptive Ride Control
Global Positioning
Navigation
Voice Commands
Digital Radio
Cellular Telephones

MEDICAL
Hearing Aids
Patient Monitoring
Ultrasound Equipment
Diagnostic Tools
Prosthetics
Fetal Monitors

Introduction - How To Use This Manual

1.4 How To Use This Manual
The purpose of this user's guide is to serve as a reference book for the firstgeneration TMS320 digital signal processors. Sections 2 through 6 provide
specific information on architecture and operation of these devices. Appendix
A furnishes electrical specifications and mechanical data information.
The following table lists each section and briefly describes the section contents.

Section 2.

Pinouts anq Signal Descriptions. Drawings of the DIP and
PLCC packages for TMS320C1 x devices. Functional listings of the signals, their pin locations, and descriptions.

Section 3.

Architecture. TMS320C1 x design description, hardware
components, and device operation. Functional block diagrams and internal hardware summary table.

Section 4.

Assembly Language Instructions. Addressing modes and
format descriptions. Instruction set summary listed according to function. Alphabetized individual instruction
descriptions with examples.

Section 5.

Software Applications. Software application examples for
the use of various TMS320C1 x instruction set features.

Section 6.

Hardware Applications. Hardware design techniques and
application examples for interfacing to codecs, external
memory, or common 4-/8-/16-/32-bit microcomputers
and microprocessors.

Seven appendices are included to provide additional information.

Appendix A.

First-Generation TMS320 Data Sheets. Electrical specifications, timing, and mechanical data for all TMS320C1 x
devices.

Appendix B.

SMJ3201 O/C1 0 Data Sheets.
Electrical specifications,
timing, and mechanical data for these military devices.

Appendix C.

ROM Codes. Discussion of ROM codes (mask options)
and the procedure for implementation.

Appendix D.

Quality anq Reliability. Discussion of Texas Instruments
quality and reliability criteria for evaluating performance.

Appendix E.

Development Support/Part Order Information. Listings of
the hardware and software available to support the
TMS320C1 x devices.

1-9

Introduction - How To Use This Manual

)

1-10

Appendix F.

Memories; Analog Converters. Sockets. and Crystals.
Listings of the TI memories, analog conversion devices,
and sockets available to support the TMS320C1 x devices
in DSP applications. Crystal specifications and vendors.

Appendix G.

Programming the TMS320E15/E17 EPROM Cell. Procedure for programming and verifying the EPROM cell using
the 28-pin TMS27C64.

Introduction - References

1.5 References
The following reference list contains useful information regarding functions,
operations, and applications of digital signal processing. These books also
provide other references to many useful technical papers. The reference list is
organized into categories of general DSP, speech, image processing, and
digital control theory; if known, each category is alphabetized by the author's
last name.

General Digital Signal Processing:
Antoniou, Andreas, Digital Filters: Analysis and Design. New York, NY:
McGraw-Hili Company, Inc., 1979.
Brigham, E. Oran, The Fast Fourier Transform.
Prentice- Hall, Inc., 1974.

Englewood Cliffs, NJ:

Burrus. C.S. and Parks, T.W., DFT/FFT and Convolution Algorithms.
New York, NY: John Wiley and Sons, Inc., 1984.
Digital Signal Processing Applications with the TMS320 Family, Texas
Instruments, 1986; Prentice-Hall, Inc., 1987.
Gold, Bernard and Rader, C.M., Digital Processing of Signals.
York, NY: McGraw-Hili Company, Inc., 1969.
Hamming, R.W., Digital Filters.
Inc., 1977.

Englewood Cliffs, NJ:

New

Prentice-Hall,

IEEE ASSP DSP Committee (Editor), Programs for Digital Signal Processing. New York, NY: IEEE Press, 1979.
Jackson, Leland B., Digital Filters and Signal Processing. Hingham, MA:
Kluwer Academic Publishers, 1986.
Jones, D.L. and Parks, T.W., A Digital Signal Processing Laboratory
Using the TMS32010. Englewood Cliffs, NJ: Prentice-Hall, Inc., 1987.
Lim,Jae and Oppenheim, Alan V., Advanced Topics in
Processing: Englewood Cliffs, NJ: Prentice-Hall, Inc., 1988.

Signal

Morris, l. Robert, Digital Signal Processing Software. Ottawa, Canada:
Carleton University, 1983.
Oppenheim, Alan V. (Editor), Applications of Digital Signal Processing.
Englewood Cliffs, NJ: Prentice- Hall, Inc., 1978.
Oppenheim, Alan V. and Schafer, R.W., Digital Signal Processing. Englewood Cliffs, NJ: Prentice- Hall, Inc., 1975.
Oppenheim, Alan V. andWillsky, A.N. with Young, LT., Signals and
Systems. Englewood Cliffs, NJ: Prentice-Hall, Inc., 1983.
Parks, T.W. and Burrus, C.S., Digital Filter Design. New York, NY: John
Wiley and Sons, Inc., 1987.

1-11

Introduction - References

Rabiner, Lawrence R. and Gold, Bernard, Theory and Application of Digital Signal Processing. Englewood Cliffs, NJ: Prentice- Hall, Inc., 1975.
Treichler, 'J.R., Johnson, Jr., C.R., and Larimore, M.G., Theory and Design of Adaptive Filters. New York, NY: John Wiley and Sons, Inc.,
, 1987.

Speech:
Gray, A.H. and Markel, J.D., Linear Prediction of Speech.
NY: Springer-Verlag, 1976.

New York,

Jayant, N.S. and Noll, Peter, Digital Coding of Waveforms. Englewood
Cliffs, NJ: Prentice- Hall, Inc., 1984.
.
Papamichalis, Panos, Practical Approaches to Speech Coding.
wood Cliffs, NJ: Prentice-Hall, Inc., 1987.

Engle-

Rabiner, Lawrence R. and Schafer, R.W., Digital Processing of Speech
Signals. Englewood Cliffs, NJ: Prentice-Hall, Inc.,
, 1978.

Image Processing:
Andrews, H.C. and Hunt, B.R., Digital Image Restoration. Englewood
Cliffs, NJ: Prentice-Hall, Inc., 1977.
Gonzales, Rafael C. and Wintz, Paul, Digital Image Processing. Reading,
MA: Addison-Wesley Publishing Company, Inc., 1977.
Pratt, William K., Digital Image Processing. New York, NY: John Wiley
and Sons, 1978.

Digital Control Theory:
Astrom, K. and Witten mark, B., Computer Controlled Systems.
wood Cliffs, NJ: Prentice-Hall, Inc., 1984.
Iserman, R., Digital Control Systems.
1981.

Engle-

New York, NY: Springer-Verlag,

Jacquot, R., Modern Digital Control Systems. New York, NY: Marcel
Dekker, Inc., 1981.
Katz, P., Digital Control Using Microprocessors. Englewood Cliffs, NJ:
Prentice- Hall, Inc., 1981.
Kuo, B.C., Digital Control Systems. New York, NY: Holt, Reinholt and
Winston, Inc., 1980.
Moroney, P., Issues in the Implementation of Digital Feedback Compensators. Cambridge, MA: The MIT Press, 1983.
Phillips, C. and Nagle, H., Digital Control System Analysis and Design.
Englewood Cliffs, NJ: Prentice- Hall, Inc., 1984.

1-12

Section 2

Pinouts and Signal Descriptions

The TMS320C1 x (first-generation TMS320) digital signal processors, except
TMS320C14 and TMS320E14, are available in a 40-pin dual-in-line (DIP)
package. The TMS320C14 is only available in the 68-pin plastic-leaded chip
carrier (PLCC) and the TMS320E14 is only available in a 68-pin CER-QUAD
package. The TMS320C10 and TMS320C15/C17 are also packaged in a
44-pin plastic-leaded chip carrier (PLCC). The TMS320E15 and TMS320E17
are available in 44-pin CER-QUAD packages, too.
This section provides the pinouts and signal definitions in the following
subsections:
•

TMS320C1 x Pinouts (Section 2.1 on page 2-2)

•

TMS3201 O/C1 O/C15/E15 Signal Descriptions (Section 2.2
on page 2-3)

•

TMS320C17/E17 Signal Descriptions (Section 2.3 on page 2-5)

Electrical specifications and mechanical data are given in Appendix A which
contains the First-Generation TMS320 and the TMS320C14/E14 data sheets.
For pinouts used in programming the TMS320E14/E15/E17 EPROMs, refer
to Appendix G.

2-1

Pinouts - TMS320C1x

2.1 TMS320C1x Pinouts
Figure 2-1 shows pinouts of the 0.1 P packages for the TMS320C1 x devices
and the PLCC packages for the TMS320C10/C15/C17. 'For pinouts of the
TMS320C14/E14, see Appendix A or refer to the TMS320C14/TMS320E14
\
User's Guide (literature number SPRU032).
TMS32010. TMS320Cl0
TMS320C1S. TMS320E1S
N/JD PACKAGE
ITOPVIEWI
Al/PAl
AO/PAO
MC/MP
RS
INT
CLKOUT
Xl
X2/CLKIN
BID

TMS320C17. TMS320E17
N/JD PACKAGE
ITOP VIEWI
PA1/RBLE
PAO/HI/LO

A2/PA2
A3
A4
A5
A6
A7
A8
MEN
DEN
WE

Vss
08
09
010
011
012
013
01'4
015
07
06

PA2/TBLF
FSR
FSX
FR
OXl

DXO
Xl
X2/CLKIN
BIO

,SCLK
ORl
OEN/RO
WE/WR

VSS
08/L08
09/LD9
010/L010
011/LOll
012/L012
013/L013
014/L014
015/L015
07/L07
06/L06

VCC
A9
Al0
All
DO
01
02
03
04
05'

VCC
ORO
XF
MC/PM
OO/LOO
01/LOl
02/L02
03/L03
04/L04
05/L05
TMS320C17
FN PACKAGE

TMS320Cl0.TMS320C1S
FN PACKAGE
ITOPVIEWI

I

1m

In..~

0.....

N

~ ~ (/)~

fU (3;:
'~a;;:;

ITO~VIEWI

Igl~
::::1]]

cnN

M..:t Ln.--CO

« « >« « « «'«

7

8
9
10
11

o

;;:

IE

O.-(I)Na:X"-

wa::..::Q.Q.

39! A7
38! A8
37[ MEN
DEN
35! WE

36!

VSS 12
08 13
09 14
010 15
011 16
012 17

34! VCC

33
32!
31!
30
29

1819202122232425262728
VlMq-U'lr--.(OLOoq-MN(J)

(/)---000000(/)
>000
>

A9
Al0
,All
DO
01

CLKOUT
Xl
X2 CLKIN
BID
NC
VSS
08/LOB
09/L09
010/L010
011/LOll
012/L012

~

7
0
39
8
38
9
37
10
36
11
35
12
34
13
33
14
32
15
31
16
30
17
29
18 19 2021 22 23 24 25 26 2728
V,)M'¢Il)r--.CDU')~MNN

(/)---0000000

>CCO...J...J...J...J...J...J...J

_ _ _ f'COtn,¢MC\I_
....J...J...J------M~"'OOOOOOO
000

Figure 2-1. TMS320C1x Pin Assignments

2-2

a;;

a..LLLLLL ......

6 5 4 3 2 1 4443424140

6 5 4 3 2 1 44 43 42 41 40

CLKOUT
X)
X2/CLKIN
BID
NC

I~al

I I(/) !;I, « « >(/) t:« I(/) I(/)
f~
X

OXO
SCLK
ORl
OEN/RO
WE/WR
VCC
ORO
XF
MC/PM
OO/LOO
VSS

Signal Descriptions - TMS3201 OlC1 O/C15/E15

2.2 TMS3201 O/C1 O/C15/E15 Signal Descriptions
The signal descriptions for the TMS3201 O/C1 0 and TMS320C15/E15 devices
are proyided in this section. Table 2-1 lists each signal, its pin location
(DIP/PLCC), function, and operating mode(s). i.e., input, output, or highimpedance state as indicated by I, 0, or Z. The signals in Table 2-1 are
grouped according to function and alphabetized within that grouping.

Table 2-1. TMS32010/C10/C15/E15 Signal Descriptions
SIGNAL

PIN
(DIP/PLCC)

I/O/Zt

DESCRIPTION

ADDRESS/DATA BUSES
A11 MSB
A10
A9
A8
A7
A6
A5
A4
A3
A2/PA2
A1/PA1
AO/PAO
D15 MSB
D14
D13
D12
D11
D10
D9
D8
D7
D6
D5
D4
D3
D2
D1
DO LSB

27/31
28/32
29/33
34/38
35/39
36/40
37/41
38/42
39/43
40/44
1/2
2/3
18/21
17/20
16/19
15/17
14/16
13/15
12/14
11/13
19/22
20/23
21/24
22/25
23/26
24/27
25/29
26/30

0

Program memory address bus A11 (MSB) through AO (LSB)
and port addresses PA2 (MSB) through PAO (LSB).
Addresses A11 through AO are always active and never
go to high impedance. During execution of the I Nand
OUT instructions. pins A2 through AO carry the port
addresses. (Address pins A11 through A3 are always
driven low on IN and OUT instruction)

,

I/O/Z

Parallel data bus D15 (MSB) through DO (LSB). The data
bus is always in the high-impedance state except when
WE is active (low).

\

INTERRUPT AND MISCELLANEOUS SIGNALS

Bi'O

9/10

I

External polling input. Polled by BIOZ instrllction. If low.
the device branches to the address specified by the instruction.

DEN

32/36

0

Data enable for device input data. When active low. 'i5EN'
indicates that the device will accept data from the data bus.
DEN is onl." active during the first c~ of the IN instruction. When DEN is active. 'MEN and E will always be inactive (high).

t Input/Output/High-impedance state

2-3

Signal Descriptions - TMS32010/C10/C15/E15

Table 2-1. TMS32010/C10/C15/E15 Signal Descriptions (Concluded)
SIGNAL

DESCRIPTION

PIN
(DIP/PLCC)

I/O/zt

iNi'

5/6

I

External interrupt input. The interrupt S~I is generated by
applying a negative-going edge to the I T pin. The edge is
used to latch the interrupt flag register (I NTF) until an interrupt is gral)ted by the device. An active low level will also
be sensed.

MC/-;;;W

3/4

I

Memory mode select pin. High selects the microcomputer
mode, in which 1.5K words (4K on the TMS320C15/E15)
of on-chip program memory are available. This mode also
allows an additional 2.5K words of program memor~ reside off-chip on the TMS3201 0/C1 O. A low on MC/ P pin
enables the microprocessor mode. In this mode, the entire
memory space is external, i.e., addresses 0 through 4095.

0

Memory enable. iiifEii1 will be active low on every machine
cycle except when WE and DElii are active. iiifEii1 is a control
signal generated by the device to enable instruction fetches
from program memory. iiifEii1 will be active on instructions
fetched from both internal and external memory.

I

Reset input for initializing the device. When held at an active low for a minimum of five clock cycles, DElii, WE, and
MEN are forced high; and, the data bus (015 through DO)
is not driven. The program counter (PC) and the address
bus (A11 through AO) are then synchronously cleared after
the next complete clock cycle from the falling edge of itS.
Reset also disllbles the interrupt, clears the interrupt· flag
register, and leaves the overflow mode·register unchanged.
The device can be. held in the reset state indefinitely.

0

Write enable for device output data. When active low, WE
indicates that data will be output from the device on the
data bus. WE is only active during the first cycle of the OUT
instruction and the second cycle of the TBlW instruction.
When WE is active, MEN and DElii wifl always be inactive
(high).

/

~

itS

33/37

4/5

-

I

WE

31/35

SUPPLY/OSCilLATOR SIGNALS
6/7

0

Vee

30/34

I

5-V supply pin.

VSS
X1

10/12

I

Ground pin.

7/8

0

Crystal output pin for internal oscillator. If the internal oscillator is not used, this pin should be left unconnected.

8/9

I

Input pin to thl3 internal oscillator (X2) from the crystal. Alternatively, an input pin for an external oscillator (ClKIN).

ClKOUT

X2/ClKIN

1

t Input/Output/High-impedance state

2-4

System clock output (one-fourth crystal/ClKIN frequency).
Duty cycle is fifty percent.

Signal Descriptions - TMS320C17/E17

2.3 TMS320C17/E17 Signal Descriptions
Table 2-2 lists each signal provided on the TMS320C17 IE17, its pin location,
function, and operating mode(s), i.e., input, output, or high-impedance state
as indicated by I, 0, or Z. The signals in Table 2-2 are grouped according to
function and alphabetized within that grouping. Note that the first signal and
the signal following the slash are both used on the TMS320C17 IE17.

Table 2-2. TMS320C17/E17 Signal Descriptions
SIGNAL

PIN
(DIP/PLCC)

I/O/zt

DESCRIPTION

BIDIRECTIONAL DATA BUS
D15/LD15
D14/LD14
D13/LD13
D12/LD12
D11/LD11
D10/LD10
D9/LD9
D8/LD8
D7/LD7
C6/LD6
D5/LD5
D4/LD4
D3/LD3
D2/LD2
D1/LD1
DO/LDO

18/21
17/20
16/19
15/17
14/16
13/15
12/14
11/13
19/22
20/23
21/24
22/25
23/26
24/27
25/28
26/30

I/O/Z

During the microcomputer mode. this represents a 16-bit
parallel data bus (015 through DO). The data bus is
always in the high-impedance state. except when WE is
active (low) or when an IN instruction is being executed
from either port 0 or port 1.
During the coprocessor mode. the 16-bit data lines (LD15
through LDO) is used for a coprocessor latch. The data
bus is always held in a high-impedance state. except
when RD is active (low).

PORT ADDRESS BUS
PA2/'i1rrF
PA1/RBLE
PAO/HI/U5

40/44
1/2
2/3

0
0
I/O/Z

I/O port address output/transmit buffer latch full flag.
I/O port address output/receive buffer latch empty flag.
I/O port address output/latch byte select pin.
During the microcomputer mode. these pins carry the port
address when using the IN and OUT instructions. When
using other instruction cycles. these pins carry the three
LSBs of the program counter.

D~ring the coprocessor mode. these pins signal the status
of the receive and the transmit buffer latches.
INTERRUPT AND MISCELLANEOUS SIGNALS

me

9/10

I

External polling input. Polled by BIOZ instruction. If low.
the device branches to the address specified by the instruction. When in the coprocessor mode. the BiO line is reserved for coprocessor interface and .cannot be driven
externally.

t Input/Output/High-impedance state

2-5

Signal Descriptions - TMS320C17/E17

Table 2-2. TMS320C17/E17 Signal Descriptions (Continued)
SIGNAL

15m/lID

PIN
(DIP/PLCC)

I/O/zt

32/36

I/O/Z

DESCRIPTION
Data enable for device input data/external read for the output latch. When active low. 15m indicates that the device
will accept data from the data bus. DEN is only active durjng
the first cycle of the IN instruction. WE will always be inactive (high) when
is active. In the coprocessor mode.
the external processor reads from the coprocessor latch by
driving the RI5 line active (low). thus enabling the output
latch to drive the latched data. When the data has been
read. the external device will bring the RI5 line high.

om

E5 = phase of internal clock.
NOTE: The TMS3201 0 requires external synchronizing flip-flops. '

Figure 3-19. TMS320C1x Simplified Interrupt Logic Diagram

3-33

Architecture - Interrupts

Figure 3-20 shows the instruction sequence that occurs once an interrupt
becomes active. The dummy fetch is an instruction that is fetched but not executed. This instruction will be refetched and executed after the interrupt
routine is completed.
The TMS320C17 IE17 has four maskable interrupts: EXINT, FSR, FSX, and FR.
On these devices, the TMS3201 0/C1 0/C15 interrupt function has been ex- i
panded to fully support the serial-port interface. An interrupt latch and multiplexer is used to generate the master interrupt signal, which functions
identically to the INT interrupt on the TMS32010. Thus, all the maskable interrupts have the same priority and require the use of interrupt polling techniques when multiple interrupts are enabled.
Two steps must be taken to enable an active interrupt to the device. First, the
individual interrupt must be enabled by writing a logic 1 to the appropriate
system control register bit (CR7-CR4). Then, the master interrupt circuitry is
enabled via the EINT instruction. An interrupt flag represents a valid interrupt
condition to the processor if interrupts have been enabled. Thus, prior to enabling interrupts, the flag bits of all undesired interrupts should be cleared. In
the coprocessor port mode, the external interrupt (EXINT) flag cannot be
cleared until four cycles after the data from the coprocessor port has been
read. In a reset initialization routine, the interrupt flag bits (CR3-CRO) should
be cleared before the EINT instruction to insure that a false interrupt does not
occur (see Section 3.12 for detailed interrupt bit descriptions);

CLKOUT

INT

1. . _-.-.. .

I

~ CLOCK CYCLE MINI
FETCH
INSTRUC1l0N N

DUMMY FETCH
INSTRUC1l0N N + 1

FETCH
INSTRUCTION 002

EXECUTE N

DI,lMMY CYCLE

Figure 3-20. Interrupt Timing

3-34

EXECUTE 002

Architecture - Interrupts

The interrupt latch synchronizes all interrupts to the device output clock
(CLKOUT). A block diagram of the interrupt latch and multiplexer is shown
in Figure 3-21.
The external interrupt flag (EXINT) is set by one of two conditions: (1) an
asynchronous input to the device for external control, or (2) a master processor interrupt signal when the TMS320C17/E17 is being operated in coprocessor mode. The EXINT flag cannot be cleared while an interrupt condition is
presented.
The other three interrupts are normally associated with the serial port framing
signals. A bit in the system control register (CR9) designates whether FR is
to be used for framing or alternatively, FSX and FSR. When FSX and FSR control
the serial port framing, FR can function as an independent timer interrupt with
the timer clocked by the SCLK ,source. When the serial port is controlled by
the internal framing pulse (FR), the FSX and FSR inputs are available as independent edge-triggered interrupts.
Due to the asynchronous operation of the interrupts, the time between the
occurrence of an active interrupt signal and the device actually vectoring to
ROM location 2 is four CLKOUT cycles; see Appendix A for further timing
information.

FSR FSX EXINT FR CR7-CRO

CLKOUT--~

MASTER
INTERRUPT
SIGNAL (MIS)

'--...0001---

FR MUX
OUTPUT

INTERRUPT
FLAG BITS
CR3-CRO

Figure 3-21. Interrupt Latch and Multiplexer

3-35

Architecture - Serial Port

3.9 Serial Port (TMS320C17/E17)
Two of the I/O ports on the TMS320C17/E17 are dedicated to the serial port
and companding hardware. I/O port 0 is dedicated to control register 0, which
controls the serial port, interrupts, and companding hardware. I/O port 1 accesses control register 1, as well as both serial port channels, and the companding hardware. The six remaining I/O ports are available for external
parallel interfaces.
The on-chip dual-channel serial port, provided on the TMS320C17/E17, is
capable of full-duplex serial communications and direct interface to combocodec PCM systems, serial A/D converters, and other serial systems. The interface signals are directly compatible with codecs and many other serial
devices, and require a minimum of external hardware. An example of a codec
interface is provided in Section 6.2. For additional information on combocodecs, refer to the TCM29C13/C14/C16/C17 Combined Single-Chip PCM
Codec and Filter Data Sheet.
Two receive and two transmit registers are mapped into I/O port 1, and operate with 8-bit data samples. Either internal or external framing signals for serial
data transfers (MSB first) are selected via the system control register. The
serial port clock, SCLK, provides the bit timing for transfers with theserial port,
and may be either an input or output. A framing pulse signal provides framing
pulses for combo-codec circuits, a sample clock for voice-band systems, or a
timer for control applications. The serial port is accessed through IN and OUT
instructions. A block diagram of the serial port and companding hardware is
shown in Figure 3-22.

3.9.1 Receive Registers
Two receive registers are mapped into I/O port 1 via the port decode logic.
Data is clocked into the shift registers on the next eight negative serial clock
(SCLK) transitions after an active framing pulse is detected. SCLK controls
the bit-level timing for all serial-port data transfers. Note that the MSB is always shifted first.
On an active framing pulse, serial data is clocked into the receive registers from
the DR pins. 'Channel 0 data is received in shift register RSO from pin ORO,
and channel 1 data is received in shift register RS1 from pin DR1. To read the
data from the registers, an IN instruction is executed from port 1. On the first
IN instruction after a framing pulse, channel 0 data is output onto the external
data bus where it is read by the CPU. On the second IN instruction, channel
1 data is output onto the external data bus.
An active framing pulse initiates the receive operation, as shown in Figure
3-23. External framing pulses (FSR) are active low, and the internal framing
(FR) signal is active high. With external framing (FSR), the falling edge of the
framing pulse gates the serial-port clock to the receive shift registers, and the
data is clocked into the shift registers on the next eight consecutive negative
transitions of the clock.
3-36

Architecture - Serial Port

EXTERNAL
DATA BUS
(D15-DO)
PAO
PA1
PA2

WE
t5EfiI

14
I/O
CONTROL
jJ.-LAW/A-LAW
ENCODER

CR14

CRa
CR13

jJ.-LAW/A-LAW
DECODER

;:
0:: 10::
CD

o

LL

RECEIVE
READ
SELECT

2

a

CR14

a
a a a

RECEIVE
REGISTER
RRO

DRO

DXO
CR11

RECEIVE
REGISTER
RR1

DR1

DX1

Figure 3-22. Serial Port and Companding Hardware

SCLK

~R~~____________~r~.______~~
DR1, DRO

-

DR1, ORO ':"'.--~----<

1

FR

Data In

Data In

TRO, TR1

RSO, RS1

transferred

to

TSO, TS1·

transferred

to

RRO, RR1

Figure 3-24. Fixed-Data Rate for Internal Framing

3-38

Interrupt
flag set

Architecture - Serial Port

In the variable data-rate mode shown in Figure 3-25, the FR pulse is eight
SCLK cycles wide, .and appears in the same SCLK cycle as the first data bit.
The rising edge of the pulse initiates the transmit and receive operations. The
falling edge of the pulse transfers data from the receive shift registers to the
receive registers and sets the FR flag bit (CR3) in the system control register,
causing an interrupt to occur if enabled.
SCLK

FR

OX1.0XO

J

~------------------~"~--------~

'---

---<'-_..JX

2

X,-_3~~~

8

)-

OR1. ORO

Data in

Data in

TRO. TR1

RSO. RS1

transferred

to TSO. TS1

interrupt
flag set

transferred

to RRO. RR1

Figure 3-25. Variable-Data Rate for Internal Framing

3.9.2 Transmit Registers
Two transmit registers are mapped into I/O port 1 via the port decode logic.
The transmit registers are connected to the port 1 data bus in a FIFO (first in,
first out) configuration. On the first OUT instruction to port 1 after a framing
pulse, the data to be transmitted is put into transmit register TRO. On the next
framing pulse, the TRO contents are latched into transmit shift register TSO and
the data is transmitted on channel 0 (pin DXO) on the next eight positive
transitions of the serial-port clock (SCLK), as shown in Figure 3-26. External
framing pulses (FSX) are active low, and the internal framing (FR) signal is
active high. Data sent to port 1 is always put into the transmit registers. Only'
when control register bit 11 (CR11) is high will the data be enabled onto the
transmit pins. The transmit pins are in the high-impedance state when not
transmitting. External framing pulses are sensed during the high portion of the
SCLK cycle and latched internally with the falling edge of SCLK. Only one FSX
state can be detected per SCLK period.

3-39

Architecture - Serial Port

J8\-/\-

SCLK

FSX

~~------------~~~t------~~

DX1,DXO~

1

Data in
TRO, TR1
transferred
to TSO, TS1

FSX
interrupt
flag set

Figure 3-26. Transmit Timing for External Framing

Internal framing (FR) pulses can be selected in either fixed data-rate or variable data-rate modes for combo-codec interface. With the fixed data-rate
mode, the FR pulse is one SClK cycle wide, and appears in the cycle preceding the first data bit. The falling edge of the pulse initiates both the
transmit and receive operations, as shown in Figure 3-24. Data is transferred
from the transmit registers to the transmit shift registers. Transmitted data is
clocked into the transmit shift registers on the next eight -consecutive negative
transitions from the clock. After data bit 8 has been transmitted, an interrupt
is generated when the FR flag bit (CR3) is set in the system control register,
thus causing an interrupt to occur if enabled.
In the variable data-rate mode shown in Figure 3-25, the FR pulse is eight
SClK cycles wide, and appears in the same SClK cycle as the first data bit.
The rising edge of the pulse initiates the transmit and receive operations. The
falling edge of the pulse sets the FR flag bit (CR3) in the system control register, causing an interrupt to occur if enabled.
When two OUT instructions to port 1 are executed between framing pulses,
both transmit registers are loaded with data for transmission. The first OUT
instruction loads data into transmit register TRO. The second OUT pushes the
data from TRO into TR1 and puts the new data into TRO. On an active framinj;J
pulse edge, the transmit register contents are latched into the transmit shift
registers and the data clocked out on the next eight consecutive positive
transitions of SClK. Thus, for single-channel operation, only one OUT instruction to port 1 should be executed between framing pulses to insure data
transmission on channel O. Only TRO may be read back to the serial-port data
bus by an IN instruction. This feature is used for the parallel companding
mode.
Both transmit channels always output data on an active framing pulse when
CR11 is high. During single-channel operation (using channel 0), channel 1
still transmits the data from transmit register TR1. Transmit channel 1 cannot
be disabled during single-channel operation.
3-40

Architecture - Serial Port

3.9.3 Timing and Framing Control
The serial-port timing and framing control is shown in Figure 3-27. The serial-port clock (SCLK) provides the timing control for data transfers with the
serial port. SCLK may be configured as either an input or output through the
control register. As an input, SCLK is an external serial system clock that
provides the framing synchronization and timing for the serial port. As an
output, SCLK provides the system clock for standalone serial applications and
is derived from the microcomputer system clock (X2/CLKIN).

CR27-CR24

CR15

FSR FSX CR23-CR16

4

X2/CLKIN

TIMER
PRESCALE
.;.10/12/14/16/20/24/28/32

FR

CR28

SERIAL-PORT
SCLK----*-.... TIMING CONTROL

tSXLD =
:t:RCLK =

SXLDt
RCLK:j:

Load transmit shift registers (TSO,TS1) from transmit registers (TRO,TR1)
Load receive registers (RRO,RR1) from receive shift registers (RSO,RS1)

Figure 3-27. Serial-Port Timing and Framing Control

3-41

Architecture - Serial Port

The serial-port clock prescaler determines the divide .ratio for SClK when
configured as an output. The TMS320C17 /E17 system clock (X2/ClKIN) is
input to the prescaler, along with control register bits CR27-CR24. Table 3-4
shows the prescale divide ratios selectable as divide by 10, 12, 14, 16, 20, 24,
28, and 32 through system control register bits CR27-CR24. These divide
ratios are available only for SClK when it is configured as an output from the
device (see Section 3.12 for control register bit configurations).
The frame multiplexer determines which framing pulses cause serial-port data
transfers to occur and configures the internal framing pulse (FR) frequency.
The inputs to the multiplexer are SClK, control register bit 9 (CR9), control
register bits CR23-CR16, external transmit framing (FSX) pulse, and external
receive framing (FSR) pulse. The outputs of the multiplexer go to the serialport control for receive and transmit timing generation for the serial-port registers and to the FR multiplexer for determining which FR framing pulse will
be generated.
The outputs of the frame counter are input to the FR multiplexer for selection
of long or short FR pulses. The short FR pulse provides fixed data-rate framing pulses for standalone serial interface to the Texas Instruments TCM29Cxx
family of combo-codec circuits. The long FR framing pulse provides variable
data-rate framing pulses to the combo-codec.
The FR frequency is determined at the beginning of the framing pulse cycle.
The FR frequency is equal to SClK/(CNT +2) where CNT is the binary value
of CR23-CR16. When reconfiguring the frequency, the upper control register
bits determine the new divide ratio. However, the new frequency is not implemented until the next FR framing pulse.

Table 3-4. Serial Cloc~ (SClK) Divide Ratios (X2/elKIN

= 20.48 MHz)

CR27

CR26

CR25

CR24

DIVIDE RATIO

SCLK FREQUENCY

UNIT

0
0

0
0

0
0

0
1

32
28

0.640

0

0

1

0

24

0.853

0

1

0

0

1

0
0

0

0
1

20
16

1.280

MHz
MHz
MHz
MHz
MHz
MHz
MHz
MHz

1
1
1

3-42

0

0
1

1

0

0.731
1.024

14
12

1.463

0
0

10

2.048

1.706

Architecture - Companding Hardware

3.10 Companding Hardware (TMS320017/E17)
The on-chip companding hardware enables the TMS320C17 /E17 to compand
(COMpress and exPAND) data in either JJ-Iaw or A-law format with either
sign-magnitude or two's-complement numbers. The standard employed in the
United States and Japan is JJ-Iaw companding. The Eur,opean standard is referred to as A-law companding. Configuration and connections of the encoder and decoder (see Figure 3-22)' are controlled through the system
control register.
When sign magnitude is selected, the JJ-Iaw encoding and decoding require a
bias adjustment in the sample value. For JJ-Iaw encoding, a bias of 33 must
be added to the sign magnitude before encoding; likewise, after JJ-Iaw decoding, the bias of 33 must be subtracted from the sign-magnitude value. No
additional bias adjustment is required for JJ-Iaw encoding and decoding when
the selected conversion uses two's-complement notation. Note that A-law
encoding and decoding do not require a bias adjustment in either case.
Upon reset, the TMS320C17/E17 is programmed to operate in sign-magnitude mode. This mode can be changed by modifying control register bit 29
(CR29). Refer to the TCM29C13/TCM29C14/TCM29C16/TCM29C17 Combined Single-Chip PCM Codec and Filter Data Sheet for further information
on companding. If software companding is desired without the use of companding hardware, descriptive algorithms are given in the book, Digital Signal
Processing Applications with the TMS320 Family (literature number
SPRA012A); refer to the application report, "Companding Routines for the
TMS32010/TMS32020."
The specification for JJ-Iaw and A-law log PCM is part of the CCITI G.711
recommendation. Part of the coding format specifies certain bits to be inverted
prior to transmission or upon receipt of transmitted data. The companding
hardware in the TMS320C17 IE17 implements the bit inversion as well as the
logarithmic compression and decompression.
Data may be companded via four modes: serial-port encode, serial-port decode, parallel encode, and parallel decode. In the serial mode, transmitted data
is encoded according to the specified companding law, and received data is
decoded to either sign-magnitude or two's-complement format. In the parallel
modes, encoding or decoding is performed on data from the RAM for computations within the device. Note that in parallel mode when two'scomplement notation is selected, at least ,one instruction must be inserted
between successive OUT and IN instructions to I/O port 1.
Table 3-5 shows the control register bit combinations that determine the serial
or parallel modes of the companding hardware operation. Note that the serial
and parallel companding modes require separate control register settings.
When using the serial mode, parallel companding is not available unless the
control register is reconfigured.

3-43

Architecture - Companding Hardware

Table 3-5. Serial- and Parallel-Mode Bit Configurations
,

CR BIT #
13 12 11

MODE OF OPERATION

0

0

0

Parallel mode. Encoder and decoder are disabled.
performed on data written to or read from port 1.

0

0

.1

Serial mode. Encoder and decoder are disabled. The transmit registers are enabled for data transmission on an active framing pulse. The
8-bit value written to port.1 is transmitted and the 8-bit value in the
receive register is read with an IN instruction from port 1.

0

1

0

P<;Iraliel encode. Encoder is enabled. A linear sample written to port
1 'with an OUT instruction is compressed to 8-bit log PCM. The 8-bit
value is then read from port 1 with an I N instruction.

0

1

1

Serial encode. Encoder is enabled. A linear sample written to port 1
is compressed to 8-bit log PCM and put into the transmit register for
transmission on an active framing pulse.

1

0

0

Parallel decode. Decoder is enabled. An 8-bit log PCM data written
to port 1 is decoded to linear notation with an IN instruction from
port 1.

1

0

1

Serial decode. Decoder is enabled. An 8-bit log PCM sample from
one of the receive registers is expanded to linear notation with an IN
instruction from port 1.

1

1

0

Parallel encode and decode. Encoder and decoder enabled. In this
state, data is compressed on an OUT instruction to port 1 and then
expanded with the IN instruction from the port.

1

1

1

Serial encode and decode. Encoder and decoder enabled. Linear
data written to port 1 is encoded and put into one of the transmit
registers for serial transmission. The 8-bit log PCM data from one of
the receive registers is decoded with an IN instruction from port 1.

No operation

I

3.10.1 J.I-Law/A-Law Encoder
The encoder compresses linear PCM (14 bits of dynamic range for J.I-Iaw format or 13 bits of dynamic range for A-law format) to 8-bit logarithmic PCM.
Selection between J.I-Iaw or A-law conversion is determined by the system
control register bit 14 (CR14). This bit is input directly to the encoder to de~
termine the conversion· law to be used. The J.I-255 law conversion is performed if CR14 is logic 0, and A-law conversion if CR14 is logic 1. Data is
input to the encoder from the data bus with an OUT instruction to port 1. The
converted 8-bit log PCM sample is then presented to the multiplexer (MUX2
. shown in Figure 3-22). The multiplexer controls whether the encoder output
or the eight low-order data bus bits are input to transmit register TRO of the
serial port. Note that the transmit registers are connected to the port 1 data
bus in a FIFO (first in, first out) configuration. The encoder compresses data
written to port 1 at all times, but the output will be enabled to the TRO only
when CR12 is logic 1.
3-44

Architecture - Companding Hardware

In the serial-encode mode, data written to port 1 is encoded, and the value
put into transmit register TRO. The transmit register is then loaded with the
8-bit value on an active framing pulse, and the 8 bits are clocked out on the
positive edge of SCLK.
For the parallel-encode mode, the linear-PCM value is written to port 1 with
an OUT instruction. The encoded 8-bit value is then stored in TRO. An IN
instruction from port 1 reads TRO to the data bus for storage in RAM. Care
should be taken to have only one OUT and one IN instruction to port 1 for
each data sample in the parallel-encode mode. If there are two OUT instructions to port 1, the first sample will be pushed into transmit register TR1 ,
which cannot be read back to the data bus. Note that when two'scomplement notation is selected, there must be at least one instruction executed after the OUT instruction to ,port 1 and before the IN instruction from
port 1.

3.10.2 IJ-Law/A-Law Decoder
The IJ-Iaw/A-Iaw decoder converts 8-bit log-PCM samples to linear PCM.
The conversion-law selection is governed by control register bit 14 (CR14).
The IJ-Iaw conversion is performed if CR14 is logic 0, and A-law conversion
if CR14 is logic 1. Data input to the decoder may come from either the serial-port receive registers or transmit register TRO. The multiplexer (MUX1
shown in Figure 3-22) sends data to the data bus either through the decoder
or directly to the bus. This multiplexer is controlled in part by control register
bit 13 (CR13). If this bit is logic 0, the multiplexer output is sent to the data
bus directly. If the bit is logic 1, the multiplexer output is sent to the data bus
through the decoder.
In the serial-decode mode, received data from the serial-port receive registers
is input to the decoder from the mUltiplexer, and the received data is decoded
according to either IJ-Iaw or A-law format.
For the parallel-decode mode, the 8-bit PCM sample to be decoded is written
to port 1 with an OUT instruction. This stores the sample in transmit register
TRO. The sample is then decoded by reading the value from port 1 with an IN
instruction. The IN instruction brings the sample from TRO through the mUltiplexer (MUX1) to the decoder, which performs the expansion on the 8-bit
sample. Again, there should be only one OUT and one IN instruction to port
1 for each sample to be decoded in order to avoid losing a sample in transn;lit
register TR1. Note that when two's-complement notation is selected, there
must be at least one instruction executed after the OUT instruction to port 1
and before the IN instruction from port 1.

3-45

Architecture - Coprocessor Port

3.11" Coprocessor Port (TMS320C17/E17)

I

The coprocessor port on the TMS320C17/E17 provides a direct interface to
most 4/8-bit microcomputers and 16/32-bit microprocessors. The port is
accessed through I/O port 5 using IN and OUT instructions. The coprocessor
interface allows the device to act as a peripheral (slave) microcomputer to a
microprocessor, or as a master to a peripheral microcomputer such as the
TMS7042. The coprocessor port is enabled by setting MC/PM and MC low.
The microcomputer mode is enabled by setting these two pins high. (Note
that the MC/PM and MC pins must belin the same state.) In the microcomputer mode, the 16 data lines are used for the 6 parallel 16-bit I/O ports.
Interprocessor communication through the coprocessor interface (see Figure
3-28) is accomplished asvnchronously as in memory-mapped I/O operations.
In coprocessor mode, the 16-bit data bus is reconfigured to operate as a
16-bit latched bus interface. Control bit 30 (CR30) in control register 1 is
used to configure the coprocessor port to either an 8-bit or a 16-bit length for
data transfers. Use of the H I/lO pin allQws the full 16-bit data latches to be
used even when the 8-bit mode is selected.

WR -+....--+--tt--A

RI-+-+-.....-<\--.....
RD -+-+--e--cL.~

PRE

~-+-+--+-----+--~Q
fij[f

-+-+--+-----1

D
4 - 4 t - ' - - 4 I " - - - I N FROM PAS

4-4t--4..---+--'-+--OUT TO PAS

LD1S·
LDO

-+---....----+-+----1-,.<;
,--_.'6+-1 Q

'.;.;;6+-_-----......--D1S.DO

D ...

Figure 3-28. TMS320C17/E17 Simplified Coprocessor Port Logic
Diagram

3-46

Architecture - Coprocessor Port

Several key characteristics of the coprocessor interface are worth noting and
listed below.
•

The BIO and EXINT signals are internal to the processor. No inputs should
be made on the BIO and EXINT pins.

•

Only transfers made when HI/LO is in a low state can activate the internal BIO and EXINT signals.

•

The interrupt condition is kept internally until it is cleared by the
TMS320C17/E17 reading the data in the coprocessor port latch. The
interrupt flag cannot be cleared until the port is read. Four instruction
cycles must take place between the read (IN instruction) from the coprocessor port (PA5) and the write to control register CRO to clear the
interrupt flag.

•

When the TMS320C17 /E17 reads the coprocessor port, it clears the data
in the latch.

•

The 16 data lines (LD15-LDO) remain in a high-impedance state unless
a logic low is asserted on RD. When RD is asserted, the TMS320C17 /E17
drives the data bus with the data in the coprocessor port latch.

The following sequences of events occur depending upon the configuration
and use of the coprocessor porto:
•

16-bit data interface (CR30

= 1):

All 16 bits of the data port are available for 16-bit transfers to
16/32-bit microprocessors.
The HI/LO pin is maintained at a logic low level for all transfers.
Transfers to the TMS320C17 /E17 (see Figure 3-29):
1)
The WR signal is driven low by the microprocessor.
2)

The RBLE (receive buffer latch empty) signal transitions to a
logic high level in response to WR.

3)

Data is written from LD15-LDO to the receive buffer latch
when the WR signal is driven high by the microprocessor.

4)

The internal EXINT signal is generated, causing the interrupt
flag to be set in the TMS320C17 /E17.

5)

The TMS320C17/E17 responds to the interrupt condition
and reads port 5 using an IN instruction.
The receive buffer is cleared. (Subsequent reads by the
TMS320C17 /E17 will be zero value.)

6)

7)

The RBLE signal transitions to a logic low level, signaling the
microprocessor that the receive buffer is empty.

8)

The internal EXINT signal is removed, allowing the interrupt
flag to be cleared.

9)

The interrupt flag is cleared by writing .to control register O.

3-47

Architecture - Coprocessor Port

Transfers from the TMS320C17 /E17 (see Figure 3-30):

•

1)

The RD signal is driven low by the microprocessor.

2)

The TBLF (transmit buffer latch full) signal transitions to a
logic high level in response to RD.

3)

Data is driven from the transmit buffer latch to LD15-LDO
until the RD signal is driven high by the microprocessor.

4)

The internal BIO signal transitions to a logic low level, indicating to the TMS320C17/E17 that the transmit buffer is
empty.

5)

The TMS320C17/E17 responds to the BIO condition and
writes to port 5 using an OUT instruction.

6)

The TBLF signal transitions to a logic low level, signaling the
microprocessor that the transmit buffer is full.

7)

The internal BiO signal transitions back to a logic high state.

8-bit data interface (CR30 = 0):
Only the least-significant eight bits of the ,data port are available
for 8-bit transfers to 4/8-bit microcomputers.
Eight-bit microcomputers may complete full 16-bit transfers by
first transferring data with the HI/LO signal in a logic high state
(steps 1 through 4 below), and then with HI/LO in a logic low
state. Composing 16-bit data in this manner requires two external
bus cycles but only one internal port access. The HI/LO pin may
be maintained at a logic low level if only 8-bit transfers are desired.
Transfers to the TMS320C17 /E17 (see Figure 3-29):
1)
The HI/LO signal is driven high by the microcomputer to allow transfers to the upper eight bits of the internal latch.

3-48

2}
3)

The WR signal is driven low by the

4)

The HllLO signal is driven low by the microcomputer to allow
transfers to the lower eight bits of the internal latch.

5)

The WR signal is driven low by the microcomputer.

6)

The RBLE (receive buffer latch empty) signal transitions to a
logic high level.

7)

Data is written from lD7-lDO to the receive buffer latch
(D7-DO) when the WR signal is driven high by the microcomputer.

8)

The internal EXINT signal is generated, causing the interrupt
flag to be set in the TMS320C17 /E17.

9)

The TMS320C17/E17 responds to the interrupt condition
. and reads port 5 using an IN instruction.

microcompu~er.

Data is written from LD7-lDO to the receive buffer latch
(D15-D8) when the WR signal is driven high by the microcomputer.

Architecture - Coprocessor Port

10}

The receive buffer is cleared. (Subsequent reads· by the
TMS320C17 /E17 will be zero value.)

11}

The RBLE signal transitions to a logic low level, signaling the
microcomputer that the receive buffer is empty.

12)

The internal EXINT signal is removed, allowing the interrupt
flag to be cleared.

13)

The interrupt flag is cleared by writing to control register O.

Transfers from the TMS320C17 /E17 (see Figure 3-30):
1)

The HI/LO signal is driven high by the microcomputer to allow transfers from the upper eight bits of the internal latch.

2}

The RD signal is driven low by the microcomputer.

3}

Data is driven from the transmit buffer latch (D15-D8) to
LD7-LDO until the RD signal is driven high by the microcomputer.

4)

The HI/LO signal is driven low by the microcomputer to allow
transfers from the lower eight bits of the internal latch.

5)

The RD signal is driven low by the microcomputer.

6)

The TBLF (transmit buffer latch full) signal transitions to a
logic high level.

7}

Data is driven from the transmit buffer latch (D7 -DO) to
LD7-LDO until the RD signal is driven high by the microcomputer.

8)

The internal BIO signal transitions to a logic low level, indicating to the TMS320C17/E17 that the transmit buffer is
empty.

9}

The TMS320C17/E17 responds to the BIO condition and
writes to port 5 using an OUT instruction.

10)

The 'i'BtF signal transitions to a logic low level, signaling the
microcomputer that the transmit buffer is full.

11)

The internal BIO signal transitions back to a logic high state.

Examples of the use of a coprocessor interface are provided in Section 6.5 and
the data sheet of Appendix A.

3-49

Architecture - Coprocessor Port

Hi/LOW

DATA-{

~\-(I

VALID
~--------~~~--~--

VALID

RBLE

u
II

EXINTt

I
\ '-----tll-l----II
\~

DENtL
(PA5)
Only necessary for
operation of a-bit mode
constructing 1 6-bit data
t Internal signals

Figure 3-29. External Write Timing to the Coprocessor Port

HlfrnW'

DATA

TBLF

----«

VALID

~I~S-----«

/
------------~\Ir\------J

11

BlOt

WEtL

(PA5)

VALID

)>---iSrS- - - - -

'-\'------ill~
/\~

. Only necessary for
operation of a-bit mode
constructing 1 6-bit data

t Internal signals

Figure 3-30. External Read Timing from the Coprocessor Port

3-50

Architecture - System Control Register

3.12 System Control Register (TMS320C17/E17)
The TMS320C17/E17 provides additional hardware for interfacing ease in
serial applications. This hardware is interfaced to the microcomputer portion
of the device via the external data bus (015-00). The additional hardware is
controlled by a 32-bit system control register (see Figure 3-31), thereby
eliminating any additions to the TMS320 instruction set.
CR(10)

XF

DATA BUS (015-00)
18

CR(15 -0) __-~<.::18=-t LOWER CONTROL
REGISTER

RESET

18

INTERRUPT
FLAG BITS

CR(31-18) __- - - - ; UPPER CONTROL
REGISTER

18

Figure 3-31. System Control Register

The lower 16 register bits (CR15-CRO) are accessed through port O. These
bits control interrupts, serial-port configuration, the external logic output flag,
internal and external framing pulses, and the J.I-Iaw/A-Iaw encoder and decoder. The interrupt inputs (EXtNT, FSX, FSR, and FR) are synchronized to
CLKOUT and control the interrupt flag bits (CR3-CRO). The interrupts are
maskable via the interrupt enable bits (CR7-CR4). Bit S (CRS) controls I/O
port 1 configuration.
The upper 16 bits (CR31-CR16) are accessed through port 1. These bits
control the internal framing pulse (FR) output frequency, serial-clock divide
ratios, pulse-width control for the FR framing pulse, and companding conversions. The bit width of the coprocessor mode is controlled by CR30.
The external data bus provides on-chip communication with the system control register, serial port, companding hardware, and coprocessor port. With a
write to port 0, the lower control register is addressed and data latched into
the register by the rising edge of the write enable (WE) signal. To write to the
upper control register bits, bit 8 of the lower control register must be set to
logic 1. If CRS is logic 0, a write to port 1 accesses the serial port and compan~ing hardware.
Table 3-6 gives a detailed description of the control register bits and their
operation. The control register bits are configured through OUT instructions
to port 0 and port 1. WE goes low during the first cycle of the OUT instruction,
enabling the port data onto the external data bus. The control register bits are
latched on the rising edge of WE. There is a propagation delay time for these
bits to access the appropriate hardware (see Appendix A for timing informa'tion). An allowance for this write delay should be made when reconfiguring
(writing to) the control register. The most critical factor is receiving an ex3-51

Architecture - System Control Register

ternal framing pulse while reconfiguring the control register. If an external
framing pulse is received at that time, it may not be detected and the serialport registers will contain random data (see Section 3.9 for further details).

Table 3-6. Control Register Bit Definitions
CR BIT
3-0

#

DESCRIPTION
Interrupt flags. When an interrupt occurs on any of the four maskable interrupts, the
appropriate flag is set to logic 1 whether the interrupt is enabled or disabled. To clear
the flag, a logic 1 is written to the appropriate bit by an OUT instruction to port O.
The bits may be read by an IN instruction to determine interrupt sources when multiple
interrupts are enabled.
Bit

#

EXINT
FSR
FSX
FR

0
1

2
3

7-4

Interrupt enable bits. When one of these bits is set to logic 1, an interrupt occurring
on that input sets the appropriate flag and activates the microcomputer interrupt circuitry. When disabled, the interrupt flag is still set, but the device is not interrupted.
Bit

4
5
6

7

3-52

Flag

#

Flag
EXINT
FSR
FSX
FR

8

Port 1 control bit. When set to logic 0, I/O port 1 isconnected to either the serial-port
registers or the companding hardware, depending on the state of CR11. When set to
logic 1, I/O port 1 is connected to the upper control register. This bit must be set with
an OUT instr\.lction to port 0 before port 1 may access the upper control register bits
CR31-CR16.

9

External framing enable. This bit controls which framing pulses cause serial port data
transmission to occur. When set to logic 0, serial port transmit and receive operations
occur simultaneously and are controlled by the internal framing (FR) pulse. When set
to logic 1, transmit operations are controlled by the external transmit framing (FSX)
pulse, and receive operations are controlled by the external receive framing (FSR)
pulse.

10

XF output latch. This bit controls the logic level of the external logic output flag (XF)
pin. A write delay time occurs when reconfiguring this latch (see Appendix A for
timing information).

11

Serial port enable. When set to logic 0, the transmit and receive registers are disabled
in order to use the parallel companding mode. When set to logic 1, the serial port
registers are enabled and data transfers with ,the serial port are via OUT and IN instructions to port 1. A reset sets this bit to zero.

Architecture - System Control Register

Table 3-6. Control Register Bit Definitions (Concluded)
CR BIT#

DESCRIPTION

12

IJ-Iaw/A-Iaw encoder enable. When set to logic 0, the encoder is disabled. When set
to logic 1, the encoder is enabled, and data written to port 1 is IJ-Iaw or A-law encoded. The encoder must be enabled for compression of linear data in both the serial
and parallel modes of operation.

13

IJ-Iaw/A-Iaw decoder enable. When set to logic 0, the decoder is disabled. When set
to logic 1, the decoder is enabled, and data read from port 1 is IJ-Iaw or A-law decoded to linear format. The decoder must be enabled for expansion of log PCM data
in both the serial and parallel modes of operation.

14

IJ-Iaw or A-law encode/decode select. When set to logic 0, the companding hardware
performs 1J-255-law conversion. When set to logic 1, the companding hardware performs A-law conversion.

15

Serial clock control. When set to logic 0, the serial port clock (SCLK) is an output,
and its frequency is derived from the microcomputer system clock, X2/CLKIN. When
set to logic 1, SCLK is an input that provides the clock for all data transfers with the
serial port and the frame counter in timing logic. A reset sets this bit to one.

23-16

Frame counter modulus. The value of these bits determines the divide ratio for the
FR output frequency. The FR frequency is given as SCLK/(CNT + 2) where CNT is a
binary value of CR23-CR16. The following should be noted when configuring the
divide ratio:
1. CNT must be in the range given by 7 :S CNT :S 254.
2. Bits are operational whether SCLK is an input or an output.

27-24

SCLK prescale control bits. As an output, SCLK is derived from the microcomputer
system clock, X2/CLKIN. Prescale divide ratios are selectable through these control
bits (see Section 3.9.3 for the available divide ratios).

28

FR pulse-width control. This bit controls the pulse width of the FR output to select
data-transfer rates with combo-codec circuits. When set to logic 0, the FR output
framing pulse is one SCLK cycle wide for the fixed data-rate mode and appears in the
serial-clock cycle preceding the first serial-bit transmission. When set to logic 1, the
FR output framing pulse is eight SCLK cycles wide for the variable data-rate mode.
In this mode. the framing pulse is active high for the duration of the eight bits transmitted and received.

29

Two's-complement IJ-Iaw/A-Iaw conversion enable. When set to logic 0, sign-magnitude companding is enabled. When set to logic 1, two's-complement companding
is enabled. When two's-complement companding has been selected along with the
parallel companding mode of operation, one instruction must be inserted between
successive OUT and I N instructions to port 1. A reset sets this bit to zero.

30

8/16-bit length coprocessor mode select. When set to logic 0, the 8-bit byte length
is used. When set to logic 1, the 16-bit word length is selected.

31

Reserved for future expansion. This bit should be set to zero.

3-53

Architecture - System Control Register .

3-54

Section 4

Assembly Language Instructions

The instruction set of the TMS320C1 x (first-generation TMS320) processors
supports numeric-intensive signal processing operations and general-purpose
applications, such as high-speed control. The instruction set shown in Table
4-2 consists primarily of single-cycle, single-word instructions, permitting
execution rates of up to 6.25 million instructions per second. Only infrequently
used branch and 1/0 instructions are multi-cycle.
For operations involving multiplication, the TMS320C1 x instruction set offers
a single-cycle instruction (MPY). For ease of use in a Harvard architecture,
table read (TBLR) and table write (TBLW) instructions are provided, which
allow information transfer between data and program memory. The IN and
OUT instructions permit a data word to be read into the on-chip RAM in only
two cycles. The SUBC (conditional subtract) instruction performs the shifting
and conditional branching necessary to implement a divide efficiently and
quickly.
This section describes the TMS320C1 x assembly language instructions. Included in this section are the following major topics:
•

Memory Addressing Modes (Section 4.1 on page 4-2)
Direct addressing
Indirect addressing (using two auxiliary registers)
Immediate addressing

•

Instruction Set (Section 4.2 on page 4-7)
Symbols and abbreviations used in the instructions
Instruction set summary (listed according to function)

•

Individual Instruction Descriptions (Section 4.3 on page 4-11 )
Presented in alphabetical order and provirfing the following:
- Assembler syntax
- Operands
- Execution
- Encoding
. - Description
- Words,
- Cycles
- Example(s}

4-1

Assembly Language Instructions - Memory Addressing Modes

4.1 Memory Addressing Modes
The TMS320C1 x instruction set provides three memory addressing modes:
•
•
•

Direct 'addressing mode
Indirect addressing mode
Immediate addressing mode.

Both direct and indirect addressing can be used to access data memory. Direct
addressing concatenates seven bits of the instruction word with the 1 -bit data
memory page pointer to form the 8-bit data memory address. Indirect addressing accesses data memory through the two auxiliary registers. In immediate addressing, the data is based on a portion of the instruction word(s).
The foilowing sections describe each addressing mode and give the opcode
formats and some examples for each mod~.

4.1.1 Direct Addressing Mode

J

In the direct memory addressing mode, the instruction word contains the
lower seven bits of the data memory address (dma). This field is concatenated
with the one-bit data memory page pointer (DP) register to form the full 8-bit
data memory address. This implements a paging scheme in which the first
page contains 128 words and the second page contains 16/128 words. In a
typical application, infrequently accessed system variables, such as those used
when performing an interrupt routine, are stored on the second page. The
7 -bit address in the instruction points to the specific location within that data
memory page. The DP register is loaded through the LOP (load data memory
page pointer~, LDPK (load data memory page pointer immediate). or LST
(load statuI! bits from data memory) instructions. The data page pointer is part
of the status register and thus can be stored in data memory.

Note:
The data page pointer is not initialized by reset and is therefore undefined
after powerup. The TMS320C1 x development tools, however, utilize de-'
fault values for many parameters, including the data page pointer. Because
of this, programs that do not explicitly initialize the data page pointer may
execute improperly depending on whether they are executed on a
TMS320C1 x device or using a development tool. Thus, it is critical that
all programs initialize the data page pointer in software.

Figure 4-1 illustrates how the 8-bit data address is formed.

4-2

Assembly Language Instructions - Memory Addressing Modes

7 LSBS FROM
INSTRUCTION
REGISTER (JR)

7

8-BIT DATA ADDRESS

Figure 4-1. Direct Addressing Block Diagram

Direct addressing can be used with all instructions except CALL, the branch
instructions, immediate operand instructions, and instructions with no operands. The direct addressing format is as follows:
15 14

13

12

11

10

9

8

7

6

5

4

o

Opcode'

3

2

0

dma

Bits 15 through 8 contain the opcode. Bit 7 = 0 defines the addressing mode
as direct. Bits 6 through 0 contain the data memory address (dma),which can
directly address up to 128 words (1 page) of data memory. Use of the data
memory page pointer is required to address the full data memory space.
Example of Direct Addressing Format:

ADD 9,5

15 14

Add to accumulator the contents of data memory location
9 left-shifted 5 bits.
13

12

11

00000

10

9

0

8

7

6

5

4

0000

3

2

0

00

The opcode of the ADD 9,5 instruction is 05h and appears in bits 15 through
8. The notation nnh indicates nn is a hexadecimal number. The shift count
of 5h appears in bits 11 through 8 of the opcode. The data memory address
09h appears in bits 6 through O.

4-3

\

Assembly Language Instructions- Memory Addressing Modes

4.1.2 Indirect Addressing Mode
Indirect addressing forms the data memory address from the least significant
eight bits of one of the two auxiliary registers, ARO and AR1 . This is sufficient
to address all the data memory; no paging is necessary with indirect addressing. The Auxiliary Register Pointer (ARP) selects the current auxiliary register.
The auxiliary registers can be automatically incremented, or decremented in
parallel with the execution of any indirect instruction to permit single-cycle
manipulation of data tables. The increment/decrement occurs AFTER the current instruction has completed executing.
In indirect addressing, the 8-bit addresses contained in the auxiliary registers
may be loaded ,by the instructions LAR (load auxiliary register) and LARK
(load auxiliary register immediate). The auxiliary registers may be modified
by the MAR (modify auxiliary register) instruction or, equivalently, by the indirect addressing field of any instruction supporting indirect addressing.
AR(ARP} denotes the auxiliary register selected by ARP.
The following symbols are used in indirect addressing:

..
..

Contents of AR(ARP} are used for data memory address.
Contents of AR(ARP} are used for adc:tress, then decremented after data
memory access.

*+

Contents of AR(ARP} are used for address, then incremented after data
memory access.

The indirect addressing format is as follows:
15

14

13

I
NOTE: NAR

=

12

11

10

9

8765432

o

Opcode
I 1 I 0 IINC I DEC I NAR I 0
new auxiliary register control bit.

Bits 15 through 8 contain the opcode, and bit 7 = 1 defines the addressing
mode as indirect. Bits 6 through 0 contain the indirect addressing control bits.
Bit 3 and bit 0 control the Auxiliary Register Pointer (ARP). If bit 3 = 0, the
contents of bit 0 are loaded into the ARP after execution of the current in~truction. If bit 3 = 1, the contents of the ARP remain unchanged. ARP = 0
defines the contents of ARO as a memory address. ARP = 1 defines the contents of AR1 as a memory address. Note that NAR denotes the new auxiliary
register control bit.
Bit 5 and bit 4 control the auxiliary registers. If bit 5 = 1, the current auxiliary
register is incremented by 1 after execution. If bit 4 = 1. the current auxiliary
register is decremented by 1 .after execution. If bit 5 and bit 4 are 0, then
neither auxiliary register is incremented nor decremented. Bits 6, 2, and 1 are
reserved and should always be programmed to O.
The auxiliary registers may also be used for temporary storage via the load and
store auxiliary register instructions. LAR and SAR, respectively.
The examples that follow illustrate the Indirect addressing format. Indirect
addressing is indicated by an asterisk (*) in these examples and in the
TMS320C1 x assembler.
4-4

Assembly Language Instructions - Memory Addressing Modes

Example 1:

ADD *+,8

15

14

13

Add to the accumulator the contents of the data memory
address defined by the contents of the current auxiliary
register. This data is left-shifted 8 bits before being added.
The current auxiliary register is auto incremented by one.
The opcode is OSASh, as shown below.
12

11

10

9

8

7

6

0000100010

5

4

o

3

2

o

o

o
o

Example 2:

ADD *,8

As in Example 1, but with no autoincrement; the opcode
is 088Sh.

Example 3:

ADD *-,8

As in Example 1, except that the current auxiliary register
is decremented by 1; the opcode is 089Sh.

Example 4:

ADD *+,8,1

As in Example 1, except that the auxiliary register pointer
is loaded with the value 1 after execution; the opcode is
OSA1h.

Example 5:

ADD "+,8,(\

As in Example 4, except that the auxiliary register pointer
is loaded with the value 0 after execution; the opcode is
08AOh.

4-5

Assembly Language Instructions - Memory. Addressing Modes

4.1.3 Immediate Addressing Mode
Included in the TMS320Clx instruction set are five immediate operand instructions, in which the immediate operand is contained within the instruction
word. These instructions execute within a single instruction cycle. The length
of the constant operand is instruction-dependent. The immediate instructions
are:
Load accumulator immediate short (S-bit constant)
Load auxiliary register immediate short (S-bit constant)
Load auxiliary register pointer (1 -bit constant)
Load data memory page pointer immediate (1-bit constan1)
Multiply immediate (13-bit constant)

LACK

LARK
LARP

LDPK

MPYK

The following examples illustrate immediate addressing format:
Example 1:
MPYK 2781
15 14

13

o

0

Multiply the value 27S1 with the contents of the T register.
The result is loaded into the P register.

I

12

11

10

9

8

7

6

5

4

3

2

0

13-bit constant

Example 2:
LACK 221

15 14

oI1

4-6

13

Load the constant 221 in the lower eight bits of the accumulator right-justified. The upper 24 bits of the accumulator
are zero.
12

11

10

I1 I1 I1 I1

9

8

1

0

7

6

5

4

3

8- bit constant

2

0

Assembly Language Instructions - Instruction Set

4.2 Instruction Set
The following sections list the symbols and abbreviations used in the
TMS320C1 x instruction set summary and in the instruction descriptions. The
complete instruction set summary is organized according to function. A detailed description of each instruction is listed in the instruction set summary.

4.2.1 Symbols and Abbreviations
Table 4-1 lists symbols and abbreviations used in the instruction set summary
(Table 4-2) and the individual instruction descriptions.
Table 4-1. Instruction Symbols
SYMBOL

MEANING

A
ACC
ARn

Port address
Accumulator
Auxiliary Register n (ARO and AR1) are predefined assembler symbols
equal to 0 and 1, respectively.)
Auxiliary register pointer
Branch address
Data memory address field
Label assigned to data memory location n
Data memory address
Data page pointer
Addressing mode bit
Interrupt mode bit
Immediate operand field
Indicates nn is a hexadecimal number. (All others are assumed to be
decimal values.)
Overflow (saturation) mode flag bit
Product register
Port address (PAO through PA7 are predefined assembler symbols equal
to 0 through 7, respectively.)
Program counter
Program memory address
Label assigned to program memory location n
1-bit operand field specifying auxiliary register
4-bit left-shift code
Temporary register
Top of stack
3-bit accumulator left-shift field
Is assigned to
An absolute value
User-defined items
Optional items
"Contents of"
Alternative items, one of which must be entered
Angle brackets back-to-back indicate "not equal".
Blanks or spac.!ls must be entered where shown.

ARP
B

o
DATn
dma
DP
I
INTM
K
nnh
OVM

P
PA
PC
pma
PRGn
R

S
T
TOS

X

....

I I

<>
[ ]
()
{}
<>

4-7

Assembly Language Instructions -- .Instruction Set

4.2.2 Instruction Set Summary _
Table 4-2 provides the TMS320C1 x instruction set summary, arranged according to function and alphabetized1within each functional grouping. Additional information is presented in the .individual instruction descriptions in the
following section.
The instruction set summary consists primarily of single-cycle, single-word
instructions. Only infrequently used branch and I/O instructions are multicycle.

4-8

Assembly Language Instructions - Instruction Set

Table 4-2. Instruction Set Summary
ACCUMULATOR MEMORY REFERENCE INSTRUCTIONS
Mnemonic and Description
Cycles Words
16-Bit Opcode
MSB
LSB
Absolute value of accumulator
1
1
0111 1111 1000 1000
ABS
ADD
Add to accumulator with shift
1
1
0000 ·SSSS I DOD DODD
ADDH
Add to high accumulator
1
1
0110 0000 I DOD DODD
ADDS
Add to low accumulator with
1
1
0110 0001 I DOD DODD
sign-extension suppressed
AND
AND with accumulator
1
0111 1001 I DOD DODD
1
LAC
Load accumulator with shift
1
0010 SSSS I DOD DODD
1
LACK
Load accumulator immediate short
1
0111 1110 KKKK KKKK
1
OR
OR with accumulator
1
0111 1010 I DOD DODD
1
SACH
Store high accumulator with shift
1
1
0101 1XXX I DOD DODD
SACL
Store low accumulator
1
1
0101 0000 I DOD DODD
SUB
Subtract from accumulator with shift
1
1
0001 SSSS I DOD DODD
SUBC
Conditional subtract
1
1
0110 0100 I DOD DODD
SUBH
Subtract from high accumulator
1
1
0110 0010 I DOD DODD
SUBS
Subtract from low accumulator
1
1
0110 0011 I DOD DODD
with sign-extension suppressed
XOR,
Exclusive-OR with low accumulator
1
1
0111 1000 I DOD DODD
ZAC
0111 1111 1000 1001
1
Zero accum,ulator
1
ZALH
Zero low accumulator and load high
1
0110 0101 I DOD DODD
1
accumulator
ZALS
Zero accumulator and load low
1
1
0110 0110 I DOD DODD
accumulator with sign-extension
suppressed
AUXILIARY REGISTER AND DATA PAGE POINTER INSTRUCTIONS
Mnemonic and Description
Cycles Words
16-Bit Opcode
MSB
LAR
LARK
LARP
LOP
LDPK
MAR
SAR

Load auxiliary register
Load auxiliary register immediate short
Load auxiliary register pointer
immediate
Load data memory page pointer
Load data memory page pointer
immediate
Modify auxiliary register
Store auxiliary register

LSB

1
1
1

1
1
1

0011 100R I DOD DODD
0111 OOOR KKKK KKKK
0110 1000 1000 OOOK

1
1

1
1

0110 1111 I DOD DODD
0110 1110 0000 OOOK

1
1

1
1

0110 1000 I DOD DODD
0011 OOOR I DOD DODD

T REGISTER. P REGISTER. AND MULTIPLY INSTRUCTIONS
Mnemonic and Description
Cycles Words
16-Bit Opcode
MSB
APAC
LT
LTA
LTD
MPY

,
MPYK
PAC
SPAC

Add P register to accumulator
Load T register
Load T register and accumulate
previous product
Load T register. accumulate previous
product. and move data
Multiply (with T register. store product
in P register)
lII!ultiply immediate
Load accumulator with P register
Subtract P register from acoumulator

1
1
1

LSB
0111 1111 1000 1111
0110 1010 I DOD DODD
0110 1100 I DOD DODD

1

1

0110 1011

I DOD DODD

1

1

0110 1101

I DOD DODD

1
1
1

1
1
1

100K KKKK KKKK KKKK
0111 1111 1000 1110
0111 1111 1001 0000

1
1
1

\

4-9

Assembly Language Instructions.., Instruction Set

Table 4-2. Instruction Set Summary (Concluded)
,/

BRANCH/CALL INSTRUCTIONS
Cycles Words
Mnemonic and Description

16-Bit Opcode
MSB

B

Branch unconditionally

2

2

BANZ

Branch on auxiliary register not zero

2

2

2

2

BGEZ

,,'

~

Branch if accumulator

0

;

BGZ

Branch if accumulator> 0

2

2

BIOZ

Branch on I/O status = 0

2

2

BLEZ

Branch if accumulator

s: 0

2

2

BLZ

Branch if accumulator < 0

2

2

BNZ

Branch if accumulator ¢ 0

2

2

BV

Branch on overflow

2

2

BZ

Branch if accumulator = 0

2

2

CALA
CALL

Call subroutine indirect
Call subroutine

2
2

1
2

RET

Return from subroutine

2

1

LSB

1111 1001 0000 0000
0000 BBBB BBBB BBBB
1111 0100 0000 0000

OQOO BBBB BBBB BBBB

1111
0000
1111
0000
1111
0000
1111
0000
1111
0000
1111
0000
1111
0000
1111
0000
0111
1111
0000
0111

CONTROL INSTRUCTIONS
Mnemonic and Description
Cycles Words

1101 0000 0000
BBBB BBBB BBBB

1100 0000 0000
BBBB BBBB BBBB

0110 0000 0000
BBBB BBBB BBBB

1011 0000 0000
BBBB BBBB BBBB

1010 0000 '0000
BBBB BBBB BBBB

1110 0000 0000
BBBB BBBB BBBB

0101 0000 0000
fBBB BBBB BBBB

111 0000 0000

BBBB BBBB BBBB

1111 1000 1100
1000 0000 0000
BBBB BBBB BBBB

1111 1000 1101
)

16-Bit Opcode
MSB

DINT
EINT
LsT
NOP
POP
PUSH
ROVM
sOVM
SST

Dis!lble interrupt
Enable interrupt
Load status register from data memory
No operation
Pop top of stack to low accumulator
Push low accumulator onto stack
Reset overflow mode
Set overflow mode
Store status register

I/O AND

1
1
1
1
2
2
1
1
1

1
1
1
1
1
1
1
1
1

0111
0111
0111
0111
0111
,0111
0111
0111
0111

LSB

1111
1111
1011
1111
1111
1111
1111
1111
1100

1000 0001
1000 0010
I ODD DODD

1000
1001
1001
1000
1000

0000
1101
1100
10.10
1011

I DOD DODD

DATA MEMORY OPERATIONS
Mnemonic and Description
16-Bit Opcode
Cyc,es Words
MSB
LSB
DMOV Data move in data memory
1
1
0110 1001 I DOD DODD
IN
Input data from port
2
1
0100 OAAA I DOD DODD
OUT
Output data to port
0100 1AAA I DOD DODD
2
1
TBLR
Table read
3
1
0110 0111 I DOD DODD
TBLW
1
0111 1101 I DOD DODD
Table write
3

4-10

Assembly Language Instructions - Individual Descriptions

4.3 Individual Instruction Descriptions
Each instruction in the instruction set summary is described in the following
pages. Instructions are listed in alphabetical order. Information, such as assembler syntax, operands, execution, encoding, description, words, cycles,
and examples, is provided for each instruction. An example instruction is
provided on the next two pages to familiarize the user with the special format
used and explain its content. Refer to Section 4.1 for further information on
memory addressing. Code examples using many of the instructions are given
in Section 5 on Software Applications.

4-11

Example Instruction

EXAMPLE
Syntax

Direct: [

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-21:37:19
Create Date                     : 2017:08:01 12:00:56-08:00
Modify Date                     : 2017:08:01 12:45:55-07:00
Metadata Date                   : 2017:08:01 12:45:55-07:00
Producer                        : Adobe Acrobat 9.0 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:8afc1eed-15c6-5c49-9308-de17bc19df94
Instance ID                     : uuid:48240434-18f2-4c4a-87a9-6e6763bd5425
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 598
EXIF Metadata provided by EXIF.tools

Navigation menu