1981 Motorola Microprocessors Data Manual
1981 Motorola Microprocessors Data Manual
MICROPROCESSORS
DATA MANUAL
• Quality
• Reliability
• Technology
Motorola's •
Microprocessor/Microcomputer Families ,
•
The Motorola M6800 Generic Bus
Concept and Use
Reliability
•
Data Sheets
•
Mechanical Data
•
~echnical Training
•
Memory Products
•
Development Systems and
Board-Level Products
II
MOTOROLA
MICROPROCESSORS
Prepared by
Technical Information Center
This book is intended to provide the design engineer with the technical
data needed to completely and successfully design a microprocessor or
microcomputer based system. The data sheets for Motorola's
microprocessor, microcomputer, and peripheral components are included.
Motorola Inc.
MOS Integrated Circuits Group
Microprocessor Division
Austin, Texas
(512)928-6800
Series B
©MOTOROLA INC., 1981
Previous Edition ©1978
Printed in U.S.A. "All Rights Reserved"
Product Preview data sheets herein contain information on a product under
development. Motorola reserves the right to change or discontinue these
products without notice.
ii
TABLE OF CONTENTS
Chapter 3 - Reliability
The MC6800 Microprocessor Family - Reliability Report No. 8110. . .. 3-3
Power Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 3-23
The "Better" Program ......................................... 3-26
iii
TABLE OF CONTENTS
Title Page No.
iv
ALPHANUMERICAL INDEX
v
ALPHANUMERICAL INDEX
vi
Motorola's
Microprocessor/Microcomputer Families
•
1-1
•
1·2
MOTOROLA'S
MICROPROCESSOR AND MICROCOMPUTER FAMILIES
The family concept has been extremely popular in the microprocessor in-
dustry. Motorola pioneered this family concept with the introduction of the
M6800 Family in 1974. Since then the MPU/MCU Family has evolved in
several directions, as shown in Figure 1-1, in order to fill expanding use
concepts. In addition, the basic M6800 Family has been enhanced. A large
number of peripheral devices have been developed to support the expan-
ding family of microprocessors and microcomputers.
The MC6800 MPU was the first of the M6800 MPU Family and still remains
a highly cost-effective processor for a great many process-control and
data-communications applications. Seventy-two instructions and six dif-
ferent addreSSing modes give it powerful capability, and a full range of
compatible peripheral chips offer the widest possible latitude in system
implementation. After years of field experience, the MC6800 has earned an
enviable reputation as one of the easiest-to-use processors available.
Moreover, to tai lor the system to your specific needs at the lowest cost, the
MC6800 (and its peripherals) is available in three different packages, three
different temperature ranges, and three speed ranges, as follows:
1-3
FIGURE 1·1. GENEALOGY OF THE COHESIVE
M6800 MICROPROCESSOR/MICROCOMPUTER FAMILY
• 15-
12.5-
10 -
7.5-
,,------ ... ,
'- ---_ ..... /
6.0-
OJ
()
c
ro
E
5.0-
/
,.----
0 /
't: 4.0-
OJ
c... /
OJ 3.0- /
> /
~
Q)
cr: 2.5- /,-----------~ ~--~
/
2.0- /
/
1.5 - /
//
1.2- /. 68701
~--~
>----.. .-----.. . ,
,----~/
1.0- 6800
.".---,"""
0.75- 6805P2 )
....... _---'"
I I I I I I I I I
1974 1975 1976 1977 1978 1979 1980 1981 1982
Introduction Year
The MC6802 MPU has all the attributes of the basic MC6800, but it
reduces the component count of a minimum microcomputer system to only
two.
The MC6802 adds an on·chip clock oscillator and 128 bytes of RAM to the
capability of an MC6800. Data in the first 32 bytes of the built-in RAM can
be retained in a low-power mode by an external power source, allowing
memory retention during a power-down situation.
1-4
The MC6803 MPU is the microprocessor version of the MC6801 single-
chip microcomputer. The MC6803 accomodates applications where exter-
nal ROM is present. With 13 parallel input/output lines, a 16-bit timer, and a
serial communications interface the MC6803 offers a great deal of freedom
in system needs. One of the most desirable attributes of the multi-
generation MC6803 is its compatibility with existing software and hard-
ware. The MC6803 easily meets this goal by being thoroughly integrated in-
to the total M6800 family of components. In addition, since the MC6803 is
an HMOS device, it requires only a single + 5 volt power supply and inter-
faces with both TTL and MOS peripherals. The concept of an integrated
family of devices is predicated on continuity in both design and develop-
ment. As a member of the M6800 family, the MC6803 shares many of the at-
tributes of the basic MC6800 MPU. For example, the MC6803 encompasses
the full MC6800 instruction set, yet new instructions have been incor-
porated for even greater system capability and ease of programming. Many
MC6803 instructions execute in fewer cycles than on the MC6800. More
and faster instructions increase throughput and reduce software conver-
sion and development time. Some of the features of the MC6803 are:
Architectural Improvements:
• Additional 16-Bit Index and Stack Registers
• Direct Page Register
• Increased Addressing Modes
1-5
• 16-Bit Operations and 16-Bit Accumulator
• 8 x 8 Multiplier
•
• Fast Interrupt
Software Improvements:
• Designed for efficient handling of high-level languages, including
Pascal, Basic, MPL, Cobol, and Fortran.
• Position-independent coding and reentrant-programming capability
encourage development of "canned software," with modular
program interchangeability.
• Structural, high subroutined code enhanced by two 16-bit
index registers and program counter usable for indexing.
• Multi-task and multi-processor organization.
• Stack-oriented compiler instructions with both user and hardware
stack registers available.
Although the MC6809 is compatible with the extensive existing M6800
Family, Motorola is designing even more peripherals to enhance systems
designed with the MC6809. These new peripherals (e.g., the MC6829
Memory Management Unit, the MC6839 Floating Point ROM, and the
MC6855 Serial DMA Processor) allow an MC6809 user to realize the full
potential of the processor.
The MC6809 is a logical step for applications that crowd the capacity limits
of today's conventional 8-bit processor - yet, hardware and software
(upward) compatibility with existing M6800 processors protects previous
software investment.
The MC6809E includes all the features of the MC6809 plus external clock-
ing to provide the flexibility required in a multi-processor system.
1-6
The very low power requirement of static CMOS make the MC146804E2
family of processors and peripherals extremely attractive for those applica-
•
tions where power is a major consideration (portable instruments, telecom-
munications, point-of-sale terminals, remote instrumentation, industrial
control, applicance controllers, etc.). The operating voltage range is from 3
to 6 volts, while current usage ranges from microamps upward depending
upon frequency, voltage, standby modes, and operating duty cycle. Other
MC146805E2 features include:
1-7
8·BIT MICROPROCESSORS FEATURES MATRIX
RAM I/O Special Mnem Ext Data
•
Device Tech Pins 8X Lines I/O Inst' Addr Size Clock Timer
MC6800 NMOS 40 - - - 72 64K 8 No -
MC6802 NMOS 40 128 - - 72 64K 8 Yes -
MC6802NS NMOS 40 128 - - 72 64K 8 Yes -
MC6803 HMOS 40 128 13 Serial 82 64K 8 Yes 16-Bit
MC6803NR HMOS 40 - 13 Serial 82 64K 8 Yes 16-Bit
MC6808 HMOS 40 - - - 72 64K 8 Yes -
MC6809 HMOS 40 - - - 59 64K2 8 Yes -
MC6809E HMOS 40 - - - 59 64K2 8 No -
MC146805E2 CMOS 40 112 16 - 61 8K 8 Yes 8-Bit +
Prescaler
NOTES:
1. Some Mnemonic Instructions can have many Opcode Instructions. As a result a Microprocessor
normally has many more Opcode Instructions than Mnemonic Instructions. For instance the
MC6809 has 59 Mnemonic Instructions and 1464 Opcode Instructions.
2. Two megabytes when used with the MC6829 Memory Management Unit.
1-8
SINGLE·CHIP MICROCOMPUTERS (MCUs)
THE M6801 - M6805 - M3870 - M141000 FAMILIES
•
Take a basic MPU; add an on-chip clock oscillator and timer; put in enough
Read-Only Memory (ROM) to handle the program routines for dedicated
application, and enought Ready/Write (RAM) Memory capacity to handle
the associated data manipulations; cap it off with sufficient input/output
capability to interface with a number of parallel and serially oriented
peripherals and you have a single-chip microcomputer.
The single-chip system doesn't necessarily have all the flexibility of a
multi-chip system, but with adequate capacity to handle a specific require-
ment, it can save both component cost and equipment manufacturing cost.
Motorola offers single-chip microcomputers across a broad spectrum of
processor performance and system functionality. Motorola's first high
volume production single-chip MCU is the second source of the popular
3870. The 4-bit CMOS M141000 Family includes two ROM-based parts, plus
a ROM-less version. The M6801 Family includes the high performance
single-chip MCU, plus EPROM and ROM-less versions. The rapidly expan-
ding M6805 Family includes a number of memory and package sizes with
various special 1/0 functions, in both HMOS and CMOS.
ROM SIZE - The mask ROM capacities of the present single-chip MCUs
range from 1K bytes for the M6805 and the M141000 Families up to 2.5K
bytes on one M6805 Family version. However, the M6801 and M6805
Families may in the future be implemented with as much as 64K bytes of
on-chip ROM without any architectural changes. In selecting the ROM size,
the ROM usage efficiency of the instruction set should be considered,
along with the application to be programmed. Architectures of the
M141000 and MC3870 class offer short one and two byte instructions. The
M6801 and M6805 Families use many multi-function instructions such as
1-9
bit manipulation, memory modification, indexing, and multiply to do the
function of two or more instructions in traditional MCUs.
•
NON·MASK·ROM VERSIONS - EPROM versions andlor ROM-less ver-
sions of practically all single-chip MCUs are offered. They serve for limited
volume applications, prototype debugging, and field trials. EPROM ver-
sions are available in the M6805 and M6801 Families. ROM-less versions
are offered in the M6801, M6805, and M141000 Families.
RAM SIZE - On-chip RAM sizes range from 32 bytes in the M141000 Fami-
ly (organized as 64 nibbles) to 128 bytes in the M6801 Family. Between
these present limits are the M6805 Family versions and the M3870 at 64
bytes and 112 bytes. Architectures such as the M6801 and M6805 Families
which permit multi-level subroutines plus ROM and RAM data tables allow
you to trade-off ROM and RAM utilization. ROM usage can be minimized
with subroutines and look-up tables, while RAM use can be optimized with
ROM tables and fewer subroutines.
1-10
TIMERS - On-chip timers are the most frequently used special 1/0 func-
tion. Timers may generate interrupts to a program at a periodic rate, may
measure external values, may count external events, and may generate
measured output values. The M6801 Family includes a 16-bit timer that may
be used to perform three of the above functions simultaneously. The M6805
Family timer consists of a programmable 8-bit counter and a selectable
7-bit prescaler. The MC3870 timer is 8 bits with a decimal prescaler. The
M141000 Family does not include on-chip timers.
•
SPECIAL FUNCTIONS - Various members of the MCU families include
additional 1/0 functions. For example, the MC6801 Family includes a full
8-bit UART with baud rate generator on-chip. A 4-channel 8-bit AID con-
verter is included on a few M6805 Family versions. A 7-segment display
decoder is included on the M141000 Family parts. The digital portion of an
RF frequency synthesizer is added to an M6805 Family member.
1-11
PROGRAMMING - The enhanced M6800 architectural features make the
M6800 Family easy to program. The stack pOinter permits up to 32
subroutine levels. Three ROM-efficient indexed addressing modes allow
for look-up tables anywhere in memory. Any I/O pin or RAM bit may be
modified with a Single instruction. A branch may be taken depending upon
the bit state of any I/O pin or RAM bit with only a single instruction. RAM,
ROM, and I/O registers are all accessed with the same powerful memory
addressing instructions. An efficient instruction set permits programs to
be written faster, more easily optimized, and, therefore, more reliable.
MOTEL - The MOTEL concept (for MOtorola and InTEL bus compatibility)
allows both types of processors to be interchanged on a bus without
changing the design of the peripheral/memory system. The MOTEL circuit
automatically detects which type of processor is connected, and interprets
the bus control signals appropriately. The MCM65516 2K CMOS ROM,
MC146818 Real-Time Clock plus RAM, and MC146823 Parallel Interface in-
corporate the MOTEL concept to provide a high degree of system flexibility.
1-12
plus RAM relieves the processor of maintaining the time and date,
generates timed interrupts, and includes 50 bytes of CMOS RAM. Program
memory is provided by the completely bus compatible MC65516 2K CMOS
ROM. Other support circuits include LCD drivers (MC1450OP, MC145001,
MC144115, and MC144117), LED drivers (MC14499 and MC144100), DIA con-
verters (MC144110 and MC144111), AID subsystem (MC14443 and
MC14447), latches (MC14099, MC14597, MC14598, and MC14599), remote
1/0 (MC14469) and frequency synthesizers (MC14156 and MC145144).
POWER SAVINGS - Energy efficiency is, of course, the chief CMOS at-
traction. CMOS MPUs are seriously considered anywhere a battery is used,
whether it be the primary or a back-up power source. The operating current
can be orders-of-magnitude lower. Standby modes can have power usages
order-of-magnitude lower yet. Since the M6805 Family is static in design,
low-speed operating current is extremely low.
1-13
SINGLE·CHIP MICROCOMPUTER FAMILIES FEATURES MATRIX
•
MC1410001 MC141200 I MC141 099 MC3870 MC680SP2 I MC680SP4 I MC680SU2 I MC680SR2 I MC6805T2
Bits 4 Bits 8 Bits 8 Bits
Instruction Set TMS1000 F8 Control Optimization of MCS800
Registers 7 Special Registers 7 Registers 2 General Purpose and 3 Special Registers
Addressing Modes 5 Addressing Modes 5 Addr Modes 10 Addressing Modes
Processor
BaSIC Inst Types 43 Basic Inst Types 54 Basic Inst 59 Basic Instruction Types
Total Instructions 43 Total Instructions 76 Total Inst 207 Total Instructions
!,slAvg Inst 10 !'sllnstruction 1600 kHzl 4.7 !'sllnst 4.9 to 5.4 !'s per Average Instruction 11 MHzl
Subroutines 1 Subroutine Level 1 Level 13 Subroutine Levels
Technology CMOS NMOS HMOS
Mask ROM lK ROM lK ROM No ROM 2K ROM lK ROM 'lK ROM 2K ROM 2K ROM 2.5K ROM
Memory EPROM - - - - - - - - -
RAM Bytes 32 RAM 32 RAM 32 RAM 64 RAM 64 RAM 112 RAM 64 RAM 64 RAM 64 RAM
Package Size 28 Pins 40 Pins 48 Pins 40 Pins 28 Pins 28 Pins 40 Pins 40 Pins 28 Pins
Inputs 4 Inputs 4 Inputs 4 Inputs - - - 8 Inputs 2 to 5 In -
Inputl Outputs 19 Outputs 24 Outputs 21 Outputs - - - - - -
Output Mask Bidu - - - 32 I/O - - - - -
Pins Prog 8idir - - - - 20 I/O 20 I/O 241/0 24110 191/0
Spec. Func - - - - - - - 1 to 4 Analog 2 Special
Expansion Bus - - o ROM, PLA - - - - - -
Display Oecoder 7·Segment PLA - - - - - - -
Special High Current Orive 20 mA, All Outputs - 10 mA Drive on 8 Pins
Function Analog Inputs - - - - - - - 8·BIIAID -
I/O Serial I/O - - - - Shift Register I/O With Bit Mampulation Instructions
Freq Synth - - - - - - - - Freq Synth
Standby RAM - - - - - Stby. RAM - - -
Prescale Bits : 200 Prescale 7 Prescaler Bits
Timer Counter Bits No Timer 8·Bit Counter B·Bit Counter
Timer Functions 1 function 1 Timer FunCllon at a Time
Timer Interrupt Timer IRO or Trer Interrupt
Interrupts External IRO No Interrupts 1 Ext IRO 1 Ext IRO 2 Ext IROs 1 Ext IRO
Serial I/O IRO - - - - - -
ICs ROM·Less Version - EPROM and ROM· Less Versions
Dev System EXORciser'" EXORciser'" EXORCiser'"
Development
Emulation User System Emulator USE User System Emulator
Support
Assembler Assembler Assembler Macro Assembler
HL Language - - -
1-14
MC6805 Family (continued) M6801 Family
•
MC68705P3JMC88705U31MC68705R31 MC146805G21 MC146805F21 MC146805E2 MC6801 1 MC68701 1 MC6803
8 BIts 8 Bits B,ts
Control OptimIzatIon of MC6800 Super Set of MC6800 Instruction Set
2 General Purpose and 3 SpecIal RegIsters 2 General. 4 SpeCIal Reg. RegIsters
10 AddressIng Modes 7 AddressIng Modes AddressIng Modes
59 BasIc Instruction Types 61 BasIc Inst Types 75 BasIc Inst Types BasIc Inst Types Processor
207 Total InstructIons 209 Total InstructIons 219 Total InstructIons Total Instructions
.9 to 5.4 "s per Average InstructIon (1 MHzl 3.9 to 4.0 "slAvg Inst (1 MHzl 3.7 "slAvg Inst (1 MHz) "slAvg Inst
13 Subroutone levels L
29 levels . 13 levels . t 29 levels IndefInite levels SubroutInes
HMOS CMOS HMOS Technology
- - - 2K ROM lK ROM No ROM 2K ROM - No ROM Mask ROM
1.8K EPROM 3.8K EPROM 3.8K EPROM - - - - 2K EPROM - EPROM Memory
112 RAM 112 RAM 112 RAM 112 RAM 64 RAM 112 RAM 128 RAM 128 RAM 128 RAM RAM Bytes
28 Pins 40 Pons 40 Pons 40 PIns 28 PIns 40 PIns 40 P,ns 40 P,ns 40 Pins Package Size
- 8 Inputs 2 to 5 In - 4 Inputs - Inputs
- - - - - - - - - Outputs Inputl
- - - - - - - - - Mask Bldor Output
20 I/O 241/0 241/0 321/0 16110 161/0 24 to 31 110 Prog Bldlr Pons
- - 1 to 4 Analog - - - o to 7 SpeCIal Funct PIns Spec. Func
- - - - - 8K Addr 64K Addressabdl\y ExpansIon Bus
- - - - - - - - - D,splay Decoder
lOrnA Drove on 8 PIns 10 rnA. 4 P,ns - - - - - HIgh Current Drove SpecIal
- - 8·Blt AID - - - - - - Analog Inputs FunctIon
Shoft RegIster 110 wIth BIt ManipulatIon InstructIons 8·Blt UART + BIt Rate Gen. Seroall/D I/O
- - - - - - - - - Freq Synth
- - - - - - - - - Standby RAM
7 Prescaler BIts - - - Prescale BIts
8·Blt Counter 16·Bit T,mer Counter B,ts T,mer
1 Timer FunctIon at a T,me 3 Simultaneous Timer FunctIons Tomer FunctIons
1 Ex~IRO I -
2 Ext IROs
-
T,mer (terru:
1 ExtlRO
- -
3 Timer Interrupts
2 Ext Interrupts
2 Seroal I/O IRQs
TImer Interrupt
External IRQ
Seroall/D IRQ
Interrupts
EPROM and ROM· less VersIOns EPROM and ROM-less VersIons ICs
EXORciser'" EXORcIser'" Dev System Development
User System Emulator User System Emulator EmulatIon Support
Macro Assembler Macro Assembler Assembler
- Fortran. BasIc. MPl Hllanguage
1-15
------- -
16·BIT MICROPROCESSORS (MPUs)
THE M68000 FAMILY AN INVESTMENT IN THE FUTURE
• The family concept has been extremely popular in the Microprocessor in-
dustry. Motorola pioneered this family concept with the introduction of the
M6800 Family in 1974. Led by the MC68000 Microprocessing Unit (MPU) in
1979 and followed by a host of peripherals, the M68000 Family offers the
engineer a set of building blocks to construct cost-effective solutions to an
ever-widening range of complex 16/32 bit applications. The tremendous
popularity of the M68000 Family is not without warrant. HMOS technology,
performance, and support are but a few of the many reasons why the
M68000 Family continues to be the 16-bit industry leader.
It should be noted that the M68000 Family is a not-so-distant relative of the
MC6800. All M6800 Family peripherals interface directly with the MC68000,
so upward compatibility is built-in. Where lost cost and medium perform-
ance are required, they present a very attractive alternative. The plan for
the M68000 Family is a simple one. Provide the marketplace with the best
16-bit family and back it up with support that is second to none. And it's
happening now.
What about expandability? The M68000 Family is designed with this in
mind. All the way from an internal microcoded 32-bit architecture to the
third-generation EXORmacs development system. Efficient high level
language support provided by Pascal allows upward compatibility of soft-
ware from 8-bit to 16-bit to 32-bit machines.
Peripherals
MC68120/121 - Intelligent Peripheral Controller .............. 4-711
MC68122 - Cluster Terminal Controller ..................... 4-755
MC68230 - Parallellnterface/Timer ........................ 4-783
MC68450 - Memory Management Unit ...................... 4-812
MC68451 - Direct Memory Access Controller ............. " .. 4-818
1-16
PERIPHERAL AND INTERFACE COMPONENTS
1-17
PERIPHERAL AND INTERFACE COMPONENTS
SELECTOR GUIDE (CONTINUED)
1·18
The Motorola M6800 Generic Bus
Concept and Use
•
2-1
II
2·2
THE M6800 GENERIC BUS CONCEPT AND USE
M6800 - M6801 - M6802 - M6809
M6800 FAMILY PERIPHERALS
After more than 5 years of experience shipping many millions of
microprocessors and peripherals, Motorola has collected, coordinated,
and improved the bus timing parameters for these 8-bit devices. The
smaller geometries and reduced capacitances obtained by introduction of
•
optical reductions of existing mask sets, the use of new process tech-
niques such as HMOS I and HMOS II, and the natural improvement in prod-
uct yield that comes with experience have allowed Motorola to improve
many performance parameters.
The new enhanced peripheral bus timing specifications allow their use in
even wider ranges of applications and yet maintain complete compatibility
with existing systems. This section provides a discussion about:
• The Generic Bus concept for both a-bit NMOS/HMOS and CMOS
devices.
• A complete set of bus timing for all of the a-bit microprocessors
(except the MC6800) and peripherals in one table (grouped by
speed).
• A set of equations for calculating worst-case bus timing. These
appear as notes under appropriate Generic Bus timing diagram.
The bus timing diagram shown in Figure 2-1 illustrates the waveforms
needed for or generated by all but two of Motorola'S mid-range family of
8-bit microprocessors and peripherals. (The MC6800, although it began the
family, is not shown, due to the nature of the 4>1,4>2, and DBE input signals.)
A generic bus timing characteristics table gives a side-by-side comparison
of major microprocessor types within the M6800 family, along with the in-
put and output specifications common to all bus peripherals. These tables
are shown as Tables 2-1 through 2-3.
A subset of the generic bus timing diagram and characteristics table ap-
pears in each data sheet (except the MC6800 and MCM6810) showing only
the signals and identification numbers appropriate to that part.
2-3
FIGURE 2·1. NMOS/HMOS GENERIC BUS TIMING DIAGRAM
"i'
~
--= 2
E V 1\
-. 4-0 07)_ _ f3'
-+ +-0 0 ..... ~
~
6
~
kD
r 0 J
•
J 6
- - I~
Q
*"-0 ~ ~ 1+0 -~
~
~ >~,,:,;
R/W, Address
INon-Muxedl ~
.--@ @Notel0 @)
12
~ l@ -,. @)
1+115
cs V
Note 7 I@+ 1+ \
~f-® 30 ®.~®-+ ~ 1
Read Data MPU Read Data Non-Muxed
Non-Muxed Ir
I+F--€>' ®
Note 9
Note 11
-I" ~118
Addr/Data
Muxed m-
-. *-® OO
Note 8
Read Data Muxed
~
'22'. 19 ®... ~@~
Write Data MPU Write Data Non-Muxed
Non-Muxed Ir
~ @ @) Note 12 @- ~
Addr/Data Write Data M uxed
Muxed
I---
00 Note 8 Ir-
@ @)- f4-- ~@-+
I-@~
Address
Strobe lAS 1 II 1\
-~
0-+ I+- ~ I-@)
~ ~
NOTES.
1 Not all signals are applicable to every part
2. Voltage levels shown are VLSO 4 V, VH~2A V, unless otherwise specified
3 Measurement POints shown are 0 8 V and 20 V, unless otherwise specified
4 For MC6800, write data IS referenced to DBE, not E, see M6800 pages.
5. For MC6800, address delay IS referenced to <1>1, not E, see M6800 pages
6 Clock pulse rise and fall time for MC6800 measured to V CC - 06 V, see M6800 pages
7. CS and CS on MC6810 have same timing
8 Address valid on the occurrence of the latest of 11, 12, 16, 22, or 23
9 Usable acce'ss time IS computed by 1 - 14 + 11 + 171, or 12 + 4 - 17, see note 8 lexcept for MC6809,
for MC6809, by 1-4-7 max +10-171
10. Usable address buffer time IS computed by 2- III + 131, see note 8 lexcept for MC6809,
for MC6809, by. 2-7 max+ 10-131.
11 Usable read data buffer time IS computed by 3 - 117 + 301
12 Usable write data buffer time IS computed by' 3-119+311, except for MC6809;
for MC6809, by: 1- 14+ 7 max+4+ 20+ 311
2-4
TABLE 2·1. NMOS/HMOS GENERIC BUS TIMING CHARACTERISTICS
FOR 1.0 MHz OPERATION
68211
Ident. 6800 6801 6802 6809 6859
Number Characteristics Symbol Min Max Min Max Min Max Min Max Min Max Unit
1 Cycle Time teye 1.0 10 10 2.0 10 10 10 10 10 10 "s
2 Pulse Width, E Low (See Note 6) PWEL 405 9500 430 1000 450 5000 430 5000 430 9500 ns
•
3 Pulse Width, E 'Hlgh (See Note 6) PWEH 450 9500 450 1000 450 9500 450 9500 450 9500 ns
4 Clock Rise and Fall Time (See Note 61 tr,tf - 100 - 25 - 25 - 25 - 25 ns
5 Pulse Width, Q High PWQH - - - - - - 430 5000 - - ns
6 Pulse Width, Q Low PWQL - - - - - - 450 9500 - - ns
7 Delay Time, E to Q Rise· tAVQ - - - - - - 200 250 - - ns
9 Address Hold Time tAH 30 - 20 - 20 - 20 - 10 - ns
10 Address Valid Time to Q Rise> tAQ - - - - - - 50 - ns
11 Address Delay from E Low (See Note 51 tAD - 270 - - - - - - - - ns
12 Non-Muxed AddressValldTlmeto E> (MPUI tAV - - 200 - 160 - - - - - ns
13 Addres Setup Time Before E (Penph I tAS - - - - - - - - 80 - ns
14 Chip Select Setup Time Before E tcs - - - - - - - - 80 - ns
15 Chip Select Hold Time tCH - - - - - - - - 10 - ns
16 Non-Muxed Address Delay Time from AS tAD - - - - - - - - - - ns
17 Read Data Setup Time tDSR 100 - 80 - 100 - 80 - - - ns
18 Read Data Hold Time TDHR 10 - 10 - 10 - 10 - 20 50 ns
19 Write Data Delay Time (See Note 41 tDDW - 225 - 225 - 225 - - - - ns
20 Data Delay Time from Q tDDQ - - - - - - - 200 - - ns
21 Write Data Hold Time (See Note 41 tDHW 10 - 20 - 30 - 30 - 10 - ns
22 Muxed Address Valid Time to E Rise> tAVM - - 200 - - - - - - - ns
23 Muxed Address Delay Time from AS tADAS - - - - - - - - - - ns
24 Muxed Address Valid Time to AS Fall> tASL - - 60 - - - - - - - ns
25 Muxed Address Hold Time tAHL - - 20 - - - - - - - ns
26 Delay Time, AS to E Rise> tASD - - 90 - - - - - - - ns
27 Pulse Width, AS High> PWASH - - 220 - - - - - - - ns
28 Delay Time, AS to E Rise> tASED - - 90 - - - - - - - ns
29 Usable Access Time> (See Note 91 tACC 605 - 570 - 605 - 695 - - - ns
30 Peripheral Output Data Delay Time tDDR - - - - - - - - - 290 ns
31 Peripheral Input Data Setup Time tDSW - - - - - - - - 165 - ns
Buffer Loglc....Q.elay..!!me
32
Address, CS, RIW (See Note 101 tBDA 55 - 120 - 100 - 150 - - - ns
2·5
TABLE 2·2. NMOS/HMOS GENERIC BUS TIMING CHARACTERISTICS
FOR 1.5 MHz OPERATION
68A211
Ident. 68AOO 68A01 68A02 68AOS 68A59
Number Characteristics Symbol Min Max Min Max Min Max Min Max Min Max Unit
1 Cycle Time tcyc 0667 10 0667 2.0 0.667 10 0667 10 0667 10 I's
2 Pulse Width, E Low (See Note 6) PWEL 230 9500 300 1000 280 5000 280 5000 280 9500 ns
•
3 Pulse Width, E High (See Note 6) PWEH 280 9500 300 1000 280 9700 280 9700 280 9500
4 Clock Rise and FaU Time (See Note 6) tr,tf - 100 - 25 - 25 - 25 - 25 ns
5 Pulse Width, a High PWaH - - - - - - 280 5000 - - ns
6 Pulse Width, a Low PWaL - - - - - - 280 9700 - - ns
7 Delay Time, E to a Rise" tAva - - - - - - 130 165 - - ns
9 Address Hold Time tAH 30 - 20 - 20 - 20 - 10 - ns
10 Address Vahd Time to a Rise" tAa - - - - - - 25 - - - ns
11 Address Delay from E Low (See Note 5) tAD - 180 - - - - - - - - ns
12 Non-Muxed AddressVahdTlmetoE"(MPU) tAV - - 115 - 100 - - - - - ns
13 Address Setup Time Before E (Perlph ) tAS - - - - - -. - - 60 - ns
14 Chip Select Setup Time Before E tcs - - - - - - - - 60 - ns
15 Chip Select Hold Time tCH - - - - - - - - 10 - ns
16 Non-Muxed Address Delay Time from AS tAD - - - - - - - - - - ns
17 Read Data Setup Time tDSR 60 - 60 - 70 - 60 - - - ns
lB Read Data Hold Time TDHR 10 - 10 - 10 - 10 - 20 50 ns
19 Wnte Data Delay Time (See Note 4) to OW - 200 - 170 - 170 - - - - ns
20 Data Delay Time from a tDDa - - - - - - - 140 - - ns
21 Wnte Data Hold Time (See Note 4) tDHW 10 - 20 - 20 - 30 - 10 - ns
22 Muxed Address Vahd Time to E Rise" tAVM - - 115 - - - - - - - ns
23 Muxed Address Delay Time from AS tADAS - - - - - - - - - - ns
24 Muxed Address Vahd Time to AS FaU" tASL - - 40 - - - - - - - ns
25 Muxed Address Hold Time tAHL - - 20 - - - - - - - ns
26 Delay Time, AS to E Rise" tASD - - 60 - - - - - - - ns
27 Pulse Width, AS High" PWASH - - 140 - - - - - - - ns
28 Delay Time, AS to E Rise' tASED - - 60 - - - - ns
29 Usable Access Time" (See Note 9) tACC 400 - 345 - 310 - 440 - ns
30 Peripheral Output Data Delay Time tDDR - - - - - - - 180 ns
31 Peripheral Input Data Setup Time tDSW - - - - - - - 80 ns
Buffer LogiC Delay Time
32
Address, CS, R/W (See Note 101 tBDA 40 - 55 - 40 - 80 - - - ns
2·6
TABLE 2·3. NMOS/HMOS GENERIC BUS TIMING CHARACTERISTICS
FOR 2.0 MHz OPERATION
68B21 1
Ident. 68BOO 68B01 68B02 68B09 68B59
Number' Characteristics Symbol Min Max Min Max Min Max Min Max Min Max Unit
1 Cycle Time teye 05 10 05 20 05 10 05 10 05 10 I's
2 Pulse Width. E Low ISee Note 61 PWEL 210 9500 210 1000 210 5000 210 5000 210 9700 ns
•
3 Pulse Width. E High ISee Note 61 PWEH 220 950 220 1000 220 9700 220 9700 220 9700 ns
4 Clock Rise and Fall Time ISee Note 61 t r• tf - 100 - 20 - 20 - 20 - 20 ns
5 Pulse Width. 0 High PWOH - - - - - - 210 5000 - - ns
6 Pulse Width, 0 Low PWOL - - - - - - 220 9700 - - ns
7 Delay Time, E to 0 Rise' tAVO - - - - - - 80 125 - - ns
9 Address Hold tAH 30 - 10 - 20 - 20 - 10 - ns
10 Address Valid to 0 Rise' tAO - - - - - - 15 - - - ns
11 Address Delay from E Low I See Note 51 tAD - 150 - - - - - - - - ns
12 Non-Muxed Address Valid T,metoE'IMPU) tAV - - 70 - 50 - - - - - ns
13 Address Setup Time Before E IPeriph I tAS - - - - - - - - 40 - ns
14 Chip Select Setup Time Before E tcs - - - - - - - - 40 - ns
15 Chip Select Hold Time tCH - - - - - - - - 10 - ns
16 Non-Muxed Address Delay Time from AS tAD - - - - - - - - - - ns
17 Read Data Setup Time tDSR 40 - 40 - 60 - 40 - - - ns
18 Read Data Hold Time TDHR 10 - 10 - 10 - 10 - 20 50 ns
19 Wnte Data Delay Time ISee Note 41 to OW - 160 - 120 - 160 - - - - ns
20 Data Delay Time from 0 tDDO - - - - - - - 110 - - ns
21 Wnte Data Hold Time ISee Note 4) tDHW 10 - 10 - 20 - 30 - 10 - ns
22 Muxed Address Valid Time to E Rise' tAVM - - BO - - - - - - - ns
23 Muxed Address Delay Time from AS tADAS - - - - - - - - - - ns
24 Muxed Address Valid Time to AS Fall' tASL - - 20 - - - - - - - ns
25 Muxed Address Hold Time tAHL - - 10 - - - - - - - ns
26 Delay Time, AS to E Rise' tASD - - 45 - - - - - - - ns
27 Pulse Width, AS High' PWASH - - 110 - - - - - - - ns
28 Delay Time, AS to E Rise' tASED - - 45 - - - - - - - ns
29 Usable Access Time" ISee Note 9) tACC 290 - 260 - 235 - 330 - - - ns
30 Peripheral Output Data Delay Time tDDR - - - - - - - - - 150 ns
31 Peripheral Input Data Setup Time tDSW - - - - - - - - 60 - ns
Buffer Logl"-.Qelay2!me - - - - -
32 tBDA 20 30 10 60 ns
Address, CS, R/W ISee Note 101
Buffer Delay Time, Read Data
33
ISee Note 111 tBDR 30 - 30 - 15 - 30 - - - ns
2·7
DIAGRAM/TABLE USE
As an example of the use of the timing diagram, consider the simple bus
connections of an MC6809 executing a read bus cycle with a peripheral
such as the MC6821 shown in Figure 2-2. The bus cycle, identified as #1 in
Figure 2-1 begins when E (#4) falls. The address output of the MC6809 is
valid prior to the rising edge of Q by time #10.
• The MC6821, as well as all other bus peripherals, requires that the register
select inputs, derived from the address bus, be valid prior to the rising edge
of E by time #13. Similarly, address decoding for assertion of chip select(s)
must be valid by time #14. The time available for address buffers and
decoding logic is given by #32 and can be calculated from the equation in
note 10.
Address RSO, 1
AO-A15 CSO
Address CS1
MPU Decode MC6821
CS2
MC6809 PIA
Data
DBO-DB7
2-8
At 1 MHz, the characteristics table for the MC6809 shows that 150
nanoseconds are available for the combination of the two 74LS240 address
buffers in series with the address decoding logic shown in Figure 2-2. Stan-
dard LS-series buffers and gates may easily be used in such a case. At
2 MHz, the MC6809 provides 60 nanoseconds for address decoding logic.
Characteristic #32 on the 2 MHz table also illustrates the dramatic improve-
ment in technology attendant with the introduction of the MC6801 and
MC6809 when compared with the MC6800 and MC6802. Schottky buffering
is easily done in a 2 MHz system with either of these newer processors; the
MC6809 even allows ample time for use of LS-series buffers at 2 MHz. II
To continue with the example, data access occurs and output buffers are
enabled within the MC6821 for the duration of E (#3) when chip select is
asserted. The peripheral output data will be valid by time #30. Propagation
through any data bus buffer must be done quickly to ensure valid data to
the MC6809 on or before the read data setup time (#17). This read buffer
delay time is #33. The overall time between the existence of a valid address
output from the microprocessor and the required input data valid (read
setup time) is called the usable access time and is characteristic #29. This
is the time provided by the microprocessor at any given bus rate, for ad-
dress buffers, address decoders, ROM/RAM access time, and data bus buf-
fers.
2-9
TABLE 2·4. BUFFER TIME EXAMPLES
•
R W
MC6888/8T28 MC68801
MC6809 150 +7440 108 80 365 8T26 52 337
(10+ 10+22) (14+14)
MC6888/8T28 MC68801
MC68A09 80 MC+ 74LS40 36 30 230 8T26 2 202
(10+ 10+24) (14+4)
MC6888/8T28 MC68801
MC68B09 60 MC+ 74LS40 16 30 160 8T26 2 132
(10+10+24) (14+14)
MC74LS240
MC6802 100 MC+ 74LS40 44 60 60 MC74LS240 28 28
(14+ 18+24)
MC74LS240
74S240
MC68A02 40 MC+74LS40 2 20 30 6 16
(7+ 7)
(7+ 7+24)
MC68802 10 74S40= (6) 4 15 0 - 15 0
In the case of multiplexed·bus parts such as the MC6801 and MC68120, ad·
ditional consideration must be given to the multiplexed address output.
The address is defined to be valid, in the case of the MC6801, prior to the
fall of address strobe by time #24. (In the MC68120, address is valid after
the rise of address strobe by time #23.) This is sufficient time to allow cap·
ture of the address by a transparent latch, such as the 74LS373. The prop·
agation time required by this latch, and the location of address strobe
within the E low time, reduces the time available for address decoding.
2·10
When this approach is used with processors that include an on-chip
oscillator (e.g., MC6801, MC6802, MC6809), specify address valid by
xx (#10, #12, or #24) nanoseconds before E or Q rise or AS fall.
Do not consider the address output of any microprocessor valid until all ap-
propriate parameters (#11, #12, #16, #22, or #23) have been considered.
The timing diagrams shown in Figure 2-3 and the timing characteristics
given in Table 2-5 may be considered as a special case of the generic bus.
This information pertains to Motorola's rapidly expanding family of CMOS
microprocessors and peripherals, beginning with the MC146805E2 and the
MC146818.
The identification numbers shown are consistent with those in Figure 2-1
for the NMOS/HMOS generic bus. The waveforms have been drawn to in-
dicate the input and output relationships of the MC146805E2 and
MC146818. The characteristic table shows, in addition to the MC146805E2
and the MC146818, timing characteristics for Motorola's CMOS ROM, the
MCM65516, available in two speed ranges. Both the MCM65516 and the
MC146818 contain the MOTEL circuit, allowing direct application to both
the Motorola generic bus and the competitive 8085-type bus. Always refer
to the latest data sheet or other technical documentation for up-to-date
characteristics for all Motorola microcomponents.
2-11
FIGURE 2·3. CMOS GENERIC BUS TIMING DIAGRAM
~~
•
AS
1/
----,
0-- - 0- ~@..
CD f--@-- - ~0
DS ~-- 0 '3'
®
-+
8,_ ~0
-00 13
--+ ~0 0--
-
-.-0
R/W
00
ro@@@)~ 1+-,
1+-- 19/ _
~@+ ::@~~- ®
_(16
~
A8-A 11
W() N~te ( Valid AD DR
-- ~ ~
--\ 1-0-0 @- --
/
-
Note4
® @ ®
~ ~ ~ -@--®---@- ~ -+ ;§2
80-8 7
MPU Write
~ 'IJ Valid ADDR
00 lftjJ Valid
Write
Data~ IJ __
-- -@ -+
-@- .@..
~@
@
~ -@--=; ~ -- ~@
--
k:--=-
~
80-8 7 Valid ( Valid Read Data
ADDR
MPU Read
@
-+
-® Note3
Note 1
NOTES:
1. Available access time:
mux=24 (MPU) +28+3-17
non-mux= 27 + 28+3-17 -16
2. Buffer delay (address):
mux= 24 (MPU) - 24 (penpheral)
non-mux=27-16-24 (penpheral)
3. Buffer delay (data read) = 3- 30-17
4. Buffer delay (data wnte)=3-19-31
5. VLow=0.5 V, VHlgh=2.0 V for VOO=3 V;
VLow=0.8 V, VHlgh=VOO-2.0 V for VOO=5 V ± 10%.
2-12
TABLE 2·5. CMOS GENERIC BUS TIMING CHARACTERISTICS
FOR 1.0 MHz OPERATION
•
1 Bus Cycle Time tcyc 1000 DC 953 DC 580 DC 725 - ns
2 Pulse Width, OS Low PWDSL 560 300 ns
3 Pulse Width, OS High PWDSH 375 - 325 - - - - - ns
4 Clock Rise and Fall Time t r , tf - 30 - 30 - - - - ns
8 R/W Hold Time tRWH 10 - - - - - - - ns
9 Non-Muxed Address Hold Time tAH 100 - - - 50** - 80 - ns
11 R/W Delay Time from OS tRW.ll. - 300 - - - - - - ns
13 R/W Setup Time to OS tRWS - 195 - - - - - - ns
14 Chip Enable Setup Time to AS Fall tCES - - 55 - 50 - 50 - ns
15 Chip Enable Hold Time tCEH - - 0 - 50** - 80 - ns
16 Non-Muxed Address Delay Time from AS tAD 0 100 - - - - - - ns
17 Read Data Setup Time tDSR 115 - - - - - - - ns
18 Read Data Hold Time tDHR 0 140 10 100 0 160 0 160 ns
19 Wnte Data Delay Time tDDW - 120 - - - - - - ns
21 Write Data Hold Time tDHW 55 - 0 - - - - - ns
23 Muxed Address Delay Time from AS tADAS 0 120 - - - - - - ns
24 Muxed Address Valid Time to AS Fall * 1ASl 55 - 55 - 50 - 50 - ms
25 Muxed Address Hold Time tAHL 60 180 20 - 50 - 80 - ns
26 Delay Time, OS to AS Rise * tDSD 180 - 50 - 50 - 50 - ns
27 Pulse Width, AS Hlgh* PWASH 175 - 100 - 150 - 175 - ns
28 Delay Time, AS to OS Rise * tASDSD 180 - 90 - 100 - 160 - ns
29 Usable Access Tlme*(See Note 11 tACC 475 - - - - 430 - 550 ns
30 Peripheral Output Data Delay Time tDDR 260 - 20 240 175 - 200 - ns
31 Peripheral Input Data Setup Time tDSW - - 220 - - - - - ns
32 Buffer LogiC Delay Time Address, CS, R/W - - - - - - -
tBDA 5 ns
(See Note 21
33 Buffer Delay Time, Read Data (See Note 31 tSDR 20 - - - - - - - ns
34 Buffer Delay Time, Wnte Data (See Note 41 tBDW 35 - - - - - - - ns
2·13
II
2-14
Reliability •
3-1
II
3-2
MOTOROL.A INC.
MOS Integrated Circuits Division
RELIABILITY REPORT
NUMBER 8110
THE MC6800
MICROPROCESSOR FAMILY
MARCH 1981
g
RELIABILITY ENGINEERING
APPROVED B Y : C / :!:.
ED DASSE, M NAGER
MOS RELIABILITY ENGINEERING
Test results contained herein are for information only. This report does not alter
Motorola's standard warranty or product specifications.
3-3
Introduction
Motorola conducts extensive reliability testing to evaluate new processes and
materials, and to monitor performance levels. The test methods used to evaluate the
MC6800 family of NMOS LSI microprocessors and peripheral device types are described
in this report. Data reduction techniques and prediction models are included, in addition
to a comprehensive summary of life and environmental test data. The life test data base
consists of results obtained on 8,761 devices representing twenty different types, in·
cluding two recently introduced circuits. Sixty percent of the life test data and all of the
environmental test results constitute new information not available in previous reports.
After five million device-hours of 125°C testing, an overall 70·C failure rate of
0.032%/1000 hours was observed. This performance is particularly impressive when the
complexity and density of microprocessors are considered.
Also of significance is the exceptional environmental performance demonstrated by
II the MC68XX plastic package. The low operating potentials and moderate power levels of
NMOS microprocessors result in excellent moisture resistance verified by temperature-
humidity-bias testing. The integrity of die and wire bonds, as well as the matching of ex-
pansion coefficients, are examined in the temperature cycle test where 40-pin packages
were shown to perform as well as 14-pin devices.
This report, describing MC68XX reliability, is the most comprehensive to date. The
1980 reliability data bases are expanded and revised with new test information which im-
proves the accuracy of the reliability predictions. In addition, the report includes applica-
tion data useful in system design and qualification of MC68XX devices. The excellent
reliability of the MC6800 family reflects the high priority given to reliability and quality
standards by Motorola as an integral part of its corporate objectives.
3-4
Methods
The life test circuits were designed to simulate system operation by dynamically exer-
cising the internal circuitry of each device type. Dynamic biasing is preferred to static
biasing of LSI devices since the continual switching of internal nodes more closely
simulates the application. Appendix B, Accelerated Life Test Techniques, describes the
biasing arrangements used in life testing.
Electrical measurements were obtained with Fairchild Sentry Systems and test pro-
grams employing exhaustive functional routines under worst-case supply and clock con-
ditions. Pass/fail criteria are established for each circuit type based on data sheet limits
of AC, DC, and timing parameters. Devices which do not meet a test criterion are
segregated by failure mode, data logged and analyzed, when appropriate, to determine
specific failure mechanisms.
•
Equivalent device-hours and individual MC68XX failure rates are based on junction
temperatures measured on test samples. A significant characteristic of NMOS devices is
a decreasing power versus temperature relationship; this characteristic improves device
reliability in severe environments since the rate of junction temperature rise decreases
with increasing ambient temperature. The calculation of acceleration factors and failure
rates using junctions rather than ambient temperature is a more conservative approach
and is employed in all MOS reliability data. The Chi-Square distribution was used at the
60% confidence level to determine the failure rate values shown in this report (Tables 1
and 2, Figure C2). Appendix B illustrates in detail the steps involved in this calculation.
Results
Table 1 summarizes the life test results obtained by Motorola on devices sourced from
mask sets used in production during 1980. The system failure rate reflects the expected
field performance due to catastrophic failures while the total failure rate also includes
devices demonstrating parametric degradation which is not likely to impair system per-
formance.
The life test results presented in Table 2 include over three hundred million device-
hours and an overall 70·C system failure rate of 0.018%/1000 hours (MTBF = 5.6 x 106
hours) measured on standard product without preconditioning. Plastic and ceramic
devices demonstrated failure rates of 0.022%/1000 hours and 0.012%/1000 hours, respec-
tively. For a detailed description of failure modes observed during accelerated life
testing refer to Appendix D, Electrical Testing and Failure Characteristics.
TABLE 1
SUMMARY OF 1980 LIFE TEST DATA
3-5
TABLE 2
MC8BOO FAMILY RELIABILITY
Average
- 70' 70' Total
Failures Actual 70'C Junction System Failure
MaS Wafer Test
Device Type Device- Equivalent Temperature at Failure Rate Rate
Technology Lots Devices
Catastrophic Total Hours Device-Hours TA=70°C %/ %/
Ceramic Plastic 1000 Hrs. 1000 Hrs.
Microprocessors
MC6800 N 25 1.069 13 18 895,628 544xlQ6 83 92 0025 0034
MC6802/08 N 42 1,665 15 24 1,576,864 460xlQ6 91 116 0035 0051
MC6805 H 19 1,499 2 2 234,672 108x106 88 102 0028 0028
MC8809 H 6 229 2 3 188,359 89x106 88 107 0034 0046
Peripheral Logie
MC8821 N 19 1,113 6 13 1,067,069 59 2x 106 79 92 0012 0023
II
MC8840 N 4 159 a a 159,632 108xl06 80 87 0008 0008
MC8845 N 3 135 a a 90,720 5 a x 106 89 105 0018 0018
MC8846 N 5 294 5 6 356,688 108xl06 89 109 0057 0066
MC8847 N 3 133 2 6 110,040 54x106 83 94 0052 0120
MC8850 N 11 477 2 3 478,223 27 1 x 106 81 92 a all 0015
MC6852 N 3 117 1 7 129,350 811x106 83 91 0025 0100
MC8854 N 4 207 1 3 205,176 91 x 106 89 101 0022 0045
MC6880 N 2 76 4 4 72.984 57x106 79 81 0091 0091
MC6862 N 3 170 5 7 159,740 12 2x 106 78 84 0051 0066
MC88488 N 2 81 1 2 78,336 32 x 106 85 98 0061 0095
RAM
MCM68lO N 5 353 2 6 384,912 17 9x lQ6 83 92 0017 0040
ROMs
MCM6830/3Q8 N 10 361 2 4 287,981 21 Ox 106 81 88 0014 0025
MCM68316 N 6 218 0 a 133,728 57 x lQ6 86 96 0016 0016
MCM68332 N 4 274 1 2 156,984 10 8x 106 78 83 0019 0029
MCM68384 H 3 131 1 1 284,096 222xl06 75 78 0009 0009
3-6
Plastic Package Environmental Performance
Molded dual-in-line packages are an attractive, low-cost alternative to hermetically-
sealed systems. Plastic is lighter, less expensive, and much more resistant to physical
damage than a ceramic device. However, there are four primary concerns: contamina-
tion, moisture resistance (corrosion), wire bond integrity, and thermal performance. The
accelerated life test described in the previous section produced no significant difference
in plastic and ceramic performance, thereby indicating the absence of a plastiC con-
tamination mechanism. This section addresses the moisture resistance and wire bond
integrity of the product. Refer to Appendix A for additional descriptions of the packaging
systems and their thermal characteristics.
•
Temperature·Humidity·Bias Testing
TABLE 3
TEMPERATURE·HUMIDITY·BIAS (85°C/85% R.H.I + 5 V) TEST RESULTS
The data presented in Table 3 is based on testing of 576 devices in which ten failures
were observed. A Weibull plot (Figure 1) shows a comparison of the performance
measured in 1979 and 1980, respectively. This excellent performance is attributed to two
factors. First, corrosion takes place because an electrolytic cell is present which is field·
strength dependent and, therefore, has a lower reaction rate with 5·volt bias than with
higher supply levels. Secondly, the cell requires an electrolyte which is created by the in·
gression of moisture reacting with minute quantities of ionic material. The power
dissipation of these devices lncreases the temperature of the die surface, helping to
drive off moisture which prevents cell formation.
3-7
FIGURE 1 - WEIBULL PLOT OF TEMPERATURE·HUMIDITY·BIAS TEST RESULTS
500
300
200
100 Performance
Measured In 1979
...
50
10
05
,.,.r - ...... 15/
.'
Performance
Measured In 1980
.....
01
II
005
001
168 336 504 1008 10K
Test Time In Hours
The integrity of wires and die bonds in plastic packages can be accurately evaluated
through temperature cycle testing. MIL-STD-8838, Method 1010.4, Condition C is
employed to permit easy comparison with other sources of data. Condition C dictates a
cycle from - 65·C to + 150·C with a fifteen minute dwell time. This is a particularly
severe range which induces stress on the wires and bonds due to differences in the ther-
mal coefficients of expansion between the wire, lead frame, and encapsulant. Air-to-air
cycling has been shown to be more severe than liquid-to-liquid thermal shock testing of
this mechanism. This surprising difference is probably due to the longer dwell time for
temperature cycle and the fact that the internal movement involves a relatively slow relax-
ation of the package components. The predominant failure mechanism is wire breakage
above the ball bond where the heat and stress of the bonding process reduce the
strength of the wire. End point continuity testing at 125·C is used to detect potential in-
termittents.
TABLE 4
TEMPERATURE·CYCLE TEST RESULTS
3-8
The temperature cycle test results presented in Table 4 reflect the effort directed
toward process control and its achievement of a consistently reliable bonding system.
Over two thousand plastic devices from thirty separate assembly lots were tested to 1000
cycles resulting in thirty failures. Of these, twelve were caused by broken bond wires,
while the remainder involved non mechanical problems.
Handling Precautions
•
All MOS and many bipolar technologies require precautions against high static
voltages. It is important that conductive or antistatic materials be employed at all work
stations. Operators should use wrist straps and work surfaces should be conductive. At-
tention should be paid to the completed boards as well as the components since high-
impedance circuit nodes are readily accessible. Although most static damages cause
failures immediately, a small portion may continue to function and fail in the field.
A second type of precaution involves the CERDIP package. Since this device employs
a glass seal, a high stress on the leads can cause hermeticity failure which will eventual-
ly result in aluminum corrosion on the die. To avoid this, the leads should never be flexed
above the seating plane. All insertion tools or automated equipment should contact the
lead at its narrowest dimension allowing it to bend without affecting the wide portion
above the seating plane.
CERDIP Package
Insertion Tool
Glass Seal
15 Mil
M,OImum Width
3-9
Quality And Testing
A complete Reliability and Quality Assurance System is in place to monitor and con-
trol the performance of Motorola MOS products. Incoming Quality Control inspects start-
ing wafers, masks, chemicals, package piece parts, and molding compounds. Process
Engineering and In-Process Quality Control perform step-by·step inspections in the
wafer area to check the oxidation, diffusion, photoresist, and metallization operations.
Final visual, class probe and capacitance voltage plot screens complete the wafer area
inspections. In the assembly area, In-Process Quality Control performs monitor (random
sample) and gate (all lots) inspections at each of the major process steps. The Outgoing
Quality Control group continues this philosophy in the final test area by gating electrical,
mechanical, visual, and clerical requirements. Refer to Appendix A for descriptions of the
process flow for ceramic and plastic MC68XX devices.
The Reliability Engineering group performs qualifications of new designs and process
II changes prior to introduction. Many short term tests are performed on an ongoing basis
to monitor the trends of all process lines; these provide rapid feedback to correct
negative perturbations before they can affect device performance. Supporting the efforts
of these groups are the Standards Laboratory, the Metrology Laboratory, the Chemical
Laboratory, and a sophisticated Product Analysis Laboratory.
I
1
1 I I I I
Process
Reliability
Engineering
I Development
Reliability I Quality
Assurance
I Quality
Control
I Analytical
Laboratones
l
r- LogiC and Special - New Processes - Burn-In and - Incoming Quality Chemical Laboratory
Functions EnVironmental Control
Laboratory
I- Memory New Technologies ~ Lot Processing - Wafer Fabncatlon Product AnalYSIS
In-Process Laboratory
Quality Control
L- Microprocessors New EqUipment r-- Outgoing Ouality Assembly In-Process
Control Quality Control
S peelfle at I0 n S S...,a nd af ds
Department Laboratory
3-10
Conclusion
The reliability data examined in this report represents the cumulative results of recent-
ly completed test programs. The specific tests were chosen to be those most represen-
tative of MC68XX field performance. Failure rate estimates were based on the outcome
of tests and data analysis which are widely accepted and conservative. The level of per-
formance predicted by this data is among the best available in the industry and far ex-
ceeds the requirements of most applications. Comparison to previous reports verifies a
history of continuous improvement which has made Motorola MOS LSI the optimum
choice for system reliability.
Copies of this and other reliability reports may be obtained from your local Motorola
representative. For additional information, contact Reliability (512)928-6640 or Marketing
(512)928-6800 organizations or write to:
Reliability Engineering
Motorola Inc.
3501 Ed Bluestein Blvd.
Austin, Texas 78721
3-11
APPENDIX A
A COMPARISON OF PACKAGING SYSTEMS
The MC6800 family of microcomputers and NMOS peripheral device types are produc-
ed in plastic, CERDIP and sidebraze packages. The ceramic packages are hermetically
sealed to protect the integrated circuit from environmental factors and permit operation
over extreme temperature ranges. Although plastic devices are nonhermetic, modern
epoxies exhibit extremely high moisture resistance and long lifetimes may therefore be
expected from these integrated circuits in typical environments. Extensive reliability
testing has been performed to evaluate the three package types as specified in Report
7639-2, Package Qualification Program Plan.
II Plastic
3-12
FIGURE A1 - PLASTIC PROCESS FLOW
Hermetic
Two package styles are commonly used for dual-in-line hermetic applications. The
CERDIP package is composed of two layers of black alumina with the seal formed be-
tween these by a glass frit layer. The kovar or alloy 42 lead frame is embedded in the
glass and has aluminum deposited on the internal lead tips to provide a compatible sur-
face for ultrasonic aluminum wire bonding. The lead frame is formed into the dual-in-line
configuration prior to assembly to prevent unnecessary stress of the glass seal. Both the
lid and the base alumina have recesses to provide a cavity and the base recess is usually
coated with a gold or paladium silver frit for die bonding. Glass die bonding is occa-
sionally used for small die but LSI devices require a eutectic bond to minimize the ther-
mal expansion mismatch. Tin plating is applied to the leads subsequent to the sealing
operation.
3-13
The solder seal package is composed of three layers of alumina whihh are screened
with a refractory metal such as tungsten or moly manganese and fired together to form
the package body with a cavity for the die. The refractory metal is then plated and kovar
or alloy 42 lead frames are brazed to the bottom, sides or top of the package, depending
on the vendor. The advantage of the sidebraze version is accurate lead alignment without
the need for forming. The final piece part operation is plating which may be gold or tin
with a selective gold plate in the cavity. Versions are also available, without a metal seal
ring, for a frit seal ceramic lid similar to the CERDIP package. Although epoxy die bond-
ing is feasible in this package due to the lower sealing temperature, most manufacturers
employ a eutectic bond. Both aluminum ultrasonic wire bonding and gold thermocom-
pression bonding are used.
IPOC
Wire Pull
Monitor
lead Finish Fine Leak Gross Leak Seal IPOC Precap IPOC Ole
ITm-P!ated Test Sample Precap Inspection Bond/Wire
Packages Only I Gate (As Applicable) Bond Gate
3-14
TABLE A1
A COMPARISON OF PACKAGING
MATERIALS AND PROPERTIES
TYPical Thermal
ReSistance 16JAi
•
Leads
24 52 52 120/80
2B 50 51 112174
40 40 50 95/42
Marking Suffix L S P
Some tradeoffs exist in the performance characteristics of the two hermetic packages
as they are offered by Motorola. Both are ceramic, hermetic, employ a eutectic die bond,
use ultrasonic aluminum wire bonding, and have tin plating. The thermal resistance of
the packages is very similar, with the sidebraze having a slight advantage. Both
packages perform well on the standard thermal and mechanical environmental tests, but
each is susceptible to handling damage. Loose shipping rail packaging or high velocity
impacts during testing can chip the sidebraze package and sever the interlayer metalliza·
tion. This type of handling will not affect the 10 mil thick lead frame of the CERDIP
package, but hermeticity failures can occur. The CERDIP package is slightly thicker and
heavier, but no conductive surfaces are exposed so the shorting potential in dense
packaging is reduced. Another difference is the fact that CERDIP devices employ an all
aluminum wire bonding system and are immune to the intermetallic problems of
multi metal systems. Extensive testing of 24·, 28-, and 40-lead CERDIP and sidebraze
devices has indicated no significant difference in reliability.
3-15
APPENDIX B
ACCELERATED LIFE TEST TECHNIQUES
The test results reported in previous sections were obtained through the use of pro-
cedures employed throughout the semiconductor industry. This section details those
methods as applied by Motorola to perform accelerated tests and the subsequent
analysis.
TEST TECHNIQUES
II to detect latent defects in the integrated circuit and some types of packaging defects
which occur in accordance with the relatively well-defined models described in this sec-
tion. The operating parameters of temperature, time, and voltage are controlled during
the test, while moisture and other atmospheric constituents are assumed to be insignifi-
cant.
The accelerated life test is widely accepted as a qualification test method for in-
tegrated circuits and is consistent with Method 1005.3, Steady State Life, Conditions D
and F, contained in MIL-STD-883B. Each device type uses a distinct driver circuit capable
of dynamically exercising internal nodes of the integrated circuit. Most of the waveforms
are derivatives of a common clock signal and are therefore easily implemented with a
minimum of circuitry. The VDD supply levels are regulated at the nominal rated value of
the devices. It is also important that supply lines be adequately decoupled and be of suf-
ficient cross-sectional area to prevent excessive voltage drop. Signal-carrying metal
traces on oven trays are limited to the shortest possible physical distances to prevent
undesired reflections and cross talk between lines. In order to insure that test devices
are properly exercised during the test, mid-range clock frequencies are chosen for each
device type based on data sheet limits. Increasing clock speed does not have a signifi-
cant effect on the power dissipation of MC68XX devices with unloaded outputs and is
not, therefore, an important factor in determining reliability. These circuits permit high
density testing and avoid the potential for accidental overstress of the parallel test
devices. Some pins are electrically isolated from device to device, since parallel connec-
tions may prevent device functions or lead to overstress; this is accomplished by remov-
ing designated socket pins from the life-test oven board.
The ambient test temperature is typically 125°C, although any value above the max-
imum system temperature will provide acceleration. Junction temperatures become a
limiting factor near 180°C for laminated ceramic devices and 150°C for plastic devices.
At these temperatures gold-aluminum intermetallics begin to form in the ceramic
packages and plastic encapsulants start to decompose. Junction temperature for CER-
DIP devices is limited only by circuit leakages which affect all package types above
150°C. A supply current measurement during the test will reveal the maximum permissi-
ble ambient temperature. Since supply currents will decrease with temperature at an
average rate of - 0.25%/OC, extrapolations are possible if a reference point is obtained
initially. Test duration is 1008 hours, and electrical measurements are performed at 0,
168,504, and 1008 hours. More frequent measurements are performed to observe infant
mortality characteristics, but frequent handling increases the likelihood of physical or
electrical damage to the sample.
3-16
ANALYSIS OF RESULT5
Upon completion of the test, failed devices are examined to characterize failure modes
and determine whether a pattern exists which would justify a physical analysis of the
failure mechanism. Failure rates are expressed in failures-per-hour and are calculated
using the Chi-Square distribution in the equation:
Where: (1)
A. = Failure Rate
x 2 = Chi-Square Function
ex =
100 - Confidence Level
100
d.f. = Degrees of Freedom = 2r + 2
r =Numbers of Rejects
t =Device-hours
If a test has been conducted at the ambient temperature of the system, then device-
•
hours can be calculated directly and substituted into Equation 1. Since it is not practical
to observe long-term effects at system temperatures, the test is accelerated and
therefore requires a basis for equating device-hours at the test temperature to device-
hours at the temperature of operation. Acceleration factors express this ratio and are
derived from the Arrhenius relationship in Equation 2. One electron-volt is used as the ac-
tivation energy value based on Motorola's experience and data from other industry
sources.
Where:
Fa =Acceleration Factor
0= Activation Energy in eV
K = Soltzman's Constant, 8.62 x 10 - 5 eV/oK
To = Operating Temperature in ° K
Tt =Test Temperature in °K
3-17
Parameters Tt and To of Equation 2 are the average junction temperatures present
during the test and in system operation, respectively. Motorola uses junction rather than
ambient temperatures since they produce more conservative and representative ac-
celeration factors. Junction temperatures can be derived from power dissipation
measurements and Equation 3. The thermal resistance (8JA) values of MC68XX devices
are given in Appendix A and may be measured using the procedure outlined in Reliability
Report 7843, Thermal Resistance Measurement Method for Microcomponent Devices.
These values were obtained under "still-air" conditions and are, therefore, slightly
pessimistic for most systems. MIL-STD-8838 Method 1005.3 provides a derating curve for
thermal resistance based on linear air movement.
Where: (3)
TJ = Junction Temperature in °C
II TA = Ambient Temperature in °C
Po = Average Power Dissipation in Watts
8JA = Thermal Resistance. Junction-to-Ambient in °CIW
3-18
APPENDIX C
APPLYING LIFE TEST DATA
The reliability test results reported in previous sections, although obtained under
severe conditions, can be extrapolated to predict failure rates expected in system ap-
plications. The conservative methods employed by Motorola in determining acceleration
factors and in electrical testing permit the calculation of system level failure rates with a
high level of confidence. This section details the techniques used in applying the
reported data to actual system conditions.
FIGURE C1
•
TIME DEPENDENT RELIABILITY
III
Failure Rate
"
OPERATING LIFETIME
MTBF=+
The failure rate characteristics of LSI Circuits may be observed in a short period of
time using the accelerating effects of temperature. The Arrhenius equation described in
Appendix B establishes an exponential relationship between time and temperature
which permits a quantitative extrapolation of the data.
3-19
FAILURE RATE DETERMINATION
Table 2 provides 70·C failure rate values for twenty MC68XX device types. Explained in
that section was the distinction between the Total Failure Rate, which includes all life
test failures, and the System Failure Rate, which includes only catastrophic failures. Ex-
trapolating this data to operating temperatures other than 70·C can be accomplished
using the curves in Figure C2. For a specific device type, plot the 70·C failure rate value
and corresponding junction temperature on the graph and draw a line through this point
parallel to the 1 eV curves shown. This line represents the failure rate values at cor-
responding junction temperatures for that device type. Measure the device power
dissipation at the maximum operating temperature and compute the corresponding junc-
tion temperature value using Equation 3. The failure rate for that temperature can then be
determined directly from the graph and will represent the operating condition of the
•
device in the system .
FIGURE C2
FAILURE RATE VERSUS JUNCTION TEMPERATURE
l000/0K
23 25 27 29 31 33 35
10
'\.I'\.
r\.\.
'\.
01 \.~
Total
'\.
00 1
System<ll
.\.
'\.
0001 .\.
'\.
00001
\ l'\..
"\ I\.
150 125 100 85 70 50 25
Junction Temperature (OC)
3·20
APPENDIX D
ELECTRICAL TESTING AND FAILURE
CHARACTERISTICS
Failure modes categorized according to these tests do not always indicate a specific
problem and individual test programs deviate from the sequence shown above as re-
quired for complete testing of the specific device type. Microprocessors and other LSI
logic circuits do not readily lend themselves to the identification of failure modes since
their complexity creates an astronomical number of possible combinations, some of
which are very subtle. Attempts to categorize these modes by the test sequence in·
variably result in groupings which are not mutually exclusive or related to physical
mechanisms.
The most valuable method of classification is a dichotomy based on system func-
tionality. Semiconductor devices failing a rigorous electrical test frequently function
adequately under nominal operating conditions such that they would not cause a system
failure. These units have parameters which exceed data sheet limits, but which do not
impact system reliability to the extent of catastrophic failures. Nearly half of the failures
observed in life testing were non-catastrophic in nature. The ultimate classification
criterion must be predicated upon the maintenance of system operation and MC68XX life
test failure modes are, therefore, categorized as being either catastrophic or non-
catastrophic. Opens, shorts, or functional (logic state) failure modes are considered to
be catastrophic, and are used in the determination of the "System Failure Rate." Input
leakage, three-state leakage, and parametric failure modes are non-catastrophic and are
combined with the catastrophic failures in the "Total Failure Rate."
3-21
TABLE 02
FREQUENCY OF FAILURE MODES ON MC68XX DEPLETION· LOAD DEVICES
Three·
Input
Faolure Modes Opens Shons Functional State Parametric
Leakage
Leakage
Percentage of Occurrances 72% 60% 379% 227% 48% 214%
TABLE 03
DEFINITION OF FAILURE MODES
I. CATASTROPHIC MODES
A. Opens - No electrical connection between an external terminal and corresponding die circUitry (possibly Intermittent)
MOS Inputs are normally high Impedance ports and opens are detected by forward· biasing the substrate diode
II B. Shorts - An unintended resistive path of relatively low value between one terminal and any other terminal
C. Functional - Failure of one or more output terminals to respond with a correct logical state under nommal supply, clock,
and VIH/VIL levels a violation of the Internal Boolean relationships defined by the CIrCUit design
II. NON·CATASTROPHIC MODES
A. Input Leakage - A current of either polarity which exceeds data sheet limits for Input terminals Large values of leakage
may be classified as shorts
B. Three-State Leakage - A current of either polarity which exceeds data sheet lImIts for 1/0 termInals when under three-
stated condItions This parameter IS also tlmmg dependent and when catastrophic IS classlfled as a functional failure mode
C Parametric ~ A broad claSSification of non-catastrophIc faIlure modes which exclude leakages but Include
1 FaIlure to respond at one or more output terminals with a correct logical state under worst-case supply clock, and
VIH/VIL conditions, usually the result of exceSSive propagation delays, Improper VOH/VOL levels, nOise, or a
dynamiC logIC state which should be static, etc Must be 100% functional under nomInal condItions and may be
assocIated with leakage currents not prevIously detected
2 ExceSSive power dIssipatIon not caused by leakage currents DeVIce I~ 100% functIOnal
3 Incorrect output analog voltage or current level not resultIng In a functIonal failure
The distribution of failure modes and meChanisms observed during life testing appear
to be the result of random manufacturing anomalies and do not, therefore, indicate
trends correlatable to specific process or design deficiencies. These results are consis·
tent with careful attention to process controls and reflect Motorola's high priority on
quality and reliability.
3-22
POWER CONSIDERATIONS
The previous paragraphs have shown that circuit performance and long-
term circuit reliability are affected by die temperature. Performance and
reliability are both improved by keeping junction temperatures low. Elec-
trical power dissipation by the integrated circuit causes an increase in the
die temperature relative to some reference point, usually the ambient
temperature. This increase in temperature depends on the amount of
power dissipated in the circuit and on the thermal resistance between the
heat source and the reference pOint. The average chip-junction
temperature, TJ, in degrees C can be obtained from:
•
T J =TA+ (PD e 6JA) (1 )
Where:
TA=Ambient Temperature, °c
6JA= Package Thermal Resistance, Junctlon-to-Ambient, °C/W
PD = PINT + PPORT
PINT= ICC x VCe. Watts - Chip Internal Power
PPORT= Port Power Dissipation, Watts - User Determined
For most applications PPORT<C PINT and can be neglected. PPORT may become
significant if the device is configured to drive Darlington bases or sink LED loads.
An approximate relationship between PD and T J (if PPORT is neglected) is:
PD= K+ (T J + 273°C) (2)
Where K is a constant pertaining to the particular part.
Solving equations 1 and 2 for K gives:
K=PD e (TA+273°C)+6JAe PD 2 (3)
Example:
In this example the power dissipation (PO) and junction temperature (TJ)
for the MC6821 P are calculated for an ambient temperature (T A) of 70°C.
3-23
Solving for K:
K= POo(TA + 273°C) + OJAoP 0 2 (3)
K= 180.4
First Iteration:
Equation (1) TJ = TA(POoOJA)
TJ = 70 + (0.55)(100)
TJ = 125°C
Second Iteration:
Substituting Po back into equation (1):
TJ = 70 + (0.453)(100)
TJ = 115.3°C
Po = 180.4 + (115.3 + 273)
Po =0.456 W
3·24
LED Drive Darlington Drive
PPORT = E(VOU e ( IIIL I) + E(VCC - VOLHlloH I) (4)
1 1
to to
n n
where n = # of port pins
•
mal response should be considered when measuring power and must be
considered when measuring power as part of a high-speed test.
The maximum power demand by any device occurs during turn-on when
=
TJ TA. The following example should be followed when calculating worst-
case power supply values.
Example:
Continuing to use the MC6821 P example to determine PD @ TA =TJ =O°C,
Equation (2) =
PD K + (TJ + 273°C)
PD = 180.4 + (0 + 273)
PD = 0.66 W
Thus, the maximum instantaneous power supply demand is 0.66 W.
SUMMARY - The calculated value of TJ should not exceed the data sheet
value of TJ (maximum) for a particular IC package. If TJ (calculated) is in ex-
cess of TJ (maximum), something must be done to reduce the junction
temperature. Equation (5) shows that ()JA consists of two parts, ()JC and
()CA·
=
()JA ()JC + ()CA (5)
=
()JC thermal resistance, junction-to-case, °C/W
=
()CA thermal resistance, case-to-ambient, °C/W
3-25
THE "BETTER" PROGRAM
•
• Reduce Service Calls
• Reduce Equipment Downtime
• Reduce Board and System Rework
• Reduce Infant Mortality
• Save Time and Money
• Increase End-Customer Satisfaction
3·26
PART MARKING - The part is marked with a suffix letter(s) as shown to in-
dicate the level of testing that the part received.
MC68XXX CP s
I T T
I I I
Part Standard "BETTER"
Identification Package Processing
Suffix =
Level I Suffix S
=
Level II Suffix D
=
Level III Suffix DS
3-27
II
3-28
Data Sheets II
4-1
•
4·2
DATA SHEETS
Data sheets at Motorola are grouped into one of three categories depen-
ding on the amount of information presented. These categories are:
Final Data Sheet - This data sheet evolves from the Advanced Information
II
data sheet. It is a result of test information collected from a fully-
implemented manufacturing process. The parametric information has been
analyzed and approved. Motorola considers this is a fully characterized
device. This type of data sheet is distinguished by the absence of any designa-
tion appearing in the header of the first page as shown in Figure 4-1.
The data sheets that follow are arranged in ascending numerical order
disregarding the prefix letters and any speed designation letters.
MECHANICAL DATA
The package availability for each device is indicated on the front page of
the individual data sheet. Mechanical data for the different package types
used is located in a separate chapter of the manual. The data is arranged
by package size (pin count) and then package type (plastic, ceramic, etc.).
4-3
Figure 4·1. DATA SHEET TYPE DESIGNATIONS
® MOTOROLA
SEMICONDUCTORS
3501 ED BLUESTEIN BLVD., AUSTIN, TEXAS 78721
I Product Previe-vv Ir
[;=__8-_B_IT_M_IC_R_~OMPUTER UNIT ~
• ® MOTOROI.A
SEMICONDUCTORS
3501 ED BLUESTEIN BLVD., AUSTIN, TEXAS 78721
c=='----------l-=:J
I Advance In:forInation II
I
® MOTOROLA
SEMICONDUCTORS
3501 ED BLUESTEIN BLVD., AUSTIN, TEXAS 78721
4·4
® MOTOROLA MC1372
COLOR TV
VIDEO
MODULATOR CIRCUIT
COLOR TV VIDEO MODULATOR
SILICON MONOLITHIC
· .. an integrated circuit used to generate an R F TV signal from
INTEGRATED CIRCUIT
baseband color-difference and luminance signals.
The MC1372 contains a chroma subcarrier oscillator, a lead and
lag network, a quasi-quadrature suppressed carrier DSB chroma
modulator, an R F oscillator and modulator, and an LSTTL com-
patibe clock driver with adjustable duty cycle.
-
The MC1372 is a companion part to the MC6847 Video Display
Generator, providing and accepting the correct dc interconnection ,
levels. This device may also be used as a general-purpose modulator 14
P SUFFIX
with a variety of video signal generating devices such as video games, PLASTIC PACKAGE
test equipment, video tape recorders, etc. CASE 646
•
Pin Connections
• Minimal External Components
• Compatible with MC6847 Video Display Generator Clock
Output
• Sound Carrier Addition Capability OscIllator
Input
• Modulates Channel 3 or 4 Carrier with Encoded Video Signal
Duty Cycle
• Low Power Dissipation Ad)
RF
Color B Lummance Modulator
Vee Input Input Output
11
Oscillator 2 Chrominance
Input Input
Chrominance
Oscillator
and .----, .----ii----+-o Modulator
Clock Output
Driver
Clock
OutPut
4
Ground Duty Cycle Color A Color
AF Tank
Adjust I nput Reference
Input
4-5
MC1372
ELECTRICAL CHARACTERISTICS (VCC = +5 Vdc, TA = 25°C, Test CirCUit 1 unless otherwISe noted)
Characteristic
Operating Supply Voltage
Supply Current
•
Output Voltage (VOL) - - 0.4 Vdc
(VOH) 24 - -
Rise Time (Vl 04 to 2 4 Vdc) - - 50 ns
Fall Time (Vl - 2 4 to 0 4 Vdcl - - 50 ns
Duty Cycle Adjustment Range (V3 :: 5 0 Vdc) 70 - 30 %
(Measured at V1 1 4 V)
::0
4-6
MC1372
+5 V
10"F~ 240 75
.
o
N 0.1 "H
V12
RF Output
56 pF
3579545 MHz 11 13
~~~2~~--~--~
9-35
pF
5.6 k
•
Va
Clock
Output
O~t------,~--~o-;i-r __-r__-r__-r__-r__-r~~~I~~~~~-,~o
+5 V
+7 V
360 2 k
1N4001 V12
Video Output
14 12
~..--<o-o..f-'----'~-------'-------~ S Chroma Modulator
Output
9-35
pF
56k MC1372
Clock Va 10
outPuto-~------------~~-L~__~__~__~__~__~ E-<> V10
01 "F
V5 V6 V7 V9
4-7
II
FIGURE 4 - SCHEMATIC DIAGRAM
3:
Duty CYcle
Adjust
Oscillator
Input
Clock
Driver
Luma
Input
Chrommance
Input
RF Modulator
Output
RF
Tank
n....
3 2 - 10 12 - Co\)
11 13 14
VccO-~4-~------~----------~~---------}---.--------.--+--.---~+------.~~---.~------~~~--~~--~t---,
~
Rl R3 R5 R13 R14
R19
25 k 2.5 k 4.7 k 600 16k
tt .--
~4
R12
n
20 k
RS
R4 R6 ~5
R9
R2
o.. k
01
11k~
R1
02
RIO
.
-"
Ul R26 ~ R21
25k 01 3.6 k ?
a:: 4
o Ground
~I
;t
~
.--+-----,,'C3 R49
.02 150
RSO M
R28 R31
SChroma
C4
" ~ fR30
MOdulator
Output
030
C2
M
C5
M
o~ R31
032
0311---,
R38
1 k
R39
1 k
033~_
O~
R42
,.
~~-)
Q~
~I
R43
t
I R44
I3 4
. •
041
t'"
~ R48
34.
6_ 1u
Color B Color Reference Color A
Input Input Input
MC1372
•
Dc coupled Input to Chroma Modulator B. whose
presented at clock driver output Pin 1 IS coupled to
phase leads modulator A by approximately 1000 . The
oscillator input pin 2 through an external RC and crystal
modulator output amplitude and polarity correspond to
network, which prOVides 1800 phase shift at the resonant
the voltage difference between this pin and the Color
frequency. The duty cycle of the output waveform 15
Reference Voltage at Pin 6.
determined by the dc component at Pin 1 Internally
Pin 6 - Color Reference Input coupled through R 12 to the base of Q4. As pin 1 dc
The dc voltage applied to this pin establishes the voltage Increases, a smaller portion of the SinUSOidal
reference voltage to which Color A and Color B Inputs feedback signal at Pin 2 exceeds the Q4 base voltage of
are compared. two times VBE reqUired for conduction. As the dc level
is reduced, deVice Q4 and thus Q5 IS turned on for a
Pin 7 - Color A Input
longer percentage of the cycle. TranSistors QO, Ql,
Dc coupled Input to Chroma Modulator A, whose
Q2 and diode D 1 prOVide the biaSing network which
phase lags modulator B by approximately 100°. The
determines the dc operating level of the oscillator. The
modulator output amplitude and polarity correspond to
tranSistor Q2 and reSIStors R5, R6, and R 7 form a voltage
the voltage difference between thiS pin and the Color
reference of four times VBE at the collector of Q2. The
Reference Voltage at Pin 6.
dc voltage at pin 1 IS determined by the values of R4,
Pin 8 - Chroma Modulator Output R8, and R 12 and the applied duty cycle adjust voltage
Low Impedance (emitter follower) output which at pin 3. Since these reSIStors are nominally equal, the
prOVides the vectorial sum of chroma modulators A voltage at Pin 1 will always approximate the dc voltage
and B. at Pin 3.
The oscillator Signal at pin 1 is Internally coupled to
Pin 9 - Luminance Input
active filter 044. ThiS filter reduces the frequency content
Input to R F modulator. ThiS pin accepts a dc coupled
above 4 MHz. The output of the filter at the emitter of
luminance and sync signal. The amplitude of the RF signal
Q44 IS ac coupled through C3 to the Input of the lead/lag
output increases with positive voltage applied to the pin,
network. R32 and Cl prOVide approximately 50 0 of phase
and ground potential results in zero output (i.e., 100%
lag, while C2 and R29 prOVide approximately 50 0 of
modulation). A signal with positive-going sync should phase lead. These two quasi-quadrature waveforms are
be used.
used to switch chroma modulators B and A, respectively.
Pin 10 - Chrominance Input The transistors Q22 through Q25 and Q32-Q33 form
Input to the R F modulator. This pin accepts ac coupled a doubly balanced modulator. The input Signal applied
chrominance provided by the Chroma Modulator Output at pin 5 is compared to the color dc reference voltage
(pin 8). The signal is reduced by an internal resistor divider applied at pin 6 in differential amplifier Q32-033. The
before being applied to the R F modulator. The resistor source current provided by tranSIStor Q34 is partitioned
divider consists of a 300 ohm series resistor and a 500 in transistors Q32 and 033 according to the differential
ohm shunt resistor. Additional gain reduction may be input signal. The bases of transistors Q23 and Q24 are
obtained by the addition of external series resistance connected to the dc reference voltage at the emitter of
to pin 10. Q30. The bases of transistors Q22 and Q25 are connected
4·9
MC1372
to the phase delayed oscillator signal at the emitter of associated equipment. The duty cycle may be adjusted
buffer transistor 021. The diffarential signal currents by varying the de voltage applied to pin 3. This adjust·
provided by 032 and 033 are switched in transistors ment may be made with the use of a potentiometer
022 through 025 and the resultant signal voltage is (10 kO) between supply and ground. With no connection
developed across R49. This signal has the phase and to pin 3, the duty cycle is approximately 50%.
frequency of the oscillator signal at the emitter of 021.
Chroma Modulator
The amplitude is proportional to the differential input
The chrominance oscillator is internally phase shifted
signal applied between pins 5 and 6. Transistors 026
and appl ied to chroma modulators A and B. No external
through 029 and 038-039 form chroma modulator B.
lead/lag networks are necessary. The phase relationship
This modulator develops a signal voltage which is propor·
between the modulators is approximately 100 0 , which
tional to the differential voltage appl ied between pins
was chosen to provide the best rendition of colors using
7 and 6. The phase and frequency of the output is equal
equal amplitude color·difference signals. The voltage
to the phase advanced chroma oscillator at the emitter
applied to pin 5, 6, or 7 must always be within the Input
of buffer transistor 020. Both chroma modulators A and
Common Mode Voltage Range. Since the amplitude of
B share the same output resistor, R49, so the output
chrominance output is proportional to the voltage dif·
signal presented at the emitter of 042 (pin 8) is the
ference between pins 5 and 6 or 7 and 6, it is desirable
algebraic sum of modulators A and B.
to select the Color Reference Voltage applied to pin 6 to
The RF oscillator consists of differential amplifier be midway between V5 max and V5 m in (which should
•
018 and 019 cross·coupled through emitter followers be V7 max and V7 m in)' The Chroma B Modulator will be
016 and 017. The oscillator will operate at the parallel defined as a (B·Y) modulator if a burst flag signal is
resonant frequency of the network connected between applied to the Color B Input (pin 5) at the appropriate
pins 13 and 14. The oscillator output is used to switch time. This voltage should be negative with respect to the
the doubly balanced RF modulator, 09 through 015. Color Reference Voltage, and typically has an amplitude
Transistors 07 and 08 provide level shifting and a high equal to 1/2[V6-V5m in]. Since the phase of burst is
input impedance to the luminance input pin 9. The always defined as -(B·Y). the Chroma A Modulator
bases of transistors 09 and 010 are both biased through approximates an (R·Y) modulator; however, the phase
resistors R 17 and R 18, respectively, to the same dc is offset by 100 from the nominal 90 0 , to provide the
reference voltage at 06 emitter. The base voltage at 010 1000 phase shift as discussed previously.
may only be offset in a negative direction by luminance
signal current source 08. This design insures that over· R F Modulator and Oscillator
modulation due to the luminance signal will never occur. The coil and capacitor connected between pins 13 and
The chrominance signal developed at pin 8 is externally 14 should be selected to have a parallel resonance at the
ac coupled to pin 10 where it is reduced by resistor carrier frequency of the deSIred TV channel. The values
dividers R20 and R17, and added to the luminance of 56 pF and 0.1 IlH shown in Figure 5 were chosen
signal in 09. The resultant differential composite video for a Channel 4 carrier frequency of 67.25 MHz. For
currents are switched at the appropriate R F frequency Channel 3 operation, the resonant frequency should
in 012 through a 15. The output signal current IS presented be 61.25 MHz (C = 75 pF, L = 0.1 IlH). Resistors R4 and
at pin 12. R5 are chosen to provide an adequate amplitude of
Transistors 036, 041 and resistors R44, R47 provide switching voltage, whereas R6 is used to lower the maxi-
a highly stable voltage reference for biasing current sources mum dc level of switch ing voltage below VCC, thus
043,034,035, and 011. preventing saturation within the IC.
Composite Luminance and Sync should be dc coupled
to Luminance Input, pin 9. This signal must be within
MC1372 APPLICATION INFORMATION the Luma Input Dynamic Range to insure Imearity.
Since an increase in dc voltage applied to pin 9 results
Chrominance Oscillator in an increase in R F output, the input signal should
The oscillator is used as a clock signal for driving have positive-going sync to generate an NTSC compatible
associated external circuitry, in addition to providing a signal. As long as the input signal is positive, over-
switching signal for the chroma modulators. The IC uses modulation is prevented by the integrated circuit.
an external crystal in a Colpitts configuration, as shown Chrominance information should be ac coupled to
in Figure 5. Resistor R 1 provides current limiting to Chrominance Input, pin 10. This pin is internally con-
reduce the signal swing. Capacitor C2 is adjusted for nected to a resistor divider consisting of a series 300
the exact frequency desired (3.579545 MHz). ohms and a shunt 500 ohms resistor. The input impedance
In some applications, the duty cycle of the clock signal is thus BOO ohms, and a coupling capacitor should be
at pin 1 must be modified to overcome gate delays in appropriately chosen.
4·10
MC1372
r---------------------------------------~--------~--------~~+5Vdc
C5 "T'
. Clock In 0001~
AF
11 A3 Output
75
12
MC6847 A6
Vid-e:o 4 240
DisplaV
Generator Color B
MC1372
Color TV
-= A4
240
Video
Modulator 13
Color Ref 6
C4
56
Color A 01 f,lH
C3 A2
01 750
The Luminance to Chrominance ratio (L:C) may be tage at pin 12 is high enough to prevent the output
modified with the addition of an external resistor in series devices from reaching saturation (approximately 4.5 V
with pin 10 (as shown in Figure 5). The unmodified L:C with components in Figure 5). The peak current out of
(Ao) is determined by the ratio of the respective Conver· pin 12 is typically 2 mAo Hence, a load resistance of up
sion Gain for equal amplitude signals (typically, 0.883 = to 250 ohms may be safely used with a 5 V supply.
-1.6 dB). The modified L:C will be governed by the
Composite Video Signal Generation
equation Ao(l + Rext/800) for equal amplitude input
The R F modulator may be easily used as a composite
signals.
video generator by replacing the RF oscillator tank
The internal chrominance modulators are not inter· circuit with a diode as shown in Figure 3. This results in
nally connected to the RF modulator; therefore, the user the output modulator being biased so the summation of
has the option of connecting an externally generated luminance and chrominance appears unswitched at
chrominance signal to the RF modulator. In addition, pin 12. The polarity of the output waveform is con·
the RF modulator is wideband, and a 4.5 MHz FM audio trolled by the direction of the diode. Inverted video:
signal may be added to the chrominance input at pin 10. Anode to pin 14, cathode to pin 13. Non·inverted
This may be accomplished by selecting an appropriate series video: Anode to pin 13, cathode to pin 14. Note that the
input resistor to provide the correct Luminance:Sound supply resistor must always be connected to the anode
ratio. of the diode.
The modulated R F signal is presented as a current The amplitude of signal may be increased by increasing
at R F Modulator Output, pin 12. Since this pin represents the load resistor on pin 12 and returning it to a higher
a current source, any load impedance may be selected for supply voltage. Any voltage up to the Absolute Maximum
matching purposes and gain selection, as long as the vol· Rating may be used.
4·11
MC1372
• OUTLINE DIMENSIONS
ROJA
P SUFFIX
PLASTIC PACKAGE
CASE 646-04
= 100 0 C/W TYPLcal
THERMAL INFORMATION
The maXimum power consumption an Integrated CirCUit can
tolerate at a given operating ambient temperature can be found
from the equation
PDITA) = TJlmax)-TA
ReJAltyp)
where PDn A) =: Power DISSipation allowable at a given operating
ambient temperature. ThiS must be greater than the sum of the NOTES
MILLIMETERS INCHES 1 LEADS WITHIN 0 13 mm
products of the supply voltages and supply currents at the worst- DIM MIN MAX MIN MAX (00051 RADIUS OF TRUE
case operating condition A 1803 1956 0710 0770 POSITION AT SEATING
8 6.10 660 a 240 0260 PLANE AT MAXIMUM
T J(max) = MaXimum Operating JunctLon Temperature as listed C 5.08 0200 MATERIAL CONDITION
10 the MaXimum Ratings Section o 038 0.53 0015 0021 2 DIMENSION "L" TO
F 102 1.78 a 040 0070 CENTER OF LEADS
TA = MaXimum DeSired OperatIng AmbLent Temperature G 2548S a 08 WHEN FORMED
H 132 241 0.052 0095 PARALLEL
R8JA(tyP) = Typical Thermal ReSistance JunctIon to Ambient J 020 038 0008 0015 3 OIMENSION "8" DOES NOT
K 292 0115 INCLUDE MOLD FLASH
L 7628SC 0300 8SC 4 OIMENSION "R" TO BE
M 0° 15 00 150 MEASURED AT THE TOP OF
N 051 0020 THE LEADS (NOT AT THE
R 826 0325 TIPS)
4-12
@ MOTOROLA MC3446A
-
• Tailored to Meet the IEEE Standard 488-1978 (Digital Interface
for Programmable Ipstrumentatlon) and the Proposed IEC
Standard on Instrument Interface
• Provides Electrical Compatibility with General·Purpose Interface
Bus (GPIBI
P SUFFIX
•
• MOS Compatible with High Impedance Inputs PLASTIC PACKAGE
CASE 648
• Driver Output Guaranteed Off DUring Power Up/Power Down
• Low Power - Average Power Supply Current = 12 mA
• Terminations Provided
PIN CONNECTIONS
DTlver Bus 0
--- - Input A
Dnver
Enable
Instrument Input 0
ABC
l
I
A
(With GPIS) Dnver '" Enable 0
, J
Programmable
Calculator
(with GPIS)
I Input B
Bus B
ReceIVer ....
Driver
Input C
Bus C
Output B
Instrument Receiver
, "" Output C
B I Gnd
I (With GPIS)
----
4-13
MC3446A
ELECTRICAL CHARACTERISTICS
(Unless otherwise noted, 4.5 V '" Vee"';: 5.5 V and 0, TAos;;; 70De, tYPical values are at TA = 2SoC, Vee = 5.0 V)
Ch.racteristic Symbol Min Typ MIX Unit
DRIVER PORTION
Input Voltage - High Logic State VltilQl 2.0 - - V
Input Voltage - Low logic State VUD) - - 0.8 V
Input Current - High Logic State IIH(D) - 50 40 ~A
IVIH = 24 V)
Input Current - Low Logic State IILID) - -0.2 -0.25 mA
IVIL = O.4V. VCC= SOY, TA= 25°C)
I nput Clamp Voltage VIK(D) - - -1.5 V
(11K = -12mAI
Output Voltage - High logic State (1) VOHIDI 2.5 33 3 7 V
•
IVIH(S) = 2.4 V or VIH(D) = 2.0 V)
Output Voltage - LOW Logic State VaLID) - - 05
IVI LISI = 0 8 V, VIL(DI = 0 8 V, IOLIDI = 48 mAl
Input Breakdown Current - - 10 mA
118(DI
IVtlDI = 5.5 V)
RECEIVER PORTION
I nput HysteresIs 400 625 - mV
Input Threshold Voltage - Low to High Output Logic State VILHIR) - 1.66 2.0 V
Input Threshold Voltage - High to Low Output Logic State VIHLlRI 0.8 1.03 - V
Output Voltage - High Logic State VOH(R) 2.4 - - V
IVIHIR) = 20 V, IOHIR) = -400/lAI
Output Voltage Low Logic State VOLIR) 0.5 V
IVILIR) = 0 8 V, IOLIRI = 8 0 mAl
Output Short-CircUit Current IOSIRI 40 - 14 mA
(V IH (R J "" 2 0 V) (Only one output may be shorted at a time)
4-14
MC3446A
FIGURE 1 - TEST CIRCUIT AND WAVEFORMS FOR PROPAGATION DELAY TIME FROM
RECEIVER INPUT (BUS) TO OUTPUT
To Scope
(Output) +5.0 V
Input
To Scope
ov (Input)
tpLH(R)
Output
VOL
Pulse Input
FIGURE 2 - TEST CIRCUIT AND WAVEFORMS FOR PROPAGATION DELAY TIME FROM
DRIVER AND COMMON ENABLE INPUTS TO OUTPUT (BUS)
Pulse
To Scope
(Input)
+50 V
VOH
•
Output
VOL----'
Input
0 60
r--- VCC~150V 40
T
TA ~ 25°C I
~
-
40 20
o :<
E I i---
~
w ...z I-- I
'" 30 w -20
~
~
~ (
o B -40
>
~ 20
~
=> I
I~~-
~ -60
~
o ~ -80 < -.> -:--
~ 10 10
II
IT 918
1_
12
- ~
o 14 II
o 05 10 15 2.0 -40 -20 20 40 60
VI. INPUT VOLTAGE (VOLTS) VBUS. BUS VOLTAGE (VOLTS)
4-15
® MOTOROLA MC3447
•
• Low Power - Average Power Supply Current = 30 mA listening PLASTIC PACKAGE
75 mA Talking CASE 724
• Eight Driver/Receiver Pairs
• Three-State Outputs
• High Impedance Inputs
PIN ASSIGNMENTS
• Receiver HysteresIs - 600 mV (Typ)
• Fast Propagation Times - 15-20 ns (Typ)
Vee
• TTL Compatible Receiver Outputs
• Single +5 Volt Supply Bus 0
• Open Collector Driver Output with Terminations
• Power Up/Power Down Protection (No Invalid ~--~~~------~-r:2:D8us1
I nformation Transmitted to Bus)
• No Bus Loading When Power is Removed From Device Bus 2
• Required Termination Characteristics Provided
I Instrument
A I "
- --
,
-,
TYPICAL MEASUREM ENT
SYSTEM APPLICATI ON
I
(With GPIB)
......... Programmable
I
Calculator Vee
~u,
(With GPIB)
Instrument
B
(With GPIB) ,
,I
,
--- ---'f--<) Bus - Indicates
~ ~ Term,",,,on,
---
16 Lines Total Gnd
4-16
MC3447
ELECTRICAL CHARACTERISTICS
(Unless otherwise noted 450 V.;;;;, Vee';;;; 550 V and 0 ~ T A ~ 70 D e tYPical values are at T A"" 25 DC Vee"" 5 0 V)
Characteristic - Note 2 Symbol Min Typ Max Unit
Bus Voltage V
IBu, Pin OpenI(VIIS/R) = 0 8 V) VIBu,) 25 - 3.7
IIIBu,) = -12 rnA) VICIBu,) - - -15
Bus Current IlBu,) mA
150 V <; V IBu,) <; 55 V) 07 - 2.5
IVIBu,) = 0 5 V) -1.3 - -32
IVCC = 0 V, 0 V <; VIBu,) <; 2 75 V) - - +004
Receiver Input HysteresIs - 400 600 - mV
IVIIS/l'\) = 0 8 V)
Receiver Input Threshold V
IVIIS/R) = 0 8 V) Low to High VILHIR) - 16 20
High to Low VIHLlR) 08 10 -
Receiver Output Voltage - High Logic State VOHIR) 24 - - V
IVIIS/R) = 0 8 V, IOHIR) = -200 MA, VIBu,) = 2 0 V)
Receiver Output Voltage - Low Logic State VOLlR) - - 05 V
IVIIS/R) = 0 8 V, IOLlR) = 4 0 mA, IVIBu,) = 0 8 V
Receiver Output Short Circuit Current IOSIR) -40 - -20 mA
a V)
•
IVIIS/RI = 0 8 V, VIBu,1 = 2
Driver Input Voltage - High Logic State VIHIO) 20 - - V
IVIIS/R) = 2 a V)
Driver Input Voltage - Low Logic State VILlO) - - 08 V
IVIIS/R) = 2 0 V)
Driver Input Current - Data Pms MA
IVIIS/R) = 2 0 V)
105<;VIIO)<;27VI 11101 -100 - 40
IVIIO) =55V) IIBIO) - - 200
Input Current - Send/Receive MA
10 5 <; VIIS/R) <; 2 7 V) IIIS/R) -250 - 20
IVIIS/RI = 5 5 V) IIBIS/R) - - 100
Driver Input Clamp Voltage VICIO) - - -15 V
IVIIS/RI = 2 0 V, IICIO) = -18 mAl .,
Driver Output Voltage- High LogiC State VOHIOI 25 V
IVIS/R) = 2 0 V, VIHIO) = 2.0 V)
Driver Output Voltage - Low LogiC State (Note 1) vOLIO) - - 05 V
IVIIS/R) = 2 0 V, VILIO) = 0.8 V, IOLlO) = 48 mAl
Power Supply Current mA
(Listening Mode - All Receivers On) leCL - 30 45
(Talking Mode - All Drivers On) ICCH - 75 95
NOTES 1. The IEEE 488-1978 Bus Standard changes VOL(OJ from 0.4 to 0.5 V maximum to permit the use of Schottky technology
2 Specified test conditions for VIIS/A) are 0.8 V (Low) and 2.0 V (High) Where VI(S/R) IS specified as a test condition, VI(S/R)
uses the oppoSite logiC levels
3. In order to meet the IEEE 488-1978 standard for total system delay on the ATN and EOI channels, a fast receiver has been
provided on Channel 6 (pms 9 and 16).
4-17
MC3447
~~L~R~
(Input) Data
tPl.HIRi
Output 1N916
I
or Equlv
51
Pulse Bus
CL'130PF
f=10MHz
·Includes Jig
tTLH = tTHL";;:; 5 0 ns (10-90)\
and Probe Capacitance
Duty Cycle = 50%
Data Bus
Input
Send/Ree
Output
To Scope Low to Open
51
(Input)
Pulse
51
Generator 30V f=10MHz
CL = 30 pF (Includes Jig and
tTLH = tTHL "" ~ 5 0 ns (10-90)
Probe Capacitance
Duty Cycle = 50%
4·18
MC3447
,...-------.-----3.0 V
5.0 V Input
OV
1.2 k
Output
HIgh to Open
Output
Low to Open
I_______ I-.-;.-==:...:..:~O V
2.0 V
51 CL = 15 pF (Includes Jig f= 1 OMHz
Pulse
and Probe CapacItance) tTLH "" tTHL =.s;; 50 ns (10-90)
Duty Cycle = 50%
-r-
VCC~50V
I
-
-
4.0
I- TA ~ 15'C 10
T
Col)
:; ;;( .....-,
o .§
2:
w .... I ~
to 30 ~ -20 ........
'"
:;
o ~ -4.0
> jljon-6h,dIldA...
~ ~ -60
20 eon'OIIII'tu
!;
o
~-8.0 Paratfjlpb 3-5,31lif -;-
IEEE_d
~ 10 -10 _1918. ~
o
-12
-14
... "CC· S.QV
~I .I
-
o 0.5 1.0 15 10 -4.0 -20 20 40 6.0
VI. INPUT VOLTAGE (VOLTS) VBUS. BUS VOLTAGE (VOLTS)
FIGURE 7 - SUGGESTED PRINTED CIRCUIT BOARD LAYOUT USING MC3447. AND MC68488
10 MC68488 0
0 o _________
2 MC3447s
--JA~ ___________,
'r~"!"'~O 1§!fi.
0
0
0
0
0
0
0
0
0 : 0 i 0 4 0 I c>--- 0108
0 167 5 0 I c>---~~;
SIR (5) o-S/R(1-4)~
l Ii? : O------~_
0 T/R 1
:~~~ l/
0
~ 11 fiI""" "",,
0
DAV
DAC
,0<
RFD 0-_ _ _ _-' SR00---4 W 1 Gnd Gnd Gnd Gnd
0 REN 0----0
Jumper or second
0 T'FC level metal
4·19
MC3447
+5 V
T/R 1 D80 D0
r-------...,I T/R2
Data
2 MC3447s D87 D7
I
I
I
DAV DAV R/Vii R/W
MC6802
RS0 A0
0101 iBll Me6S00
RS2 Address MPU
DI03 iB2
A15
I
0105 184
IRQ IRQ
0107 186
NDAC DAC
en
:;)
III EOI EOI
00
....
~
cO IFC we
...w
00
MC68488
w t--------~ GPIA
!!! I
SRQ SRQ
0102 181
DI04 183
DI06 185
0108 187
L ______ ...JI
Tng
-=
4·20
MC3447
MC68488 MC68488
Connections MC3447 Pin Designations Connections
A B A B
•
T/R 1 Gnd SIR 16) 11 14 SiR 17) Gnd Gnd
OUTLINE DIMENSIONS
L SUFFIX P3 SUFFIX
CERAMIC PACKAGE PLASTIC PACKAGE
CASE 623-04 CASE 724-02
'JAllyp)" 53 0 CIW 'JAllypl" 90 0 CIW
NOTE
1 LEADS, TRUE POSITIONED WITHIN
025 mm (0 OlD) DIA AT SEATING
PLANE AT MAXIMUM MATERIAL
CONDITION (DIM 0)
MllllMEHRS INCHES
DIM
NOTES
MIN MAX MIN MAX
1 DIM "L"TO CENTER OF
A 3124 3217 1230 1290 lEADS WHEN FORMED
•
C
1270
406
1549
5"
0 ..0
0160
0610
0220
PARAllEL
2 LEADS WITHIN 0 13 mm
0 041 051 0016 0020 {ODDS) RADIUS OF TRUE
F 117 152 0050 0050 POSITION AT SEATING
G 254 sse olDDBSC PLANE AT MAXIMUM
J 020 030 ODD. 0012 MATERIAL CONDITION
0090 0160
K
l
M
'"
0'
406
152485(;
t5'
o BOOBse
0' t5'
(WHEN FORMED PARALLEL)
THERMAL INFORMATION
The maximum power consumption an Integrated CirCUit the sum of the products of the supply voltages and supply
can tolerate at a given operating ambient temperature, can currents at the worst case operating condition
be found from the equation
T J(max) = MaXimum Operating Junction Temperature
TJ(max)-TA
as listed In the MaXimum Ratings Section
PD(T A) = ReJAITyp)
T A = MaXimum DeSIred Operating Ambient
Where PD(T A) = Power DISSipation allowable at a given Temperature
ReJA(Typ) = TYPical Thermal ReSIStance JunctIOn to
operating ambient temperature ThiS must be greater than
Ambient
4·21
® MOTOROLA MC3448A
BIDIRECTIONAL INSTRUMENTATION
BUS (GPIB) TRANSCEIVER
This bidirectional bus transceiver is Intended as the interface QUAD THREE-STATE
between TTL or MOS logic and the IEEE Standard Instrumentation BUS TRANSCEIVER WITH
Bus (488-1978. often referred to as GPIB). The required bus TERMINATION NETWORKS
termination is Internally provided.
SILICON MONOLITHIC
Each driver/receiver pair forms the complete interface between
INTEGRATED CIRCUIT
the bus and an Instrument. Either the driver or the receiver of each
channel is enabled by its corresponding Send/Receive input with
the disabled output of the pair forced to a high Impedance state. An
additional option allows the driver outputs to be operated In an
open collector(l) or active pull·up configuration. The receivers have
J'Iffm
Input hysteresIs to improve noise margin. and their input loading
follows the bus standard specifications.
• Four Independent Driver/Receiver Pairs
• Three-State Outputs
• High Impedance Inputs
CERAMIC PACKAGE
LSUFFIX ""'"
• Receiver HysteresIs - 600 mV (Typ) CASE 620
I
• Fast Propagation Times - 15-20 ns (Typ)
• TTL Compatible Receiver Outputs t. t
(1) Selection of the "Open Collector" configuration, In fact, selects an open collector device
with a passive pull-up load/termtnatlon which conforms to Figure 7, IEEE 488-1978 Send/Ree.
VCC
Bus Standard. Input A
Sand/Ree. D.tee
Input B
Sond/Roc.
TYPICAL MEASUREME NT
--- - SYSTEM APPLICATIO N
Instrumant
.
I A
(With GPIB)
I '"
"
"
,- . J
Instrument
B
IWlth GPIB)
I TRUTH TABLE
Programmable Send/Rec Enabte Info. Flow Commentt
Calculator I I .............
I (With GPIB)
----
0 X 8us~Data
Data~Bus
Data -+Bus
Active Pull· Up
Open Col.
16 Lin .. Total
4-22
MC3448A
ELECTRICAL CHARACTERISTICS
IUnless otherwISe noted 4.75 V .;; VCC';; 5.25 V and 0.;; T A';; 70°C; typical values are at TA ~ 25°C, VCC ~ 5.0 V)
Characteristic Symbol Min Typ Max Unit
Bus Voltage V
IBus Pm Open)IVIIS/R) ~ 0.8 V) VIBUS) 2.75 - 3.7
(lIBUS) ~ -12 mAl VICIBUS) - - -1.5
8us Current IIBUS) mA
15.0 V .;; V IBUS) .;; 5.5 V) 0.7 - 2.5
IVIBUS) ~ 0.5 V) -1.3 - -3.2
IVcc ~ 0 V, 0 v.;; VIBUS)';; 2.75 V) - - +0.04
Receiver Input HysteresIs - 400 600 - mV
IVIIS/R) ~ 0.8 V)
Receiver Input Threshold V
IVIIS/R) ~ 0.8 V, Low to High) VILHIR) - 1.6 1.8
IVIIS/R) = 0.8 V, High to Low) VIHLlR) 0.8 1.0 -
Receiver Output Voltage - High Logic State VOH(R) 2.7 - - V
IVIIS/R) ~ 0.8 V, 10HIR) ~ -800 J.lA, VIBUS) = 2.0 V)
Receiver Output Voltage - Low Logic State VOLlR) - 0.5 V
(VIIS/R) ~ 0.8 V, 10LlR) ~ 16 rnA, VIBUS) ~ 0.8 V)
Receiver Output Short Circuit Current 10SIR) -15 - -75 rnA
•
IVIIS/R) ~ 0.8 V, VIBUS) ~ 2.0 V)
Driver Input Voltage High LogiC State VIH(O) 2.0 - - V
IVIIS/R) ~ 2.0 V)
Drtver Input Voltage - Low LogiC State VILIO) - - 0.8 V
IVIIS/R) = 2.0 V)
Drtver Input Current - Data Pins J.lA
IVIIS/R) = VilE) ~ 2 0 V)
10.5';; VIIO) .;; 2.7 V) 11(0) -200 - 40
IVI(O) ~ 5.5 V) IIB(O) - - 200
Input Current - Send/Receive J.lA
10.5';; VIIS/R)';; 2.7 V) IIiS/R) -100 - 20
IVIIS/R) = 5.5 V) IIBIS/R) - - 100
Input Current - Enable J.lA
10.5';; VIIEI .;; 2.7 V) IIIE) -200 - 20
IVIIE) ~ 5.5 V) IIBIE) - - 100
Driver Input Clamp Voltage VICIO) - - -1.5 V
IVI(S/R) = 2.0 V, IICIO) = -18 mAl
Driver Output Voltage - High LogiC State VOHIO) 2.5 - - V
IVIIS/R) ~ 2.0 V, VIHIO) = 2.0 V, VIHIE) ~ 2.0 V, 10H ~ -5.2 rnA)
Driver Output Voltage - Low LogiC State (Note 1) VOLIO) - - 0.5 V
IVIIS/R) ~ 2.0 V, 10LlO) ~ 48 mAl
Output Short CircuIt Current 10S(0) -30 - -120 rnA
IVIIS/R) = 2.0 V, VIHIO) = 2.0 V, VIH(E) ~ 2.0 V)
Power Supply Current mA
(Listening Mode - All Receivers On) ICCL - 63 85
ITalkmg Mode - All Onvers On) ICCH - 106 125
NOTE 1. A modification of the IEEE 488-1978 8us Standard changes VOLtO) from" 0.4 to 0.5 V maximum to permit the use of
Schottky technology.
4-23
MC3448A
~~L~R~
(Input)
• r-------_-
tPLH(R)
---VOH
Output 1.5 V lN916
or Equlv.
To Scope 3.0 V
h
(Input)
To Scope
Sendl
(Output) • 23 V
Dnverlnp~t1 5 V
r--------. 30 V
Pulse
_+--<:>-.. Rec
£.... . .
Bus
CL'130 P F
383
or Enable
Output
tPLH(D) F
•
20 V
1 5 V
08 V
£tPH~(~)
---VOH
VOL
f= 1 QMHz
* Includes JIg
and Probe Capacitance Pull-Up Enable tTLH = tTHL'; 50 ns (10-90)
Duty Cycle = 50%
To Scope ,-----30V
(Output) Input
Output
High to Open
To Scope
Output
(Input)
Low to Open
Pulse
Generator
51
CL =- 15 pF (Includes Jig and
f= 1.0MHz
Probe Capacitance
tTLH = tTHL =.; 5.0 ns (10-90)
Duty Cycle = 50%
4-24
MC3448A
,--------".-----30 V
50V Input
1'----0 V
280
Output
High to Open
Output
Low to Open
30 V
FIGURE 5 - ENABLE INPUT TO BUS OUTPUT (DRIVER)
To Scope
(Output)
II
,---------,.·----30 V
Data 15 V 1 5 V
OV
Send/Ree
~F(EI
To Scope 480 ----90-%~ VOH
(Input)
Output
Pulse Voe
51 f= 1 OMHz
Generator CL = 15 pF (Includes Jig
and Probe Capacitance tTLH = tTHL =.;;;; 5 0 ns (10-90)
Duty Cycle = 50%
-
40
I
40 -
VCC- 5OV
~ - TA 25°C 20
I r--
'S"'
-
00
~
w >- I "...
,/"
I
'" 30 ~ -20
'"
~
00 ~ -4.0
> Non.shaded Area .;.
~ 20 ~ -6.0 Conto.... t. r-
!;
00
~ -8.0 l'\I,agraph 3-5.3 of f - -
IEEElltllndar4
~ 10 -10 48&.18l18 .. f--
-12 VCC"5.oV f---
o
< -, ,
-14
o 05 10 15 2.0 -4.0 -2.0 2.0 40 60
VI. INPUT VOLTAGE (VOLTS) VBUS. BUS VOLTAGE (VOLTS)
4-25
MC3448A
+5 V
TIFt 1 DB?, O~
Data
TIFt 2
OB7 07
• .
~
,
o C
IFC IFC
A15
"'::;;
<Jl
:J
'"
""''"
;
f:::: OAC
RFO
lOAV OAV
~
W MC68488
W GPIA
W
0101 IBIi
IBI
IB2
IB3
IB4
4-26
MC3448A
OUTLINE DIMENSIONS
NOTES
•
1 LEADS WITHIN 0 13 mm (0 005) RADIUS
OF TRUE POSITION AT SEATING PLANE
AT MAXIMUM MATERIAL CONDITION
2 PKG INDEX NOTCH IN LEAD
NOTCH IN CERAMIC OR INK DOT
3 DIM "L" TO CENTER OF LEADS
WHEN FORMED PARALLEL
NOTES
MILLIMETERS INCHES
1 lEADS WITHIN 0.13 mm
OIM MIN MAX MIN MAX (0005) RADIUS OF TRUE
MILLIMETERS INCHES A lB BO 21.34 0740 0 B40 POSITION AT SEATING
DIM MIN MAX MIN MAX B 610 660 0240 0260 PLANE AT MAXIMUM
e 406 50B 0160 0200 MATERIAL CONDITION
A 1905 19B1 0750 07BO o 03B 053 0015 0021
8 622 69B 0245 0275 2 DIMENSION "l" TO
F 102 17B 0040 0070 CENTER OF LEADS
e 406 50B 0160 0200 G 2548SC 0100BSC
D 03B 051 0015 0020 WHEN FORMED
H 038 241 0015 0095 PARALLEL
F 140165 0055 0065 J 020 03B OOOB 0015
G 2.548se o100 sse K 2 3.43 0 115 0 135
3 DIMENSION "B" DOES NOT
H 051 114 0020 0045 INCLUDE MalO FLASH
L 762 BSC 0300 BSC
J 020 030 OOOB 0012 M 00 100 00 100 4 "F" DIMENSION IS FOR FUll
K 3 18 4 06 0125 0160 051 102 0020 0040 LEADS "HALF" LEADS ARE
L 737 7B7 0290 0310 OPTIONAL AT LEAD POSITIONS
M 150 15° 1,8,9, and 16)
N 051 102 0020 0040 5 ROUNDED CORNERS OPTIONAL
THERMAL INFORMATION
The maximum power consumption an integrated Circuit the sum of the products of the supply voltages and supply
can tolerate at a given operating ambient temperature, can currents at the worst case operating condition_
be found from the equation:
TJ(max) -TA T J(max) = Maximum Operating Junction Temperature
as listed in the Maximum Ratings Section
PD(T A) = ReJA(Typ)
TA = Maximum Desired Operating Ambient
Where: PD(T A) = Power DISSipation allowable at a given Temperature
operating ambient temperature_ This must be greater than ReJA(Typ) = TYPical Thermal Resistance Junction to
Ambient
4·27
MC3482 A/MC6882 A
® MOTOROLA MC34828/MC68828
ThIS deVice may be ordered under
either of the above type numbers.
II •
•
•
•
Three-State LogiC Configuration
Srngle +5 V Power Supply ReqUirement
Compatible with 74S LogiC or M6BOO Microprocessor Systems
High Impedance PNP Inputs Assure Mrnlmal Loadrng of the Bus
INPUT EQUIVALENT
CIRCUIT
(Clock)
Gnd+5V¢1 rp2
OUTPUT EQUIVALENT
CIRCUIT
vec
ORDERING INFORMATION
(Temperature Range for the following
devices'" 0 to + 75°C)
Package
Ceramic DIP
Ceramic DIP
4-28
MC~2A/MC~A·MC~2B/MC~2B
ELECTRICAL CHARACTERISTICS (Unless otherwISe noted OOC ';;TA ';;750 C and 4.75 V ';;VCC';;5 25 VI
Characteristic Symbol Min Typ Max Unit
Input Voltage - High Logic State VIH 2.0 - - V
(VCC = 4.75 V, TA = 250 CI
Input Voltage - Low Logic State VIL - - 0.8 V
(VCC = 4.75 V, TA = 250 CI
Input Current - HIgh Logic State IIH - - 40 )lA
(VCC = 5.25 V, VIH = 2.4 VI
Input Current - Low Logic State IlL - - -250 )lA
..
(VCC = 5.25 V, VIL = 0.5 V, VIL(OEI = 0.5 VI
Output Voltage - High Logic State VOH 2.4 - - V
(VCC = 4.75 V, 10H = -20 mAl
Output Voltage - Low Logic State VOL - - 0.5 V
IIOL = 48 mAl
Output Current - High Impedance State 10Z )lA
(VCC = 5.25 V, VOH = 2.4 VI - - 100
(VCC = 5.25 V, VOL = 0.5 VI - - -100
Output Short-Circuit CUrrent lOS -30 -80 -130 mA
(Vee = 5.25 V, Vo = 0) (only one output can be shorted at a time)
Power Supply Current MC3482A/MC68B2A ICC - 130 rnA
(VCC = 5.25 VI MC34828/MC68828 150
Input Clamp Voltage V IK - - -1.2 V
(VCC = 4.75 V, 11K = -12 mAl
SWITCHING CHARACTERISTICS (V cc = 50 V, O°C <; TA <; +75°C, unless otherwIse noted,lVPlcal @T A = 25°C I
MC3482AI MC348281
Characteristics Symbol MC6882A MC68828 Unit
Min Typ Max Min Typ Max
Propagation Delay Times ns
Data to Output
Low to High tpLH(DI
CL=50pF 40 90 16 40 90 16
CL = 250 pF _. 12 20 - 12 20
CL = 375 pF - 14 22 - 14 22
CL = 500 pF 10 16 24 10 16 24
High to Low tpHL(DI
CL = 50 pF 4.0 B.O 16 40 B.O 16
CL = 250 pF - 15 22 - 15 22
CL = 375 pF -- 18 25 -- 17 24
CL = 500 pF 16 21 28 14 18 27
Propagation Delay Times ns
Latch Disable (Low to High)
to Output
Low to High tPLH(LI
CL=50pF - 22 30 - 18 30
High to Low tpHLILI
CL = 50 pF - 23 30 - 14 25
Propagation Delay Times ns
(CL = 20 pFI
High Output Level to High Impedance tPHZ(OEI - 8.0 15 - 6.0 13
Low Output to High Impedance tpLZ(OEI - 20 27 - 15 23
High Impedance to High Output tPZH(OEI - 9.0 16 - 11 18
High Impedance to Low Output tPZL(OEI - 13 20 - 9.0 16
4-29
MC~A/MC~A·MC~B/MC~B
AC SETUP CHARACTERISTICS (V cc = 5.0 V, o°c.;; T A ';; +75°C, unless otherwise noted, typical@T A = 25°C.)
MC3482AI MC3482BI
Characteristic Symbol MC6882A MC6882B Unit
Min Typ Max Min Typ Max
Setup Time ",u(D) 10 0 - 7.0 0 - ns
(Data to Negative Going Latch Enable)
Hold Time th(D) 10 - - B.O - - ns
(Data to Negative Going Latch Enable)
Minimum Latch Enable Pulse Width tWILl - 15 - - 15 - ns
(High or Low)
.. MC3482A/MC6882A MC3482B/MC6882B
Output
Enable 1 Vee
Out 5
Output .output
Enable Latch Input Output Enable latch Input Output
0 1 0 1 0 1 0 0
0 1 1 0 0 1 1 1
0 0 X Qo 0 0 X Qo
1 X X Z 1 X X Z
4-30
MC~A/MC~2A·MC~B/MC~B
Output
MC34B2B/MC6BB2B _ _ _J
10k
C L Includes Probe and
Jig Capacitance
1 Closed for
tpHZ(OE),tPZH(OE) only
Input Pulse Conditions
tTHL"" tTLH < 5 ns
f= 10 MHz
MILLIMETERS INCHES
NOTES DIM MIN MAX MIN MAX
1 LEADS WITHIN 025 rnm (0 010) A 2388 25.15 0940 0990
CIA, TRUE POSITION AT
•
•
660 749 0260 0295
SEATING PLANE, AT MAXIMUM C 381 5.08 0.150 0.200
MATERIAL CONDITION 0 038 0.66 0015 0.022
2 DIM L TO CENTER OF LEADS 14 I
FIGURE 3 - WAVE FORMS FOR AC SETUP AND WHEN FORMED PARALLEL 0 2.54BSC 0.100 sse
3 DIM A At-.lO B INCLUOES 0.51 127 0.020 0.050
LATCH DISABLE TO OUTPUT DELAY MENISCUS J 0.20 0.30 0.008 0.012
.1 408 0.125 0.160
L 7.B2BSC 0.300 BSC
0' l' 0' 15'
N 025 1.02 .00 0.40
Latch
Input
(Data) ""'''''''''''''''+';''':~
tpLH(DI t
Output 1.5 V I --------
4-31
® MOTOROLA MC3870
Advance Inf'orxnation
MOS
SINGLE-CHIP MICRO CONTROLLER IN-CHANNEL, SILICON-GATE
DEPLETION LOAD)
The MC3870 IS a monolithic 8-blt microcomputer utilizing lon-
Implanted, N-channel silicon-gate technology and advanced CirCUit SINGLE-CHIP
design techniques The single-chip 3870 offers maximum cost effec-
MICROCONTROllER
tiveness "' a wide range of control and logic replacement applications
,
• Software Compatible with F8 Family
• 2048 Byte Mask Programmable ROM
• 64 Byte Scratchpad RAM
• 32 Bits 14 Ports) TTL-Compatible 1/0 L SUFFIX
CERAMIC PACKAGE
• Programmable Binary Timer CASE 715
Interval T'mer Mode
Pulse Width Measurement Mode
~ '
Event Counter Mode
,,' SSUFFIX
• External Interrup'
, " I CERDIP PACKAGE
• Crystal, LC, RC, External ,l'
II
I \ I, I ' CASE 734
• Low Power 1275 mW Typ )
~"l"
• Single + 5 Volt ± 10% Power Supply
XTL 1
ABSOLUTE MAXIMUM RATINGS'
Operating Temperature XTL 2
o to 70'C 40 to + 85'C PO-O EXT INT
Temperature Under Bias - 20°C to + 85°C - 50°C to + 100°C
PO-1 P1-0
Storage Temperature - 65°C to + 150°C - 65°C to + 150°C
PO-2 P1-1
Voltage on any Pin with Respect to Ground
-10Vto+7V -10Vto+7V
(Except open-drain pins and TEST) PO-3 P1-2
Voltage on TEST with Respect to Ground -10 V to +9 V -10 V to +9 V P1-3
STROBE
Voltage to Open-Drain P:ns with Respect
-1 0 V to + 13 5 V -1 0 V to + 135 V P4-0 P5-0
to Ground
Power DISSipation 15W 15W P4-1 P5-1
Power DISSipation by any One 110 Pin 60 mW 60 mW P5-2
P4-2
Power DISSipation by All 110 Pins 600 mW 600 mW
P4-3 P5-3
• Stresses above those listed under" Absolute Maxtmurn Ratings" may cause permanent dam- P44 P5-4
age to the devIce ThiS IS a stress rating only and functional operation of the deVice at these or
P4-5 P5-5
any other conditions above those Indicated In the operatlona! sections of thiS specification IS
not Implied Exposure to absolute maximum rating conditions for extended periods may af- P4-6 P5-6
fect deVice reliability
P4-7 P5-7
PO-7 P1-7
PO-6 P1-6
P1-5
P1-4
TEST
4·32
MC3870
ROM
Address
Registers
PO, P, OC, DCl
Indirect Accumulator
Scratchpad and
Address Status Control
Logic
..
Register
Test
AC CHARACTERISTICS
4-33
MC3870
II 10HS
10L
10LS
ICC
PD
STROBE OU1PUl High Current
Output Low Current
STROBE Output Low Current
Power Supply Current
Power DISSipation
-300
18
50
-
-
-
-
-
85
400
-270
165
45
-
-
-
-
-
110
525
~A VOL =24 V
mA VOL=04V
rnA VOL=04V
rnA Outputs Open
mW Oulputs Open
RESET and EXT INT have Internal Schmitt triggers giVing mmlmum 0 2 V hysteresIs
Power dlsslpal10n for I/O PinS IS calculated by EIVCC- VILI qllLI! = EIVCC- VOHlllioHI! = EIVOLIIIOLI
TIMER AC CHARACTERISTICS
Definitions
Error:::: Indicated time value ~ actual time value
tpse:::: t~ x Prescale Value
NOTES
1 All times which entail loading, starting, or stopping the Timer are referenced from the end of the last machine cycle of the OUT or OUTS
Instruction
All times which entail reading the Timer are referenced from the end of the last machine cycle of the IN or INS Instruction
3 All times which entail the generation of an Interrupt request are referenced from the start of the machine cycle In which the appropriate in-
terrupt request latch IS set Additional time may elapse If the Interrupt request occurs dUring a pflvlleged or multlcycle Instruction
4 Error may be cumulative If operation IS repetitively performed
4-34
MC3870
+ 100
~
~
~
"'" L.oI
"'" 1"'0 I~
.....
,...
OUTPUT VOLT AGE
OUTPUT VOLTAGE
-1.5
FIGURE 5 - STANDARD 110 PORT SOURCE CAPABILITY
(TYPICALATVCC=5V, TA=25°C)
FIGURE 6 - DIRECT DRIVE I/O PORT SOURCE CAPABILITY
-10
(TYPICALATVCC~5V. TA=25°C)
II
1I -1.0
....
1-"'"
I
~
~
"" ....
!§ -0.5
~ "'"
""
~
OUTPUT VOLTAGE
"
4
OUTPUT VOLTAGE
10 0
+6 0
.
e
+5 0
..
<.>
I
... ... I ..
1+40 50
i'J.As7lC CERAMIC
ffi
1+3 0
"j
a
~+2
v; ~
... ...,1""
PoI/O-mW
OUTPUT VOLTAGE
4·35
MC3870
90
80 /'Il1o
l""
70 f'Io.
~
I"'"
'" 60
E l!!!o ~ r'"
I
I" r'"
050
9 I"I'!!0 "'"
40 "" i"o
30 ""
20
-40 -20 +20 +40 +60 +80 +100
TEMPERATURE TA - °c
• External Clock
FIGURE 10 - AC TIMING DIAGRAM
tSL J
4·36
MC3870
Port Addr
r
311:'"
Port Data
rp Next
rf..---J" '-
IN or INS
'Cycle Timing Op Code Placed on Driven on to Op Code
Shown for Fetched Data Bus Data Bus Fetched
4 MHz External
Clock
Port PillS )( IX
1 ~s
Setup
Max
•
t SilO
A Input on Port 4 or 5
Port PinS
Internal
1 ~s
Max
Setup
1
Max
"s
C. Inpot on Port 0 or 1 D Output on Port 0, 1
4-37
MC3870
3870 CLOCKS
The time base for the 3870 may originate from one of four system-to-system IS unsurpassed The 3870 has an Internal
sources The four configurations are shown In Figure 12 dlvlde-by-two to allow the use of inexpenSive and Widely
There IS an Internal 26 pF capacitor between XTL 1 and GND available TV Color Burst Crystals 1358 MHzl The follOWing
and an Internal 26 pF capacitor between XTL 2 and GND crystal parameters are suggested for 3870 applications
Thus, external capacitors are not necessarily required In all
external clock modes the external time-base frequency IS a) Parallel Resonance, Fundamental Mode AT-Cut.
diVided by two to form the Internal", clock. The external H C-33/ I' holder
clock frequency IS diVided by eight dUring short Instruction
bl Frequency Tolerance measured With 18 pF load
cycles and IS diVided by twelve dUring long Instruction cycles
(0 1% accuracy) - drive level 10 mW
as given per Instruction In the Instruction set towards the end
c) Shunt capaCItance (Col = 7 pF max
of thiS data sheet To get the total instruction cycle time,
diVide the external clock frequency by eight, Invert the d) Series reSistance IRs)
number, then multiply by the short number of cycles Then
diVide the external clock frequency by twelve and Invert the
number IYx) then multiply by the number of long cycles f= 1 MHz Rs = 550 ohms max
Add these two numbers to get the number of nanoseconds
f=2MHz Rs = 300 ohms max
per Instruction for a given clock frequency
f-3 MHz Rs= 100 ohms max
•
CRYSTAL SELECTION
f=358MHz Rs= 100 ohms max
The use of a crystal as the time base IS highly recommend-
f=4MHz Rs = 100 ohms max
ed as the frequency stability and reproducability from
9 t~Lr'
Minimum R= 4 kll
..L
'T' Cexternal (optional I
AT Cut 1 - 4 MHz
Open External
..L Clock
C=26 5 pF ±2 6 pF+Cexternal
LC Mode
Re CLOCK MOOE OF MC3870
:"'~
MInimum L = 0 1 mH
MInimum Q=4O
Cexternal (optional)
MaXimum Cexternal = 30 pF
C=13pF ±13pF+Cexternal
"""""
MAXIMUM 14.5·5.5 y, 0·C.70·ti
TYPICALIYCC-5 Y, TA-25·CI
MINIMUM 14.5·5.5 y, 0·C·70·CI
-
~= ;;.. ~--
1 10 12 14 16 18 20 22
f =2 ".,fIT: EXTERNAL RESISTOR IN KILOHMS
4·38
MC3870
•
upon completion of the subroutme or the Interrupt routine
ecution begins at $000
The Data Counter IDCI,s used to address data tables ThiS
register IS auto-Incrementing Of the two data counters only
EXT/INT
DC can access the ROM However, the XDC Instruction
ThiS Input IS an external Interrupt Its active state IS soft-
allows DC and DCl to be exchanged
ware programmable The Input IS also used In conlunctlon
ASSOCiated With the address registers IS an 11-blt Ad-
with the timer for pulse width measurement and event coun-
der/lncrementer ThiS logiC elerr.ent IS used to Increment PO
ting or DC when required an I ,s also used to add displacements
to PO on relative branches or to add the data bus contents to
XTL 1 AND XTL 2
DC In the ADC IAdd Data Counterl Instruction
These two Inputs Interface a crystal 11 to 4 MHzl, LC net-
work, RC network, or an external Single-phase clock to the
microcomputer
2048 x 8 ROM
The microcomputer program and data constants are
TEST
stored In the program ROM When a ROM access IS re-
TEST IS an Input used only In testing the MC3870 For nor- qUired, the appropriate address register (PO or DCI IS gated
mal CIrCUit functIOnality, thiS pin IS left unconnected or may
onto the ROM address bus and the ROM output IS gated on-
be grounded to the main data bus The first byte In the ROM IS location
zero
Vee
ThiS IS the power supply Input 1+5 V ± 10% I
SCRATCHPAD AND IS
Pin Name Description Type The scratch pad proVides 64 8-blt registers which may be
PO-O - PO-7 I/O Port 0 Bidirectional used as general purpose RAM memory The Indirect Scrat-
rn Pl-7 I/O Port 1 BidirectIOnal chpad Address Register liSI IS a 6-blt register used to ad-
dress the 64 registers All 64 registers may be accessed uSing
P4-0 P4-7 I/O Port 4 81dlrectlonal
IS In addition, the lower order 12 registers may also be
P5-0 - P5-7 I/O Port 5 Bldlrecllonal
directly addressed
STROBE Ready Strobe Output IS can be visualized as holdIng two octal digits ThiS diVI-
EXT INT External Interrupt Input sIon of I S IS lmportant since a number of instructIons Incre-
RESET External Reset Input ment or decrement only the least-slgplilcant three bits of IS
TEST Test Line Input when referenCing scratchpad bytes via IS ThiS makes It easy
to reference a buffer consisting of contiguous scratch pad
XTL 1, XTL 2 Time Base Input
bytes For example, when the low order octal digit IS in-
VCC, GND Power Supply Lines Input cremented or decremented I S IS Incremented from octal 27
10'28'1 to 0'20'1 or IS decremented from 0'20' to 0'27' ThiS
feature of the I S IS very useful In many program sequences
All SIX bits of IS may be loaded at one time or either half may
3870 ARCHITECTURE
be loaded Independently
ThiS section describes the baSIC funcllonal elements of the Scratchpad registers 9 through 15 (decimal I are given
3870 as shown In the block dIagram of F,gure 2 A program- mnemolliC names IJ, H, K, and QI because of speCial
ming model IS shown In Figure 13 linkages between these registers and other registers such as
4-39
MC3870
the Stack Register These special linkages facilitate the Im- Just, add with carry, decrement, and Increment The logiC
plementation of multi-level Interrupts and subroullne operations that can be performed are AND, OR, EXCLUSIVE
nesting For example, the instruction LR K, P stores the OR, "l's" complement, shift right, and shift left Besides
lower eight bits of the Stack Register Into register 13 (K providing the result on the result bus, the ALU also prOVides
lower or KLI and stores the upper three bits of P Into register four Signals representing the status of the result These
12 (K upper or KU) Signals, stored 'r the Status Register (W), represent
CARRY, OVERFLOW, SIGN, and ZERO condition of the
result of the operation
ARITHMETIC AND LOGIC UNIT (ALU)
After receiving commands from the main control logic, the ACCUMULATOR (A)
ALU performs the reqUired arithmetic or logiC operations The Accumulator (A) IS the principal register for data
(using the data presented on the two Input buses) and pru- manipulation within the 3870 The A serves as one Input to
vldes the result on the result bus The arithmetic operations the ALU for arithmetiC or logical operations The result of
that can be performed In the ALU are binary add, deCimal ad- ALU operations are stored In the A
Accumulator
Indirect
A Scratchpad
Address Aeglster Scratch pad Dec Hex OCI
7 __ 8BIIs_0
I I~ I o o
H
o
•
Status ISU ISl
Register 5 32 0
IWI _68,ts _ _
UHzlclsl
I 0 Z C S Program
J
HU
q
10
9
A
11
12
N V E A I Counter HL 11 B 13
TEA A G
A A 0
C L
N 0
F
A N
Y
I
10
POU
PO
8 7
I POL
I
0
KU
Kl
QU
12
13
14
C
o
E
14
15
16
TW -118115_ Ql 15 17
A
L
Stack I
4--5B,ts-0
I
Binary
Timer
Port 7
7 __ 8 Bits --0
10
PU
- 1 1 Blts_
Register
8 7
P
I Pl
I
0
§
7_8B,ts_0
61
62
63
3D
3E
3F
75
76
77
Interrupt
Control Port
I Port 6
Data
Counter Main Memory
I I
DC Memory Dec HEX
7--88,ts--0
R
DCU DCl 0 0
I
10 8 7 0
110 Ports
_ _ _ 11 Bits - - -
Port 5 A
0
I I
Aux Data M I I
~
Counter
Port 4
DCl
lOCI U I DCl l 2046 7FE
Port 1 10 8 7 o 2047 7FF
_IIB,ts_
PortO
4-40
MC3870
1/0 PORTS
Sign The MC3870 proVides four complete bidirectional In-
putlOutput ports These are ports 0,1,4, and 5 In addition,
Carry the Interrupt Control Port IS addressed as port 6 and the
Zero binary timer IS addressed as pOI t 7 An output instruction
lOUT or OUTSI causes the contents of A to be latched Into
Overflow 11m dddressed port An Input instruction (IN or INSI transfers
Interrupt Control the cuntents of the port to A (port 6 IS an exception w~lch IS
Sit lJ(Jscflbed later) The schematiC of an I/O pin and lVJllahl8
(llJ1PlJ\ drive options are shown In Figure 18
Summary of Status Bits An output ready strobe IS associated With port 4 ThiS flag
may be used to signal a penpheral device that the MC3870
•
OVERFLOW~ CarrY7<1l CARRY6
has Just completed an output of new data to port 4 The
ZERO ~ ALU7AALU6AALU5AALU4AALU3AALU2A strobe provides a Single low pulse shortly after the output
Arn1
AALU O operation IS completely finished, so either edge may be used
CARRY ~ CARI'Y7 to signal the penpheral STROBE may also be used as an In-
SIGN~ALU7
put strobe Simply by dOing a dummy output of H '00' strobe
to port 4 after completing the Input operation
c0
~ Port
~ I/O
t: ;;
'"
c
0
U
0
11. Il. Pin
II:
0
& --']
II:
0
"0
~
1 n Typ
4·41
MC3870
TIMER AND INTERRUPT CONTROL PORT reading the Interrupt Control Port (port 61 bit 7 of the Ac-
The Timer IS an 8-blt binary down counter which IS soft- cumulator IS loaded With the actual logiC level being applied
ware programmable to operate In one of three modes the In- to the EXT INT pin, regardless of the status of ICP b,t 2 (the
terval Timer Mode, the Pulse Width Measurement Mode, or eXT INT Active Level b,tl, that IS, If EXT INT IS a + 5 V blr 7
the Event Counter Mode As shown In Figure 16, associated of the Accumulator IS set to a log,e "1", but If EXT INT IS at
with the Timer are an 8-blt register called the Interurpt con- G NO then Accumulator bit 7 IS reset to logiC "0" ThiS
trol port, a programmable prescaler, and an 8-blt modulo-N capability IS useful In establishing a high speed polled hand-
register A functIOnal logiC dlag,am IS shown In Figure 17 shake procedure or for us,ng EXT INT as an extra Input pin 'f
external Interrupts are not requrred and the Timer IS used on-
INTERRUPT CONTROL PORT (PORT 6) ly In the Interval Timer Mode However, If It 's deSirable to
read the contents of the ICP then one of the 64 scratch pad
The deSired timer mode, prescale value, start,ng and stop-
registers or one byte of RAM may be used to save a copy of
ping the t,mer, act,ve level of the EXT INT pin, and local
whatever IS written to the ICP
enabhng or disabling of Interrupts are selected by outputtrr,g
the proper b't conf'gurat,on from the Accumulator to the In- The rate at which the timer IS clocked In the Internal Timer
terrupt Control Port (port 61 w'th an OUT or OUTS Instruc- Mode IS determined by the frequency of an Internal ¢ clock
tion Bits Within the Interrupt Control Port are defined as and by the diVISion value selected for the prescaler !The In-
follows
Bit °- External Interrupt Enable
Bit 1 - Timer Interrupt Enable
ternal ¢ clock operates at one-half the external time-base fre-
quencyl If ICP bit 5 IS set and bits 6 and 7 are cleared, the
prescaler diVides ¢ by 2 LikeWise, If bit 6 or 7 's individually
Bit 2 - EXT INT Act,ve Level set, the prescaler diVides ¢ by 5 or 20 respectively Combina-
Bit 3 - Startl Stop Timer tions of bits 5, 6, and 7 may also be selected For example, If
Bit 4 - Pulse Wldthllnterval Timer bits 5 and 7 are set while 6 IS cleared the prescale, Will diVide
•
B't 5 -- - 2 Prescale by 40 Thus, possible prescaler values are - 2, -- 5, - 10,
Bit 6 - - 5 Prescale - 20, - 40, - 100, and - 200
B,t 7 - - 20 Prescale
A spec,al situation exrsts when reading the Interrupt Con- Any of three conditions will cause the prescaler to be
trol Port (With IN or INS ,nstructlonl The Accumulator IS nor reset whenever the timer IS stopped by clearing ICP bit 3,
loaded With the content of the ICP, Instead, Accumulator
°
bits through 6 are loaded With "D's" while bit 7 IS loaded
With the logiC level being applied to the EXT INT pin, thus
execution of an output Instruction 10 Port 7, (the timer IS
assigned port address 71, or on the tra,ltng edge transition of
the EXT INT pin when In the Pulse Width Measurement
allOWing the status of EXT INT to be determined without the Mode These last two conditions are explained In more detail
necessity of servIcing an external Interrupt request When below
Timer
External Timer
Prescaler Clock Interrupt
Time 8-Blt Down Counter
Request
Base (Port 71
+2,5,10,20,40,100, or 200 Latch
Modulo-N Register
Interrupt a-Bits
Control
Port
E
(Port 61
7 6 5 4 3 2
External
~
-:-2 Prescale _0 0
Latch
75 Prescale
-;-10 Prescale
_0
-0 , , 0 Timer Interrupt Enable
- ,,
-- ,
-;-20 Prescale 0 0 EXT INT Active Level
740 Prescale 0
-:-100 Prescale 0 Start/Stop Timer
-:-200 Prescale
' - - - - - - - - _ ... Pulse Width/Interval Timer
4·42
FIGURE 17 - MC3870 TIMER/INTERRUPT FUNCTIONAL DIAGRAM
~
(")
~
From Interrupt Control Port
------------------- \
62 • 64 • 63 '65 , 66 , 67 .'INS 7' • 60 , 61 o
External
~ ~ Acknowledge
.. Timer
~ Interrupt
.i:. 'OUTS 7'
c.l
'I' = Pulse Width Mode
External J"L
Interrupt r.-----JI
Input
JL.....
'DI'
Acknowledge
External
Interrupt
II
MC3870
An OUT or OUTS Instruction to Port 7 will load the con- definitely and Will resume counting when bit 3 IS again set
tent of the Accumulator to both the Timer and the 8-blt Recall however that the prescaler IS reset whenever the
modulo-N register, reset the prescaler, and clear any Timer IS stopped, thus a series of starting and stoPPing will
preViously stored timer Interrupt request As preViously result In a cumulative truncation error
noted, the Timer IS an 8-blt down counter which IS clocked A summary of other timer errors IS given In the timing sec-
by the prescaler In the Interval Timer mode and In the Pulse tion of their speCification For a free running timer In the In-
Width Measurement Mode The prescaler IS not used In the terval Timer Mode the time Interval between any two inter-
Event Counter Mode The modulo-N register IS a buffer rupt requests may be In error by ± 6 '" clock periods although
whose function IS to save the value which was most recently the cumulative error over many Intervals IS zero The
outputted to Port 7 The modulo-N register IS used In an prescaler and Timer generate precise Intervals for setting the
three timer modes timer Interrupt request latch but the time out may occur at
any time Within a machine cycle IThere dee two types of
Interval Timer Mode - When ICP bit 4 IS cleared 1I0gic 01 machine cycles, short cycles which consist of 4 '" clock
and at least one prescale bit IS set the Timer operates In the periods and long cycles which consist of 6 '" clock pen ods 1
Interval Timer Mode when bit 3 of the ICP IS set the Timer In,<'rrupt requests 3re synchronIZed With the Internal
Will start counting down froM the modulo-N value After machine clock thus, giving nse to the pOSSible ± 6", error
counting down to H '01', the Timer returns to the modulo-N Additional errors may arise due to the Interrupt request oc-
value at the next count On the transition from H '01' to H 'N' cunng while a priVileged instruction or multlcycle instruction
the Timer sets a timer Interrut request latch Note that the in- IS being executed Nevertheless, for most applications all of
terrupt request latch IS set by the transition to H 'N' and not the above errors are negllblble, espeCially If the deSired time
be the presence of H 'N' In the timer, thus allOWing a full 256 Interval IS greater than 1 ms
counts If the modulo-N register IS preset to H '00' If bit 1 of
•
the ICP IS set, the Interrept request .s passed on to the CPU Pulse Width Measurement Mode - When ICP bit 4 IS set
section of the MC3870 However, If bit 1 of the ICP IS a logic Iloglc 11 and at least one prescale bit IS set, the Timer
o the Interrupt request IS not passed on to the CPU section operates In the Pulse Width Measurement Mode ThiS mode
but the Interrupt request latch remains set If ICP bit 1 IS IS used for accurately measuring the duration of a pulse ap-
subsequently set, the Interrupt request will then be passed plied to the EXT INT pin The Timer IS stopped and the
on to the CPU section I Recall from the discussion of the prescaler IS reset whenever EXT INT IS at ItS Inactive level
Status Register's Interrupt Control Bit that the Interrupt re- The active level of EXT INT IS defined by ICP bit 2, If cleared,
quest will be acknowledged by the CPU section only If ICB IS EXT INT IS active low, If set EXT INT IS active high If ICP bit
set) Only two events can reset the timer Interrupt request 3 IS set, the prescaler and Timer will start counting when EXT
latch when the timer Interrupt request latch IS acknowledg- INT tranSitions to the active level When EXT INT returns to
the inactive level the Timer then stops, the prescaler resets,
ed by the CPU section, or when a new load of the modulo-N
register IS performed and If lep bit a IS set an external Interrupt request latch IS set
ConSider an example In which the modulo-N register IS IUnl,ke timer Interrupts, external Interrupts are not latched If
loaded With H '64' Ideclmal 100) The timer Interrupt request the ICP Interrupt Enable bit IS not set 1
latch will be set at the l00th count follOWing the timer start As In the Interval Timer Mode, the Timer may be read at
and the timer Interrupt request latch Will repeatedly be set on any time, may be stopped at any time by clearing ICP bit 3,
precise 100 counter Intervals If the prescaler IS set at - 40 the prescaler and ICP bit 1 function as preViously deSCribed,
the timer Interrupt request latch will be set every 400 '" clock and the Timer stili functions as an 8-blt binary down counter
penods For a 2 MHz", clock 14 MHz time-base freuqencyl With the timer Interrupt request latch being set on the
thiS Will produce 2 millisecond Intervals Timer's transition fre,m H '01' to H 'N' Note that the EXT
The range of pOSSible Intervals IS from 2 to 51,200 '" clock INT pin has nothing to do With loading the Timer, ItS action IS
pen ods Ill's to 25 6 ms for a 2 MHz clockl However, ap- that of automatically starting and stoppmg the Timer and of
proXimately 50 '" penods IS a practical minimum because the generating external Interrupts Pulse Widths longer than the
time between setting the Interrupt request latch and the ex- prescale value times the modulo-N value are easily measured
ecution of the first Instruction of the Interrupt service routine by uSing the timer Interrupt service routine to store the
IS at least 29 '" periods Ithe response time IS dependent upon number of timer Interrupts In one or more scratch pad
how many priVileged instructions are encountered when the registers
request occursl, 29 IS based on the timer Interrupt occurlng As for accuracy, the actual pulse duration IS tYPically
at the beginning of a non-prlvllaged short instruction To slightly longer than the measured value because the status of
establish time Intervals greater than 51,200 '" clock penods IS the prescaler IS not readable and IS reset when the Timer IS
a Simple matter of uSing the timer Interrupt serVice routine to stopped Thus, for maximum accuracy, It IS adVisable to use
count the number of Interrupts, saving the result In one or a small diVISion setting for the prescaler
more of the scratch pad registers until the deSired Interval IS
achieved With thiS technique VIrtually any time Interval, or Event Counter Mode - When ICP bit 4 IS cleared and all
several time Intervals, may be generated prescale bits IICP bits 5, 6, and 71 are cleared, the Timer
The Timer may be read at any time and In any mode uSing operates In the Event Counter Mode ThiS mode IS used for
an Input instruction liN 7 or INS 71 and may take place "on counting pulses applied to the EXT INT pin If ICP bit 31s set.
the fly" Without Interfering With normal timer operatlcn the Timer Will decrement on each transition from the inactive
Also, the Timer may be stopped at any time by clearing bit 3 level to the active level of the EXT INT pm The prescaler IS
of the ICP The Timer will hold ItS current contents In- not used In thiS mode, but as In the other two timer modes,
4-44
MC3870
the Timer may be read at any time, may be stopped at any add I ess for a timer Interrupt IS H '020' The vector address
time by clearing ICP bit 3, ICP bit 1 functions previously for external Interrupts IS H 'DAD' After the vector address IS
described, and the timer Interrupt request latch IS set on the passed to the Program Counter, the CPU section sends an
Timer's transition from H '01' to H 'N' acknowledge Signal to the appropriate Interrupt request latch
Normally ICP bit 0 should be kept cleared In the Event which clears that latch The execution of the Interrupt ser-
Counter Mode, otherWise, external Interrupts Will be vice routine Will then commence The return address of the
generated on the transition from the inactive level to the ac- Original program IS automatically saved In the Stack Register,
tive level of the EXT INT pin P
For the Event Counter Mode, the minimum pulse Width re-
qUired on EXT INT IS 2 '" clock periods and the minimum In- The Interrupt Control Bit of W IStatus Register) IS
automatically reset when an Interrupt request IS acknowledg-
active time IS 2 '" clock periods, therefore, the maXI~lum
repetition rate IS 500 kHz ed It IS then the programmer's responsibility to determine
when ICB Will again be set Iby executing an EI instruction)
External Interrupts - When the timer IS In the Interval ThiS action prevents an Interrupt service routine from being
Timer Mode the EXT INT pin IS available for non-timer Interrupted unless the programmer so deSIres
related Interrupts If ICP bit 0 IS set, an external Interrupt re- Figure 18 details the Interrupt sequence which occurs
Quest latch IS set when there IS a transition from the inactive whether the Interrupt request IS from an external source via
level to the active level of EXT INT IEXT INf IS an edge- EXT INT or from the MC3870's Internal timer tvents are
triggered Input) The Interrupt request IS latched until either labeled With the letters A through G and are deSCribed
acknowledged by the CPU section or untillCP bit 0 IS cleared below
lunllke timer Interrupt requests which remain latched even
when ICP bit 1 IS clearedl External Interrupts are handled In Event A - An Interrupt request must satisfy a hold time
•
the same fashion when the Timer IS In the Pulse Width requirement as speCified In the AC Characteristics In order to
Measurement Mode or In th8 Event Counter Mode, except guarantee that It IS ,alid on the rising edge of the WRITE
that only In the Pulse Width Measurement Mode the external clock
Interrupt request latch IS set on the trailing edge of EXT I NT,
that IS, on the tranSItIOn from the active level to the Inactive Event B - Event B represents the instruction being ex-
level ecuted when the Interrupt occurs The last cycle of B IS nor-
mally the InstructIOn fetch for the next cycle However, If B IS
INTERRUPT HANDLING not a privileged Instruction al1d the CPU's Interrupt Control
When either a timer or an external Interrupt request IS Bit IS set, then the last cycle becomes a "freeze" cycle rather
communicated to the CPU section of the MC3870, It will be thar, a fetch At the end of the freeze cycle the Interrupt re-
acknowledged and processed at th6 completion of the first quest latches are Inhibited from altering the Interrupt dalsy-
non-privileged InstructIOn If the Interrupt Control Bit of the chain so that suffiCient time will be allowed for the dalsy-
Status Register IS S6t If the Interrupt Control Bit IS not set, chain to settle Ilf B IS a priVileged instruction, the instruction
the Interrupt request Will continue until either the Interrupt fetch IS not replaced by a freeze cycle, Instead, the fetch IS
Control Bit IS set and the CPU section acknowledges the In- performed and the next instructIOn IS executed Although
terrupt or until the Interrupt request IS cleared as previously unlikely to be encountered, a series of privileged Instructions
deSCribed Will be sequentially executed Without Interrupt One more in-
If there IS both a tlnler Interrupt request and an external In- struction, called a 'protected' Instruction, Will always be ex-
terrupt request when the CPU section starts to process the ecuted after the last priVileged Instruction The last cycle of
requests, the timer Interrupt IS handled first the protected Instruction then performs the freeze i
When an Interrupt IS allowed the CPU section Will request The dashed lines on EXT INT Illustrate the last opportunity
that the Interrupting element pass ItS Interl upt vector ad- for EXT INT to cause the last cycle of a non-protected In-
dress to the Program Counter via the data bus The vector structIOn to becorne a freeze cycle
Freeze Cycle
INT REO
(Internal)
4·45
MC3870
The freeze cycle IS a short cycle 14 '" clock periods) In all rupt response time IS 3 long cycles plus 2 short cycles plus
cases except where B IS the Decrement Scratch pad IIlStruC- one WRITE clock pulse Width plus a setup time of EXT INT
tlon, In which case the freeze cycle IS a long cycle 16", clock prior to the leading edge of the WRITE pulse - a total of 27
periods). '" clock periods plus the setup time At a 2 MHz", thiS IS
INT REO goes Iowan the next negative edge of WRITE If 14251's Although the maximum could theoretically be In-
both PRIIN IS low and the appropriate Interrupt enable bit of finite, a practical maximum IS 35 I's Ibased on the Interrupt
the Interrupt Control Port IS set. Both INT REO and WRITE request occurring near the beginning at a PI and LR K, P se-
are Internal signals quence)
Event C - A NO-OP long cycle to allow time for the Inter· POWER-ON RESET
nal priority chain to settle The intent of the Power-On Reset CIrCUitry on the MC3870
IS to automatically reset the deVice follOWing a tYPical power-
Event 0 - The Program Counter IPO) IS pushed I') tne up SituatIOn, thus saving external reset circuitry In many ap-
stack register IP) In order to save the return address The In- plications ThiS circuitry IS not guaranteed 10 sense a" Brown
terrupt Circuitry places the lower 8 bits of the Interrupt vector Out" lIow voltage) condition nor IS It guaranteed to operate
address onto the data bus This IS always a long cycle under all pOSSible power-on Situations
Three conditions are reqUired before the MC387C will leave
Event E - A long cycle In which the Interrupt CIrcuitry the reset state and begin operation Refer to Figure 19 as an
places the upper 8 bits of the Interrupt vector address onto aid to the follOWing deSCriptIOns The On-Chip V CC detector
the data bus senses a minimum value of V CC before It wl:1 allow the
MC3870 to operate The threshold of thiS detector IS set by
Event F - A short cycle ,n which the interrupting Interrupt analog Circuitry because a stable voltage reference IS not
request latch IS cleared. Also, the CPU's Interrupt Control Bit available With n-channel MaS processing. Processing varia-
To Internal
Wnte 3870 LogiC
Reset State = 1
4-46
MC3870
start to function If the Input to the delay CirCUit IS high, Into Vibrational motion ThiS time IS basically dependent on
tYPically after 100 cycles of the WRITE clock (800 cycles of the frequency Imass) of the crystal 4 MHz crystals tYPically
the external clock) the output of the delay CIrcuit will go high reqUire about 2-3 ms to start while 1 MHz crystals require
allowing the MC3870 to begin execution 60-70 ms to start oscillating Of course, thiS time may vary
If VCC falls to ground for at least a few hundred greatly from crystal to crystal and IS also a function of the
nanoseconds the output of the delay CIrCUit will go low Im- power supply rise time characteristic, however, the hlgh-
mediately and the MC3870 will reset frequency crystals start faster and are definitely recommend-
The Internal logic may detect a valid V CC, bias and clocks ed II e , 3-4 MHz)
at VCC=3 5 volts and allow the MC3870 to start executing The condition of the port pins dUring the power-In-clear
after the time delay With a slowly rising power supply, the sequence IS often asked The port pins or the STR08E line
part may start running before V CC IS above 4 5 volts which IS cannot be speCified until VCC reaches 45 V and the MC3870
below the guaranteed voltage range When power-an-clear enters the RESET state 8efore thiS, the port PinS may stay
IS required with a slowly rising power supply, an external at VSS, may track VCC as It rises, or they may track VCC
capacitor must be used on the RESET pin to hold It below part way up then return to VSS (ports 4 and 5 Will go to VCC
08 volts until VCC IS stable above 45 volts (Note The op- once the clocks are running and the MC3870 has sufficient
tion to disconnect the Internal pullup resistor on RESET IS VCC to properly operate the Internal control logiC and I/O
available which allows the use of a larger external pullup portsl
resistor and a small capacitor on RESET )
In many applications It IS desirable If the unit does an EXTERNAL RESET
automatic power-an-clear, but not mandatory The unit will When RESET IS taken low, the content of the Program
have a RESET push bulton and If the unit does not power-up Counter IS pushed to the Stack Register and then the Pro-
correctly or malfunctions because of some disturbance on gram Counter and the ICB bit of the W Status Register are
•
the VCC line, the operator Will simply press RESET and cleared The original Stack Register content IS lost Ports 4,
restore normal operation It IS for these applications that the 5, 6, and 7 are loaded With H '00' The contents of all other
Internal power-an-clear circuitry was designed registers and ports are unchanged or undefined When
In some applications It IS reqUired that the microcomputer RESET IS taken high, the first program Instruction IS fetched
continue to run properly without operator Intervention after from ROM location H '000' When an external reset of the
brown-outs, power line disturbances, electrical nOise, com- MC3870 occurs, PO IS pushed Into P and the old contents of
puter malfunction due to a programming bug, or any other P are lost It must be noted that an external reset IS recog-
disturbance except a catastrophic failure of some compo- nIZed at the start of a machine cycle and not necessanly at
nent the end of an instruction Thus, If the MC3870 IS executing a
One concept used to keep computers running IS that of multi-cycle instruction, that Instruction IS not completed and
the "WATCHDOG TIMER" The computer IS programmed the contents of P upon reset may not necessanly be the ad-
to periodically reset the watchdog timer dUring the normal dress of the instruction that would have been executed next
execution of ItS program (thiS IS easily done In the MC3870 as It may, for example, pOint to an Immediate operand If the
ItS normal application IS In some control function which IS reset occurred dunng the second cycle of an LI or CI Instruc-
tYPically periodic) As long as the computer continues to ex- tion Additionally, several instructions IJMP, PI, PI, LR, PO,
ecute ItS program the watchdog timer IS continually reset Q) as well as the Interrupt acknowledge sequence modify PO
and never times out Should the computer stop executing ItS In parts That IS, they alter PO by first loading one part then
program for whatever reason, the watchdog timer will time the other and the entlfe operation takes more than one cycle
out prodUCing a RESET pulse to the CPU re-startlng execu- Should reset occur dunng thiS modification process the
tion This IS a very positive way to assUle that the computer value pushed Into P Will be part of the old PO (the as yet un-
IS dOing ItS job, Ie, executing the program It IS Important modified part) and part of the new PO (already modified
that the software driving the watchdog timer test as many part) Thus, care should be taken Iperhaps by external
functional blocks (timer, ALU, scratchpad RAM, and ports) gating) to Insure that reset does not occur at an undeSirable
of the MC3870 as possible before resetting the watchdog time if any Significance IS to be given to the contents of P
timer This IS because operation of the MC3870, With an out after a reset occurs
of specification power supply, may allow some of the func-
tions to operate correctly while other functions are not Vcc DECOUPLING
operable The MC3870 family deVices have dynamiC CIrcuitry Inter-
Motorola can guarantee correct operation of the MC3870 nally which requires a good high frequency decoupling
only while the V CC voltage remains Within ItS specified capacitor to surpress nOise on the VCC line A 0 01 ~F or
limits If proper operation of the MC3870 must be o 1 I'F ceramic capacitor should be placed between V CC and
guaranteed after a disturbance on the VCC line, then an ex- ground, located phYSically close to the MC3870 deVice ThiS
ternal CirCUit must be used to mOnitor the V CC line and pro- Will reduce nOise generated by the MC3870 to about
duce RESET to the MC3870 whenever VCC IS out of the 70-100 mV on the VCC line
specified limits
A related characteristic to power-an-clear IS the startup TEST LOGIC
time of the basIc timing element The LC and RC oscillators SpeCial test logiC IS Implemented to allow access to the in-
begin to function almost Immediately once V CC IS high ternal main data bus for test purposes
enough to allow the on-board oscillator to operate In normal operation, the TEST Pin IS unconnected or IS
IV CC = 3 5 V) Operation With a crystal IS partly mechanical connected to GND When TEST IS placed at a TTL level
and some start time IS reqUired to get the mass of the crystal (2 0 V to 2 6 V) port 4 becomes an output of the Internal data
4-47
MC3870
bus The data appearing on the port 4 pins IS logically true +5 V, bit 7 of the Accumulator IS set to a logiC "1", but, If
whereas Input data forced on port 5 must be logically false EXT INT IS at GND, then Accumulator bit 7 IS reset to logiC
When TEST IS placed at a high level (60 V to 70 V), the "0"
ports act as above and additionally the 2K x 8 program ROM
IS prevented from driVing the data bus In thiS mode, In the MC3870 (F8 COMPATIBLE) INSTRUCTION SET
operands and instructions may be forced externally through summary, the number of cycles shown are "nominal"
port 5 Instead of being accessed from the program ROM machine cycles A nominal machine cycle IS defined as 4 </J
When TEST IS In either the TTL state or the high state, clock periods, thus, requiring 21's for a 2 MHz </J clock fre-
STROBE ceases Its normal function and becomes a machine quency (4 MHz external time-base frequency)
cycle clock (,dent,cal to the F8 multi-chip system WRITE
Also, the summary uses an older nomenclature for register
clock except Inverted)
names The translation IS as follows
TlrTling complexities render the capabilities associated With
the TEST pin Impractical for use In a user's application, but PCO= PO Program Counter
these capabilities are thoroughly suffiCient to provide a rapid PCl = P Stack Register
method for thoroughly testing the MC3870 DCO= DC Data Counter
DCl = DCl Auxrlrary Data Counter
SUPPLEMENTARY NOTES The nomenclature IS used In order to be consistent With the
assembly language mnemonics
The Interrupt Control Bit of the W Status Register IS
For the MC3870, execution of an INS or OUTS Instruction
autc)matlcally reset when an Interrupt request IS acknow-
requires 2 machine cycles fur ports 0 and 1, whereas ports 4
ledgeo It IS then the programmer's responsibility to deter-
and 5 require 4 machine cycles
mine when ICB will again be set (by execution an EI instruc-
tion) ThiS action prevents an Interrupt serVice routine from
I
being Interrupted unless the programmer so deSires INSTRUCTION EXECUTION
When reading the Interrupt Control Port (port 6), bit 7 of
the Accumulator IS loaded With the actual logiC level berng ThiS section details the tlmrng and execution of the
applied to the EXT INT pin, regardless of the status of ICP MC3870 Instruction set Refer 10 Frgure 20 for a MC3870 Pro-
bit 2 (the EX r INT Active Level bit) ThiS IS, If EXT INT IS at gramming Model
4·48
FIGURE 20 - MC3870 PROGRAMMING MODEL
s:
r---------------------~--~IAOC~
EI
01
------------~~ILNK~
sl w
OUTS 7
INS' 7
Timer
i
Ports
2 1 0
LISL
1 OUTS 6
IH~
Int Cntl
-,
IS INS' 6t Ports
LlSU
Scratch pad OUTS 0, I, 4, 5
Registers I/O
a 0 INS' 0, 1,4,5 Ports
Aux Data
Counter
3
4 4
3
n~I~ ~
~
ROM
xocrl OClt I
5
6
5
6
LR
I~
MEM
2048x8 8 10
LR ~o]_
~ LR 9 11
.J,..
<0 ~~l OCI l .. I oct ~ ~
LR _r A
B
U 12
Ht::13
Data Counter
---, c
o
K~
L 15 ~S~' ~ OS'
SL4
SRI
E U 16 SR4 ROM
-Q--
F L 17 Mem
AM' 2048 x 8
Pt ~ 11 1'~ 20 AMO
H~~~
Lf:I
XM
~
3C 74
pot 3D 75 t--CM'-""
JMP PI2 h:R 3E 76
L-J-..j~ ~ Program 3F 77
LM ••
Counter Hex Octal
IDC7L-----J
Int. Vector Reset Transfers PO to P and
From
Timer
H '020' 1 .1 then clears PO, ICB BIt of W
and Ports 4, 5,6. and 7
NOTE The Instructions PI and PK are shown In two sequential parts (PI 1. PI2 and PK 1, PK2),
•
MC3870
I BRANCH INSTRUCTIONS In all conditIOnal branches PO-IPO) + 211 the test conditIOn IS not met Execution IS complete In 3 short cycles
Operation
Branch on Carry
MnemOniC
Op Code
BC
Operand
aa
Function
PO-{PQ}+l+H'aa'
If CRY~ 1
Machine
Code
82aa
Bytes
2
Cycles
Short
2
long
1
Status Bits
12 MHz <1>1 OVR ZERO CRY SIGN
4·50
MC3870
MEMORY REFERENCE INSTRUCTIONS In all Memory Reference Instructions, the Data Counter IS Incremented DC - (DCI +1
Mnemonic Machine Cycles Status Bits
Operation Operand Function
Op Code Code Byte. Short Long (2 MHz ¢I OVR ZERO CRY SIGN
Add Binary AM A-(AI+[lDCII BB 1 1 5 1/0 1/0 1/0 1/0
Add Decimal AMD A-(AI+[IDCII· 89 1/0 1/0 1/0 1/0
BCD Adlust
AND NM A-(AIAlIDCII 8A 1/0 0 1/0
Compare CM [IDCII + (AI + 1 8D 1/0 1/0 1/0 1/0
Exclusive OR XM A-IAle[lDCII 8C a 1/0 0 1/0
Load LM A-[IDCII 16
Logical OR OM A-IAlv[IDCII 88 1/0 1/0
Store 5T A-[IDCII 17
Load DC Immediate
XDC
LR
LR
DCI
DC, 0
DC, H
aaaa
IDCI=IDCll
DCU-lr141,
DCL-(r151
DCU-(rlO1,
DCL-lrlll
DC H'aaaa
2C
OF
10
2Aaaaa 12
II
Load Program Counter LR PO, 0 POU -lr141, OD 8
POL - Ir151
Load Stack Register LR P, K PU -lr121, 09
PL-r131
Return from POP PO=IPI lC
Subroutine·
Store Data Counter LR 0, DC r14-IDCUI, OE
r15-IDCLI
Store Data Counter LR H,DC rl0- DCU, 11
rl1-(OCLl
Store Stack Register LR K, P r12-IPUI, 08
r13-IPLI
4-51
MC3870
MISCELLANEOUS INSTRUCTIONS
I
.. Pnvlleged Instruction
**b= 1-blt Immediate operand
NOTES
Lower case denotes variables specified by programmer KL Register 13
KU Register 12
Function Definitions PO Program Counter
IS replaced by POL Least Significant 8 Bits of Program Counter
I I the contents of POU Most Significant 8 bits of Program Counter
I I Binary "15" complement of P Stack Register
.+
A
ArithmetiC Add (Binary or Decima))
Logical "OR" exclUSive
Logical" AND"
PL
PU
a
Least Significant 8 bits of Program Counter
Most Significant 8 bits of Active Stack Register
Reglstels 14 and 15
Logical "OR" inclUSive aL Relgster 15
H" Hexadecimal digit au Register 14
[I II Contents of memory speCified by ( a
Scratchpad Register (any address through B)
a Address Vanable (four bits) ISee Belowl
A Accumulator W Status Register
b One bit Immediate operand
Scratchpad Addressing Modes USing IS, Ir .. O through BI
DC Data Counter (Indirect Address Register)
r= H'C' Register Addressed by IS IS IUnmodlfledl
DCl Data Counter 1 (AuXIliary Data Counter)
r= H'D' Register Addressed by IS IS Incremented
DCL Least Significant 8 bits of Data Counter Addressed
r=HT Register Addressed by IS IS Decremented
DCU Most Significant 8 bits of Data Counter Addressed
r=H'F' Illegal OP Code
H Scratchpad Register 10 and 11
I Immediate operand (four bits) Status Register
ICB Interrupt Control Bit No change In condition
IS Indirect Scratchpad Address Register 1/0 IS set to "1" or "0" depending on conditions
ISL Least Significant 3 bits of ISAR CRY Carry Flag
ISU Most Significant 3 bits of ISAR OVR Overflow Flag
Scratchpad Register 9 SIGN Sign of Result Flag
K Registers 12 and 13 ZERO Zero Flag
4-52
MC3870
•
denSity, 8-lnch, MDOS compatible flOPPies The customer
FIGURE 21 - PROM MARKING must write the binary file name and company name on the
disk with a felt-tip pee The floppies are not to be returned by
Motorola as they are used for archival storage The minimum
MDOS system files must be on the dtsk as well as the ab-
solute binary object file I ("ename La type of file) from the
MC3870 cross assembler An object file made from a
memory dump uSing the ROLLOUT command IS also ad-
missable Consider submitting a source listing as well as the
follOWing ftles filename LX IEXORclser® loadable format)
and filename S,4 IASCII Source Code) These files Will of
000 400 course be kept confidential and are used 1) to speed up the
process in house If any problems arise, and 2) to speed up
xxx:::: Customer ID our customer to factory Interface If a user finds any 30ftware
errors and needs assistance qUickly from the factory
VERIFICATION MEDIA representatives
All original pattern media IPROMs or Floppy Disk) are filed MDOS IS Motorola's Disk Operatrng System available on
for contractual purposes and are not returned A computer development svstems such as EXORCisers, or EXORsets,
listing of the ROM code Will be generated and returned along etc
4·53
MC3870
Customer Name _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Address _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Country _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Phone _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Extension _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Contact _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Options
Reset Pullup CJ No Pullup CJ
External Interrupt Pullup CJ No Pullup CJ
•
Port Options
Standard TTL Open Drain Direct DriVe
P4-0 CJ CJ Cl
P4-1 Cl CJ Cl
P4-2 Cl CJ Cl
P4-3 Cl CJ Cl
P4-4 Cl CJ Cl
P4-5 Cl CJ Cl
P4-6 Cl CJ Cl
P4-7 Cl CJ Cl
P5-0 CJ CJ Cl
P5-1 Cl CJ Cl
P5-2 Cl Cl Cl
P5-3 Cl CJ Cl
P5-4 Cl CJ Cl
P5-5 Cl Cl Cl
P5-6 Cl Cl Cl
P5-7 CJ CJ CJ
Pattern Media
Clock Mode _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
c:::J XT AL CJ RC CJ LC CJ External
Clock Freq
Temp Range _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
c:J 0-70'C CJ -40-+85'C
4-54
MC6800
® MOTOROLA
(1.0 MHzl
MC68AOO
(1.5 MHzl
MC68BOO
(2.0 MHzl
~
state, making direct memory addreSSing and multiprocessing applica-
tions realizable.
• 8-Blt Parallel Processing SSUFFIX
• .' c CERDIP PACKAGE
• Bidirectional Data Bus
~,,::~
• 16-Blt Address Bus - 64K Bytes of AddreSSing
• 72 Instructions - Vanable Length
• Seven AddreSSing Modes - Direct, Relative, Immediate, Indexed,
Extended, Implied and Accumulator
PLASTIC PACKAGE
• Vanable Length Stack
CASE 711
• Vectored Restart
• Maskable Interrupt Vector
• Separate Non-Maskable Interrupt -
•
Stack
Internal Registers Saved In
HALT TSC
1/>1 NC
TIm 1/>2
MAXIMUM RATINGS VMA OBE
ThiS device contains circuitry to protect the Inputs against damage due to high A9 16 A13
static voltages or electncal fields. however, It IS adVised that normal precautions 19 A12
Ala
be taken to aVOid application of any voltage higher than maximum-rated
voltages to thiS high-Impedance CtrCUlt Reliability of operation IS enhanced If All 20 Vss
unused Inputs are tied to an appropriate logic voltage Ie g , either VSS or VCC)
4-55
MC~MC~AOO·MC~BOO
POWER CONSIDERATIONS
DC ELECTRICAL CHARACTERISTICS (Vcc=5 0 Vdc, ±5%, Vss=O, TA=lL to TH unless otherwise noted I
•
Input High Voltage LogiC VIH VSS+20 - VCC V
</>1,</>2 VIHC VCC-06 - VCC+03
Input Low Voltage LogiC VIL VSS-03 - VSS+O 8
V
</>1,</>2 VILC VSS-03 - VSS+04
Input Leakage Current
(V,n =Ot05 25 V, Vcc=Maxl LogiC lin - 10 25 p.A
IVIn=O to 5.25 V, VCC=O V to 5 25 VI </>1,</>2 - - 100
Three-State Input Leakage Current DD-D7 20 10
liZ p.A
(VIn =0.4t02 4 V, VCC= Maxi AO-A15, R/W - - 100
Output High Voltage
ULoad= -205,.A, Vcc=Mlnl DQ.D7 VSS+24 - - V
VOH
ULoad= -l45p.A, VCC= Mini AD-A15, R/W, VMA VSS+24 - -
ULoad= -loo,.A, VCC= Mini BA VSS+24 - -
Output Low Voltage ULoad-1.6 mA, VCC- Mini VOL - - VSS+04 V
Internal Power DISSipatIOn IMeasured at T A - TLI PINT - 05 10 W
Capacitance
(V,n=O, TA=25°C, 1= 1.0MHzI </>1 - 25 35
</>2 Cin - 45 70 pF
DD-D7 - 10 125
LogiC Inputs - 65 10
AD-AI5, R/W, VMA Cout - - 12 pF
4-56
MC6800-MC680AOO-MC68BOO
~-----------------'u'------------~
tt/>f
Id
~VIHC
t/> V,LC
--j
Vov
___________________
't/>r
L =rt
I,::::
•
C=3O pF - - 250 - - 166 - - 135
Penpheral Read -Access Time
tacc=tut- (tAD+tDSR)
tacc 606 - --- 400 - -- 290 - - ns
</>2
Address
From MPU
--_"'""_________-'tacc __________~+_~
FromOa"
Memory _____ ~____________________________~2~O~V~~~st~~~~~~
or Pertpherals 08 V
4-57
MC6800· MC68AOO. MC68BOO
~-----------------------teyc----------------------~
AddreS$
F'omMPU __~~~~~~~~~~~____________________________________+1~~
v MA _ _ _ _ -f"'~
• OBe
08t8 MPU
From
~------------tEH------------~
---------------------~--~~~~r_~----~~~~----~~
Data Valid ~>------
FIGURE 4 - TYPICAL DATA BUS OUTPUT DELAY FIGURE 5 - TYPICAL READ/WRITE, VMA, AND ADDRESS
versus CAPACITIVE LOADING (TDDWI OUTPUT DELAY versus CAPACITIVE LOADING (TAD)
600 600
IOH =-205"A [email protected] 10H =-145"A max@2 4 V
IOL = 16 mA [email protected] IOL'" 1 SmA max@04V
500 VCC = 5.0V VCC = 5.0 V
500
lA = 25'C TA=25'C
- --
400 ] 400
~
,.
w
-
~ i= VMA
i= 300
>- 300 I
>-
g ,...... V- Address. RN(-- -
--
~
0 200
..- V 200
~ ~I-"" f.--
100
_I----
100
4-58
MC68OQ-MC68AOO-MC68BOO
A15
26
A14
24
A13
23
FIGURE 7 - EXPANDED BLOCK DIAGRAM
A12
22
A11
20
A10
19
A9
18
A8
17
A7
16
A6
15
A5
14
A4
13
A3
12
A2
11
A1
10
AO
9 ..
Clock, .1 3
Clock, .2 37
RESET 40
Non-Maskable Interrupt 6
HALT 2 Instruction
Interrupt Request 4 Decode
and
Three-State Control 39
Control
Data Bus Enable 36
Bus Available
Valid Memory Address 5
Read/Wrlte, R/W 34
Vcc=Pin 8 32 33
26 'IT 28 29 30 31
VSS=Plns 1, 21
D7 DB 05 04 D3 02 D1 DO
4·59
MC6800-MC68AOO-MC68BOO
Proper operation of the MPU requires that certain control Read (high) or Write (low) state. The normal standby state of
and timing signals be provided to accomplish specific func- thiS signal IS Read (high). Three-State Control going high Will
tions and that other signal lines be mOnitored to determine turn Read/Write to the off (high Impedance) state. Also,
the state of the processor. when the processor IS halted, It Will be In the off state. ThiS
output IS capable of driving one standard TTL load and
Clocks Phase One and Phase Two (4)1, 4>2) - Two pins 90 pF.
are used for a two-phase non-overlapping clock that runs at
the VCC voltage level. RESET - The RESET Input IS used to reset and start the
Figure 1 shows the microprocessor clocks. The high level MPU from a power down condition resulting from a power
IS speclfled at VIHC and the low level IS specified at VILC failure or initial start-up of the processor. This level sensitive
The allowable clock frequency IS specified by f (frequency). input can also be used to relnltlallzll the machine at any time
The minimum 4> 1 and 4>2 high level pulse Widths are specified after start-up.
by PW4>H (pulse Width high time) To guarantee the required If a high level IS detected In thiS Input, thiS will signal the
access time for the peripherals, the clock up time, tut, IS M PU to begin the reset sequence. DUring the reset se-
specified. Clock separation, td, IS measured at a maximum quence, the contents of the last two locations (FFFE, FFFF)
voltage of Vav (overlap voltage). ThiS allows for a multitude In memory Will be loaded Into the Program Counter to pOint
of clock variations at the system frequency rate. to the beginning of the reset routine. During the reset
routine, the Interrupt mask bit IS set and must be cleared
under program control before the MPU can be Interrupted by
Address Bus (AO-A15) - Sixteen pins are used for the ad- IRQ. While RESET IS low (assuming a minimum of B clock
dress bus. The-outputs are three-state bus drivers capable of cycles have occurred) the MPU output Signals will be In the
II
driving one standard TTL load and 90 pF When the output is following states: VMA= low, BA= low, Data Bus= high Im-
turned off, it IS essentially an open CircUit. ThiS permits the pedance, R/IN= high (read state), and the Address Bus Will
MPU to be used In DMA applications Putting TSC In ItS high contain the reset address FFFE. Figure 8 illustrates a power
state forces the Address bus to go Into the three-stllte mode up sequence uSing the RESET control line. After the power
supply reaches 4.75 V, a minimum of eight clock cycles are
Data Bus (DO-07) - Eight PinS are used for the data bus reqUired for the processor to stabilize In preparation for
It IS bidirectional, transferring data to and from the memory restarting During these eight cycles, VMA Will be In an In-
and peripheral deVices. It also has three-state output buffers determinate state so any deVices that are enabled by VMA
capable of driVing one standard TTL load and 130 pF Data which could accept a false write dUring thiS time (such as
Bus is placed In the three-state mode when DBE IS low. battery-backed RAM) must be disabled until VMA IS forced
low after eight cycles RESET can go high asynchronously
Data Bus Enable (OBE) - ThiS level sensitive Input is the With the system clock any time after the eighth cycle.
three-state control signal for the M PU data bus and Will
enable the bus drivers when in the high state. ThiS Input IS RE'SET timing IS shown In Figure 8 The maximum rise and
TTL compatible; however In normal operation, It would be fall transition times are speCified by tPCr and tPCf If RESET
driven by the phase two clock. During an MPU read cycle, IS high at tpcs (processor control setup time), as shown In
the data bus drivers Will be disabled Internally. When It IS Figure 8, In any given cycle then the restart sequence Will
deSired that another deVice control the data bus, such as In begin on the next cycle as shown The RESET control line
Direct Memory Access (OMA) applications, DBE should be may also be used to relnltlallze the M PU system at any time
held low. dUring ItS operation ThiS IS accomplished by pulSing RESET
If additional data setup or hold time is reqUired on an M PU low for the duration of a minimum of three complete 4>2
write, the DBE down time can be decreased, as shown In cycles. The RESET pulse can be completely asynchronous
Figure 3 (DBE"4>2). The minimum down time for DBE is With the MPU system clock and Will be recognized dUring 4>2
tDBE as shown. By skeWing DBE With respect to E, data If setup time tpcs IS met.
setup or hold time can be Increased
Interrupt Request IiRQ) - ThiS level sensitive Input re-
Bus Available (BA) - The Bus Available signal Will nor- quests that an Interrupt sequence be generated within the
mally be in the low state; when activated, It will go to the machine. The processor Will walt until It completes the cur-
high state indicating that the microprocessor has stopped rent instruction that IS bemg executed before It recognizes
and that the address bus IS available. ThiS will occur If the the request. At that time, If the Interrupt mask bit In the Con-
HALT line is In the low state or the processor IS In the WAIT dition Code Register IS not set, the mach me Will begin an m-
state as a result of the execution of a WAIT Instruction. At terrupt sequence The Index Register, Program Counter, Ac-
such time, all three-state output drivers will go to their off cumulators, and Condition Code Register are stored away on
state and other outputs to their normally Inactive level. The the stack. Next, the MPU Will respond to the Interrupt re-
processor IS removed from the WAIT state by the occurrence quest by setting the mterrupt mask bit high so that no further
of a maskable (mask bit 1= Ol or nonmaskable interrupt. ThiS interrupts may occur. At the e~d of the cycle, a 16-blt ad-
output is capable of driving one standard TTL load and dress Will be loaded that pOints to a vectoring address which
30 pF. If TSC is In the high state, Bus Available will be low. is located m memory locations FFFB and FFF9. An address
loaded at these locations causes the MPU to branch to an In-
Read/Write (R/W) - ThiS TTL compatible output signals terrupt routine in memory. Interrupt timing IS shown m
the peripherals and memory devices wether the MPU IS In a Figure g.
4·60
~
~•
FIGURE 8 - REm TIMING
I Cycle
I #1
I #2 1#5 #6 #7 #8 #9 In + lin + 21n + ~I n+41 n+51 1m + + 21m + + 31
p-
~~
~:::;. J
On
s..""'y -f 5_25 V
4_15 V
II
JJ
I
f
"t
(I
------1
_
tpcs ~
JLJLJl-J
I<
'~
f---
I
tpcs
~
(')
~•
~
RESET If Ir----/i I~,;-_ _ _ _- (')
---1 t--- tpc, ---1 I-- tPCf
~
::
:=res5 S\\\\\\\\\\\\\\\\\\\\\"""""1.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\~f=:=-'-,-="-=-'-~==-~=~--:d:,"_-J\_~~~,,"=,-=,,===
==:~~t:\m~==:'\\\\\\\Y FFFE ~f FFFE FFFE I FFFE FFFF New PC ~E
OJ
8
0 _ Bus \\\\\\\\\\\\\\\\\\\\\\\\\SW~\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\~ ~
PC 8-15 PC 0-7 FIrst
.I:>-
BA i\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\~~\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ (f 'n"'uetlan rt
m
-" ~ = Indeterminate
Cycle
#1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 #13 r #14 #15
Address
Bus
IRQ at
-~
'..-.upt
--=~~~~~~-------------=====~======~====~;=====~======~====~r=t=====~~/
~ BUS====~~====~======)(====)(====~<=====:x======)[====~<======x======)[=t====~~~~x=====~<=====:x======)( New PC 8-1SNew PC 0-7 ~Irst Inst of
~===========---I~
Address Address Interrupt Routine
RNi llllllUJ'
VMA ""till.
The HALT line must be in the high state for Interrupts to time PW</>H Without destroYing data Within the MPU TSC
be serviced. Interrupts will be latched Internally while HALT then can be used In a short Direct Memory Access IDMA)
IS low. application.
The IRO has a high-Impedance pull up device Internal to Figure 12 shows the effect of TSC on the MPU TSC must
the chip; however, a 3 kG external resistor to VCC should be have its transitions at tTSE (three-state enable) while holding
used for wire-OR and optimum control of Interrupts. </>1 high and </>2 low as shown The Address Bus and R/Vi
line will reach the high-Impedance state at tTSD (three-state
Non-Maskable Interrupt (NMII and Wait for Interrupt delay), With VMA being forced low. In this example, the
(WAil - The MC6800 is capable of handling two types of in- Data Bus IS also In the high-Impedance state while </>2 IS be-
terrupts. maskable IIRO) as described earlier, and non- Ing held low Since DBE=</>2. At thiS pOint In time, a DMA
maskable (NMIl which IS an edge sensitive Input. IRO IS transfer could occur on cycles #3 and #4. When TSC IS
maskable by the Interrupt mask In the condition code register returned low, the MPU Address and R/W lines return to the
while NMlls not maskable The handling of these Interrupts bus. Because It is too late m cycle #5 to access memory, thiS
by the M PU IS the same except that each has ItS own vector cycle IS dead and used for synchronization Program execu-
address The behaVior of the MPU when Interrupted IS tion resumes in cycle #6
shown In Figure 9 which details the MPU response to an in-
terrupt while the MPU IS executing the control program The Valid Memory Address (VMA) ~ ThiS output ,ndicates to
Interrupt shown could be either IRO or NMI and can be asyn- peripheral deVices that there IS a valid address on the address
chronous with respect to </>2 The Interrupt 'IS shown gOing bus. In normal operation, thiS signal should be utilized for
low at time tpcs In cycle #1 which precedes the first cycle of enabling peripheral mterfaces such a~ the PIA and ACIA
an Instruction (OP code fetch). ThiS Instruction IS not ex- This signal IS not three-state. One standard TTL load and
ecuted but Instead the Program Counter !PC), Index 90 pF may be directly driven by thiS active high signal.
•
Register (IX), Accumulators (ACCX), and the ConditIOn
Code Register (CCR) are pushed onto the stack. HALT - When thiS level senSitive Input IS In the low state,
The Interrupt Mask bit IS set to prevent further mterrupts. all activity In the machine Will be halted This Input is level
The address of the Interrupt service routine IS then fetched senSitive.
from FFFC, FFFD for an NMllnterrupt and from FFF8, FFF9 The HALT line proVides an Input to the MPU to allow con-
for an IRO Interrupt. Upon completion of the Interrupt ser- trol of program execution by an outSide source. If HALT IS
vice routine, the execution of RTI Will pull the PC, IX, ACCX, high, the MPU will execute the Instructions, If It is low, the
and CCR off the stack; the Interrupt Mask bit IS restored to MPU Will go to a halted or Idle mode. A response Signal, Bus
Its condition prior to Interrupts (see Figure 10) Available (BA) proVides an indication of the current MPU
Figure 11 IS a Similar interrupt sequence, except In thiS status. When BA IS low, the MPU IS In the process of ex-
case, a WAIT instruction has been executed In preparatIOn ecuting the control program; If BA IS high, the MPU has
for the Interrupt. ThiS technique speeds up the MPU's halted and all Internal activity has stopped
response to the interrupt because the stacking of the PC, IX, When BA IS high, the Address Bus, Data Bus, and R/W
ACCX, and the CCR IS already done While the MPU IS line will be In a high-impedance state, effectively removing
waiting for the Interrupt, Bus Available Will go high In- the MPU from the system bus VMA IS forced low so that the
dicating the follOWing states of the control lines VMA IS low, floating system bus will not activate any device on the bus
and the Address Bus, R/W and Data Bus are all In the high that IS enabled by VMA.
Impedance state. After the Interrupt occurs, It IS serviced as While the MPU IS halted, all program activity IS stopped,
previously described. and If either an NMI or IRO interrupt occurs, It Will be latched
A 3-10 kG external resistor to V CC should be used for wlre- into the MPU and acted on as soon as the MPU IS taken out
OR and optimum control of Interrupts. of the halted mode. If a RESET command occurs while the
MPU IS halted', the follOWing states occur' VMA= low,
MEMORY MAP FOR INTERRUPT VECTORS BA=low, Data Bus=hlgh Impedance, R/W=hlgh (read
state), and the Address Bus Will contain address FFFE as
Vector long as RESET IS low As soon as the RESET line goes high,
Description
MS LS the MPU Will go to locations FFFE and FFFF for the address
FFFE FFFF Reset of the reset routine
FFFC FFFD Non-Maskable Interrupt Figure 13 shows the timing relationships Involved when
FFFA FFFB Software Interrupt halting the MPU. The Instruction Illustrated is a one byte, 2
FFF8 FFF9 Interrupt Request cycle Instruction such as CLRA. When HALT goes low, the
Refer to Figure 10 for program flow for Interrupts
MPU will halt after completing execution of the current in-
struction. The transition of HALT'must occur tpcs before
Three-State Control (TSC) - When the level sensitive the trailing edge of </>1 of the last cycle of an Instruction
Three-State Control (TSC) line IS a logiC "1", the Address (point A of Figure 13). HALT must not go low any time later
Bus and the R/W line are placed In a high-impedance state. than the minmum tpcs speCified
VMA and BA are forced low when TSC= "1" to prevent The fetch of the OP code by the MPU IS the first cycle of
false reads or writes on any deVice enabled by VMA. It IS the instruction. If HALf had not been low at POint A but
necessary to delay program execution while TSC IS held went low dUring </>2 of that cycle, the MPU would have
high. This IS done by inSUring that no transitions of </>1 (or </>2) halted after completion of the follOWing Instruction. BA Will
occur during this period. (Logic levels of the clocks are Ifrele- go high by time tBA (bus available delay time) after the last
vant so long as they do not change!. Since the MPU is a instruction cycle. At thiS pOint in time, VMA IS low and R/Vii,
dynamic deVice, the</> 1 clock can be stopped for a maximum Address Bus, and the Data Bus are In the high-Impedance
state.
4-62
MC6800- MC68AOO-MC68BOO
To debug programs It IS advantageous to step through lines are back on the bus. A single byte, 2 cycle Instruction
programs instruction by instruction. To do thiS, HALT must such as LSR IS used for thiS example also. DUring the first cy-
be brought high for one MPU cycle and then returned low as cle, the Instruction Y IS fetched from address M + 1. BA
shown at POint B of Figure 13 Again, the transitions of returns high at tBA on the last cycle of the Instruction In-
HALT must occur tpes before the trailing edge of <1>1 BA dicating the MPU IS off the bus. If instruction Y had been
will go low at tBA after the leading edge of the neyt <1>1, in- three cycles, the width of the BA low time would have been
dicating that the Address Bus, Data Bus, VMA and R/Vii Increased by one cycle
Notes
1 Reset IS recognized at any pOSition In the flowchart
2 Instructions which affect the I-Bit act upon 8 one-blt buffer reglSter.
"ITMP" ThiS has tho effect of delaying any CLEARING of tho I-Bit one
clock. time. Setting the I-Bit. however. IS not delayed
3. See Tables 6-11 for details of Instruction Execution
4·63
FIGURE 11 - WAIT INSTRUCTION TIMING
• s:
~•
Cycle
#1 #2 #3 #4 #5 #6 #7 #6 #9 #10 1 n+1 1 n+21 n+31 n+4In+51
r
4>2
s:
n
~s:•
Address
Bus
RM
VMA
~OJ
Interrupt
Mask First Inst
of Interrupt
IROor Routine
Niiiii
Data Bus 8
Wait
Inst
PC 0-7 PC 8-15 10-7 18-15 ACCA ACCB CCR
Address Address
BA
"""
m
"""
FIGURE 12 - THREE-STATE CONTROL TIMING
Cycle
#1 "2 #3 ~4 ~5 ~6 ~7 '-8
System
""
(p1
MPU (/11
Address~~===tt=~--~~----~~---tt-i=====x======>~====)(======x======>c=
Bus _
Fl/W
VMA
...f\ II 'f II r
~~:a ---X1U II (
(:>2= DBE
TSC I
</>1
</>2
SA ' ' -_ _ _ _ _- . . . I r
VMA ~---,L----------1{:t- _____-1/ c=:=\
R/W ~--------ill~-----_/
Fetch Execute
'<'---~~>-
~~:ress _..J~~~!x'J..__~>----------j/.--------C< Addr X,____..) -
..
1M +1
Bus _
Data -=====:X==)(====)C==~---------1~----------<
Inst
X
Inst
y
MPU REGISTERS
The MPU has three 16-blt registers and three 8-bit FIGURE 14 - PROGRAMMING MODEL OF
registers available for use by the programmer (Figure 14) THE MICROPROCESSING UNIT
Overflow
Condition Code Register - The condition code register In- Z.ro
dicates the results of an Anthmetlc LogiC Unit operation:
Negative
Negative (N), Zero (Z), Overflow (V), Carry from bit 7 (C),
and half carry from bit 3 (HI. These bits of the Condition Interrupt
Code Register are used as testable conditions for the condi- " - - - - - - Half Carry (From Bit 3)
tional branch Instructions. Bit 4 is the Interrupt mask bit (Il.
The unused bits of the Condition Code Register (b6 and b7)
are ones.
4·65
MC~MC~AOO·MC~BOO
• 00
01
02
03
04
05
06
07
08
09
OA
OB
oc
00
NOP
TAP
TPA
INX
DEX
CLV
SEV
CLC
SEC
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
40
NEG
COM
LSR
ROR
ASR
ASL
ROL
DEC
INC
TST
A
A
A
A
A
A
A
A
A
A
80
81
82
83
84
85
86
87
88
89
8A
8B
8C
80
SUB
CMP
SBC
AND
BIT
LOA
EOR
ADC
ORA
ADD
CPX
BSR
A
A
A
A
A
A
A
A
A
A
A
IMM
IMM
IMM
IMM
IMM
IMM
IMM
IMM
IMM
IMM
IMM
REL
CO
C1
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
SUB
CMP
SBC
AND
BIT
LOA
EOR
ADC
ORA
ADD
B
B
B
B
B
B
B
B
B
B
IMM
IMM
IMM
IMM
IMM
IMM
IMM
IMM
IMM
IMM
Notes 1 AddreSSing Modes
A
B
REl
INO
IMM
= Accumulator A
=
=
=
Accumulator B
Relative
Indexed
= Immediate
OE CLI OIR = Olrect
4E 8E LOS IMM CE LOX IMM
OF SEI 4F CLR A 8F CF
10 SBA 50 NEG B 90 SUB A DIR DO SUB B DIR
11 CSA 51 91 CMP A DIR 01
2 Unassigned code Indicated by " • " •
CMP B DIR
12 52 92 sec A DIR 02 SBC B DIR
13 53 COM B 93 03
14 54 LSR B 94 AND A DIR D4 AND B DIR
15 55 95 BIT A DIR 05 BIT B DIR
16 TAB 56 ROR B 96 LOA A DIR 06 LOA B DIR
17 TSA 57 ASR B 97 STA A DIR 07 STA B DIR
18 66 ASL B 98 EOR A DIR DB EOR B DIR
19 DAA 59 ROL B 99 ADC A DIR 09 ADC B DIR
1A 5A DEC B 9A ORA A DIR DA ORA B DIR
1B ABA 58 9B ADD A DIR DB ADD B DIR
1C 50 INC B 9C CPX DIR DC
10 50 TST B 90 DO
1E 5E 9E LOS DIR DE LOX DIR
1F 5F CLR B 9F STS DIR OF STX DIR
20 BRA REL 60 NEG IND AO SUB A IND EO SUB B IND
21 81 A1 CMP A IND E1 CMP S IND
22 SHI REL 62 A2 sec A IND E2 sec B IND
23 BLS REL 63 COM IND A3 E3
24 Bec REL 64 LSR IND A4 AND A IND E4 AND B IND
25 BCS REL 65 AS BIT A IND E5 BIT B IND
26 BNE REL 66 ROR IND A6 LOA A IND E6 LOA B IND
27 BEO REL 87 ASR IND A7 STA A IND E7 STA B IND
28 BVC' REL 66 ASL IND AS EOR A IND E8 EOR B IND
29 BVS REL 69 ROL IND A9 ADC A IND E9 ADC B IND
2A BPL REL 6A DEC IND AA ORA A IND EA ORA B IND
2B BMI REL 6B AB ADD A IND EB
2C
20
BGE
BLT
REL
REL
6C
60
INC
TST
IND
IND
AC
AD
CPX
JSR
IND
IND
EC
ED
ADD
" IND
4·66
MC6800. MC68AOO· MC68BOO
,,
I I I 1
··,, , ,,, ,,
·
ADOS CB 2 2 DB 3 2 EB 2 F6 3 B + M -8 I I
Add Acmllrs ABA
,, 16 2 1 :
··.·.·,,, ,, ·
A + B 'A
Add with Carr~ AOCA B9 2 2 99 3 2 A' 2 B9
•• 3 A + M + C 'A t I
AQeS CO 2 2 09 3 2 E9
,, 2 F9 3 B + M + C •B I I I I
" •
And ANDA 84 2 2 94 3 2 A4 2 3 A M -A R •
BII Tesl
Clear
ANOS
BITA
BITS
CLA
C4
85
C5
2
2
2
2
2
2
D'
"
05
3
3
3
2
2
2
E4
A'
E5
7
,, 2
2
2
F4
B5
F5
••
4
6
3
3
3
3
B'M -8
A- M
B M
00 • M
··.. , I I R
I
A •
A •
ClAA " 2 7F
4F 2 1 00 'A
• • A S A A
A S A A
··..,, ,, ,
• •
Compare
CLRB
CMPA 81 2 2 91 3 2 AI ,, 2 B1 • 3
Sf 2 1 00 '8
A M
• • A S A R
I I I
Compare Acmllr!
CMPB
CBA
C1 2 2 01 3 2 E1 2 F1
• 3
11 2 1
8· M
A 8
··.., , I I I
I
Complelnenl, ,'s COM
COMA
COMB
63 7 2 73 6 3
43
53
2
2
1
1
M -M
~ -'A
Ii ~ B ···..., ,
I I A S
I A S
A S
CIlmpiement,2's
iNegatel
NEG
NEGA
60 7 2 70 6 3
40 2 1
00 - M 'M
00 - A -A I
··..,
,<D(z)
1<D(z)
Oetlmai Adjust, A
NEGB
DAA
50
19
2
2
1
1
00 B -8
Con~er1s Blnarv Add of BCD Characters I
·.
1<D(z)
I 1(3)
Decrement DEC
InlO BCD Format
··..,,, ,, ··
···... , , ·
6A 7 2 7A 6 3 M - 1 ·M 4
CECA 4A 2 1 A -l-'A I 4
DECa 5A 2 1 8-1-8 4 •
,
··.., , ..
ExclUSIVe OR EORA 2 A8 5 2 3 A®M~A
" 2 9B J 2 8B 4 I A
•
EORB CB 2 2 DB J 2 EB 2 FB 4 3 B(!)M·... S
Increment INC 6C 7 2 7C 6 3 M + ' ...... M I If
···..., ,,,
INCA de 2 1 A+ 1 ·A :
INCB 5C 2 1 8' 1 -B I ,@.
lead Acmltr LDAA B6 2 2 96 J 2 A6 5 2 B6 4 3 M-A I A •
Or, InclusIVe
LOAS
DRAA
C6
8A
2
2
2
2
06
9A
J
3
2 E6
2 AA
5
5
2 F6
2 8A
4
4
3
3
M 'B
A+ M .... A
··..·...
! A •
,
A •
DRAB CA 2 2 DA 3 2 EA 5 2 FA 4 3 B +M ...... a
···...··...
I A •
···...·,, ...
Push Data PSHA J6 4 1 A--- MSP,SP-l-->SP
...
PSHB 37 4 1 B-->MSP,SP-l-->SP
Pull Data PULA 32 4 1 SP+ l .... SP. MSp--> A
PULa 33 4 1 Sp+' .... SP.MSp-->B
~} LD - CIII!IIIJ:J
Rolale left AOL 69 7 2 7S 6 3 ! 6 I
ROlA
ROlB
49
59
2
2
1
1 B C b7 - bD
··.. ,, :~:
!
Rotale Righi AOA
RORA
RORB
66 7 2 16 6 3
46
56
2
2
1
1
~} COC
8
- iIIIIIII}:J
bJ - bO I
···...
I@,
! !
Shih left, Anthmeht ASL
ASlA
68 7 2 78 6 3
48 2 1
n 0- = - 0
- I
I
··..
I ,
II'
I 1
···...
ASlB 2 1 C b7 bO , !
" I
~} I~',
Shih RighI, ArithmetiC ASA 6/ 7 2 )) 6 3 !
ASRA 47 2 1 ctrnTI:rn - 0 I I
'f
ASRB 2 1 B b1 bO C !
"
n -
Shift Right, Lagle LSA 64 7 2 74 6 3 , !
• • A
LSRA 44 2 1 o-aIIIIDJ - 0 • • A I !
Store Acmltr
lSRB
STAA 97 4 2 A7 6 2 Bl ,, 3
54 2 1
A-M
bJ bO C
• •
• •
A !
I
I I A •
STAB 07 4 2 El 6 2 f) 3 8-M ! A •
···...,
• • I
Subtract SUBA
SUBS
80
CO
2
2
2
2
80
00
3
3
2
2
AD
eo ,
5 2
2
BD
Fa
4
4
3
3
A-M . . . A
B-M ..... a
• • ! ! I I
! ! !
Subtract Acmltrs SBA ID 2 1 A-S .... A ! ! ! !
···... ,
Subtr With Carry SBeA B2 2 2 92 3 2 A2 5 2 B2 4 3 A-M-C .... A I ! I I
seCB C2 2 2 02 J 2 E2 5 2 F2 4 3 B - M - C---B I I I !
Tran5fer Acmltrs TAB 16 2 1 A-8 I I A •
Nore - Accumulator addreSSing mode instructions are Included In the column for IMPLIED addreSSing
4-67
MC6800-MC68AOO-MC68BOO
Program Control operation can be subdivided into two Stack POinter IS automatically Incremented by one Just prior
categories' (1) Index Register/Stack POinter Instructions, (2) to the data transfer so that It Will pOint to the last byte stack-
Jump and Br~~ch' operations. ed rather than the next empty location Note that the PULL
Instruction does not "remove" the data from memory, In the
Index Register/Stack,Pointer Operations example, 1A IS still In location (m+ 1) follOWing execution of
The instructions for direct operation on the MPU's Index PULA. A subsequent PUSH Instruction would overwrite that
Register and Stack POinter are summarized In Table 3. location With the new "pushed" <jata
Decrement (DEX, DES), Increment IINX, INS), load ILDX, Execution of the Branch to Subroutine (BSR) and Jump to
LDS); and store (STX, STS) instructions are provided for Subroutine (JSR) instructions cause a return address to be
both 'The Compare InstruqtlOn, CPX, can be used to com- saved on the stack as shown In Figures 18 through 20 The
pare the Index Regl,ster to Ii 16-blt value and ~pdate the Con- stack IS decremented after each byte of the return address IS
dition Code Register accbrdlngly pushed onto the stack For both of these InstrUctIOns, the
The TSX Instruction causes the Index Register to be load- return address IS the memory location follOWing the bytes of
ed with the address of the last data byte put onto the code that correspond to the BSR and JSR Instruction. The
"stack" The TXS instruction loads the Stack POinter with a code reqUired for BSR or JSR may be either two or three
value equal tb one less than the current contents of the Index bytes, depending on whether the JSR IS In the Indexed (two
Register ThiS causes, the next byte to be pulled from the bytes) or the extended (three bytes) addreSSing mode
"stack" to come from the location indicated by the Index Before It IS stacked, the Program Counter IS automatically in-
, Register. The utility of these two Instructions can be clarified cremented the correct number of times to be pOinting at the
by describing the "stack" concept relative to the M6800 location of the next Instruction The Return from Subroutine
•
system Instruction, RTS, causes the return address to be retrieved
The "stack" can be thought of as a sequential list of data and loaded Into the Program Counter as shown In Figure 21.
stored In the MPU's read/write memory. The Stack POinter There are several operations that cause the status of the
contains a 16-blt memory address that IS used to access the MPU to be saved on the stack. The Software Interrupt (SWIl
list from one end on a last-In-flrst-out (LIFO) baSIS In contrast and Walt for Interrupt (WAil InstructIOns as well as the
to the random access mode used by the MPU's other ad- maskable (IRQ) and non-maskable (NMi) hardware inter-
dreSSing modes' rupts all cause the MPU's Internal registers (except for the
The MC6800 Instruction set and Interrupt structure allow Stack POinter Itself) to be stacked as shown In Figure 23
extensive use of the stack concept for effiCient handling of MPU status IS restored by the Return from Interrupt, RTI, as
data movement, subroutines and Interrupts. The instructions shown In Figure 22
can be used to establish one or more "stacks" anywhere In
read/write memory Stack length IS limited only by the Jump and Branch Operation
amount of memory that IS made available. The Jump and Branch instructions are summarized In
Operation of the Stack POinter with the Push and Pull in- Table 4. These Instructions are used to control the transfer or
structions IS Illustrated In Figures 15 and 16 The Push In- operation from one pOint to another In the control program
structIOn (PSHA) causes the contents of the Indicated ac- The No Operation InstruCtIOn, NOP, while Included here,
cumulator IA In thiS example) to be stored In memory at the IS a Jump operation In a very limited sense Its only effect IS to
location Indicated by the Stack POinter The Stack POinter IS Increment the Program Counter by one. It IS useful dUring
automatically decremented by one follOWing the storage program development as a "stand-In" for some other In-
operation and IS "pointing" to the next empty stack location struction that IS to be determined dUring debug It IS also us-
The Pull instructIOn IPULA or PULB) causes the last byte ed for equaliZing the execution time through alternate paths
stacked to be loaded Into the appropriate accumulator The In a control program
- " - " - - -
POINTER OPERATIONS
Co~pafe Index Reg
Decrement Index Reg
MNEMONIC
CPX
DEX
OP
BC 3 3
OP
9C 4 2
DP
AC 6
"2 OP
BC 5
= OP
3
P9 4
=
I
BOOlEAN/ARITHMET)C OPERATION
XH - M. Xl - 1M + 1)
X -I-X
···...·.··..
H I N Z V C
CD: 2 •
··..·.·• .•
lOS 4 3
Store Index Reg STX ·DF 5 2 EF 7 2 FF 6 3 XH-M.Xl-IM+1/ Q): R •
Store Stack Potr STS 9F 2 AF 7 2 BF 6 SPH-M.SPl-IM+ II Q): R •
·.·.
5 3
Indx Reg ..... Stack Pntr TXS 35 X-I -SP
Stack Pntr-+lndlC Reg TSX 3U
.4 1 '1 SP+ 1 'X
4·68
MC6800-MC68AOO-MC68BOO
ACCA ACCA
~
m - 2 m - 2
m -1
SP --+0. m
7F
.
3
":;
o
New Data F3
7F
PrevIously
Stacked J::: 63
Previously '
mm++2
63
1
Stacked (
Data Data
m +3 FO m +3 FO
3C 3C
PC _ _
PSHA
Next Instr,
Next Instr.
ACCA ACCA
m - 2 m - 2
m -1 m -1
J:: ~
1A SP -+- m +1 1A
Previously
Stacked 3C
J 3C
Data
1 m +3 05
PrevlouslV
Stacked
Data 1
m
m
+2
+3
05
4-69
MC6800e MC68AOOe MC68BOO
. .
Branch If BLT 20 4 2 N@V=l 0 0 0 0 0 0
Branch If Minus BMI 2B 4 2 N" 1 0 0 0 0 0 0
Blanch If Not Equal Zero BNE 26 4 2 ZoO 0 0 0 0 0
Branch If Overflow Clear BVe 2B 4 2 v=o 0 0 0 0 0
·.
Branch If Overflow Set BVS 29 4 2 V"l 0 0 0 0 0 0
Branch If Plus BPL 2A 4 2 N"O 0 0 0 0 0 0
Branch To Subroutine BSR 80 8 2 0 0 0 0
}
·· .. ..CD--
..!.. ..
Jump JMP 6E 4 2 7E 3 3 See SpecIal Operations 0 0 0 0 0 0
Jump To Subroutme JSR AD 8 2 BO 9 3
No Operation NOP 01 2 1 Advances Prog Cntr Only
Return From Interrupt RTI 3B 10 1 ---
•
Return From Subroutrne RTS 39 5 1
Software Interrupt
Walt for Interrupt*
SWI
WAI
3F
3E
12
9
1
1
} See SpeCial Operations •• ®-)j.• •• •• ••
01°':1-
0
1
0
1
0
WAr puts Address Bus, Rm, and Data Bus In the three-state mode while VMA IS held low
<D (All) Load Condition Code Register from Stack (See SpeCial Operations)
® (Bit 1) Set when Interrupt occurs. If preViously set, a Non-Maskable Interrupt
IS required to exit the walt state
Execution of the Jump Instruction, JMP, and Branch cle faster than JSR, The Return from Subroutine, RTS, IS
, Always, BRA, affects program flow as shown In Figure 17, used as the end of a subroutine to return to the main pro-
When the MPU encounters the Jump Iindexediinstructlon, gram as indicated In Figure 21,
It adds the offset to the value In the Index Register and uses The effect of executing the Software Interrupt, SWI. and
the result as the address of the next Instruction to be ex- the Wait for Interrupt, WAI, and their relationship to the
ecuted, In the extended addreSSing mode, the address of the hardware Interrupts IS shown In Figure 22 SWI causes the
next Instruction to be executed IS fetched from the two loca- MPU contents to be stacked and then fetches the starting
tions Immediately following the JMP instruction, The Branch address of the Interrupt routine from the memory locations
Always IBRAllnstructlon IS Similar to the JMP lextendedlln- that respond to the addresses FFFA and FFFB Note that as
structlon except that the relative addreSSing mode applies In the case of the subroutine instructions, the Program
and the branch IS limited to the range within - 125 or + 127 Counter IS Incremented to pOint at the correct return address
bytes of the branch Instruction Itself, The opcode for the before being stacked, The Return from Interrupt instruction,
BRA instruction requires one less byte than JMP lextended) RTI, IFlgure 22) IS used at the end of an Interrupt routine to
but takes one more cycle to execute restore control to the main program The SWI Instruction IS
The effect on program flow for the Jump to Subroutine useful for inserting break pOints In the control program, that
IJSRI and Branch to Subroutine IBSRI IS shown In Figures IS, It can be used to stop operation and put the MPU
18 through 20 Note that the Program Counter IS properly In- registers In memory where they can be examined The WAI
cremented to be pOinting at the correct return address Instruction IS used to decrease the time reqUired to service a
before It is stacked Operation of the Branch to Subroutine hardware Interrupt, It stacks the MPU contents ,and then
and Jump to Subroutine lextendedllnstructlon IS Similar ex- walts for the Interrupt to occur, effectively removing the
cept for the range The BSR Instruction reqUires less opcode stacking time from a hardware Interrupt sequence,
than JS R 12 bytes versus 3 bytesl and a1so executes one cy-
PC Main Program
Main Program
n+~
PC
lE= JMP
n+~
KH = Next Address
{ n+1
INDXD EXTND { n+2 KL = Next Address
4-70
MC6800-MC68AOO- MC68BOO
SP--" m
m -2
m-l
,--
--- FIGURE 18 - PROGRAM FLOW FOR BSR
SP-"'m-2
m-l (n
(n
-
+ 2)H
+ 2}L
m+ 1 7E m+l 7E
PC -----.. n
L...---
7A
BSR
---- - BSR
L---
•
-
·K =Signed 7-Bit Value PC""(n+2}±K 1st Subr. Instr.
-- --
FIGURE 19 - PROGRAM FLOW FOR JSR (EXTENDED) FIGURE 20 - PROGRAM FLOW FOR JSR (INDEXED)
m -3 m -2 sp-+-m - 2
m -2 SP--...m-2
m-, m-l (n + 2)H
m+ 1
m+2
7'
7A
m+ 1
m +2
7.
7A
7A
---- 7A
-
pc~n
n + ,
'---
70
-
JSFI = BD
SH • Sub,. Addr
PC--+- n
n+2
+1
JSR = AD
K "'Offset-
n<2
+'
JSR = AD
K - Offset
-
(a) Before E XBcutlon ·Contents of Index Aaglster
PC~S 1st Subr. InStf
4·71
MC6800- MC68AOO- MC68BOO
SP~m-2
m -1
m
-
--
FIGURE 21 -
Cn + 3)H
Cn + 3)L
PROGRAM FLOW FOR RTS
SP---+- m
m-2
m-l
+1 7E
---
m + 1 7E m
7A 7A
I..----
JSR = BO JSA = SO
-----
• Last Subr. Instr.
ATS
ATS
-- ---
FIGURE 22 - PROGRAM FLOW FOR RTI
SP ______ m - 7
m - 7
m -6 CCA m -6 eCR
m - 5 ACCS m - 5 ACeB
m -4 ACCA m -4 ACCA
m - 3 XH (Index Reg) m - 3 XH
m -2 XL (Index Reg) Xl
m -1 PC(n+1)H m -1 PCH
SP _ _
PC(n+1)L PCl
~ ~
n +1 PC- n+ 1
4-72
MC68OQ-MC68AOO- MC68BOO
Na
c::>
sp- m -7
m-6
m -5
m-4
Stack
Condition Code
Acmltr. B
Acmltr A
I
m -3 Index Register (X H)
m -2 Index RegISter (X I
m-I PCln + IIH
PC(n + IlL
4-73
MC6800- MC68AOO- MC68BOO
FIGURE 24 - CONDITIONAL BRANCH INSTRUCTIONS for testing relative magnitude when the values being tested
BMI BEQ Z-l are regarded as unsigned binary numbers, that IS, the values
N- 1
BPl BNE are In the range 00 Ilowest) to FF Ihlghest!. BCC follOWing a
N-" Z-"
companson ICMP) Will cause a branch If the lunslgned!
value in the accumulator IS higher than or the same as the
BVC
BVS
V-"
V-I
BCC
BCS
C-"
C-l value of the operand. Conversely, BCS Will cause a branch If
the accumulator value IS lower than the operand
BHI C+Z=¢ BlT NEIlV-l The fifth complementary pair, Branch On Higher IBHII and
BlS C+Z=1 BGE NEIlV-" Branch On lower or Same IBlS! are, In a sense, com-
plements to BCC and BCS. BHI tests for both C and Z=O; If
BlE Z+{NEIlV}-l used follOWing a CMP, It Will cause a branch If the value In
BGT Z+INEIlV}-" the accumulator IS higher than the operand Conversely,
BlS Will cause a branch If the unsigned binary value in the
accumulator is lower than or the same as the operand.
The conditional branch instructions, Figure 24, consists of The remaining two pairs are useful In testing results of
seven pairs of complementary instructions. They are used to operations In which the values are regarded as signed two's
•
test the results of the preceding operation and either con- complement numbers. ThiS differs from the unsigned binary
tinue with the next Instruction In sequence Itest falls) or case In the following sense: In unsigned, the onentatlon IS
cause a branch to another pOInt In the program Itest suc- higher or lower; In signed two's complement, the com-
ceeds!. panson IS between larger or smaller where the range of
Four of the pairs are used for simple tests of status bits N, values IS between -128 and + 127.
Z, V, and C: Branch On less Than Zero IBlT! and Branch On Greater
1. Branch on Minus IBMII and Branch On Plus IBPU tests Than Or Equal Zero IBGE) test the status bits for N E& V = 1
the sign bit, N, to determine If the prevIous result was and NEIlV=O, respectively BlT Will always cause a branch
negative or positive, respectively. follOWing an operation In which two negative numbers were
2. Branch On Equal IBEQ) and Branch On Not Equal added. In addition, It Will cause a branch follOWing a CMP In
IBNE) are used to test the zero status bit, Z, to determine which the value In the accumulator was negative and the
whether or not the result of the previous operation was equal operand was positive. Bl T Will never cause a branch follow-
to zero. These two instructions are useful follOWing a Com- Ing a CMP In which the accumulator value was positive and
pare ICMP) Instruction to test for equality between an ac- the operand negative. BGE, the complement to BlT, Will
cumulator and the operand. They are also used following the cause a branch follOWing operations In which two positive
Bit Test IBIT! to determine whether or not the same bit POSI- values were added or In which the result was zero.
tions are set in an accumulator and the operand. The last pair, Branch On less Than Or Equal Zero IBlE!
3. Branch On Overflow Clear I BVC) and Branch On and Branch On Greater Than Zero IBGT) test the status bits
Overflow Set IBVS) tests the state of the V bit to determine for ZE&IN+V)=1 and ZEIlIN+V!=O, respectively. The ac-
If the prevIous operation caused an arithmetic overflow. tion of BlE is identical to that for BlT except that a branch
4. Branch On Carry Clear IBCC) and Branch On Carry Set will also occur If the result of the prevIous result was zero.
I BCS) tests the state of the C bit to determine If the prevIous Conversely, BGT IS Similar to BGE except that no branch Will
operation caused a carry to occur. BCC and BCS are useful occur following a zero result.
The Condltton Code Register ICCR) IS a 6-bIt register to precede any SEI Instruction With an odd opcode such
Within the MPU that IS useful In controlling program flow as NOP These precautions are not necessary for MC6800
during system operation The bits are defined In Figure 25. processors Indicating manufacture In November 1977 or
The Instructions shown in Table 5 are available to the user later.
for direct manipulation of the CCR. Svstems which require an Interrupt Window to be opened
A CLI-WAI Instruction sequence operated properly, With under program control should use a CLI-NOP-SEI sequence
early MC6800 processors, only If the preceding Instruction rather than CLI-SEI.
was odd Ileast Significant Blt= 1). Similarly It was adVisable
4-74
MC68OQeMC68AOOe MC68BOO
b5 b4 b3 b2 b, bO
IHI N z vlcl
H = Half-carry; set whenever a carry from b3 to b4 of the result IS generated
by ADD, ABA, ADC, cleared If no b3 to b4 carry, not affected by other
Instructions.
N = Negative, set if high order bit (b7) of result IS set, cleared otherWise.
•
= Overlow;set if there wasanthmetic overflow as a result of the operation,
cleared otherwise.
C = Carry, set If there was a carry from the most Significant bit (b7) of the
result; cleared otherWise.
~ 5 4 3 2 1 0
OPERATIONS
Cillar Carry
MNEMONIC
Cle
OP
De
-
2
~
1
BOOLEAN OPERATION
o~e
H
0
I
..
N
0 ..
Z V C
R
.
Clear Interrupt Mask CLI DE 2 1 O~I 0 R 0 0 0 0
. ..
Clear Overflow elV OA 2 1 O-V 0 0 0 0 R 0
.--CD--
Set Carry SEe 00 2 1 1-e 0 0 0 0 S
Set Interrupt Mask SEI OF 2 1 1-1 0 S 0 0 0
SetOverflow SEV DB 2 1 1-V 0 0 S
Acmltr A -.-)0 eCR TAP 06 2 I A-.-)oCCR
CGA ...... Acmltr A TPA 07 2 1 eCA A-.-)0 01010101010
R == Reset
S == Set
• '" Not affected
G> (ALL) Set according to the contents of Accumulator A
ADDRESSING MODES
The MPU operates on 8-blt binary numbers presented to It appropriate opcode then depends on the method used. If
via the Data Bus A given number (byte) may represent manual translation IS used, the addreSSing mode IS Inherent
either data or an instruction to be executed, depending on In the opcode For example, the Immediate, Direct, Indexed,
where it IS encountered In the control program. The M6BOO and Extended modes may all be used with the ADD instruc-
has 72 unique Instructions, however, it recognizes and takes tion. The proper mode IS determined by selecting (hex-
action on 197 of the 256 possibliltis that can occur using an adecimal notation) 8B, 9B, AB, or BB, respectively
B-blt word length. ThiS larger number of instructions results The source statement format Includes adequate Informa-
from the fact that many of the executive instructions have tion for the selection If an assembler program is used to
more than one addressing mode. generate the opcode. For Instance, the Immediate mode IS
These addressing modes refer to the manner In which the selected by the Assembler whenever it encounters the" #"
program causes the MPU to obtain its Instructions and data. symbol in the operand field. Similarly, an "X" In the operand
The programmer must have a mothod for addreSSing the field causes the Indexed mode to be selected. Only the
MPU's internal registers and all of the external memory loca- Relative rnode applies to the branch Instructions, therefore,
tions the mnemonic instruction Itself is enough for the Assembler
Selection of the deSired addreSSing mode IS made by the to determine addreSSing mode.
user as the source statements are written. Translation Into
4-75
MC68QO. MC68AOO· MC68BOO
For the Instructions that use both Direct and Extended "operands" but the space between them and the operator
modes, the Assembler selects the Direct mode If the operand may be omitted. ThiS IS commonly done, resulting In ap-
value IS In the range 0-255 and Extended otherwise. There parent four character mnemonics for those Instructions
are a number of Instructions for which the Extended mode IS The addition instruction, ADD, provides an example of
valid but the Direct IS not For these instructions, the dual addressing In the operand field.
Assembler automatically selects the Extended mode even If
the operand IS In the 0-255 range The addressing modes are Operator Operand Comment
summarized In Figure 26. ADDA MEM12 ADD CONTENTS OF MEM12 TO ACCA
or
Inherent (Includes" Accumulator Addressing" Model ADDB MEM12 ADD CONTENTS OF MEM12 TO ACCB
The successive fields In a sta tement are normally
separated by one or more spaces An exception to thiS rule The example used earlier forthe test InstrUCtion, TST, also
occurs for Instructions that use dual addressing In the applies to the accumulators and uses the "accumulator ad-
operand field and for instructions that must distinguish be- dressing mode" to designate which of the two accumulators
tween the two accumulators In these cases, A and Bare IS being tested'
•
& n + 2 Next Instr. n+2 Next Inst.
• OR
• (K == Two-Byte Oprnd)
(CPX, LOX, and LOS)
Instruction
• n + 1 KH '" Operand
OR n +3 Next Instr.
Z + 1 K L '" Operand
Relative: Instruction
& If Z ~255, Assembler Select Direct Mode Example: BNE K n +1 ±K :: Brnch Offset
If Z >255, !:xtended Mode IS selected
(K "" Signed 7-Bit Value) n + 2 Next I nstr. &
Addr. Range:
-125 to +129 •
Relative to n.
•
Extended: FO Instruction
•
EXample: CMPA Z n+1
In + 21 ±K 1~_N_._xt_ln_._tr_._&
__-'
ZH = Oprnd Addr•••
Addr, Range:
n +2
& If Brnch T.t Fal •• , & If Brnch T.t Tru •.
& 256-65535
Z L = Oprnd Addre••
n +3 Next Inltr,
• Indexed: Inltruction
• Addr. Range:
0-255 Relative to
n+2 Next Instr.
(K = One-Byte Oprnd) Z
I K = Operand
OR
Index Register, X
•
•
(K = Two-Byte Oprnd) Z KH "" Operand
•
Kl = Operand (Z = 8-Blt Unsigned X+Z K =: Operand
Z + 1 Value)
4-76
MC68OQ·MC68AOO·MC68BOO
A number of the Instructions either alone or together with Direct and Extended Addressing Modes - In the Direct
an accumulator operand contain all of the address Informa- and Extended modes of addressing, the operand field of the
tion that IS required, that IS, "Inherent" In the instruction source statement IS the address of the value that IS to be
Itself For Instance, the Instruction ABA causes the MPU to operated on. The Direct and Extended modes differ only In
add the contents of accmulators A and B together and place the range of memory locations to which they can direct the
the result In accumulator A The Instruction INCB, another MPU. Direct addreSSing generates a Single 8-bit operand
example of "accumulator addressing," causes the contents and, hence, can address only memory locations 0 through
of accumulator B to be Increased by one S:milarly, INX, in- 255; a two byte operand IS generated for Extended address-
crement the Index Register, causes the contents of the Index Ing, enabling the MPU to reach the remaining memory loca-
Register to be Increased by one tions, 256 through 65535. An example of Direct addreSSing
Program flow for instructions of this tipe IS Illustrated In and ItS effect on program flow IS Illustrated In Figure 30
Figures 27 and 28 In these figures, the general case IS shown The MPU, after encountenng the opcode for the Instruc-
on the left and a specific example IS shown on the nght. tion LDAA (Dlrectl at memory location 5004 (Program
Numerical examples are In deCimal notation Instructions of Counter = 5004), looks in the next location, 5005, for the ad-
thiS type require only one byte of opcode. Cycle:by-cycle dress of the operand. It then sets the program counter equal
operation of the Inherent mode IS shown In Table 6 to the value found there (100 In the example) and fetches the
•
operand, In thiS case a value to be loaded Into accumulator
Immediate Addressing Mode - In the Immediate address- A, from that location. For instructions requiring a two-byte
Ing mode, the operand IS the value that IS to be operated on. operand such as LDX (Load the Index Register!, the operand
For Instance, the Instruction bytes would be retneved from locations 100 and 101 Table 8
Operator Operand Comment shows the cycle-by-cycle operation for the direct moqe of
LDAA #25 LOAD 25 INTO ACCA addressing.
Extended addreSSing, Figure 31, IS Similar except that a
causes the MPU to "Immediately load accumulator A With two-byte address IS obtained from locations 5007 and 5008
the value 25", no further address reference IS required The after the LDAB (Extended) opcode shows up In location
Immediate mode IS selected by preceding the operand value 5006 Extended addreSSing can be thought of as the "stan-
With the "r symbol Program flow for thiS addressing mode dard" addreSSing mode, that is, It IS a method of reaching
IS Illustrated In Figure 29 any place In memory. Direct addressing, since only one ad-
The operand format allows either properly defined sym- dress byte IS required, proVides a faster method of process-
bols or numencal values. Except ior the instructions CPX, Ing data and generates fewer bytes of control code. In most
LDX, and LDS, the operand may be any value In the range 0 applications, the direct addreSSing range, memory locations
to 255. Since Compare Index Register (CPXl. Load Index 0-255, are reserved for RAM. They are used for data buffer-
Register (LDXI, and Load Stack POinter (LDSI, reqUIre 16-brt Ing and temporary storage of system vanables, the area In
values, the Immediate mode for these three instructions re- which faster addressing IS of most value Cycle-by-cycle
qUire two-byte operands. In the Immediate addressing operation IS shown In Table 9 for Extended Addressing.
MPU
4-77
MC6800. MC68AOO. MC68BOO
Relative Address Mode - In both the Direct and Extended the unconditional Jump IJMP), Jump to subroutine IJSR),
modes, the address obtained by the MPU IS an absolute and return from subroutine IRTS) are used.
numencal address The Relative addressing mode, Im- In Figure 32, when the MPU encounters the opcode for
plemented for the MPU's branch Instructions, specifies a 8EQ 18ranch If result of last Instruction was zero), It tests the
memory location relative to the Program Counter's current Zero bltm the Condition Code Register. If that bit IS "0," in-
Incatlon Branch Instructions generate two bytes of machine dicating a non-zero result, the MPU continues execution
code, one for the instruction opcode and one for the with the next Instruction (in location 5010 In Figure 32). If the
"relative" address Isee Figure 32) Since It IS desirable to be prevIous result was zero, the branch condition IS satisfied
able to branch In either direction, the 8-blt address byte IS in- and the MPU adds the offset, 151n this case, to PC+2 and
terpreted as a signed 7-blt value, the 8th bit of the operand IS branches to location 5025 for the next instruction,
treated as a sign bit, "0" = plus and "1" = minus The re- The branch instructions allow the programmer to effiCient-
maining seven bits represent the numencal value This ly direct the MPU to one pOint or another In the control pro-
results In a relative addressing range of ± 127 with respect to gram depending on the outcome of test results, Since the
the location of the branch Instruction Itself However, the control program IS normally In read-only memory and cannot
branch range IS computed with respect to the next instruc- be changed, the relative address used In execution of branch
tion that would be executed If the branch conditions are not Instructions IS a constant numencal value. Cycle-by-cycle
satisfied Since two bytes are generated, the next Instruction operation IS shown In Table 10 for relative addreSSing.
IS located at PC + 2 If D IS defined as the address of the
branch destination, the range IS then Indexed Addressing Mode - With Indexed addreSSing,
IPC+2)-127sDsIPC+2)+ 127 the numencal address IS vanable and depends on the current
or contents of the Index Register A source statement such as
PC-125s Ds PC+ 129
Operator Operand Comment
that IS, the destination of the branch Instruction must be STAA X PUT A IN INDEXED LOCATION
within - 125 to + 129 memory locations of the branch In-
II
structIOn Itself For transferring control beyond this range, causes the MPU to store the contents of accumulator A In
4-78
MC6800. MC68AOO· MC68BOO
•
10 1 +2 1 Contents of Accumulator B from Stack
5 Stack POinter
6 1 Stack Po,nter + 3 1 Contents of Accumulator A from Stack
7 1 Stack Pointer + 4 1 Index Register from Stack (High Order
8yte)
8 1 Stack POinter + 5 1 Inc;lex Register from Stack (Low Order
8yte)
9 1 Stack POinter + 6 1 Next I nstructlon Address from Stack
(HIgh Order Byte)
10 1 Stack POinter + 7 1 Next Instruction Address from Stack
{Low Order Byte}
SWI 1 1 Op Code Address 1 .Op Code
2 1 Op Code Address + 1 1 Irrelevant Data (Note 1)
3 1 Stack POinter 0 Return Address {Low Order Byte}
4 1 Stack POinter - 1 0 Return Address (High Order Byte)
5 1 Stack Pointer -- 2 0 Index Register (Low Order Byte)
6 1 Stack POinter - 3 0 Index Register (High Order Byte)
12
7 1 Stack POinter - 4 0 Contents of Accumulator A
8 1 Stack POinter -- 5 0 Contents of Accumulator 8
9 1 Stack POinter - 6 0 Contents of Cond Code Reglst~r
Note 1 If deVice which IS addressed during thiS cycie uses VMA, then the Data Bus Will go to the high impedance three-state condition.
Depending on bus capacitance, data from the prevIous cycle may be retained on the Data Bus.
Note 2 Data is ignored by the MPU
Note 3. While the MPU IS waiting for the Interrupt, Bus Available will go high Indicating the followlOg states of the control lines. VMA IS
low; Address Bus, RNi. and Data Bus are ail In the high impedance state
the memory 10catJon specified by the contents of the Index location 5006. It looks In the next memory location for the
Register (recall that the label "X" IS reserved to deSignate the value to be added to X (5 In the example) and calculates the
Index Register) Since there are Instructions for manipulating reqUired address by adding 5 to the present Index Register
X dUring program execution (LOX, INX, DEC, etc.), the In- value of 400. In the operand format, the offset may be
dexed addressmg mode provides a dynamiC ··on the fly" way represented by a label or a numerical value In the range 0-255
to modify program activity as In the example In the earlier example, ST AA X, the
The operand field ca~ also contem a numerical value that operand IS eqUivalent 10 0, X, that IS, the 0 may be omitted
will be automatically added to X dUring execution ThiS for- when the deSired address IS equal to X Table 11 shows the
mat IS Illustrated In Figure 33. cycle-by-cycle operation for the Indexed Mode of Address-
When the MPU encounters the LDAB (Indexed) opcode m mg
4-79
MC6800- MC68AOO-MC68BOO
PC = 5004 1-==-1
5005 1-_;';""_1'
ADDR = O~255
GENERAL flOW EXAMPLE
GENERAL FLOW EXAMPLE
• ADC
ADO
AND
BIT
CMP
Address Mode
and Instructions
EOR
LOA
ORA
SBC
SUB
2
TABLE 7 -
1
2
1
1
IMMEDIATE MODE CYCLE-BY-CYCLE OPERATION
Address Bus
Op Code Address
Op Code Address +1
RM
Line
1
1
Op Code
Operand Data
Data Bus
Address Mode RM
and Instructions Address Bus Line Data Bus
Note 1 If device which IS address dUring thiS cycle uses VMA, then the Data Bus will go to the high Impedance three·state condition
Depending on bus capacitance, data from the prevIous cycle may be retained on the Data 8us
4-80
MC6800- MC68AOO- MC68BOO
ADDR f-==-I'..
ADDR 256
GENERAL FLOW EXAMPLE
•
and Instructions Cycles ~ Line Address Bus Lme Data Bus
STS
STX
1
,
1 Op Code Address 1
, Op Code
6
2
3 , Cp Code Address + 1
ap Code Address + 2 , Address of Operand (High Order Byte)
Address of Operand (Low Order Byte)
4 a Address of Operand 1 Irrelevant Data (Note 1)
1 a
5
, Address of Operand
Address of Operand + 1 a
Operand Data (High Order Byte)
JSR , ,
6
, Operand Data (Low Order Byte)
ap Code
, Op Code Address
,
2
, Op Code Address + 1
Op Code Address + 2 , Address of Subroutine (High Order Byte)
3
, , Address of Subroutme (Low Order Byte)
4
, Subroutine Startmg Address
a
Op Code of Next Instruction
9 5
, Stack POinter
a
Return Address (Low Order Byte)
6
a
Stack Pomter - 1
, Return Address (High Order Byte)
7
a
Stack Pomter -~ 2
, Irrelevant Data (Note 1 )
8
, Op Code Address + 2
Op Code Address + 2 , Irrelevant Data (Note 1)
9
, , , Addrpss of Subroutine (Low Order Byte)
JMP
, Op Code Address
, Op Code
3 2
, Op Code Address + 1
, Jump Address (High Order Byte)
AND ORA 4
2
, Op Code Address + 1
Op Code Address + 2 , Address of Operand (High Order Byte)
BIT SBC
CMP SUB
3
, , Address of Operand (Low Order Byte)
, ,
4 Address of Operand
, Operand Data
CPX
LOS , Op Code Address
, Op Code
LOX
2
, Op Code Address + 1
, Addrelos of Operand (High Order Byte)
5 3
, Qp Code Address + 2
, Address of Operand (Low Order Byte)
4
, Address of Operand Operand Data (High Order Byte)
STAA
, ,
5 Address of Operand + 1
Op Code Address
1
1
Operand Data (Low Order Byte)
Op Code
STA B 2
,
1 Op Code Address + 1 1 Destination Address (High Order Byte)
5
4
3
a
Qp Code Address + 2
Operand Destination Address ,
1 Destination Address (Low Order Byte)
Irrelevant Data (Note 1)
a
5
,
1 Operand Destination Address
, Data from Accumulator
ASL
ASR
LSR
NEG
1
, Op Code Address
, Op Code
CLR ROL
2
, Op Code Address + 1 Address of Operand (High Order Byte)
COM
DEC
INC
ROR
TST
6
3
4 , Op Code Address + 2
Address of Operand ,
1 Address of Operand (Low Order Byte)
Current Operand Data
5 a Address of Operand 1 Irrelevant Data (Note 1 )
6 1/0 Address of Operand a New Operand Data (Note 2)
(Note
2)
Note 1 If deVice which IS addressed during thiS cycle uses VMA, then the Data Bus Will go to the high Impedance three-state condition
Depending on bus capaCitance, data from the prevIous cycle may be retained on the Data Bus
Note 2 For TST, VMA '" 0 and Operand data does not change
4-81
MC6800-MC68AOO-MC68BOO
Program Program
Memory Memory
PC Instr.
Offset PC
(PC + 2) Next Instr.
PC
• FIGURE 33 -
MPU
INDEXED ADDRESSING MODE
4-82
MC6800- MC68AOO-MC68BOO
AddreaMode R
and Instructions Addr. . Bul Line
INDEXED
JMP 1 1 Op Code Addre.. 1 Op Code
2 1 Op Cod. Addre.. + 1 1 Offset
4
3 0 Index Register 1 Irrelevant Data (Note 1 )
4 0 Index Register Plus Offset (w/o Carry) 1 Irrelevant Data (Note 1)
ADC EDR 1 1 Dp Code Addre.. 1 Op Code
ADD LOA
2 1 Op Code Addre.. + 1 1 Offset
AND ORA
BIT SBC 5 3 0 Index Register 1 Irrelevant Data (Note 1 )
CMP SUB 1
4 0 Index Register Plus Offset (w/o Carry) Irrelevant Data (Note 11
5 1 Index Register Plus Offset 1 Operand Data
CPX 1 1 Op Code Address 1 Dp Code
LOS
LOX 2 1 Op Code Address +1 1 Offset
3 0 Index Register 1 I rrelevant Data (Note 1)
6
4 0 Index Register Plus Offset (w/o Carry) 1 Irrelevant Data (Note 1)
•
5 1 Index Register Plus Offset 1 Operand Data (High Order Byte)
6 1 Index Register Plus Offset + 1 1 Operand Data (Low Order Byte)
4·83
MC6S01
@ MOTOROLA MC6S03
MC6S03NR
MICROCOMPUTER/MICROPROCESSOR (MCU/MPU)
~""
operating In Modes 2 or 3 The MC6803NR IS comparable to MC6801
operating In Mode 3. An EPROM verSion of the MC6801, the MC68701
' ~ ~ ;"'"
microcomputer, IS available for systems development The MC68701 IS
I ,. G SUFFIX
pin and code compatible with the MC6801/03/03NR and can be used to
. 1 ":' PLASTIC PACKAGE
emulate the MC6801 /03/03NR The MC68701 IS descnbed In a separate . . CASE 711
Advance Information publication MC6801 MCU Family features In-
clude.
•
• Enhanced MC6800 Instruction Set
• 8 x 8 Multiply Instruction
• Serial Communications Interface ISCI)
• Upward Source and Object Code Compatibility With the M6800
• 16-Blt Three-Function Programmable Timer
• Single-Chip or Expanded OperatIOn to 64K Byte Address Space
• Bus Compatibility With the M6800 Family'
.2048 Bytes of ROM IMC6801) FIGURE I - PIN ASSIGNMENT
• 128 Bytes of RAM IMC6801 and MC6803)
• 64 Bytes of RAM Retalnable Dunng Powerdown IMC6801 VSS
and MC6803)
XTAL1 39 SCI
• 29 Parallel I/O and Two Handshake Control Lines
• Internal Clock Generator With Dlvlde-by-Four Output EXTAL2 SC2
NMI 4 P30
TIiCl1 P31
RESET 6 P32
VCC P33
PART NUMBER DESIGNATED P20 8 P34
BY SPEED P21 9 P35
P22 P36
MC6801 MC68A01
P23 P37
MC6803 MC68A03 "
P24 P40
MC6803NR MC68A03NR
P10 P41
(1.0 MHz) (1.5 MHz)
P11 P42
P12 P43
MC6801-1 MC68B01
P13 P44
MC6803-1 MC68B03'
P14 P45
MC6803NR-1 MC68B03NR
(1.25 MHz) (2.0 MHz) P15 P46
P16 P47
P17 VCC
Standby
4·84
MC6801. MC6803·MC6803NR
MAXIMUM RATINGS
Rating Symbol Value Unit
Supply Voltage Vcc -03to+70 V
This device contains Circuitry to protect the in-
Input Voltage Y,n -03to +70 V
puts against damage due to high static voltages
Operating Temperature Range 'TA o to 70 °c or electric fields, however, It IS advised that nor-
Storage Temperature Range Tstg -55 to +150 °C mal precautions be taken to aVOId appliCation of
any voltage higher than maximum rated voltages
'An extended temperature device, the MC6801C IS available With TA= -40°C to 85°C
to this high-Impedance Circuit For proper opera-
tion It IS recommended that V In and Vout be Con-
THERMAL CHARACTERISTICS strained to the range VSS '" IV,n or Voutl '" VCC
Input protection IS enhanced by connecting
Characteristic Symbol Value Rating unused Inputs to either VDD or VSS
Thermal Resistance
Plastic 8JA 50 °C/W
Ceramic 50
POWER CONSIDERATIONS
•
The average chip-Junction temperature, T j, In °C can be obtained from
T j= TA+ (P0 0 6jA)
Where.
TA,,"Amblent Temperature, °C
6jA .. Package Therma) Resistance, junctlOn-to-Amblent, °C/W
PO'" PINT + PPORT
PINT .. ICC x VCC, Watts - Chip Internal Power
PPORT- Port Power Oissipatlon, Watts - User Oetermlned
For most applications PPORT<C PINT and can be neglected PPORT may become Significant If the device IS configured to
drive Darlington bases or sink LEO loads
An approximate relatIOnship between Po and T j (,f PPORT IS neglected) IS
PD=K-lTj+273°C) (2)
Solving equations 1 and 2 for K gives.
K= Poo(TA+273°C) +6JAoP 0 2 (3)
Where K IS a constant pertaining to the particular part K can be determined from equation 3 by measuring Po (at eqUilibrium)
for a known T A USing thiS value of K the values of Po and T J can be obtained by solVing equations (1) and (2) Iteratively for any
value of TA
4·85
MC6801-MC6803-MC6803NR
DC ELECTRICAL CHARACTERISTICS (VCC=50 Vdc ±5% VSS=O TA=O to lOoC unless otherwise noted I
Characteristic Symbol Min Typ Max Unit
Input High Voltage i'i'E'Sn VSS+40 - VCC V
VIH
Other Inputs' VSS+20 - VCC
Input Low Voltage All Inputs' VIL VSS-O 3 - VSS+08 V
Input Load Current Port 4
lin
- - 05
rnA
(V,n = 0 to 2.4 VI SC1 - - 08
Input Leakage Current
(V,n=Oto 525 VI NliiIl, iRl!i, RESET lin - 15 25 "A
Three-State (Off Statel Input Current
(VIn =05t02.4VI P10-P17, P30-P37 ITSI - 20 10 "A
P20-P24 - 100 100
Output High Voltage
"Ioad= -100 "A, Vcc=mlnl P30-P37 VSS+24 - -
VOH V
"Ioad= -65 "A, Vcc=mlnl" P40-P47, E, SCI, SC2 VSS+24 - -
"load = -loo"A, Vcc=mlnl Other Outputs VSS+24 - -
Output Low Voltage
"load=2 OmA, Vcc=mlnl All Outputs VOL - - VSS+O 5 V
•
VCC Standby Powerdown VSBB 40 - 525
V
Powerup VSB 475 - 5.25
Standby Current Powerdown ISBB - - 60 rnA
'Except Mode Programming Levels, See Figure 16
"Negotiable to -100 "A (for further information contact the factoryl
FIGURE 2 - M6801 MICROCOMPUTER FAMILY BLOCK DIAGRAM
I Ii Expanded MultIplexed
Expanded Non-Multiplexed
30 P37
I
AlID7 D7 110
Single Chip ,
4·86
MC6801·MC6803·MC6803NR
FIGURE 3 - DATA SETUP AND HOLD TIMES FIGURE 4 - DATA SETUP AND HOLD TIMES
IMPU READ)
, M P U Read
r
(MPU WRITE)
MPUWrHe
PlO-Pt 7
P20-P24
P40-P47
~ ~/ {CMOS
Address
Bus
P30-P37
Inputs
NOTE Timing measurements are referenced to and from a low voltage of 0 8 volts and a high voltage of 20 volts, unless otherwise noted
4·87
MC6801· MC6803. MC6803N R
2 Pulse Width, E Low PWEL 430 1000 350 1000 300 1000 210 1000 ns
3 Pulse Width, E High PWEH 450 1000 350 1000 300 1000 220 1000 ns
4 Clock Rise and Fall Time tr, tf - 25 - 25 - 25 - 20 ns
9 Address Hold Time tAH 20 - 20 - 20 - 10 - ns
12 Non-Muxed Address Valid Time to E' tAV 200 - 150 - 115 - 70 - ns
17 Read Data Setup Time tDSR 50 - 70 - 50 - 40 - ns
18 Read Data Hold Time tDHR 10 - 10 - 10 - 10 - ns
19 Write Data Delay Time tDDW - 225 - 200 - 170 - 120 ns
21 Write Data Hold Time tDHW 20 - 20 - 20 - 10 - ns
22 Muxed Address Valid Time to E Rise' tAVM 200 - 150 - 115 - 50 - ns
24 Muxed Address Valid Time to AS Fall' tASL 60 - 50 - 40 - 20 - ns
25 Muxed Address Hold Time tAHL 20 - 20 - 20 - 10 - ns
26 Delay Time, E to AS Rise' tASD 90" - 70" - 50" - 45" - ns
•
27 Pulse Width, AS High' PWASH 220 - 170 - 140 - 110 - ns
28 Delay Time, AS to E Rise' tASED 90 - 70 - 60 - 45 - ns
29 Usable Access Time' ISee Note 9) tACC 595 - 465 - 380 - 270 - ns
• At specified cycle time
"tASD parameters listed assume external TTL clock drive with 50% ± 5% duty cycle DeVices driven by an external TTL clock with 50% ± 1%
duty cycle or which use a crystal have the following tASD specifications 100 ms min 11,0 MHz deVices), 80 ms min, 11 25 MHz deVice),
65 ms min, 11 5 MHz deVices), 50 ms min 120 MHz deVices)
FIGURE 7 - BUS TIMING
R/W,lOS,
Address ----i~~~~JC~~------------------rt--------------------------------rt~~~
(Non-Muxed) -----+~~~~~~~~------------------_i_t------------------------------------ri~~~
Addr/Data
Muxed
Address
Strobe IASi ___________-''f'1
NOTES
Voltage levels shown are VL.$O 5 \I, VH2:2 4 V, unless otherwise specified
Measurement pOints shown are 0 8 V and 2 0 V, unless otherWise specified
Usable access time IS computed by 12 + 3 - 17 + 4
Memory deVices should be enabled only dUring E high to avoid Port 3 bus contention
4-88
MC6801- MC6803- MC6803N R
1rl
Vee
RL18kO
C R MMD7000
or Equlv
~ ~
4-89
MC6801- MC6803- MC6803NR
~ A °U7
15--------- B
D ---------
~ 8-Blt Accumulators A and B
~
Or 16-BIt Double Accumulator D
•
Interrupt
L.._ _ _ _ _ _ Half Carry (From Bit 31
OPERATING MODES
The MC6801 provides eight different operating modes Non-Multiplexed IS Mode 5 and the remaining five are Ex-
(Modes a through 7), the MC6803 provides two operaling pRnded Multiplexed modes Table 2 summarIZes the
modes (Modes 2 and 3), and the MC6803NR provides one characteristics of the operating modes
operating mode (Mode 31 The operating modes are hard-
ware selectable and determine the device memory map, the MC6801 Single-Chip Modes (4, 7)
configuration of Port 3, Port 4, SCI, SC2, and the phYSical In the Single-Chip Mode, the four MCU ports are con-
location of the Interrupt vectors figured as parallel Input/output data ports, as shown In
Figure 11 The MCU functions as a monohthlc microcom-
FUNDAMENTAL MODES puter In these two modes Without external address or data
The eight operating modes can be grouped Into three fun- buses A maximum of 29 110 hnes and two Port 3 control
damental modes which refer to the type of bus It supports hnes are provided Peripherals or another MCU can be inter-
Single ChiP, Expanded Non-Multiplexed, and Expanded faced to Port 3 In a loosely coupled dual processor configura-
Multiplexed Single chip modes Include 4 and 7, Expanded tion, as shown In Figure 12
4·90
MC6801·MC6803·MC6803NR
In Single-Chip Test Mode (41, the RAM responds to bidirectional data bus and Port 4 IS configured Initially
$XX80 through $XXFF and the ROM IS removed from the in- as an Input data port Any combination of the eight least-
ternal address map A test program must first be loaded Into significant address lines may be ob18lned by writing to the
the RAM uSing modes 0, 1, 2, or 6 If the MCU IS Reset and Port 4 Data Direction Register Stated alternatively, any
then programmed Into Mode 4, execution will begin at combination of AO to A7 may be provided while retaining the
$XXFE XXFF Mode 5 can be irreversibly entered from Mode remainder as Input data lines Internal pullup rGSlstors pull
4 without asserting RESET by setting bit 5 of the Port 2 Data the Port 4 lines high until the port IS configured
Register ThiS mode IS used primarily to test Ports 3 and 4 ,n
the Single-Chip and Non-Multiplexed Modes
Figure 13 Illustrates a tYPical system configuration In the
Expanded Non-Multiplexed Mode The MCU Interfaces
MC6801 Expanded Non-Multiplexed Mode (51 directly With M6800 family parts and can access 256 bytes of
Amodest amount of external memory space IS provided In external address space at $100 through $1 FF lOS provides
the Expanded Non-Multiplexed Mode while significant on- an address decode of external memory ($100-$1 FFI and can
chip resources are retained. Port 3 functions as an 8-blt be used as a memory page select or chip select line
•
Reserved Register Area
Port 1
Port 2
Programmable Timer
Senal Communications Interface
Single Chip Mode 7
128 bytes of RAM, 2048 bytes of ROM
Port 3 IS a parallel 1/ 0 port With two control lines
Port 4 IS a parallel 1/0 port
SC1 IS Input Strobe 3 IIS~
SC2 IS Output Strobe 3 IOS31
Expanded Non-Multiplexed Mode 5
128 bytes of RAM, 2048 bytes of ROM
256 bytes of external memory space
Port 3 IS an 8-blt data bus
Port 4 IS an Input port! address bus
SCI IS Input/Output Select IIOSI
SC2 IS Read/Write IR/WI
Expanded Multiplexed Modes 1, 2, 3, 6'
Four memory space options (64K address spacel
111 No tnternal RAM or ROM IMode 31
12/ Internal RAM, no ROM IMode 21
13/ Internal RAM and ROM IMode 11
14/ Internal RAM, ROM With partial address bus IMode 61
Port 3 IS a multiplexed addressl data bus
Port 4 IS an address bus (,nputs/address In Mode 6)
SCI IS Address Strobe lAS)
SC2 IS Aead/Write IA/W)
Test Modes 0 and 4
Expanded Multiplexed Test Mode 0
May be used to test RAM and ROM
Single Chip and Non-Multiplexed Test Mode 4
111 May be changed to Mode 5 Without gOing through Reset
12/ May be used to test Ports 3 and 4 as I/O ports
"The MC6803 operates only In modes 2 and 3, the MC6803NR operates only In Mode 3
4·91
II
FIGURE 11 - SINGLE-CHIP MOOE FIGURE 12 - SINGLE-CHIP OUAL PROCESSOR CONFIGURATION
s:
n
§....
-
Vee Vee Vee
XTALI
n
s:•
§
Port 3
Port 1
81/0
Port 1
81/0
s:•
I II II IiS3
~z
Port 1
8 110 Lones 8110 Lones LInes LInes
0S3
I Port 2 Port 4
Port 4
8110 Lones
•
II ~ Port 2
5110 Lones I 5 110 Lones
SCI
81/0
Lines
:::c
'::" Senall/O
16-811 TImer
-= -=
VSS VSS VSS
Lines
16-81t Timer
~
cO
I\.)
-
Vee Vee
I
~ XTALI Port3 8
~(DO-D71
Port4 8
(AO-A71
-c::_ EXTAL2 iOS /
lOS
Vee Standby_ R/W R/W
RESET- E E
MC6801
NM-I~
IRol--
Port 3
Port 1
8 1/0 Lones 8 Data lines Port 1 .... ....
R/W 81/0 ...
Port 2
51/0
lOS
Port 2 ....
"
Port 4 --"
5 110
Lines
Senall/O
To 8 SCI ... --,.
16-81t Timer
-=-
Timer
~
VSS VSS
RAM PIA ACIA
----- ---- .
MC6801.MC6803· MC6803N R
Expanded-Multiplexed Modes (0, 1, 2, 3, 6) Multiplexed Modes Address Strobe can be used to control a
A 64K byte memory space IS provided In the expanded transparent D-type latch to capture addresses AO-A7, as
multiplexed modes In each of the expanded multiplexed shown In Figure 15 ThiS allows Port 3 to function as a Data
modes Port 3 functions as a time multiplexed address/data Bus when E IS high
bus with address valid on the negative edge of Address
Strobe lAS), and data valid while E IS high )n Modes 0 to 3, PROGRAMMING THE MODE
Port4 provides address lines AS to A 15 )n Mode 6, however, The operating mode IS determined at RESET by the levels
Port 4 initially IS configured at RESET as an Input data port asserted on P22, P21, and P20 These levels are latched Into
The port 4 Data Direction Register can then be changed to PC2, PC1, and PCO of the program control register on the
prOVide any combination of address lines, AS to A 15 Stated positive edge of RES ET The operating mode may be read
alternatlve)y, any subset of AS to A 15 can be provided whl)e from the Port 2 Data Register as shown below, and program-
retaining the remaining port 4 lines as Input data lines Inter- ming levels and timing must be met as shown In Figure 16 A
na) pullup resistors pull the Port 4 )Ines high until software brief outline of the operating modes IS shown In Table 3
configures the port
In Mode 0, the Reset vector IS external for the first two PORT 2 DATA REGISTER
E-cycles after the positive edge of RES ET, and Internal 7 6 5 4 3 2 o
thereafter In addition, the Internal and external data buses
are connected so there must be no memory map overlap In
order to avoid potential bus conflicts Mode 0 IS used
I PC21 PCl I I
PCO P241 P231 P221 P21 I I
P20 $0003
primarily to verify the ROM pattern and mOnitor the Internal
•
data bus With the automated test equipment CircUitry to proVide the programmmg levels IS dependent
Only the MC6801 can operate In each of the expanded primarily on the normal system usage of the three pms If
multplexed modes The MC6803 operates only In Modes 2 configured as outputs, the circuit shown In Figure 17 may be
and 3, while the MC6803NR operates only In Mode 3 used, otherWise, three-state buffers can be used to proVide
Figure 14 depicts a tYPical configuration for the Expanded- Isolation, while programming the mode
c
6 H H L I I I MUXI5,61 Multiplexed/Partial Decode
'The MC6803 operates only In Modes 2 and 3, the MC6803NR operates only In Mode 3
4·93
MC6801-MC6803-MC6803NR
Port 1 Port 3
8 I/O Lines
Port 2
Port 4
5 I/O lmes 8 Lines
Serrall/O Address Bus
16-BII Timer
VSS
V C
XTAl1
•
fXTAb2
Vee Sldndby
REsTI MC6801 1-_ _..L--,.,....-,r+____'"'T'"+____ril-_. . Addres~ Bus
NMi MC6803 16 (AD A151
R/W
iJillj MC6803NR 1------rlH---4"++---......t-I--. . RIN
Port 1
81/0
Port 2
5 I/O
SCI
TImer
VSS
NOTE To avoid data bus (Port 31 contention In the expanded multiplexed modes, memory devices should be enabled only dUring E high time
GND
AS
11
G OC
M'''~ ~A,
Dl at
Port 3
AddresslData lf 74LS373
ITYPlcal1 }
08 08
} ~ .. 000,
4-94
MC6801-MC6803-MC6803NR
See Figure 17
for~DIOde
Arrangement~ VMPDD
.,
..... - - V
(P20, P21, P221 " " MPL
_ _ ___ " ---.- Mode Latch
Mode Inputs ~ I Level
(P20, P21, P221
II
RESET Rise T,me< 1 ~s 100 -
1
>-
R2 : > Rl ~> Rl R,>
>
6
RESET RESET
8
P20 P20lPCOI
9
P2 1 P21 (PCll
10
P22 P22 (PC21
Mode
Control MC6801
SWitches MC6803
MC6803NR
D D D
Notes
I-....
1 Mode 7 as shown
2 R2-C =: Reset time constant C
3 Rl = 10 k ItYPlcall
4 D= lN914, lN4001 Ityplcall
5 Diode Vf should not exceed VMPDD min
MEMORY MAPS 6R, the MC6801 ROM has been relocated by a mask option
The M6801 Family can provide up to 64K byte address The first 32 locations of each map are reserved for the inter-
space depending on the operating mode A memory map for nal register area, as shown In Table 4, with exceptions as In-
each operating mode IS shown In Figure 18 In Modes 1Rand dicated
4·95
• ~
~
......
~
•
FIGURE 18 - MC6801/03/03NR MEMORY MAPS ~•
~
s:•
FIGURE 18 - MC6801/03/03NR MEMORY MAPS (CONTINUED)
MC6801
Mode
1 MC6801
Mode 1R MC6801
MC6803
2 ~•
Mode
s:
MultIplexed/RAM & ROM
$0000(11 v?77777J77JJt\.
MultIplexed/RAM & ROM
SOO00{11 OJ77nhn7A<--
Multlple)(ed/RAM
~
Z
Internal Registers Internal Registers I nternal Registers ::XJ
SOOl F I"<U////U/'j( $ 001 F ru««<'l<'l«K SOOl F f ( ( ( ( / / f i J I ! '1(
External Memory Space External Memory Space External Memory Space
S0080 b777777JJJJAC S0080 b77777777JzA( S0080 1,,,,,, u" ,ok'
Internal RAM Internal RAM Internal RAM
SOOFF r'/i/II((((/1(
SOOF F ~?///(«(~ SOOF F fIt // ((u///'K
~
cO '=xternal Memory Space
~
External Memory Space
SX800 121 It);))) 7J7JnK External Memory Space
Internal ROM(21
SF800 b777777777J:A<
SXFF:= F ( { { « ( ( ( ( ( ( U 11
Internal ROM
$FFEF 1//L///////L1(
SFFFO
SFFFF
External Interrupt Vectors
:::~ t t External Interrupt Vectors
$FFFF I v
External I nterrupt Vectors
II
.' s:
FIGURE 18 - MC6801/03/03NR MEMORY MAPS (CONTINUEDI
~....
s:•
~•
MC6801
MC6803
MC6803NR
Mode
3 MC6801
Mode
4 MC6801
Mode 5
Multiplexed/No RAM or ROM Single Chip Test Non~MuJtlplexed/ Partial Decode
s:
(')
$0000 111
$oooo~lnternal ~~ Internal
~
f///////////4( Internal RegIsters Registers Registers
$oolF $001 F""~~Lf':LL.:-L>
$OlFFY
External Memory Space Unusablel1l141
I
Unusable
-'='"
~
Internal ROM
$FFFOI r $XX80~lnternal RAM
External Interrupt Vectors 0"//////,/(1) Internal Interrupt Vectors
$FFFFI II $XXFF . Internal Interrupt Vectors
~z
Multiplexed/Partial Decode
SOOFF 1
External Memory Space
~ Unusable
External Memory Space
cO
CO
fnternal ROM Ij)
Notes Notes
1) Excludes the following addresses which may be 1) Excludes the following addresses which may
used extern",ly S04, S06, SOF be used externally $04, S06, $OF
2) Address lines AS-A 15 will not contain 2) Address lines A8-A 15 will not contain
addresses until the Data Direction Reglsterfor addresses until the Data DlrectlOn Register
Port 4 has been written with '"l's" In the for Port 4 has been written with "1 's" In the
appropriate bits These address Imes will appropriate bits These address lines will
assert "1 '5" unt,1 made outputs by writing the assert "l's" until made outputs by wrltmg the
Data DirectIon Register Data Direction Register
3) Starting addresses for the mternal ROM may
be SC800, SD800 or SE800
•
MC6801- MC6803- MC6803NR
•
pushed to the stack The I-bit IS set to Inhibit maskable Inter- Input Capture Register (High Byte) 00
Input Caplure Register (Low Byte) OE
rupts and a vector IS fetched corresponding to the current
Port 3 Control and Status Register OF'
highest Priority Interrupt The vector IS transferred to the
Program Counter and Instruction execution IS resumed In- Rate and Mode Control Register 10
terrupt and REm timing are Illustrated In Figures 20 and 21 Transmit/Receive Control and Status Register 11
Receive Data Register 12
FUNCTIONAL PIN DESCRIPTIONS Transmit Data Register 13
4-100
FIGURE 19 - INTERRUPT FLOWCHART
s:
~.....
s:•
~
s:•
~
Z
::tI
~
~
o
~
Vector . . PC
•
• s:
~......
FIGURE 20 - INTERRUPT SEQUENCE
I Cycle
Last Instructron-j #1 #2 #3 #4 I #5 I #6 #7 #8 #9 I #10 I #11 #12
s:•
~•
E
Internal
Address Bus
s:
~
IRQl
NMI or IRQ2
\. Z
~ !--tpcs :II
Internal
Data Bus
Op Code Op Code PC 0-7 PC8-15 X 0-7 X 8-15 ACCA ACCB CCR Irrelevant Vector Vector First Inst of
_ _ _ _ _ _ _ _ _ _ _ _~+...l1_'"\ Data MSB LSB Interrupt Routine
Internal R/W \ /
f'
-"'
oI\)
FIGURE 21 - RESET TIMING
•
V CC reaches 4 75 volts In order to proVide suffiCient time for
the clock generator to stabilize, and 121 until V CC Standby SCl And SC2 In Expanded Multiplexed Mode
reaches 475 volts RESET must be held low at least three
In the Expanded Multiplexed Modes, both SC1 and SC2
E-cycles If asserted dunng powerup operation
are configured as outputs SC1 functions as Address Strobe
and can be used to demultiplex the eight least significant ad-
E (ENABLE)
dresses and the data bus A latch controlled by Address
ThiS IS an output clock used pnmanly for bus synchroniza- Strobe captures address on the negative edge, as shown In
tion It IS TTL compatible and IS the slightly skewed dlvlde- Figure 15
by-four result of the deVice Input clock frequency It Will SC2 IS configured as Read/Wnte and IS used to control
drive one Schottky TTL load and 90 pF, and all data given In the direction of data bus transfers An M PU read IS enabled
cycles IS referenced to thiS clock unless otherWise noted when Read/Wnte and E are high
'"DeVices made With masks subsequent to M5G, M8D and T5P in-
7 6 543 2 1 o
corporate an advanced clock With Improved startup charac-
teristics
IPC21 PC1 I I
PCO P241 P231 P221 P21 I I
P20 $0003
4-103
MC6801-MC6803- MC6803NR
*NOTE These are representative AT-cut crystal parameters only Crystals of other
types of cut may also be used
MC6S01
1.1 3
•
• CL ~ 20 pF (tYPlcall
2
Ll
Cl
Co
RS
EqUivalent CircUIt
NOTE
TTL -compatible oscillators may be
obtained from
Motorola Component Products
Attn Data Clock Sales
2553 N Edgington St
Franklin Park, IL 60131
Tel 312·451-1000
Telex 433·0067
~4~7~5~V~-----------f~f----------------------------------
Vee
I. tAC
Oscillator
J
Stabilization
Time. tRC
4·104
MC6801- MC6803- MC6803N R
153
Flag
PORT 3 CONTROL AND STATUS REGISTER
IS3
IRQ1
6
Enable
X
5 4
OSS
3
Latch
Enable
2
X X
o
X $OOOF
Port 4 In Expanded Non-Multiplexed Mode
Port 4 IS configured from reset as an S-blt Input port,
where the Port 4 Data Direction Register can be written to
provide any or all of eight address lines, AO to A7 Internal
I
pullup resistors pull the lines high until the Port 4 Data Direc-
tion Register IS configured
Bit 0-2 Not used
Bit 3 LATCH ENABLE This bit controls the Port 4 In Expanded Multiplexed Mode
Input latch for Port 3 If set, Input data In all Expanded Multiplexed modes except Mode 6, Port 4
IS latched by an iS3 negative edge The functions as half of the address bus and provides AS to A 15
latch IS transparent after a read of the In Mode 6, the port IS configured from reset as an 8-blt
Port 3 Data Register LATCH ENAL- parallel Input port, where the Port 4 Data Direction Register
BLE IS cleared dUring reset can be wlllten to provide any or all of upper address lines AS
Bit 4 OSS (Output Strobe Select) This bit to A 15 Internal pullup resistors pull the lines high until the
determines whether OS3 will be Port 4 Data Direction Register IS configured, where bit 0 con-
generated by a read or write of the Port trols AS
3 Data Register When clear, the
strobe IS generated by a read, when
set, It IS generated by a write OSS IS
cleared dUring reset RESIDENT MEMORY
Bit 5 Not used
The MC6801 provides 2048 bvtes of on-board ROM and
Bit 6 IS3 IRQ1 ENABLE When set, an iROT
128 bytes of on-board RAM
Interrupt will be enabled whenever 153
One half of the RAM IS powered through the VCC standby
FLAG IS set, when clear, the Interrupt
pin and IS maintainable dUring V CC powerdown ThiS stand-
IS inhibited This bit IS cleared dUring
by portion of the RAM consists of 64 bytes located from $SO
reset
through $BF
Bit 7 IS3 FLAG This read-only status bit IS Power must be supplied to V CC standby If the Internal
set by an I S3 negative edge It IS RAM IS to be used regardless of whether standby power
cleared by a read of the Port 3 Control operation IS anticipated
and Status Register (with IS3 FLAG The RAM IS controlled by the RAM Control Register
set) followed by a read or write to the
Port 3 Data Register or dUring reset
RAM CONTROL REGISTER ($14)
Port 3 In Expanded Non-Multiplexed Mode The RAM Control Register Includes two bits which can be
Port 3 IS configured as a bidirectional data bus (07-00) In used to control RAM accesses and determine the adequacy
the Expanded Non-Multiplexed Mode The direction of data of the standby power source dUring powerdown operation
transfers IS controlled by Read/Write (SC2) Data IS clocked It IS rntended that RAME be cleared and STBY PWR be set
by E (Enable) as part of a powerdown procedure
4-105
MC6801·MC6803·MC6803NR
•
by software and IS not affected dUring bitrary timeout flag It IS compared With the free-running
reset counter on each E-cycle When a match occurs, OCF IS set
Status Register
Register
$OB Bit 1
Port 2
DDR
,...-
I
Output Compare Pulse ___ J Output Input
Level Edge
Bit 1 Bit 0
Port 2 Port 2
4·106
MC6801-MC6803-MC6803NR
and OLVL IS clocked to an output level register If Port 2, bit Sit 4 EICI Enable Input Capture Interrupt When
1, IS configured as an output, OLVL Will appear at P21 and set, an IRQ2 mterrupt IS enabled for an
the Output Compare Register and OLVL can then be Input capture, when clear, the Inter-
changed for the next compdre The function IS mhlblted for rupt IS mhlblted It IS cleared dUring
one cycle after a write to ItS high byte ($OBI to ensure a valid reset
compare The Output Compare Register IS set to $FFFF at Bit 5 TOF Timer Overflow Flag rOF IS set when
RESET the counter contains all 1's It IS
cleared by reading the TCSR (with
INPUT CAPTURE REGISTER ($OD:OE) TOF set) then reading the counter high
The Input Capture Register IS a 16-blt read-only register byte ($OO), or dUring reset
used to store the free-runnmg counter when a "proper" In- Bit 6 OCF Output Compare Flag OCF IS set
put transition occurs as defmed by IEDG Port 2, bit 0 should when the Output Compare Register
be configured as an mput, but the edge detect CirCUit always matches the free-runnmg counter It IS
senses P20 even when configured as an output An Input cleared by readmg the TCSR (with
capture can occur Independently of ICF the register always OCF setl and then wrltmg to the Out-
contains the most current value Counter transfer IS In- put Compare Register ($OB or $OCI, or
hibited, however, between accesses of a double byte MPU dUring reset
read The mput pulse Width must be at least two E-cycles to
Bit 7 ICF Input Capture Flag ICF IS set to m-
ensure an mput capture under all conditions
dlcate a proper level transition, It IS
cleared by reading the TCSR (with ICF
TIMER CONTROL AND STATUS REGISTER ($OB)
•
setl and then the Input Capture
The Timer Control and Status Register (TCSR) IS an 8-blt Register High Byte ($001, or dUring
register of which all bits are readable, while only bits 0-4 can reset
be written The three most significant bits provide the timer
status and md,cate If'
• a proper level transition has been detected,
• a match has occured between the free-running SERIAL COMMUNICATIONS INTERFACE (SCI)
counter and the output compare register, and
A full-duplex asynchronous Serial Communications Inter-
• the free-running counter has overflowed
face (SClils provided With two data formats and a variety of
Each of the three events can generate an IRQ2 Interrupt
rates The SCI transmitter and receiver are functionally m-
and IS controlled by an md,v,dual enable bit In the TCSR
dependent, but use the same data format and bit rate Serial
data formats Include standard mark/space (NRZI and BI-
TIMER CONTROL AND STATUS REGISTER (TCSR) phase and both provide one start bit, eight data bitS, and one
stop bit "Baud" and "bit rate" are used synonymously In
7 6 5 432 1 0 the follOWing deSCription
WAKE-UP FEATURE
In a typical serial loop mUlti-processor configuration, the
Bit OOLVL Output level OLVL IS clocked to the
software protocol Will usually Identify the addressee(s) at the
output level register by a successful
beglnnmg of the message In order to permit uninterested
output compare and Will appear at P21
MPU's to Ignore the remainder of the message, a wake-up
If Bit 1 of the Port 2 Data Direction
feature IS Included whereby all further SCI receiver flag (and
Register IS set It IS cleared dUring
Interrupti processing can be mhlblted until ItS data line goes
reset
Idle An SCI receiver IS re-enabled by an Idle string of ten
Bit 1 EIDG Input Edge IEDG IS cleared dUring consecutive 1's or dUring reset Software must provide for
reset and controls which level transI- the required Idle string between consecutive messages and
tion Will trigger a counter transfer to prevent It Within messages
the Input Capture Register
IEDG = 0 Transfer on a negative-edge PROGRAMMABLE OPTIONS
IEDG= 1 Transfer on a posItive-edge The followmg features of the SCI are programmable
Bit 2 ETOI Enable Timer Overflow Interrupt • format standard mark/space (NRZI or BI-phase
When set, an IRQ2 Interrupt IS enabled • clock external or Internal bit rate clock
for a timer overflow, when clear, the
• Baud one of 4 per E-clock frequency, or external
Interrupt IS mhlblted It IS cleared dur-
clock ( x 8 deSired baud)
Ing reset
• wake-up feature enabled or disabled
Sit 3 EOCI Enable Output Compare Interrupt
When set. an IRQ2 Interrupt IS enabled • Interrupt requests enabled Individually for trans-
for an output compare, when clear, mitter and receiver
the Interrupt IS mhlblted It IS cleared • clock output Internal bit rate clock enabled or diS-
dUring reset abled to P22
4-107
MC6801- MC6803-MC6803NR
SERIAL COMMUNICATIONS REGISTERS Bit 1 Bit 0 S S 1 SSO S peed Select These two
The Serial Communications Interface Includes four ad- bits select the Baud when uSing the in-
dressable registers as depicted In Figure 24 It IS controlled ternal clock Four rates may be
by the Rate and Mode Control Register and the selected which are a function of the
Transmlt/ Receive Control and Status Register Data IS MCU Input frequency Table 6 lists bit
transmitted and received utilizing a write-only Transmit time and rates for three selected M CU
Register and a read-only Receive Register The shift registers frequencies
are not accessible to software Bit 3 Bit 2 CCl CCO Clock Control and Format
Select These two bits control the for-
mat and select the serial clock source
Rate and Mode Control Register IRMCR) 1$10) If CCl IS set, the DDR value for P22 IS
The Rate and Mode Control Register controls the SCI bit forced to the complement of CCO and
rate, format, clock source, and under certain conditions, the cannot be altered until CCl IS cleared
configuration of P22 The register consists of four write-only If CCl IS cleared after haVing been set,
bits which are cleared dUring reset The two least Significant ItS DDR value IS unchanged Table 7
bits control the bit rate of the Internal clock and the remain- defines the formats, clock source, and
Ing two bits control the format and clock source use of P22
If both CCl and CCO are set, an external TTL compatible
clock must be connected to P22 at eight times 18XI the
deSired bit rate, but not greater than E, With a duty cycle of
50% I ± 10%1 If CCl CCO= 10, the Internal bit rate clock IS
•
RATE AND MODE CONTROL REGISTER IRMCR) provided at P22 regardless of the values for TE or RE
NOTE: The source of SCI internal bit rate clock is the timer
7 6 5 43210
free running counter. An MPU write to the counter
x x x x 1 CCl 1 CCO 1 SSll SSO 1 $0010 can disturb serial operations.
Port 2
10
12
4·108
MC6801 e MC6803e MC6803NR
Transmit/ Receive Control And Status Register Sit 5 TDRE Transmit Data Register Empty TDRE
ITRCSR) 1$11) IS set when the Transmit Data Register
The Transmit/Receive Control and Status Register con- IS transferred to the output serial shift
trols the transmitter, receiver, wake-up feature, and two in- register or dUring reset It IS cleared by
dividual Interrupts and mOnitors the status of serial opera- reading the TRCSR IWlth TDRE set)
tions All eight bits are readable while bits 0 to 4 are also and then writing to the Transmit Data
writable The register IS initialized to $20 by RESET Regrster Additional data will be
transmitted only If TDR E has been
TRANSMIT/RECEIVE CONTROL AND STATUS cleared
REGISTER ITRCSR) Sit 6 ORFE Overrun Framing Error If set, ORFE In-
dicates either an overrun or framing er-
6 5 4 3 2 o ror An overrun IS a new byte ready to
transfer to the Receiver Data Register
With RDRF stili set A receiver framing
error has occurred when the byte
S,tOWU "Wake-up" on Idle Line When set, boundaries of the bit stream are not
WU enables the wake-up function, It IS synchronized to the bit counter An
cleared by ten consecutive 1'5 or dur- overrun can be distinguished from a
Ing reset WU will not set If the line IS framing error by the state of RDRF If
Idle RDRF IS set, then an overrun has oc-
•
Sit 1 TE T ransmt Enable When set, P24 DDR curred, otherWise a framing error has
bit IS set, cannot be changed, and will been detected Data IS not transferred
remain set If TE IS subsequently to the Receive Data Register In an
cleared When TE IS changed from overrun condition Unframed data
clear to set, the transmitter IS con- causing a framing error IS transferred
nected to P24 and a preamble of nine to the Receive Data Register
consecutive 1'5 IS transmitted TE IS However, subsequent data transfer IS
cleared dUring reset blocked until the framing error flag IS
Sit 2 TIE Transmit Interrupt Enable When set, cleared' ORFE IS cleared by reading
an IR02 Interrupt IS enabled when the TRCSR IWlth ORFE set) then the
TDRE IS set, when clear, the Interrupt Receive Data Register, or dUring reset
IS inhibited TE IS cleared dUring reset Sit 7 RDRF Receive Data Register Full RDRF IS
Sit 3 RE Receive Enable When set, the P23 set when the Input serial shift register
DDR bit IS cleared, cannot be chang- IS transferred to the Receive Data
ed, and will remain clear If RE IS subse- Register It IS cleared by readmg the
quently cleared While RE IS set, the TRCSR IWlth RDRF set), and then the
SCI receiver IS enabled RE IS cleared Receive Data Register, or dUring reset
dUring reset
Sit 4 RIE Receiver Interrupt Enable When set, "Oevlces made With mask numbers M5G, M8D, and TbP do not
an IR02 Interrupt IS enabled when transfer unframed data to the Receive Data Register
RDRF and/or ORFE IS set, when clear,
the Interrupt IS Inhibited RIE IS cleared
dUring reset
4·109
SERIAL OPERATIONS executable Instruction IS suffiCient to Identify the Instruction
The SCI IS Inttlalized by wntlng control bytes first to the and the addreSSing mode The hexadeCimal eqUivalents of
Rate and Mode Control Register and then to the the binary codes, which result from the translation of the 82
Transmltl Receive Control and Status Register When TE IS Instructions In all valid modes of addreSSing, are shown In
set, the output of the transmit senal shift register IS con- Table 8 There are 220 valid machine codes, 34 unassigned
nected to P24 and senal output IS Initiated by transmitting a codes, and 2 codes reserved for test purposes
9-blt preamble of l's
At this pOint one of two situations eXist lllf the Transmit PROGRAMMING MODEL
Data Register IS empty (TDRE= 11, a continuous stnng of l's A programming model for the MC6801/03/03NR IS shown
will be sent indicating an Idle line, or 21 If a byte has been In Figure 11 Accumulator A can be concatenated with ac-
wntten to the Transmit-Data Register (TDRE=Q), It Will be cumulator B and JOintly referred to as accumulator D where
transferred to the output senal shift register (synchronized A IS the most significant byte Any operation which modifies
with the bit rate clockl, TDRE Will be set, and transmission the double accumulator Will also modify accumulator A
Will begin and I or B Other registers are defined as follows
The start bit (01, eight data bits Ibeglnnlng with bit 01 and a Program Counter - The program counter IS a 16-blt
stop bit (11, Will be transmitted If TDRE IS stili set when the register which always pOints to the next Instruction
next byte transfer should occur, l's Will be sent until more
Stack Pointer - The stack pOinter IS a 16-blt register
data IS provided In BI-phase format, the output toggles at
which contams the address of the next available location In a
the start of each bit and at half-bit time when a "1" IS sent.
pushdown/pullup (L1FOI queue The stack reSides In ran-
Receive operation IS controlled by RE which configures P23
dom access memory at a location defined by the program-
as an Input and enables the receiver SCI data formats are Il-
mer.
lustrated In Figure 25
I
Index Register - The Index Register IS a 16-blt register
INSTRUCTION SET which can be used to store data or provide an address for the
Indexed mode of addreSSing
The MC6801/03/03NR IS upward source and object code Accumulators - The M PU contains two 8-b" ac-
compatible with the MC6800 Execution times of key Instruc- cumulators, A and B, which are used to store operands and
tions have been reduced and several new Instructions have results from the anthmetlc logiC unit IALUI They can also be
been added, Including a hardware multiply A list of new concatenated and referred to as the D Idoublel accumulator
operations added to the MC6800 instruction set IS shown In Condition Code Registers - The condition code register
Table 1 Indicates the results of an Instruction and Includes the
In addition, two new speCial opcodes, 4E and 5E, are pro- following five condition bits Negative I NI , Zero IZI,
Vided for test purposes These opcodes force the Program Overflow (VI, Carry/Borrow from MSB ICI, and Half Carry
Counter to Increment like a 16-blt counter, causing address from bit 3 I HI These bits are testable by the conditional
lines used In the expanded modes to Increment until the branch instructions Bit 4 IS the Interrupt mask (I-bltl and In-
deVice IS reset. These opcodes have no mnemoniCS hibits all maskable Interrupts when set The two unused bitS,
The coding uf the first (or onlyl byte corresponding to an B6 and B7, are read as ones
Output
Clock
NRZ
Format
BI-Phase
J=ormat
Bit Bit
Idle Start a 3 4 5 6 7 Stop
Data 01001101 1$401
4·110
MC6801-MC6803-MC6803NR
ADDRESSING MODES tlons, the 256-byte area IS reserved for frequently referenced
S'X addressing modes can be used to reference memory data
A summary of addressing modes for all Instructions IS Extended Addressing - The second and third bytes of the
presented In Tables 9, 10, 11, and 12, where execution times Instruction contain the absolute address of the operand
are proVided In E-cycles Instruction execution times are These are three byte Instrutlons
summarized In Table 13 With an Input frequency of 4 MHz, Indexed Addressing - The unSigned offset contained In
E-cycles are eqUivalent to microseconds A cycle-by-cycle the second byte of the instruction IS added With carry to the
deSCription of bus activity for each instruction IS provided In Index Register and used to reference memory Without
Table 14 and a deSCription of selected Instructions IS shown changing the Index Register These are two byte Instruc-
In Figure 26 tions
Immediate Addressing - The operand or "Immediate Inherent Addressing - The operand(s) are registers and
byte(s)" IS contained In the following byte(s) of the Instruc- no memory reference IS reqUired These are Single byte In-
tion where the number of bytes matches the size of the structions
register These are two or three byte instructIOns Relative Addressing - Relative addreSSing IS used only for
Direct Addressing - The least Significant byte of the branch instructions If the branch conditIOn IS true, the Pro-
operand address IS contained In the second byte of the in- gram Counter IS overwritten With the sum of a Signed Single
struction and the most Significant byte IS assumed to be $00 byte displacement In the second byte of the Instruction and
Direct addreSSing allows the user to access $00 through $FF the current Program Counter ThiS proVides a branch range
uSing two byte Instructions and execution time IS reduced by of - 126 to 129 bytes from the fllst byte of the Instruction
eliminating the additional memory access In most applica- These are two byte instructIOns
.
TABLE 8 - CPU INSTRUCTION MAP
-. -. . .
t-
•
OP
00
MNEM MODE
- OP
14
MNEM
DES
MODE
INHfR 3 I
OP
68
MNEM
ASL
M DE
INDXD 6 2
OP
9C
MNEM
CPx Dl
---
MODE
5 2
OP
DO
MNEM
SUB8
MODE
DIR
-
3 2
I
01 NOP IN ER 2 I 35 TXS 3 I 69 ROL 6 2 90 JSR 5 2 01 (MPS 3 2
02 36 PSHA 3 I 6A DEC 6 2 9E LOS 4 2 02 S~CB 3 2
03 37 PSHB 3 I 6B 9f STS DIR 4 2 03 ADDD 5 2
04 LSAD 3 I 38 PULX 5 I 6C INC 6 2 40 SUBA INDXD 4 2 04 ANOS 3 2
Db ASLD 3 I 39 ATS 5 I 60 TST 6 2 AI CMPA 4 2 OS BITS 3 2
06 TAP 2 I 3A ABX 3 I fiE JMP 3 2 A2 seCA 4 2 06 LDAS 3 2
07 TPA 2 I 3B RTI 10 I 6F CLR INDXD 6 2 A3 SUBD 6 2 07 STAB 3 2
DB INX 3 I 3C PSHX 4 I 70 NEG fXTND 6 3 A4 ANDA 4 2 DB EORB 3 2
,,
09 DEX 3 I 3D MUL 10 I 71 A5 BITA 4 2 09 AceS 3 2
OA
DB
CLV
SEV ,
2 I
1
3E
3F
WAI
SWI
9
12
1
1
72
73 rOM 6 3
A6
A7
LOAA
STAA
4
4
2
2
OA
DB
ORAB
ADDs
3
I
DC CLC 2 1 40 NEGA 2 1 74 LSR 6 3 AB EORA 4 2 Dr I DO 4 I
00 SEC 2 1 41 75 A9 ADCA 4 2 DO "0 4
DE CLI 2 1 42 76 ROR 6 3 AA DRAA 4 2 DE lOX 4
,1
OF
10
SEI
SBA
2
2
1
,
1
43
44
COMA
LSRA ,
2 1
1
77
7B
ASR
ASL
6
6
3
3
AB
AC
ADDA
(PX
4
b
2
2
OF
ED
',IX
'>lJHII
( MPH
[JlIi
IMPH) ,1
., i
11 CBA 2 45 79 ROL 6 3 AD JSR b 2 F1 I
12
13
46
47
RORA
ASRA
2
2
I 17A
1 78
DEC 6 3 AE
M
LOS
STS INDXO ,
5 2
2
E2
E3
~B( B
AODD
4
b
I
)
\4 48 ASLA 2 1 7C INC 6 3 80 SUBA fXTND 4 7 E4 ANDB 4 2
15 49 ROLA 2 1 70 TS7 6 3 B1 ('MPA 4 3 E5 81T8 4 2
16 TAB ) 1 4A OECA 2 1 7[ JMP 3 3 82 SBCA 4 3 E6 LDAB 4 2
17 TBA 2 1 48 7F CLR I::XTND 6 3 B3 SUBD 6 3 E7 STAB 4 2
1B 4C INCA 2 1 80 SU8A IMMED 2 2 84 ANOA 4 3 E8 EORS 4 2
19 OAA tNHER 2 1 40 TSlA 2 1 81 CMPA 2 2 B5 elTA 4 3 E9 ADCB 4 2
1A 4E T 82 seCA 2 2 86 lOAA 4 3 EA DRAB 4 2
1B ABA INHER 2 I 4F ClRA 2 1 83 SUBD 4 3 87 51AA 4 3 EB ADDS 4 2
1C 50 NEGB 2 1 84 ANDA 7 2 88 EORA 4 3 EC LaD 5 2
10 51 85 BllA 7 2 B9 AO(A 4 3 EO STD 5 2
1E 52 86 LDAA 7 2 8A DRAA 4 3 EF LOX 5 2
1F 53 COMB 2 1 87 6B ADOA 4 3 EF ST> INoxa 5 2
20 ORA REL 3 2 54 LSRB 7 1 B8 tORA } 2 8e epx 6 3 EO SUBS fXTND 4 3
21 8RN 3 2 55 89 ADCA } 2 BO JSA 6 3 E1 CMPB 4 3
22 8HI 3 2 56 RaRB 2 I 8A ORAA 2 2 8E LOS 5 3 E2 sece 4 3
23 BLS 3 2 57 ASRB 2 1 8B ADOA 2 2 RF SIS EXl'ND 5 3 r3 ADDO 6 3
24 8CC 3 2 58 ASLB 2 1 8C (rx IMMH) 4 3 CO SUBS IMMED 2 2 F4 ANOS 4 3
c5 BITS 4
.
25 BCS 3 2 59 ROLS 2 1 80 BSR REL b 2 ('1 (MPB 2 2 3
26 8NE 3 2 5A OECB 2 I I BE LOS IMMED 3 3 ('2 sees 2 2 F6 LOAS 4 3
27 8EQ 3 2 58 C3 ADOO 4 3 F7 STAB 4 3
2B 8VC 3 2 5C INCB 2 I 90 SUBA 0" 3 2 e4 ANoe 2 7 f8 fORB 4 1
29 BVS 3 2 SO T516 2 I 91 CMPA 3 2 co BITS 2 2 F9 AOCB 4 3
2A 8PL 3 2 1 2 ('6 LOAS ) 2 FA aRAB 4 3
50 I 92 seCA
28
2C
8MI
BGE
3
3
2
2
5f
60
(LRB
NEG
INHEA
INoxa
2
b
1
2 ,.
93 sueD
ANDA
5
3
2
2
C7
C8
C9
EORB
ADCB
7
7
2
2
FB
FC
FD
ADDe
LaD
STO
4
5
5
3
3
3
I
20 8CT 3 2 61 95 elTA 3 2
2E 8GT 3 2 62 96 LOAA 3 2 eA DRAB 7 2 fE LOX 5 3
2F 8LE REL 3 2 63 COM 6 2 97 SlAA 1 2 C8 ADDS 7 2 FE STX EXTND 5 3
30 TSX INHER 3 1 64 LSR 6 2 98 fORA 3 2 ce WD 1 3
t
31 INS 3 1 AOCA 3 2 (0
65 99 UNDEFINfD OP (ODE
32 PULA 4 I 66 ROR 6 2 9A DRAA 3 2 C~ LOX IMMEO 3 3
33 PULB 4 1 67 ASR INDXD 6 2 98 ADDA 3 2 Cf
----- --------
NOTES
1 AddreSSing Modes
INHER '" Inherent INDXD", Indexed IMMED", Immediate
REL", Relative EXTND", Extended DIR",Dlfect
Unassigned opcodes are IndIcated by "*,, and should not be executed
Codes marked by "T" force the PC to functIon as a 16-blt counter
4-111
MC6801· MC6803· MC6803N R
CPX 8C 4 3 9C 5 2 AC 6 2 BC 6 3 M +1
Boolean/
Anthmetic Operation
!< - M
H I N Z V C
• • ·11
II I i
,
Decrement Index Reg DEX 09 3 1 X -1 -X
•• I ••
Decrement Stack Pntr DES 34 3 1 sp - 1 -SP
• • ·It
••••
Increment Index Reg INX 08 3 1 X + 1 -X
•• ••
Increment Stack Pntr INS 31 3 1 1 SP + 1 SP
••••••
Load Index Reg LDX CE 3 3 DE 4 2 EE 5 2 FE 5 3 M -XH, 1M + 1)--XL
•• R • R
Load Stack Pntr LDS 8E 3 3 9E 4 2 AE 5 2 BE 5 3 M -SPH, 1M + 1) --SPL
•• •
Store Index Reg STX DF 4 2 EF 5 2 FF 5 3 XH -M, XL -1M + 11
•• R •
Store Stack Pntr STS 9F 4 2 AF 5 2 BF 5 3 SPH -M, SPL -1M + 1)
•• • R
Index Reg - Stack Pntr TXS 35 3 1 X - 1 -SP
••••••
Stack Pntr - Index Reg TSX 30 3 1 SP + 1 -X
•• •• • • • •
• • •• • " •
Add
Push Data
ABX
PSHX
3A 3
3C 4
1 B +X-X
1 XL -MSp, SP - 1 -SP
•••
XH -MSR SP - 1~SP
••••••
II
Pull Data PULX 38 5 1 SP + 1 -SP, MSp -XH
SP + 1 -SP, MSp --XL
Accumulator and Immed Direct Index Extend '"her Boolean Condition Codes
Memory Operations MNE Op # Op # Op - # Op # Op # Expression H I N Z V C
• •• • • • •
Add Acmltrs ABA 18 2 1 A +8-A I I
AddBtoX ABX 3A 3 1 OOB+X-X
•••
Add with Carry ADCA 89 2 2 99 3 2 A9 4 2 89 4 3 A+M+C-A
ADCB C9 2 2 D9 3 2 E9 4 2 F9 4 3 B+M+C-B
Add ADDA 88 2 2 9B 3 2 AB 4 2 BB 4 3 A +M -A
• •••
ADOB CB 2 2 OB 3 2 EB 4 2 FB 4 3 B + M-A
Add Double ADDD C3 4 3 D3 5 2 E3 6 2 F3 6 3 D + M M + 1-D
••• •• ••
And ANDA 84 2 2 94 3 2 A4 4 2 B4 4 3 A·M-A R
--
ANDB C4 2 2 D4 3 2 E4 4 2 F4 4 3 B' M --8 R
Shift Left, ASL 68 6 2 78 6 3 J j
Arithmetic ASLA
ASLB
48 2 1
58 2 1
&)-...IIIIIIIII+-o
b7 bO •• •• I
~ Contmued-
4·112
MC6801·MC6803·MC6803NR
Accumulator and Immed Diract Index Extend Inher Boolean Condition Cod••
Memory Operations MNE
Op - # Op # Op - # Op -
# Op - # Expression H N Z V C
Shift Left Dbl ASLD 05 3 1
Shift Right, ASR 67 6 2 77 6 3
Arithmetic ASRA 47 2 1 qlllli III+El
b7 bO
ASRB 57 2 1
Bit Test BITA
BITB
85 2 2 95 3 2 A5 4 2 B5 4 3
C5 2 2 D5 3 2 E5 4 2 F5 4 3
A'M
B'M
R
R
••
Compare Acmltrs CBA 11 2 1 A-B I I
Clear CLR 6F 6 2 7F 6 3 OO-M R S R R
CLRA 4F 2 1 OO-A R S R R
CLRB 5F 2 1 OO-B R S R R
Compare CMPA B1 2 2 91 3 2 A1 4 2 B1 4 3 A-M I
CMPB C1 2 2 D1 3 2 E1 4 2 F1 4 3 B-M I
"s Complement COM 63 6 2 73 6 3 IM-M R S
COMA 43 2 11A"-A R S
COMB 53 2 1 'IJ-B R S
Decimal Adj, A DAA 19 2 1 Adj binary sum to BCD
•••
Decrement DEC 6A 6 2 7A 6 3 M-1-M
DECA 4A 2 1 A-1-A
DECB 5A 2 1 B-1 -B
Exclusive OR EORA BB 2 2 98 3 2 AB 4 2 BB 4 3 A @ M-A R
•
•••
EORB CB 2 2 DB 3 2 E8 4 2 FB 4 3 B @ M-B f R
Increment INC 6C 6 2 7C 6 3 M+ 1-M II
Load Acmltrs
Load Double
INCA
INCB
LDAA
LDAB
LDD
B6 2 2 96 3 2 A6 4 2 B6 4 3
C6 2 2 D6 3 2 E6 4 2 F6 4 3
CC 3 3 DC 4 2 EC 5 2 FC 5 3
4C 2 1 A + 1-A
5C 2 1 B + 1-B
M-A
M-B
M M+ 1-D
R
R
R
••
•• I
logical Shift,
Left
LSL
LSLA
LSLB
LSLD
6B 6 2 7B 6 3
4B 2 1
5B 2 1
05 3 1
--
0 ...... 11111111'-0
b7 bO
•• •• •• •••
ORAB CA 2 2 DA 3 2 EA 4 2 FA 4 3 B+ M-B I R
Push Data PSHA 36 3 1 A -Stack
PSH8 37 3 1 B --Stack
Pull Data PULA 32 4 1 Stack -A
•• • • ••
Rotate Left
PULa
ROL
ROLA
69 6 2 79 6 3
33 4 1 Stack -B
-
49 2 1 g..H Ii " i II H-m
I I
I
•• I
I
-
b7 bO
ROLB 59 2 1 I
Rotate Right ROR 66 6 2 76 6 3 I
RORA 46 2 1 ~11i1!11~
RORB 56 2 1 b7 bO
4·113
MC6801·MC6803·MC6803NR
R.lative
Direct Index Extnd Inheren
Condo Code Reg.
Ii 4 3 2 0 ,
Operations Mnemonic OP -# OP- # OP- # OP - # OPr- Branch Test H I N Z V C
•••• •
• • • • •• •
Branch Alwavs BRA 203 2 None
Branch Never BRN 21 3 2 None
•• •
•• • •• •• • ••
Branch If Carry Clear BCC 24 3 2 C=O
Branch If Carry Set BCS 25 3 2 C=1
Branch If = Zero BEQ 27 3 2 Z=1
•••••
Branch If "" Zero BGE 2C 3 2 N$V=O
••••••
•••••
• • • • • ••
Branch If > Zero BGT 2E 3 2 Z+(N$V)=O
Branch If Higher BHI 22 3 2 C+Z=O
Branch If Higher or Same BHS 24 3 2 C=G
• •••• •
•••••
•• • • • • ••
Branch If < Zero BlE 2F 3 2 Z+(N$V)= 1
Branch If Carry Set BLO 25 3 2 C- 1
Branch If lower Or Same
Branch If < Zero
BlS
BlT
23 3 2
203 2
C+Z =1
N$V= 1
•••••
••••••
•••••
• • • • • ••
Branch If Minus BMI 2B 3 2 N -1
Branch If Not Equal Zero BNE 26 3 2 Z-O
• ••••••
Branch If Overflow Clear BVC 2B 3 2 V=O
Br anch If Overflow Set BVS 29 3 2 V=1
••••••
Branch If Plus BPl 2A 3 2 N=O
••••••
Branch To Subroutme BSR 806 2
} See Special ••••••
•••• •
• • • • •• •
Jump JMP 6E 3 2 7E 3 3 Operations ~
Inherent
Cond Code Reg
5 4 3 2 0 ,
Operattons Mnemonic OP - # Boolean Operation H I N Z V C
Clear Carry ClC OC 2 1 O-C
••••• R
Clear Interrupt Mask CLI OE 2 1 0-1
• ••••
R
••• •
• • • •• •
Clear Overflow ClV OA 2 1 O-V R
Set Carry SEC 002 1 1-C S
Set Interrupt Mask SEI OF 2 1 ,1-1
• ••••
S
Set Overflow
Accumulator A -CCR
SEV
TAP
OB 2
06 2
1
1
1 -V
A -CCR
•I II• •, •I I I
S •
4·114
MC6801· MC6803· MC6803N R
! .
'ii
."
"c ." ;:
..,".>
$
.
.,
'ii
.,
."
." .,
."
~
C
"
.~
E"
~
"f
."
"
)( f
E
lJ c
$)(
.,
)(
~ .!!
.E 0 ~
w
"
."
E E
"
.r:: a;
a: .E 0
f
w
."
E
.r::
E "
ABA
• •• •• • 2
•• INX
••• •• • • 3
•2 • •••
ABX 3 JMP 3 3
ADC 3 4 4
•• • JSR 5 6 6
•••
ADD 2 3 4 4 LOA 2 3 4 4
ADDD
AND
4
2
5
3
6
4
6
4
•
•2
LDD
LOS
3
3
4
4
5
5
5
5
••
••• ••• •• •2
ASL 6 6 LOX 3 4 5 5
ASLD •6 •6 3 LSL
•
•
•• 6
•6 •
6
ASR
•• •• ••
2
•3 LSLD
•
3
• ••
BCC LSR 6 2
••
••• ••• ••6
BCS 3 LSRD 3
BEQ
•• •• •••
3 MUL
•• 10
•••
BGE 3 NEG 6 2
•
BGT
•• •• •••
3 NOP
•2 •3 • • 2
•
••
BHI 3 QRA 4 4
BHS
•2 • •
3 PSH
•• • •• •
••
3
•••
••
BIT 3 4 4 PSHX 4
•• •• •• •
••• ••
BLE 3 PUL 4
BLO 3 PULX
•• •6 • 5
••
•• • •• ••
BLS 3 ROL 6 2
BLT
• • 3 ROR
•••
6 6 2
••
•• ••• ••• •• ••• ••• •• ••
BMI 3 RTI 10
BNE 3 RTS 5
BPL
•• •••
3 SBA
•3 • • 2
•• •• • •• •
BRA 3 SBC 2 4 4
BRN
•• • • ••
3 SEC
••• •• ••
2
•••
BSR 6 SEI 2
BVC
• ••• •• ••2
3 SEV
• • • • 2
••• •••
BVS 3 STA 3 4 4
••• •• •• •••
CBA STD 4 5 5
•••
CLC 2 STS 4 5 5
CLI
CLR
•• 6
•6 2
2
STX
SUB
•
2
4
3
5
4
5
4
•
CLV
• • • • 2 SUBD 4 5 6
•• •• •
6
•2 • •••
CMP 2 3 4 4 SWI 12
COM
• •5 6 6 TAB
•• •• ••
2
CPX 4
•• ••
6
•
6
•2 TAP 2
•6 ••• •••
DAA TBA 2
DEC
DES
• ••
6
•• •
2
3
TPA
TST
•6 •6 2
2
DEX
• • 3 TSX
••
••• •• • 3
•• ••
EOR 2 3 4 4 TXS 3
INC
INS
•• •• 6
•
6
• 3
WAI
• • 9
4-115
MC6801·MC6803-MC6803NR
Table 14 provides a detailed description of the information per instruction In general, instructions with the same ad-
present on the Address Bus, Data Bus, and the Read/Write dressing mode and number of cycles execute In the same
(R/W) line dUring each cycle of each Instruction manner Exceptions are indicated In the table
The Information IS useful In comparing actual with ex- Note that dUring MPU reads of Internal locations, the
pected results dUring debug of both software and hardware resultant value will not appear on the external Data Bus ex-
as the program IS executed. The information IS categorized In cept In Mode a "High order" byte refers to the most signifi-
groups according to addressing mode and number of cycles cant byte of a 16·blt value
•
LOS 3 1 Op Code Address 1 Op Code
LOX 2 Op Code Address + 1 1 Operand Data (High Order Byte)
LDD 3 Op Code Address + 2 1 Operant.: Data (Low Order Byte)
CPX 4 1 Op Code Address 1 Op Code
SUBD 2 Op Code Address + 1 1 Operand Data (High Order Byte)
ADDD 3 Op Code Address + 2 1 Operand Data (Low Order Byte)
4 Address Bus FFFF 1 Low BytE' of Restart Vector
DIRECT
ADC EOR 3 1 Op Code Address 1 Op Code
ADD LOA 2 Op Code Address + 1 1 Address of Operand
AND ORA 3 Address of Operand 1 Operand Data
BIT SBC
CMP SUB
STA 3 1 Op Code Address 1 Op Code
2 Op Code Address + 1 1 Destination Address
3 Destination Address 0 Data from Accumulator
LOS 4 1 Op Code Address 1 Op Code
LOX 2 Op Code Address + 1 1 Address of Operand
LDD 3 Address of Operand 1 Operand Data (High Order Byte)
4 Operand Address + 1 1 Operand Data (Low Order Byte)
STS 4 1 Op Code Address 1 Op Code
STX 2 Op Code Address + 1 1 Address of Operand
STD 3 Address of Operand 0 Register Data (High Order Byte)
4 Address of Operand + 1 0 Register Data (Low Order Byte)
CPX 5 1 Op Code Address 1 Op Code
SUBD 2 Op Code Address + 1 1 Address of Operand
ADDD 3 Operand Address 1 Operand Data (High Order Byte)
4 Operand Address + 1 1 Operand Data (Low Order Byte)
5 Address Bus 'FFFF 1 Low Byte of Restart Vector
JSR. 5 1 Op Code Address 1 Op Code
2 Op Code Address + 1 1 Irrelevant Data
3 Subroutine Address 1 Fn st Subroutine Op Code
4 Stack POinter 0 Return Address (Low Order Byte)
5 Stack Pomter + 1 0 Return Address(Hlgh Order Byte)
- Contmued-
4-116
MC6801-MC6803- MC6803N R
EXTENDED
JMP 3 1 Op Code Address 1 Op Code
2 Op Code Address + 1 1 Jump Address (High Order Byte)
3 Op Code Address + 2 1 Jump Address (Low Order Byte)
ADC EOR 4 1 Op Code Address 1 Op Code
ADD LOA 2 Op Code Address + 1 1 Address of Operand
AND ORA 3 Op Code Address + 2 1 Address of Operand
(Low Order Byte)
BIT SBC 4 Address of Operand 1 Operand Data
CMP SUB
STA 4 1 Op Code Address 1 Op Code
2 Op Code Address + 1 1 Destination Address
(High Order Byte)
3 Op Code Address + 2 1 Destmatlon Address
(Low Order Byte)
4 Operand Destmatlon Address 0 Data from Accumulator
•
LOS 5 1 Op Code Address 1 Op Code
LOX 2 Op Code Address + 1 1 Address of Operand
(High Order Byte)
LDD 3 Op Code Address + 2 1 Address of Operand
(Low Order Byte)
4 Address of Operand 1 Operand Data (High Order Byte)
5 Address of Operand + 1 1 Operand Data (Low Ortier Byte)
STS 5 1 Op Code Address 1 Op Code
STX 2 Op Code Address + 1 1 Address of Operand
(High Order Byte)
STD 3 Op Code Address + 2 1 Address of Operand
(Low Order Byte)
4 Address of Operand 0 Operand Data (High Order Byte)
5 Address of Operand + 1 0 Operand Data (Low Order Byte)
ASL LSR 6 1 Op Code Address 1 Op Code
ASR NEG 2 Op Code Address + 1 1 Address of Operand
(High Order Byte)
CLR ROL 3 Op Code Address + 2 1 Address of Operand
(Low Order Byte)
COM ROR 4 Address of Operand 1 Current Operand Data
DEC TST 5 Address Bus FFFF 1 Low Byte of Restart Vector
INC 6 Address of Operand 0 New Operand Data
CPX 6 1 Op Code Address 1 Op Code
SUBD 2 Op Code Address + 1 1 Operand Address
(High Order Byte)
ADDD 3 Op code Address + 2 1 Operand Address
(Low Order Byte)
4 Operand Address 1 Operand Data (High Order Byte)
5 Operand Address + 1 1 Operand Data (Low Order Byte)
6 Address Bus FFFF 1 Low Byte of Restart Vector
JSR 6 1 Op Code Address 1 00 Code
2 Op Code Address + 1 1 Address of Subroutine
(High Order Byte)
3 Op Code Address + 2 1 Address of Subroutine
(Low Order Byte)
4 Subroutine Starting Address 1 Op Code of Next InstructIon
5 Stack POInter 0 Return Address
(Low Order Byte)
6 Stack POInter - 1 0 Return Address
High Order Byte)
- Contmued-
4·117
MC6801- MC6803- MC6803NR
•
5 Index Register Plus Offset + 1 1 Operand Dat .. (Low Order Byte)
STS 5 1 Op Code Address 1 Op Code
STX 2 Op Code Address + 1 1 Offset
STD 3 Address Bus FFFF 1 Low Byte of Restart Vector
4 Index Aeglster Plus Offset 0 Operand Data (HIgh Order Byte)
5 Index Aeglster Plus Offset + 1 0 Operand Data (Low Order Byte)
ASL LSR 6 1 Op Code Address 1 Op Code
ASA NEG 2 Op Code Address + 1 1 Offset
CLA AOL 3 Address Bus FFFF 1 Low Byte of Restart Vector
COM ROA 4 Index RegIster Plus Offset 1 Current Operand Data
DEC TST (I) 5 Address Bus FFFF 1 Low Byte of Restart Vector
INC 6 Index Aeglster Plus Offset 0 New Operand Data
CPX 6 1 Op Code Address 1 Op Code
SUBD 2 Op Code Address + 1 1 Offset
ADDD 3 Address Bus FFFF 1 Low Byte of Restart Vector
4 Index Register + Offset 1 Operand Data (HIgh Order Byte)
5 Index Aeglster + Offset + 1 1 Operand Data (Low Order Byte)
6 Address Bus FFFF Low Byte of Restart Vector
JSR 6 1 Op Code Address 1 Op Code
2 Op Code Address + 1 1 Offset
3 Address Bus FFFF 1 Low Byte of Aestart Vector
4 Index Aeglster + Offset 1 First Subroutme Op Code
5 Sta ck POinter 0 Return Address (Low Order Byte)
6 Stack POInter - 1 0 Aeturn Address (HIgh Order Byte)
- Contlnued-
4-118
MC6801-MC6803-MC6803NR
INX
DEX
PSHA
PSHB
3
3
3
1
2
3
1
2
PrevIous Register Contents
Op Code Address
Op Code Address +1
Address Bus FFFF
Op Code Address
Op Code Address +1
1
1
1
1
1
1
Irrelevant Data
Op Code
Op Code of Next Instrucllon
Low Byte of Restart Vector
Op Code
Op Code of Next Instruction
II
3 Stack POinter 0 Accumulator Data
TSX 3 1 Op Code Address 1 Op Code
2 Op Code Address +1 1 Op Code of Next Instruction
3 Stack POinter 1 Irrelevant Data
TXS 3 1 Op Code Address 1 Op Code
2 Op Code Address +1 1 Op Code of Next InstrUClion
3 Address Bus FFFF 1 Low Byte of Restart Vector
PULA 4 1 Op Code Address 1 Op Code
PULB 2 Op Code Address +1 1 Op Code of Next Instruction
3 Stack POinter 1 Irrelevant Data
4 Stack POinter +1 1 Operand Data from Stack
PSHX 4 1 Op Code Address 1 Op Code
2 Op Code Address +1 1 Irrelevant Data
3 Stack Pomter 0 Index Register (Low Order Byte)
4 Stack POinter - 1 0 Index Register (High Order Byte)
PULX 5 1 Op Code Address 1 Op Code
2 Op Code Address +1 1 Irrelevant Data
3 Stack POinter 1 Irrelevant Data
4 Stack POinter +1 1 Index Register (High Order Byte)
5 Stack POinter +2 1 Index Register (Low Order Ih'!e)
- Continued -
4·119
MC6801-MC6803-MC6803NR
II 2
3
4
5
6
7
8
Op Code Address +,
Address Bus FFFF
Address Bus FFFF
Address Bus FFFF
Address Bus FFFF
Address Bus FFFF
Address Bus FFFF
1
1
1
1
,,
1
Irrelevant Data
Low Byte of Restart Vector
Low
Low
Low
Low
Byte
Byte
Byte
Byte
of
of
of
of
Restart
Restart
Restart
Restart
Low Byte of Restart Vector
Vector
Vector
Vector
Vector
4-120
MC6801- MC6803- MC6803N R
4-121
MC6801- MC6803- MC6803NR
!'(;
Direct
{ RTN
SE Stack
{ ~SP-2~
~
c:=>
lNDXO SP _ 1 RTNH
RTN SP RTNL
Main Program
EC sao - J$R
EXTND
{ RTN
SH == Subr Addr
SL - Subr Addr
~Sp~~S"Ck
!'(;
Subroutine
"-';""'3:-9-'0'::R:::Ts'-'1 c>
~ SP + 2
SP - 1
SP + 1
SP
;~Stack
ATNH
RTNL
RTNH
RTNl
IT
RTN
Main Program
~--t
$3F;;;SWI I L-y'~ -"SP-7
SP - 6
S,P Slack
Condition Code
SP - 5 Acmltr B
SP - 4 Acmltr A
SP 3 lndex Register (X H)
c:=>
WAI. Wall for Interrupt
Main Program Index Register (XL)
--II
SP - 2
f-'_3_Eo_W_A_' SP - 1 RTNH
RTN SP RTNL
SP + 2 Acmllr B
SP + 3 Acmltr A
JMP. Jump
{~b":-:::-::-::::::::::-1
ff
INOXD { '''ended
X +K Next InstructIOn I
K I Next InstructIOn
Legend
RTN = Address of next ,nstructlOn In Main Program to be executed upon rpturn from subroutine
RTNH = Most SIgnIfIcant byte of Return Address
RTNl ;;:; least slgmflcant byte of Return Address
--= Stack POlOter After ExecutIon
K = 8·1>11 UnSIgned Value
4-122
MC6801-MC6803-MC6803NR
APPENDIX
CUSTOM MC6801 ORDERING INFORMATION
A.O CUSTOM MC6801 ORDERING INFORMATION data}, may be submitted for pattern generation The
The custom MC6801 specifications may be transmitted to MC2708s must be clearly marked to ,nd,cate which PROM
Motorola In any of the follOWing media corresponds to which address space ($X800-$XFFF) See
1} PROM(s} Figure A-1 for recommended marking procedure
After the PROM(s} are marked, they should be placed In
2} MOOS diskette
conductive I C carners and securely packed 00 not use
styrofoam
The specificatIOn should be formatted and packed, as in-
dicated In the appropnate paragraph below, and mailed
prepaid and Insured with a cover letter (see Figure A-2) to'
Motorola Inc ~ ~
6d ~
3501 Ed Bluestein Blvd
AUStin, Texas 7B721
II
The start/end location should be written on the label EX-
MCM270B and MCM2716 type PROMs, programmed With
ORclsor format
the custom program (positive logiC sense for address and
FIGURE A-2
CUSTOMER NAME
ADDRESS ___________________________________________________________________
CONTACT MS/MR
CUSTOMERPART# _________________________________________________________________
MARKING
PATTERN MEDIA o Standard
02708 PROM o Special
02716 PROM
o Diskette (MOOS)
(Note 1) _______________________________________________________________
4-123
MC6801. MC6803· MC6803N R
• IMPORTANT NOTICE
Devices made with mask #T5P may generate multiple framing error
flags In response to unframed data These devices will eventually syn·
chronlze correctly after a framing error, but valid, framed data following
an unframed data byte may generate false framing error flags
4-124
® MOTOROL.A
MC6S02
MC6S0S
MC6S02NS
MICROPROCESSOR WITH CLOCK AND OPTIONAL RAM
•
• Expandable to 64K Words
• Standard TTL-Compatible Inputs and Outputs
• 8-Blt Word Size
• 16-Blt Memory AddreSSing
• Interrupt Capability
PART NUMBER DESIGI'!ATION BY SPEED
MC6802 MC6808 MC6802NS
(10 MHzl (10 MHzl (10 MHzl
PIN ASSIGNMENT
MC68A02 MC68A08
(15 MHzl (15 MHzl VSS RESET
MC68B02 MC68B08 HALT EX TAL
(20 MHzl (20 MHzl '.1R XTAL
iiiQ AD DI
Counter/ ~
Timer 1/0 MR Al D2
REsTI VMA VMA A2 D3
Clock E RE A3 D4
..
Riw
RiwMC6802 NMI
, ," \
A4 D5
MPU
A5 D6
1/0 DO-D7 DO-D7
EXTAL D7
A6
CJ A7 A15
Control { AO-A15 AO-AI5 XTAL
A8 AlA
A9 AI3
AlO 19 AI2
ThiS block diagram shows a typical cost effective microcomputer The MPU 15
the center of the mlcrocoputer system and IS shown In a minimum system Inter- All VSS
faCing With a ROM combination chip It IS not Intended that thiS system be
limited to thiS function but that It be expandable With other parts In the M6800 'P,n 35 must be tied to 5 V on the 6802NS
Microcomputer family .. Pin 36 must be tied to ground for the 6808
4·125
MAXIMUM RATINGS
ThiS Input contains circUitry to protect the
Rating Symbol Value Unit
Inputs agamst damage due to hIgh statIc
Supply Voltage Vee -03 to + 70 V voltages or electnc fields, however, It IS ad~
Input Voltage Vin -03 to + 70 V vised that normal precautions be taken to
Operatmg Temperature Range TA o to + 70 °e aVOid apphcatlon of any voltage higher than
maximum rated voltages to thIS hlgh-
Storage Temperature Range Tstg -55 to + 150 °e
Impedance CircUit Reliability of operatIon IS
enhanced If unused Inputs are tied to an ap-
propriate logiC voltage level (e 9 , either VSS
THERMAL CHARACTERISTICS
or VeeJ
Characteristic Symbol Value Unit
Average Thermal ResIstance (Junction to Ambient)
PlastiC 100
8JA °e/w
Ceramic 50
POWER CONSIDERATIONS
•
TJ=TA+(PO"OJA) (1)
Where
T A'" Ambient Temperature, °c
OJA= Package ThermaJ ReSistance, Junctlon-to-Amblent, °C/W
PO'" PINT+ PPORT
PINT'"' ICC x VCC, Watts - Chip Internal Power
PPORT= Port Power OISSlpatlOn, Watts - User Oetermlned
For most applications PPORT<IIi PINT and can be neglected PPORT may become significant If tl'8 deVice IS configured to
drive Oarlington bases or sink LEO loads
An approximate relationship between Po and T J (,f PPORT IS neglected) IS
Po = K - IT J + 273°C) (2)
SolVing equations 1 and 2 for K gives
K = PO"IT A + 273°C) + OJA"P 0 2 (3)
Where K IS a constant pertaining to the particular part K can be determined from equation 3 by measuring Po lat equilibrium)
for a known T A USing thiS value of K the values of Po and T J can be obtained by solVing equations (1) and (2) Iteratively for 3ny
value of T A
4-126
OPERATING TEMPERATURE RANGE
-
DC ELECTRICAL CHARACTERISTICS (VCC-50 Vdc ±5% Vss-O -
- to 70°C unless otherwise noted I
TA-O
Charactenstic Symbol Min Typ Max Unit
•
Input Low Voltage Logic, EXTAL, RESET VIL VSS-03 - VSS + 08 V
Input Leakage Current (V ,n =Oto 525 V, VCC= maxi Logic lin - 10 25 ~A
Output High Voltage
(ILoad= -205~A, Vcc=mlnl 00-07 VSS + 24 -- -
VOH V
ilLoad= -145~A, VCC = mini AO-A15, Riw, VMA, E VSS+24 - -
(ILoad= -100~A, Vcc=mlnl BA VSS + 24 - -
Output Low Voltage ilLoad = 1 6 rnA, VCC = mini VOL - - VSS+O 4 V
Internal Power DISSipation (Measured at T A = QOC) PINT - 0600 10 W
VCC Standby
Power Down VSBB 40 - 525
V
Power Up VSB 475 - 525
Standby Current ISBB - 80 mA
Capacitance #
(V,n=O, TA=25°C,f=1 OMHzl 00-07 C,n 10 125 pF
LogiC Inputs, EXT AL 65 10
AO-AI5, Riw, VMA Cout 12 pF
4·127
MC6802· MC6808. MC6802NS
2 Pulse Width, E Low PWEL 450 5000 280 5000 210 5000 ns
3 Pulse Width, E High PWEH 450 9500 280 9700 220 9700 ns
4 Clock Rise and Fall Time tr,q - 25 - 25 - 20 ns
9 Address Hold Time tAH 20 - 20 - 20 - os
tAVl 160 - 100 - 50 -
12 Non-Muxed Address Valid Time to E ISee Note 51 ns
tAV2 - 270 - - - -
17 Read Data Setup Time tDSR 100 - 70 - 60 - ns
18 Read Data Hold Time tDHR 10 - 10 - 10 - ns
19 Wnte Data Delay Time tDDW - 225 - 170 - 150 ns
21 Wnte Data Hold Time tDHW 30 - 20 - 20 - ns
29 Usable Access Time (See Note 4) tACC 605 - 310 - 235 - ns
II
R/VV, Address----_r~~~](~~jf~t_-=~~~__t----_tt_--------------------------------_r~~~7
INon-Muxedl
Write Data
Non-Muxed ____ -+__~
NOTES
Voltage levels shown are VL;5; 0 4 V, V H 2: 2 4 V, unless otherwise specified
Measurement POints shown are 0 8 V and 20 V, unless otherwise noted
All electllcals shown for the MC6802 apply to the MC6802NS and MC6808, unless otherwise noted
Usable access time IS computed by 12+3+4-17
If programs are not executed from on-board RAM, TAV1 applies If programs are to be stored and executed from on-board RAM, T AV2 ap-
plies For normal data storage In the on-board RAM, this extended delay does not apply Programs cannot be executed from on-board
RAM when uSing A and B parts IMC68A02, MC68A08, MC68B02, MC68B081 On-board RAM can be used for data storage with all parts
4-128
MC6802- MC6808- MC6802NS
RL = 22 kD
MMD6150
C= 130 pF for 00-07, E Test POlnto-.....-1r--t..- . or Equlv
=90 pF for AO-AI5, R/iN, and VMA
=30 pF for SA C R
R= 117 kD for 00-07, E MMD7000
= 16 5 kD for AO-AI5, R/iN, and VMA or EqUlv
=24 kD for SA
FIGURE 4 - TYPICAL DATA BUS OUTPUT DELAY FIGURE 5 - TYPICAL READ/WRITE, VMA AND
versus CAPACITIVE LOADING ADDRESS OUTPUT DELAY versus CAPACITIVE LOADING
600 600
IOH =-205JJA max@24V 10H I _145 1"A rna> .'2 4 V
10 l = 1 6 rnA max @ 0 4 V tOl:: 1 6 rnA max@O 4 V
500
VCC'50V 500 VCC' 5 av
TA' 25'C TA' 25 C
]
400
:g 400
Address, VMA
-
w w
'>-"
~ 300 '>-"
~
300
I---- I--"
l-
g I-- --- g Vf-" ...... f--: r- RIW
200
-- I---- 200
r-
•
~
100
100
i
CL tncludesstray capacitance CL tncludesstray capacitance
100 200 300 400 500 600 100 200 300 400 500 600
Cl,lOAD CAPACITANCE (pfl Cl,lOAO CAPACITANCE (pfl
Memory Ready 3
Enable 37
RESET 40
Non-Maskable Interrupt (NMI)
i=iiii:T 2
Interrupt Request IIRQ) 4
EXTAl 39
XTAl 38
Bus Available 7
Valid Memory Address 5
Read/Write {R/WI 34
Vee= P,n 8
Vee'" Pm 35 for MC6802NS
VSS=Plns 1, 21
VSS = Pm 36 for MC6808
26 27 28 29 30 31 32 33
D7 D6 D5 D4 D3 D2 D1 DO
4·129
MPU REGISTERS
A general block diagram of the MC6802 IS shown In Figure read/wnte memory that may have any location laddress)
6. As shown, the number and configuration of the registers that IS convenient. In those applications that require storage
are the same as for the MC6800 The 126 x 8-blt RAM" has of Information In the stack when power IS lost, the stack
been added to the basIc MPU. The first 32 bytes can be re- must be non-volatile.
tained during power-up and power-down conditions via the
RE signal. INDEX REGISTER
The MC6802NS IS identical to the MC6802 except for the The index register IS a two byte register that IS used to
standby feature on the first 32 bytes of RAM. The standby store data or a 16-blt memory address for the Indexed mode
feature does not eXist on the MC6802NS and thus pin 35 of memory addressing
must be tied to 5 V.
The MC6808 IS identical to the MC6802 except for on- ACCUMULATORS
board RAM. Since the MC6808 does not have on-board The MPU contains two 8-blt accumulators that are used to
RAM Pin 36 must be tied to ground allOWing the processor to hold operands and results from an arithmetic logic Unit
utilize up to 64K bytes of external memory IALU)
The MPU has three 16-blt registers and three 8-bit
registers available for use by the programmer IFlgure 7) CONDITION CODE REGISTER
PROGRAM COUNTER The condition' code register indicates the results of an
Anthmetlc Logic Unit operation: Negative IN), Zero IZ),
The program counter IS a two byte 116-blt) register that Overflow IV), Carry from bit 7 IC), and Half Carry from bit 3
•
POints to the current program address IHI. These bits of the Condition Code Register are used as
testable conditions for the conditional branch Instructions.
STACK POINTER Bit 41s the interrupt mask bit II) The unused bits of the Con-
The stack pOinter IS a two byte register that contains the dition Code Register Ib6 and b7) are ones.
address of the next available location In an external push- Figure 8 shows the order of saving the microprocessor
down/pop-up stack ThiS stack IS normally a random access status Within the stack.
'If programs are not executed from on-board RAM, TAV1 applies. If programs are to be stored and executed from on-board RAM, TAV2 ap-
plies. For normal data storage In the on-board RAM, thiS extended delay does not apply Programs cannot be executed from on-board RAM
when uSing A and B parts IMC68A02, MC68AOB, MC68B02, and MC68BOBI On-board RAM can be used for data storage with all parts.
I Accumulator A
':-------'0
15
'-_____-'1 Accumulator B
Condition Codes
,....."..,r'-r.,..,..
L...J....... Register
Overflow
z •.-o
Negative
Interrupt
4·130
FIGURE 8 - SAVING THE STATUS OF THE MICROPROCESSOR IN THE STACK
m - 9
m - 8
m - 7 SP
SP = Stack POinter
CC:: Condition Codes (Also called the Processor Status Byte) m- 6 CC
ACeS = Accumulator B
m - 5 ACeS
ACCA = Accumulator A
IXH:: Index RegISter, Higher Order 8 Bits m - 4 ACCA
I XL = Index Register, Lower Order 8 Bits m - 3 IXH
PCH = Program Counter, Higher Order 8 Sits
PC L = Program Counter, Lower Order 8 Bits m - 2
m -1
m - 2
m - 1
IXL
PCH .
"u
en
--l
_ _ SP
PCL
m + 1 m + 1
m + 2 m + 2
Before After
4-131
WAIT state by the occurrence of a maskable (mask bit 1=0) tlon of a routine to Inttlallze the processor from ItS reset con-
or nonmaskable Interrupt. This output IS capable of driving ditIOn All the higher order address lines will be forced high
one standard TTL load and 30 pF. For the restart, the last two ($FFFE, $FFFFI locations In
memory will be used to load the program that IS addressed
INTERRUPT REQUEST (IRQ) by the program counter Dunng the restart routine, the inter-
A low level on this Input requests that an Interrupt se- rupt mask bit IS set and must be reset before the MPU can be
quence be generated within the machine The processor will Interrupted by IRO Power-up and reset timing and power-
wait until It completes the current instruction that IS being down sequences are shown In Figures 9 and 10, respectively
excuted before It recogntzes the request At that time, If the RESET, when brought low, must be held low at least three
Interrupt mask bit In the condition code register IS not set, clock cycles ThiS allows adequate time to respond Internally
the machine will begin an Interrupt sequence. The Index to the reset ThiS IS Independent of the trc power-up reset
register, program counter, accumulators, and condition that IS reqUired.
code register are stored away on the stack Next the MPU When RES ET IS released It must go through the low-to-
will respond to the Interrupt request by setting the Interrupt high threshold Without bounCing, oscillating, or otherwise
mask bit high so that no further Interrupts may occur At the causing an erroneous reset (less than three clock cyclesl
end of the cycle, a lS-bIt vectoring address which IS located ThiS may cause Improper M PU operation until the ~ext valid
In memory locations $FFF8 and $FFF9 IS loaded which reset
causes the M PU to branch to an Interrupt routine In memory
The HALT line must be In the high state for Interrupts to NON-MASKABLE I~TERRUPT (NMI)
be serviced Interrupts will be latched Internally while HALT A low-gOing edge on thiS Input requests that a non-
IS low. maskable Interrupt sequence be generated Within the pro-
A nominal 3 kD pullup resistor to Vee should be used for cessor. As With the Interrupt request Signal, the processor
Wire-OR and optimum control of Interrupts IRO may be tied Will complete the current Instruction that IS being executed
directly to Vee If not used before It recogmzes the NMi Signal The Interrupt mask bit In
the condition code register has no effect on NMi
II RESET
ThiS Input IS used to reset and start the M PU from a
power-down condition, resulting from a power failure or an
Inttlal start-up of the processor When thiS line IS low, the
MPU IS inactive and the Information In the registers will be
The Index register, program counter, accumulators, and
condition code registers are stored away on the stack At the
end of the cycle, a 16-blt vectonng address which IS located
In memory locations $FFFe and $FFFD IS loaded causing the
M PU to branch to an Interrupt service routine In memory
lost If a high level IS detected on the Input, thiS will Signal A nominal 3 kD pullup resistor to Vee should be used for
the MPU to begin the restart sequence ThiS will start execu- wire-OR and optimum control of Interrupts NMI may be tied
Vcc
trc
~--------------------~~--------~VIH
d !.-t
VIL
pcs
Option 1
(See Note Below)
trc
RESET ______
RE _ _ _ _
~-
j[,~,
fI
---------- Option 2
(See Figure 10 for
Power-down Condition)
4-132
MC6802-MC6808-MC6802NS
Vector
Description
MS LS
$FFFE $FFFF Restart RE
$FFFC $FFFD Non-Maskable Interrupt
$FFFA $FFFB Software Interrupt
$FFFB $FFF9 Interrupt Request
•
No
Yes
NMI
No No
Yes
TAli
No
Yes
On
4-133
MC6802-MC6808-MC6802NS
Y1 Cin Cout
358 MHz 27 pF 27 pF
4 MHz 27 pF 27 pF
6 MHz 20 pF 20 pF
8 MHz 18 pF 18 pF
Crystal Loading
----;101--1- - -
Yl
• RS
CO
Cl
Q
3.58 MHz
60 Il
35 pF
0015 pF
>40K
Nominal Crystal Parameters*
4.0 MHz
501l
65 pF
0025 pF
>30K
6.0 MHz
3O-501l
4-6 pF
001-002 pF
>20K
8.0 MHz
20-40 [)
4-6 pF
001-002 pF
>20K
4·134
MC6802- MC6808- MC6802NS
4xfo
OSCillator
EXTALf~~--------------------------.
XTAL 38
MC6802
MR~----------------1Q
Memory Ready
D Generated from
CS Logic
SN74LS74
e=t''''
E Clock Stretch •
\I...O_B_V___ .JJ
The E clock Will be stretched at end of E high of the cycle dUring which MR negative meets the tpcs setup time The tpcs setup time IS
referenced to the fall of E If the tpcs setup lime IS not met, E Will be stretched at the end of the next E-hlgh II cycle E Will be stretched In in-
tegral multiples of II cycles
Resuming E ClOCking
~tPcs ~tPcs
L
I
I I
Stretched E I
MR
HUff
The E clock Will resume normal operallOn at the end of the II cycle dUring which M R asserllOn meets the tpcs setup time The tpcs setup time
IS referenced to transitions of E were It not stretched If tpcs setup time IS not met, E Will fall at the second possible tranSItion time after MR IS
asserted There IS no dIrect means of determlOing when the tpcs references occur, unless the synchroniZing CirCUit of Figure 14 IS used
4-135
RAM ENABLE (RE - MC6802+MC6802NS ONLY) MPU INSTRUCTION SET
A TTL-compatible RAM enable Input controls the on-chip
RAM of the MC6802 When placed In the high state, the on- The Instruction set has 72 different Instructions Included
chip memory IS enabled to respond to the MPU controls In are binary and deCimal anthmetlc, logical, Shift, rotate, load,
the low state, RAM IS disabled This Pin may also be utilized store, conditional or unconditional branch, Interrupt and
to disable reading and wntlng the on-chip RAM dunng a stack manipulation Instructions (Tables 2 through 6) The in-
power-down situation RAM Enable must be low three struction set IS the same as that for the MC6800
cycles before VCC goes below 4 75 V dunng power-down
RAM enable must be tied low on the MC6808 RE should be
tied to the correct high or low state If not used
MPU ADDRESSING MODES
EXTAL AND XTAL
These Inputs are used for the Internal oscillator that may There are seven address modes that can be used by a pro-
be crystal controlled These connections are for a parallel grammer, With the addreSSing mode a function of both the
resonant fundamental crystal (see Figure 12) (AT-cut) A type of instruction and the coding Within the instruction A
dlvlde-by-four CirCUit has been added so a 4 MHz crystal may summary of the addreSSing modes for a particular instruction
be used In lieu of a 1 MHz crystal for a more cost-effective can be found In Table 7 along With the associated Instruction
system An example of the crystal circuit layout IS shown In execution time that IS given In machine cycles With a bus
FigurE:> 13 Pin 39 may be dnven externally by a TTL Input frequency of 1 MHz, these times would be microseconds
signal four times the required E clock frequency Pin 38 IS to
be grounded ACCUMULATOR (ACCX) ADDRESSING
II
An RC network IS not directly usable as a frequency In accumulator only addreSSing, either accumulator A or
source on PinS 38 and 39 An RC network type TTL or CMOS accumulator B IS specified These are one-byte Instructions
OSCillator will work well as long as the TTL or CMOS output
dnves the on-Chip OSCillator IMMEDIATE ADDRESSING
LC networks are not recommended to be used In place of
In Immediate addreSSing, the operand IS contained In the
the crystal
second byte of the Instruction except LOS and LOX which
If an external clock IS used, It may not be halted for more
have the operand In the second and third bytes of the in-
than tPW4>L The MC6802, MC6808 and MC6802NS are
struction The MPU addresses thiS location when It fetches
dynamiC parts except for the Internal RAM, and require the the Immediate instruction for execution These are two- or
external clock to retain information three-byte instructions
4-136
MC6802- MC68Q8- MC6802NS
II
BCS Branch rt Carry Set DES Decrement Stack POinter SEC Set Carry
BEQ Branch If Equal to Zero DEX Decrement Index Register SEI Set Interrupt Mask
BGE Branch If Greater or Equal Zero
EOR ExclUSive OR SEV Set Overflow
BGT Branch rt Greater than Zero
STA Store Accumulator
BHI Branch If Higher INC Increment
STS Store Stack Register
BIT Bit Test INS Increment Stack POinter STX Store Index Register
BlE Branch rt Less or Equal INX Increment Index Register SUB Subtract
BLS Branch If Lower or Same
JMP Jump SWI Software Interrupt
BLT Branch If less than Zero
BMI Branch rt MinUS JSR Jump to Subroutine TAB Transfer Accumulators
BNE Branch rt Not Equal to Zero LDA Load Accumulator TAP Transfer Accumulators to Condition Code Reg
BPL Branch rt Plus lDS Load Stack POinter TBA Transfer Accumulators
BRA Branch Always lDX Load Index Register TPA Transfer Condition Code Reg to Accumulator
BSR Branch to Subrouline LSR LogICal Shift Right TST Test
BVC Branch rt Overflow Clear TSX Transfer Stack POinter to Index Register
NEG Negate TXS Transfer Index Register to Stack POinter
BVS Branch If Overflow Set
NOP No Operation
CBA Compare Accumulators WAI Wail for Interrupt
ORA InclUSive OR Accumulator
ClC Clear Carry
CLI Clear Interrupt Mask PSH Push Data
4-137
TABLE 3 - ACCUMULATOR AND MEMORY INSTRUCTIONS
BltTesl
ANOA
ANDB
BITA
81TS
84
C4
85
C5
94
04
95
05 3
A4
E4
AS
E5
5
5
B4
F4
B5
F5
4
4
A
8
A M
B
M ·A
M B
M
I
I ••
,.
,•• .
Clear CLA 6F 1 2 IF 6 3 00 ·M • • R S R R
ClRA 00 A
Compare
ClRS
CMPA 81 2 2 91 2 Al 5 2 Bl 4 3
"
5f 00.
•
•
•
•
R S R R
R S
A M I I
CMPS CI 2 201 2 EI 5 2 Fl 4 3 • M • • ! I
Compare Acmllf! CBA 11 2 I A B 11
Complement,l's co. 63 , 2 73 6 J
• • I I'S
COMA 43 2
" ·AM
A • • I l' S
COMB 53 2 8·. I, S
i
!'~i
Complement,2s NEG 60 , 10 6 J 00 M M
!Negatel NEGA 40 2 00 A·A • • I
NEGB 50 2 00 B B • • I
Decimal AdlUSI A OAA 19 2 , Cunverts Bilidry Add 01 BCD Chdrd~ters
;~ :
Decrement DEC 6A ,
21'A 6 3
M I M
•
OECA 4A 2 1 A I A • • I
DECB SA 2 I BIB ! t':' •
ExclUSive OR fORA B8 2 9B 3 A. , 2 B8 4 AffiM ·A I , •
EOAB CB 2 08 3 E8 , 2 F8 4 B0M B
·: .:1:..iI' :.
Illcremenl INC 6C , 2 7C 6 1 M" ·M
INCA 4C '} 1 A. 1 ~
INCB 5C 2 , Bfl Il
LoadALmlu lOAA 86 2 1 96 3 A6 2 B6 4 M A • • : : R •
LDAS C6 2 06 3 E6 2 f-6 4 M • • • : : R •
···....
Or InchlslYI! OAAA 8A 2 9A 3 2 AA ') 2 I SA 4 3 A+ M A
.... ..
• •• : R •
DRAB CA 2 2 OA 3 2 EA !i 2 FA 4 3 B+M B • • : : A •
.... .
Pu~h Data PSHA 36 4 1 A MSp SP 1 SP
PSHS 31 4 1 B MSp SP 1 SP
Pun Odld PULA 32 SP liSP MSp A
ROldleLeit
PULS
ROl
ROLA
69 2 19 6 3
33
49 2 1
SP. 1 SP MSp e
=}L{]-~
· .. ~If
;I~:
ROlS !i9 2 , B C b7 - bO
'0' ~} CO
66 1 2 76 6 J
RORA 46 l. - b1o:r:rn:o:;:::J
i~
1
RORS 56 2 I B C - bO
ASl
ASLA
ASLB
68 1 2 18 6 3
4B
" ,
2
n ~- ~-O • .!
:~
1(6
ASR
ASRA
ASAI!
6f I 2 11 6 3
47
!i7
'}
'}
1
1
:}ctrnlliD -
B b1 bO
0
C : :~:
lSR 64 1 2 14 6 J • • A :@ !
::;I it
lSRA 44 2 1 A
M, } o- rn::r::rII1J - 0
LSRB 54 2 1 bl bD C
STAA 91 4 2 AI 6 2 61 A M
STAB , M
··...
01 2 E1 6 2 FI • • : : R •
SublfdLt SUBA 80 2 2 90 2 AD 5 2 BO 4 • A • • : : I
SUBS
SBA
CO 2 2 00 3 2 EO !i 2 fO 4
• ,
·.,
SubtrdLl Atmltrs 10 2 1 A • : :
..,
Subtr With Cdf1~ SBCA B2 2 92 2 A2 !J '} B2 4 3 A MeA
SBCB C2 2 02 '} E2 5 2 F2 4 3 B M (. B
TrdllsferAcmllf$ TA. 16 2 A • I , •
TBA
, ,,
, A
" 2
TeSl, ZPfO or MlIlu$ TST 60 7 2 10 6 3 • 00
TSlA 40 2 , 00
TSIB 50 2 1 00 I, ,
H I N Z V C
4·138
TABLE 4 - INDEX REGISTER AND STACK MANIPULATION INSTRUCTIONS
- -= -= -
····....... ·..·.
POINTER OPERATIONS MNEMONIC OP = OP OP OP = OP I- = BOOLEAN/ARITHMETIC OPERATION H I N Z V C
Compare Index lIeg CPX 8C 3 3 9C 4 2 AC 6 2 BC S 3 XH M, XL- 1M .1) CD: 8 •
Decrement Index Reg DEX I X I ,X I
··.... ··..
Decrement Stal;k Pntr DES I SP I 'SP
Increment Index Reg
Increment Slack Pntr
INX
INS
=1 :
08
31
4
4
I
1
Xt 1 •X
SP + 1 'SP
;
· ··
Ind. Reg • Stack Potr TXS 35 4 1
Slack Pllir 'Inch. Reg TSX I 30 4 1 Spq ·X ·i· : 1
•
RELATIVE INDEX EXTNO IMPLIED 543210
OPERATIONS MNEMONIC OP - = OP - OP - OP - BRANCH TEST HINZVC
• .• .• .
• .• .
" " "
Branch Always BRA 20 4 2 None
·.,. •
. .. .. .. ..
Branch If Carry Clear BCC 24 4 2 CoO
Branch If Carry Set Bts 25 4 2 C- 1
Branch It = Zero BEQ 27 4 2 Z- I • i· • • • •
Bunch It :<tZero BGE 2C 4 2 NG)V-O :.
a
.' ·1·. .
• .• .
It > Zero
.'.
Branch BGT 2E 4 2 Z' IN $VI-
Branch It Higher
Branch If <; Zero
BHI
BLE
22
2F
4
4
2
2
C+Z"O
Z + IN (t) VI" 1
• i· •
•
• • •
· ., ....
Branch If lower Or Same BLS 23 4 2 C+Z=l • i • !. • • •
Branch If < Zero BLT 2D 4 2 N (£I V:.l
Branch If MinUS BMI 2B 4 2 N-l .' • i· • • •
Branch If Not Equal Zero BNE 26 4 2 Z-B • • I. • ••
Branch It Overflow Clear BVC 28 4 2 v-a • • • I. • •
Branch If Overflow Set
Branch If Plus
Branch To Subroutine
Jump
Jump To Subroutme
BVS
BPl
BSR
JMP
JSR
29
2A
80
4
4
8
2
2
2
6E
AD
4
8
2
2
IE
BD
3
9
3
3
I(
,
V-I
N-O
~l@! ·1· · ·
Softwar. Interrupt SWI 3F 12 1 See Special Operations :
W'lt tor Interrupt WAI 3E 9 1 I (Figure 16)
4-139
FIGURE 16 - SPECIAL OPERATIONS
SPECIAL OPERATIONS
JSR, JUMP TO SUBROUTINE,
INOXD
PC
-;;
{ n+ 1
Main Program
Ao-JSR
K = Offset-
SP-2
SP-l
Ii!' Stack
INX + K
eli
I Subroutme
hI Sub. I.m
Io+~
MltnProgram ~ Stack ~ Subroutme
l£
Bo· JSR 5P-2 S ht Subr Instr
EXTNo
.+2
.+3
SH Subr Addr
It
Sl = Subr Addr
Next Mam Instr
c::::> SP-l
SP '-"'-";"':;'_--' (S Formed From SH and SLI
-+ = Stack Pomter After Execution
JMP, JUMP
[~:
Main Program
•
1E = JMP
,'1 KH = Next Address
INOXO EXTENDED Kl = Next Address
".
Next In:truCllon I
RTS, RETURN FROM SUBROUTINE
~ MamProgram
~§St"k
PC Subroutme
S 1 39 • RTS 1 c:::> SP + 1 NH
SP + 2 NL
CONDITION CODE REGISTER NOTES (Bit set It test IS true and cleared otherWise!
(Bit VI Test Result" 10000000' (Bit N! Test Stgn bit of most slgmflcant (MSI byte" 1?
IBlt C! Test Result # 00000000' (Bit V! Test 2's complement overtlow from subtraction of MS bytes'
IBlt Cl Test DeCimal value at most slgAlficant BCD Character greater than mne' (8tt N) Test Result less than zero? (Btt lS = 1)
(Not cleared If prevtously set I 10 IAIII load ConditIOn Code Register from Stack (See SpeCial Operations)
(Bit VI Test Operand" 10000000 pnor to executIOn' 11 IBII il Set when mterrupt occurs It pr,evlously set, a Non Maskabh!
(Bit V! Test Operand'" 01111111 prior to execution' Interrupt IS reqUired to Ult the Wilt state
(Bit V! Test Set equal to result of N(f)C after shift has occurre" 12 IAII! Set accordmg to the contents of Accumulator A
4-140
TABLE 7 - INSTRUCTION ADDRESSING MODES AND ASSOCIATED EXECUTION TIMES
(Times in Machine Cycle)
;; :;;
c .5
c
l = !I
. "-!c
. ".e
1c
! 0- !
11x "-a! .!!i 11
: "!
0
0
OJ
)(
u i! ~ . . OJ
)(
U
to
!I
! 0= w= !
ABA
ADC
e u
"
2
6
3
..
x
w
4
.:" !
5
2
a:
INC
INS
9 ~
2
x
"E
6
4
ADD
AND
ASl
ASR
2
2
2
2
3
3
6
6
4
4
5
5
7
7 .
INX
JMP
JSR
lDA 2 3
3
9
4
·
4
8
5
4
BCC 4 lDS 3 4 5 6
BCS 4 LDX 3 4 5 6
BEA 4 lSR 6 7
BGE 4 NEG 6 7
BGT Nap
·
4
BHI 4 ORA 2 3
BIT PSH 4
BlE
BLS
BLT
BMI
4
4
4
PUL
ROL
ROR
RTI
0
6
·
7
7
4
.
4 10
BNE 4 RTS 5
BPL 4 SBA 2
BRA 4 SBC 2 3 4
BSR SEC
.
8 2
BVC SEI 2
·
4
BVS 4 SEV 2
CBA 2 STA 4 5 6
CLC 2 STS 5 6 7
CLI STX
..·
2 6 7
·
5
CLR 2 6 SUB 3 4 5
CLV 2 SWI 12
CMP 3 4 5 TAB 2
COM TAP
. .·
6 7 2
CPX 5 6 TBA 2
DAA 2 TPA 2
DEC
DES
DEX
EaR
2
2 3
6
4
·
4
4
TST
TSX
TSX
WAI
2 6 7
·
4
4
9
4·141
MC6802·MC6808·MC6802NS
Table 8 provides a detailed descnptlon of the Information as the control program IS executed The Information IS
present on the address bus, data bus, valid memory address categonzed In groups according to addressing modes and
line IVMA), and the read/wnte line IR/W) dunng each cycle number of cycles per instruction. lin general, instructions
for each instruction. with the same addreSSing mode and number of cycles ex-
This Information IS useful In companng actual with ex- ecute In the same manner, exceptions are indicated In the
pected results dunng debug of both software and hardware table.)
•
3 1 Op Code Address + 2 1 Operand Data (Low Order Byte)
DIRECT
ADC EOR 1 1 Op Code Address 1 Op Code
AOD LOA
AND ORA 3 2 1 Op Code Address +1 1 Address of Operand
BIT SBC 3 1 Address of Operand 1 Operand Data
CMP SUB
CPX 1 1 Op Code Address 1 Op Code
LOS 1
LOX 4 2 Op Code Address + 1 1 Address of Operand
3 1 Address of Operand 1 Operand Data (High Order Byte)
4 1 Operand Address + 1 1 Operand Data (Low Order Byte)
STA 1 1 Op Code Address 1 Op Code
4 2 1 Op Code Address + 1 1 Destination Address
3 0 De!.ttnation Address 1 Irrelevant Data (Note 1)
4 1 DestIOatlon Address 0 Data from Accumulator
STS 1 1 Op Code Address 1 Op Code
STX 2 1 Op Code Address + 1 1 Address of Operand
5 3 0 Address of Operand 1 Irrelevant Data (Note 1)
4 1 Address of Operand 0 Register Data (High Order Byte)
5 1 Address of Operand + 1 0 Register Data (Low Order Byte)
INDEXED
JMP 1 1 Op Code Address 1 Op Code
2 1 Op Code Address + 1 1 Offset
4
3 0 Index Register 1 Irrelevant Data (Note 1)
4 0 Index Register Plus Offset (w/o Carry) 1 Irrelevant Data (Note 1)
ADC EDR 1 1 Op Code Address 1 Op Code
ADO LOA 1
AND 2 1 Op Code Address + 1 Offset
ORA
BIT SBC 5 3 0 Index Register 1 Irrelevant Data (Note 1)
CMP SUB 1
4 0 Index Register Plus Offset (w/o Carry) Irrelevant Data (Note 1)
5 1 Index Register Plus Offset 1 Operand Data
CPX 1 1 Op Code Address 1 Op Code
LOS
LOX 2 1 Op Code Address + 1 1 Offset
3 0 I ndex Register 1 Irrelevant Data (Note 1)
6
4 0 Index Register Plus Offset (w/o Carry) 1 Irrelevant Data (Note 1)
5 1 Index Register Plus Offset 1 Operand Data (High Order By tel
6 1 Index Register Plus Offset + 1 1 Operand Data ILow Order Byte)
4-142
MC6802-MC68Q8-MC6802NS
•
7
4 0 Index Register Plus Offset (w/o Carry) 1 Irrelevant Data (Note 1)
5 0 Index Register Plus Offset 1 Irrelevant Data (Note 1)
6 1 Index Register Plus Offset 0 Operand Data (High Order Byte)
7 1 Index Register PILI'S Offset + 1 0 Operand Data (Low Order Byte)
JSR 1 1 Op Code Address 1 Op Code
2 1 Op Code Address + 1 1 Offset
3
,
0 Index Register 1 Irrelevant Dat03 (Note 1)
8 4
5 , Stack Pomter
Stack POinter -- 1
0
0
Return Address (Low Order Byte)
Return Address (High Order Byte)
6
7
0
0
Stack POinter - 2
Index Register ,
1 Irrelevant Data (Note 1)
Irrelevant Data (Note 1)
8 0 Index Register Plus Offset (w/o Carry) 1 Irrelevant Data (Note 1)
EXTENDED
, 1
JMP
3 2 1
Op Code Address
Op Code Address + 1 ,
1 Op Code
Jump Address {High Order Byte)
3
,
1 Op Code Address + 2 1 Jump Address (Low Order Byte)
ADC
ADD
EOR
LOA
1
, Op Code Address
Op Code Address + 1
1 Op Code
AND ORA 4
2
Op Code Address + 2 ,
1 Address of Operand (HIgh Order Byte)
BIT
CMP
SBC
SUB
3
4 ,
1
Address of Operand , Address of Operand (Low Order Byte)
Operand Data
CPX 1 1 Op Code Address 1 Op Code
LOS
LOX
2 1 Op Code Address + 1 1 Address of Operand (HIgh Order Byte)
1 Op Code Address + 2
5 3
,
1 Address of Operand (Low Order Byte)
4
5
1
1
Address of Operand
Address of Operand + 1 , Operand Data (High Order Byte)
Operand Data (Low Order Byte)
STA A 1 1 Op Code Address 1 Op Code
STA B
2 1 Op Code Address + 1 1 DestinatIon Address (High Order Byte)
5 3 1 Op Code Address + 2 1 Destination Address (Low Order Byte)
4
5 ,
0 Operand Destination Address
Operand Destination Address 0
1 Irrelevant Data (Note 1)
Data from Accumulator
ASL
ASR
CLR
LSR
NEG
ROL
1
2
1
1
Op Code Address
Op Code Address +,
1
, Op Code
Address of Operand (High Order Byte)
Op Code Address + 2
COM
DEC
INC
ROR
TST 6
3
4
1
1 Address of Operand ,
1 Address of Operand (Low Order Etyte)
Current Operand Data
5 0 Address of Operand 1 Irrelevant Data (Note 1)
6 1/0 Address of Operand 0 New Operand Data INote 3)
INote
3)
4-143
TABLE 8 - OPERATIONS SUMMARY ICONTINUED)
I
ASR INC SEV
CBA LSR TAB
CLC NEG TAP
CLI NOP TBA
CLR ROL TPA
CLV ROR TST
COM SBA
DES 1 1 o p Code Address 1 Op Code
DEX 1 Op Code Address + 1 1 Cp Code of Next InstructIon
INS 2
4
INX 3 0 PrevIous Register Contents 1 Irrelevant Data (Note 1)
4 0 New Register Contents 1 Irrelevant Data (Note 1)
PSH 1 1 Op Code Address 1 Op Code
2 1 Op Code Address + 1 1 Op Code of Next Instruction
4
3 1 Stack POinter 0 Accumulator Data
4 0 Stack POinter - 1 1 Accumulator Data
PUL 1 1 ap Code Address 1 ap Code
2 1 Op Code Address + 1 1 Op Code of Next Instruction
4
3 0 Stack POinter 1 Irrelevant Data (Note 1)
4 1 Stack POinter + 1 1 Operand Data from Stack
TSX 1 1 Op Code Address 1 Op Code
2 1 Op Code Address + 1 1 Op Code of Next Instruction
4
3 0 Stack POinter 1 Irrelevant Data (Note 1)
4 0 New Index Register 1 Irrelevant Data (Note 1)
TXS 1 1 Op Code Address 1 Op Code
2 1 Op Code Address + 1 1 ap Code of Next Instruction
4
3 0 Index Register 1 Irrelevant Data
4 0 New Stack POinter 1 Irrelevant Data
RTS 1 1 Op Code Address 1 Op Code
2 1 Op Code Address + 1 1 Irrelevant Data (Note 2)
5 3 0 Stack Pointer 1 Irrelevant Data (Note 1)
4 1 Stack Pointer + 1 1 Address of Next Instruction (High
Order Byte)
5 1 Stack POinter + 2 1 Address of Next Instruction (Low
Order Byte)
4-144
MC6802. MC680a. MC6802NS
•
7 1 Stack POinter + 4 1 Index Register from Stack (High Order
Byte)
S 1 Stack POinter + 5 1 Index Register from Stack (Low Order
Byte)
9 1 Stack POinter + 6 1 Next Instruction Address from Stack
(H Igh Order Byte)
10 1 Stack POinter + 7 1 Next Instruction Address from Stack
(low Order Byte)
SWI 1 1 Op Code Address 1 Op Code
2 1 Op Code Address + 1 1 Irrelevant Data (Note 1)
3 1 Stack Pointer 0 Return Address (Low Order Byte)
4 1 Stack POinter - 1 0 Return Address (High Order Byte)
5 1 Stack Po Inter - 2 0 Index Register (Low Order Byte)
6 1 Stack POinter - 3 0 Index Register (High Order By tel
12
7 1 Stack POinter - 4 0 Contents of Accumulator A
B 1 Stack POinter - 5 0 Contents of Accumulator B
9 1 Stack POinter - 6 0 Contents of Condo Code Re'Jlster
10 0 Stack POinter - 7 1 Irrelevant Data (Note 1)
11 1 Vector Address FFFA (Hex) 1 Address of Subroutine (High Order
Byte)
12 1 Vector Address FFFB (Hex) 1 Address of Subroutine (Low Order
Byte)
RELATIVE
BCC BHI BNE 1 1 Op Code Address 1 Op Code
BCS BlE BPl 1 Op Code Address + 1 1 Branch Offset
2
SEQ BlS BRA 4
BGE BlT BVC 3 0 Op Code Address + 2 1 Irrelevant Data (Note 1)
BGT BMI BVS 1 Irrelevant Data (Note 1)
4 0 Branch Address
BSR 1 1 Op Code Address 1 Op Code
2 1 Op Code Address + 1 1 Branch Offset
3 0 Return Address of Main Program 1 Irrelevant Data (Note 1)
4 1 Stack POinter 0 Return Address (Low Order Byte)
B
5 1 Stack POinter - 1 0 Return Address (High Order Byte)
6 0 Stack Pointer - 2 1 Irrelevant Data (Note 1)
7 0 Return Address of MaIn Program 1 I rrelevant Data (Note 1)
B 0 Subroutine Address (Note 4) 1 Irrelevant Data (Note 1)
NOTES
If device which is addressed dunng thiS cycle uses VMA, then the Data Bus will go to the high-Impedance three-state condition
Depending on bus capacitance, data from the prevIous cycle may be retained on the Data Bus
2 Data IS Ignored by the MPU
3 For TST, VMA=Q and Operand data does not change
4 MS Byte of Address Bus= MS Byte of Address of BSR InstructIOn and LS Byte of Address Bus= LS Byte of Sub-Routine Address
4-145
® MOTOROLA MC680SP2
Advance Infor:rnation
HMOS
(HIGH DENSITY
N·CHANNEl, SILICON-GATE
a-BIT MICROCOMPUTER UNIT DEPLETION LOADI
HARDWARE FEATURES:
•8-Blt Architecture
•
CASE 719
•1100 Bytes of User ROM
•20 TTLICMOS Compatible 81dlrectlonal 110 Lines 18 Lines are
LED Compatlblel
• 5 V Single Supply
SOFTWARE FEATURES:
•Similar to M6800 Family
•Byte EffiCient Instruction Set
•Easy to Program
• Internal8-Blt Timer With Selectable Clock Source (External Tlrner NUM PA3
Input or Internal Machine Clock) TIMER PA2
• Timer Prescaler Option 17 Bits 2NI PCO PAl
• 8 Bidirectional 110 Lines With TTL or TTLICMOS Interface Option
PCl PAO
• Crystal or Low-Cost Resistor OSCillator Option
PC2 PS7
• Low Voltage Inhibit Option
• 4 Vectored Interrupts; Timer, Software, and 2 External PC3 PS6
PSO PS5
PSl PS4
PS2 PS3
4-146
MC6805P2
TIMER
PBO
Accumulator PBI
a A CPU Data Pon PB2 Pon
Index Control Dir. a PB3 a
PB4 I/O
Register Reg. Reg. PB5 Lines
PAO a x
PB6
PAl Condition
Pon PA2 PB7
Pon Data Code
A PA3 Re ister cc
A Dir.
I/O PA4 CPU
PA5 Reg. Reg. Stack
Lines
PA6 Pointer
PA7 SP PCO Pon
Program Data Pon
PCI C
Counter Dir. C
PC2 I/O
Hi h PCH Reg. Reg PC3 Lines
ALU
1100 X 8 Program
User ROM Counter
•
116 X 8 Self- a Low PCl
Check ROM
MAXIMUM RATINGS
This device contains circuitry to protect the
Rating Symbol Value Unit Inputs against damage due to high static
Supply Vollage Vee -0:310 +70 V voltages or electric fields, however, It IS ad-
Inpul Vollage {Excepl Pin 61 V," -0310 +70 V vised that normal precautions be taken to
avoid appllcatlon of any voltage higher than
Operating Temperature Range TA 010 70 'e
maximum rated voltages to this hlgh-
Storage Temperature Range Tslg -5510 +150 'e Impedance Circuit For proper operation It IS
Junction Temperature recommended that V In and Vout be con-
Plasllc 150 strained to the range VSS:S (V in or V out )
::5Vee Reliability of operation IS enhanced If
Ceramic TJ 175 'e
unused Inputs are tied to an appropriate logic
Cerdlp 175 voltage level (e g , either VSS or Vee)
THERMAL CHARACTERISTICS
Characteristic Symbol Value Unit
Thermal Resistance
Plastic 120
Ceramic 8JA 50 'c/w
eerdlp 60
POWER CONSIDERATIONS
The average chip-junction temperature. T J, In °c can be obtained from
TJ=TA+(PD-8JA) (1)
Where:
T A. Ambient Temperature, °c
8JA" Package Thermal ReSistance, Junctlon-to-Amblent, °C/W
PD- PINT+ PPORT
PINT-ICCxVCC, Watts - Chip Internal Power
PPORT- Port Power DISSipation, Watts - User Determined
For most appliCationS PPORT <C PINT and can be neglected PPORT may become significant If the deVice IS configured to
drive Darlington bases or sink LED loads
An approximate relationship between PD and T J (,f PPORT IS neglected) IS
Po = K ... IT J + 273°C) (2)
SolVing equations 1 and 2 for K gives.
K = PO-(T A + 273°C) + 8JA-PD 2 (3)
Where K IS a constant pertaining to the particular part. K can be determined from equation 3 by measuring PD (at eqUllibnum)
for a known T A. USing this value of K Ihe values of Po and T J can be obtained by solVing equations (1) and (2) Iteratively for any
value of T A.
4·147
MC6805P2
ELECTRICAL CHARACTERISTICS IVCC~ +525 Vdc±O 5 Vdc, VSS ~ GND, TA ~O" to 70"C unless otherwise noted)
•
Internal Power DlsslpatlOn- No Port Loading V CC ~ 5 75 V, T A ~ O"C PINT - 400 690 mW
Input Capacitance
EXTAL Cin - 25 - pF
All Other - 10 -
Low Voltage Recover VLVR - - 475 V
Low Voltage Inhibit VLVI - 35 - V
Input Current
TIMER IV,n~O 4 V) - - 20
INT IVIn~2 4 V to VCC) - 20 50
EXTAL IV,n~2 4 V to VCC, crystal OptIOn I lin - - 10 ~A
IVIn~O 4 V, Crystal OptlOnl - - -1600
RESEi' IVIn~O 8 VI -40 - -50
(External Capacitor Chargmg Current)
* Due to Internal biaSing, this Input (when unused) floats to approximately 2 0 Vdc
PORT DC ELECTRICAL CHARACTERISTICS IVCC~ +5 25 Vdc±O 5 Vdc, VSS~GND, TA~O" to 70"C unless othenwlse noted I
Characteristic I Symbol I Min I Typ I Max I Unit
Port A with CMOS Drive Enabled
Output Low Voltage, ILoad~ 1 6 mA VOL - - 04 V
Output High Voltage, ILoad_~ -100 ~A VOH 24 - - V
Output High Voltage, ILoad= -10 ~A VOH 35 - - V
Input High Voltage, ILoad= -300 ~A Imax) VIH 20 - VCC V
Input Low Voltate, ILoad= -500 ~A Imax ) VIL 03 - 08 V
HI-Z State Input Current IV In =2 0 V to VCC) IIH - - -300 ~A
HI-Z State Input Current IVIn=O 4 V) IlL - - -500 ~A
Port B
Output Low Voltage, ILoad = 32 mA VOL - - 04 V
Output Low Voltage, ILoad= 10 mA ISlnk) VOL - - 10 V
Output High Voltage, ILoad= -200 ~A VOH 24 - - V
Darlington Current Drive ISource), VO= 15 V 10H -10 - 710 rnA
Input High Voltage VIH 20 - VCC V
Input Low Voltage VIL -03 - 08 V
HI-Z State Input Current ITS I - 2 20 ~A
Port C and Port A with CMOS Drive Disabled
Output Low Voltage, ILoad =1 6 mA VOL - - 04 V
Output High Voltage, ILoad- -100 ~A VOH 24 - V
Input High Voltage VIH 20 - VCC V
Input Low Voltage VIL -03 - 08 V
HI-Z State Input Current ITSI - 2 20 ~A
4-148
MC6805P2
SWITCHING CHARACTERISTICS IVec ~ + 025 Vde ± 05 Vde, VSS ~ GND, TA ~ 0" 10 70"C unle" olherWlse noledl
FIGURE3 - TIL EQUIVALENT TEST LOAD FIGURE4 - CMOS EQUIVALENT TEST LOAD FIGURE5 - TIL EQUIVALENT TEST LOAD
(PORT BI (PORT AI (PORTS A AND CI
VCC=575V VCC=575V
Test Test
POint Pomt
40 pF
TestPolnt~
I 30 pF IT otall 30 pF
•
1T0tali ITotali
C = 40 pF 1T0tali
SIGNAL DESCRIPTION 4-blt port ICI All lines are prograrnmable as either Inputs or
The tnput and output signals for the M CU, shown tn outputs under software control of the data direction
F'gure 1, are descnbed tn the followtng paragraphs registers Refer to INPUTS/OUTPUTS for add,ttonal tnfor-
matlon
VCC AND VSS - Power IS supplted to the MCU us,ng
these two pins Vec IS power and VSS 's the ground con- MEMORY
nection As shown ,n Figure 6, the MCU IS capable of addressing
INT - ThiS pin provides the capablltty for asynchronously 2048 bytes of memory and I/O registers with ItS program
applYing an external tnterrupt to the MCU Refer to INTER- counter The MC6805P2 MCU has Implemented 128 of these
RUPTS for additional tnformatlon locations ThiS consists of 1100 bytes of user ROM, 116
XTAL AND EXTAL - These ptnS provide connections to bytes of self-check ROM, 64 bytes of user RAM, 6 bytes of
the on-chip clock OSCillator circuit A crystal, a resistor, or an port 1/0, and 2 timer registers
external signal dependtng on the user selectable manufactur- The stack area IS used dunng the processing of Interrupt
tng mask option, can be connected to these ptnS to provide a and subroutine calls to save the processor state The register
system clock source with vanous stability/ cost tradeoffs contents are pushed onto the stack tn the order shown ,n
lead lengths and stray capacitance on these two pins should Figure 7 Because the stack potnter decrements dunng
be minimized Refer to INTERNAL CLOCK GENERATOR pushes, the low order byte IPCU of the program counter 's
OPTIONS for recommendations about these Inputs stacked first, then the high order three bits I PCHI are
stacked ThiS ensures that the program counter IS loaded
TIMER - ThiS ptn allows an external Input to be used to correctly, dunng pulls from the stack, stnce the stack potnter
decrement the Internal timer circuitry Refer to TIMER for Increments dunng pulls A subroutine call results In only the
additional tnformatlon about the timer circUitry program counter IPCl, PCHI contents betng pushed onto
REsET - ThiS ptn allows resetting of the MCU at times the stack The rematntng CPU registers are not pushed
other than the automat,c resetttng capablltty already tn the
MCU Refer to RESETS for additional tnformatlon CENTRAL PROCESSING UNIT
The CPU of the M6805 Family IS Implemented In
NUM - ThiS pin IS not for user appltcatlon and must be
dependently from the 1/0 or memory configuration Conse-
connected to V S S
quently, ,t can be treated as an tndependent central pro-
INPUT/OUTPUT LINES {AO-A7, Bo-B7, CO-C31 - These cessor commUnication w,th I/O and memory via Internal ad-
20 Itnes are arranged Into two 8-blt ports IA and BI and one dress, data, and control buses
4·149
MC6805P2
o 76543210
()()() I/O Ports $()()() $()()()
0 PortA
Timer
1 PortB $001
Page Zero RAM
Access with 127 1128 Bytes! $07F 2 11 1 1 I Port C $002
Short 128 $080 3 Not Used $003
Instructions Page Zero
User ROM 4 PortA DDR $004"
1128 Bytes!
255 \FF 5 Port BOOR $005"
256
Not Used
$100 6 I
Not Used Port C DDR $006"
•
ROM 164 Bytes!
1116 Bytes!
2039 $7F7
2040 Interrupt $7F8 Stack
Vectors 131 Bytes
ROM Maximum)
2047 18 Bytes! $7FF 127 1 $07F
"Caution IDDRs! are write-only, they read as $FF
7 6 5 4 o Pull o
n 4 1 1 1
I COND1T10N
CODE REGISTER n .1
7
I
~--------------~
A I Accumulator
o
n -3 ACCUMULATOR n .2
L..-_ _ _ _ _ _--'
X I Index Register
n -2 INDEX REGISTER n '3 10 o
I'-___
PCH -'-__________
PCl -'1 Program Counter
n -1 1 1 1 1
1 I PCH* n '4
10 5 4
Push
Condition Code Register
*For subroutine calis, only PCl and PCH are stacked
Carry/Borrow
REGISTERS
The M6805 Family CPU has five registers available to the Zero
programmer They are shown In Figure 8 and are explained In L -_ _ _ _ Negative
the follOWing paragraphs.
~----- Inlerrupt Mask
4-150
MC6805P2
INDEX REGISTER (X) - The Index register IS an 8-bIt bit IS set the Interrupt :s latched and IS processed as soon as
register used for the Indexed addressing mode. It contains the Interrupt bit IS cleared
an 8-blt value that may be added to an Instruction value to Negative (N) - Used to indicate that the result of the last
create an effective address The Index register can also be arithmetic, logical or data manipulation was negative (bit 7 In
used for data manipulations uSing the read/modify/write in- result equal to a logical one)
structions The Index register may also be used as a tem- Zero (Z) - Used to ,nd,cate that the result of the last
porary storage area arithmetiC, logical or data manipulation was zero
Carry/Borrow (C) - Used to indicate that a carry or bor-
row out of the arithmetic logiC unit (ALU! occurred dUring
PROGRAM COUNTER (PC) - The program counter IS an the last arithmetic operation ThiS bit IS also affected dUring
11-blt register that contains the address of the next instruc- bit test and branch instructions plus shifts and rotates
tion to be executed
TIMER
STACK POINTER (SP) - The stack pOinter IS an 11-blt The MC6805P2 MCU timer circuitry IS shown In Figure 9
register that contains the address of the next free location on The 8-bIt counter may be loaded under program control and
the stack. Initially, the stack pOinter IS set to location $07F IS decremented toward zero by the clock Input (prescaler
and IS decremented as data IS being pushed onto the stack output!. When the timer reaches zero, the timer Interrupt re-
and Incremented as data IS being pulled from the stack The quest bit (bit 7) In the Timer Control Register (TCR) IS set
SIX most significant bits of the stack pOinter are permanently The timer Interrupt can be masked (disabled) by setting the
set to000011 DUring a MCU reset orthe Reset Stack POinter timer Interrupt mask bit (bit 6) In the TCR The Interrupt bit
•
(ASP) InstrUction, the stack pOinter IS set to location $07F ii-bit) In the Condition Code Register also prevents a timer
Subroutines and Interrupts may be nested down to location Interrupt from being processed The MCU responds to thiS
$06+.(31 bytes maximum! which allows the programmer to Interrupt by saving the present CPU state In the stack,
use up to 15 levels of subroutine calls fetching the timer Interrupt vector from locations $7F8 and
$7F9 and executing the Interrupt routine, see the INTER-
RUPTS section The TIMER INTERRUPT REQUEST BIT
CONDITION CODE REGISTER (CC) - The condition MUST BE CLEARED BY SOFTWARE
code register IS a 5-blt register In which four bits are used to
Indicate the results of the instruction Just executed These
bits can be indiVidually tested by a program and speCifiC ac- The clock Input to the timer can be from an external
tion taken as a result of their state Each indiVidual condition source (decrementing of Timer Counter occurs on a positive
code register bit IS explained In the follOWing paragraphs tranSition of the external source! applied to the TIMER Input
pin or It can be the Internal <1>2 Signal When the <1>2 Signal IS
Half Carry (H) - Set dUring ADD and ADC instructions to used as the source, It can be gated by an Input applied to the
Indicate that a carry occurred between bits 3 and 4 TIMER Input pin allOWing the user to easily perform pulse-
Interrupt (I) - Thls..!2!!..!s set to mask (disable) the timer Width measurements. (Note' For ungated <1>2 clock Inputs to
and external Interrupt (lNT) If an Interrupt occurs while thiS the timer prescaler, the TIMER pin should be tied to VCC).
"'2
(Internal)
Timer
Interrupt
TIMER
Mask
Input
Pin
r------,
!
I
I
I
L_____ J
Manufacturing
Mask Options
4-151
MC6805P2
The source of the clock mput IS one of the mask options that RESETS
IS specified before manufacture of the MCU The MCU can be reset three ways by mltlal power-up, by
A prescaler option can be applied to the clock mput that the external reset Input d'iESEi\ and by an optional Internal
extends the timing mterval up to a maximum of 128 counts low voltage detect CirCUit, see Figure 11 The mternal circuit
before decrementmg the counter This prescallng mask op- connected to the RESET pin consists of a Schmitt trigger
tion IS also specified before manufacture which senses the RESET line logiC level The Schmitt trigger
The timer contmues to count past zero, fallmg through to prOVides an Internal reset voltage If It senses a logiC 0 on the
$FF from zero and then continUing the count Thus, the RESET pin DUring power-up, the Schmitt trigger SWitches
counter can be read at any time by readmg the Timer Data on (removes reset) when the RES ET pm voltage rises to
Register (TOR) ThiS allows a program to determme the VIRES + When the RESET pin voltage falls to a logical 0 for
length of time smce a timer Interrupt has occurred, and not a period longer than one tcyc, the Schmitt trigger SWitches
disturb the counting process off to proVide an mternal reset voltage The "switch off"
At Power-up or Reset. the prescaler and counter are voltage occurs at VIRES _ A tYPical reset Schmitt trigger
Inillalized With all logical ones, the timer mterrupt request bit hysteresIs curve IS shown m Figure 12
(bit 7) IS cleared, and the timer mterrupt mask bit (bit 6) IS Upon power-up, a delay of tRHL IS needed before allowmg
set the RESET mput to go high ThiS time allows the Internal
clock generator to stabilize Connectmg a capacitor to the
SELF-CHECK Rt'm Input as shown In Figure 13, tYPically proVides suffi-
The self-check capability of the MC6805P2 MCU proVides cient delay See Figure 17 for the complete reset sequence
an mternal check to determine If the part IS functional Con-
nect the MCU as shown m Figure 10 and monitor the output INTERNAL CLOCK GENERATOR OPTIONS
•
of Port C bit 3 for an OSCillation of approximately 7 Hz A 9 The mternal clock generator CirCUit IS deSigned to require a
volt level on the Timer Input, Pm 7, energizes the ROM- minimum of external components A crystal, a reSistor, a
based self-check feature The self-check program exerCises Jumper Wire, or an external Signal may be used to generate a
the RAM, ROM, timer, mterrupts, and 1/0 ports system clock With various stabilityl cost tradeoffs A
-
2 INT MC6805P2 PA7 27
PA6 26
28 RESET PA5 25
~ 10"F PA4 ~
--
~
XTAL PA3 23
PA2 22
EXTAL PAl 21
PAD 20
-
..A12~
'9V
.... 7 TIMER
PB7 19
-
6 NUM PB6 18
vcc
-::r-
-
PB5 17
PB4 16
3300
-"'=!~ 8
PCO PB3
15
-
_'!:
l.~~ ~ ~9 PC1 PB2 14
3300 .h.:; ~1O PC2 PB1 13
'Cl ~11
JlOJ2
v
'PC3 PBO 12
0'
VCC= Pin 3
Vss= Pin 1
*Thls connection depends on the clock OSCillator user selectable mask option
Use crystal If that optIOn IS selected
4-152
MC6805P2
manufacturing mask option IS required to select either the The crystal oscillator startup time IS a function of many
crystal oscillator or the RC oscillator CIrCUit The oscillator variables crystal parameters (especially Rsl, oscillator load
frequency IS Internally divided by four to produce the Internal capacitance, IC parameters, ambient temperature, and
system clocks supply voltage To ensure rapid oscillator startup, neither the
The different connection methods are shown In Figure 14 crystal characteristics nor the load capacitance should ex-
The crystal specifications are given In Figure 15 A resistor ceed recommendations
selection graph IS given In Figure 16
5V
VCC
OV _ _ _ _ _ _- J
RESET
Pin
-------1'
Internal
Reset
----------~
Out
Of
Reset
FIGURE 12 - TYPICAL RESET SCHMITT
TRIGGER HYSTERESIS FIGURE 13 - POWER UP RESET DELAY CIRCUIT
--.1.-
v CC _1\,/I/\.--+2:::;S'-----,
II
RESET I' O~F
I~
Part Of
MC6805P2
MCU
In
Reset
OSV 2V 4V
FIGURE 14 - CLOCK GENERATOR OPTIONS
5 XTAL XTAL
-
Crystal ApprOXimately 25% Accuracy
TYPical tCYC= 1 25 ~s
External Jumper
+5V
XTAL XTAL
R MC6S05P2
External MC6S05P2
4 I See Figure 16} 4 EXTAL MCU
Clock EXTAL MCU
(Resistor Mask
Input ICrystal Mask No
Optloni
Option) Connection
4-153
MC6805P2
FIGURE 15 - CRYSTAL MOTIONAL ARM PARAMETERS FIGURE 16 - TYPICAL FREQUENCY SELECTION FOR
AND SUGGESTED PC BOARD LAYOUT RESISTOR OSCILLATOR OPTION
50
I I
Crysldl P,IItllllt'tt->r<.,
\ VCC=5 V
f--
EXTAL~~XTAL
40
TA=25'C
N
'"
I
::;;
4·~W
;: 30
u
5
zw "",
i5w 20
AT - Cut Parallel Resonance Crystal a: .........
Co = 7 pF Max u.. r-..... r--...
FREQ=40 MHz @ CL =24 pF 10
RS = 50 ohms Max ......
o 5 10 15 20 25 30 35 40 45 50 55 60
lal RESISTANCE Ik OHMSI
INTERRUPTS
•
The MC6805P2 MCU can be Interrupted three different
ways through the external Interrupt (lNT) mput pin, the
mternal timer Interrupt request, or the software Interrupt m-
structlon (SWII When any Interrupt occurs, processmg IS
suspended, the present CPU state IS pushed onto the stack,
the mterrupt bit (I) m the condition code register IS set, the
address of the mterrupt routme IS obtamed from the
appropriate Interrupt vector address, and the mterrupt
routme IS executed Stackmg the CPU register, settmg the
I-bit. and vector fetchmg requires a total of 11 tcyc periods
for completion
A flowchart of the Interrupt sequence IS shown m Figure
17 The Interrupt service routme must end with a return from
mterrupt (RTII Instruction which allows the MCU to resume
processmg of the program prior to the mterrupt (by unstack-
mg the prevIous CPU state) Table 1 provides a IIstmg of the
mterrupts, their PriOrity, and the address of the vector which
Ibl contams the starting address of the appropriate mterrupt ser-
vice routme The mterrupt PriOrity applies to those pending
when the CPU IS ready to accept a new mterrupt RESET IS
listed In Table 1 because It IS treated as an mterrupt
However, It IS not normally used as an Interrupt. When the
mterrupt mask bit m the Condition Code Register IS set the
mterrupt IS latched for later mterrupt execution
The external mterrupt IS mternally synchrOnized and then
latched on the failing edge of INT A smusoldal mput signal
(fINT maximum) can be used to generate an external mter-
rupt, as shown In Figure 18a, for use as a Zero Crossing
Detector For digital applications the INT can be driven by a
digital signal at a maximum period of tlWL ThiS allows ap-
plications such as servIcing tlme-of-day routmes and engag-
Ing/ dlsengagmg AC power control deVices Off-chip full
wave rectification provides an mterrupt at every zero cross-
mg of the AC signal and thereby proVides a 2f clock
A software mterrupt (SWII IS an executable mstructlon
which IS executed regardless of the state of the I-bit m the
Note Keep crystal leads and CirCUit
Condition Code Register SWl's are usually used as break-
connections as short as possible
pOints for debuggmg or as system calls
4-154
MC6805P2
,------.1. N
1-llln CCR)
07F- SP
O-OOR's Stack
CLR INT Logic PC, X,A, CC
FF- Timer
7 F-Prescaler
7F- TCR
N
TCR 6=0
And
•
Put on 7FE TCR 7= 1 Load PC From
SWI 7FC17FD
Address Bus
INT 7FA /7FB
N
Timer 7F8 I7F9
Fetch
Instruction
N{ PIn=
iiESEf
High
PC _ PC + 1 I--,S:..;W-,,-I- '
Load PC
from
7FE17FF
Execute
Instruction
VCC
AC
Input (Currel'lt TTL 47 k
IflNT Max) Limiting) MC6805P2 Level iNT MC6805P2
Rs 1 Mil ~----;Q~---;~~ MCU Dlgltal------4~_"_t
MCU
Input
AC Input~ 01 IlF
10 Vpp (tIWL Maximum
Period)
lJ
4-155
MC6805P2
Data
Direction Register
Blt*
~
c
<5 0 Latched
EU Output
-"c ccw Data
- 0 Bit
u
Data
Direction Output Input
Register Data Output To
,,
Sit Sit
0
State
0
MCU
0
1 1 1
0 X 3-State** Pin
4·156
MC6805P2
-
PA5 25 PB6 18
PAO 20 PBl 13
PBO 12
-
Port A, Bit 7 Programmed as Output, DriVing
CMOS Loads and Bit 4 DriVing one TTL Load Port B, Bit 5 Programmed as Output, DriVing
Directly luslng_CMOS output option) Darlington-Base Directly
+v +V
PB7 19
PB6 18
PB5 17
PB4 16
-
PC3 11 CMOS
PB3 15
PC2 10 Inverters
PB2 14 MC14049/MCl4069
PBl 13
PCl 9 f - - - -....-+-- ITYPlcall
PBO PCO 8
_lamA
Port B, Bit a and Bit 1 Programmed as Output, Port C, Bits 0-3 Programmed as Output, DriV-
DriVing LEOs Directly Ing CMOS Loads, USing External Pullup
ReSIstors
4·157
MC6805P2
. b. Input Modes
PA7 PB7
PA6 PB6
25 PA5 17 PB5
MC74LS04
MC74LS04 24 PA4 or 16 PB4
!TYPical! MC14069
23 PA3 15 PB3
iTYPlcal!
22 PA2 14 PB2
PA1 PB1
PAO PBO
II
PC3
PC2
PC1
PCO
BIT MANIPULATION
The MC6805P2 MCU has the ability to set or clear any. have Individual flags In RAM or to handle 1/0 bits as control
single random access memory or Input/output bit (except lines
the Data Direction Register, see Caution under INPUT/OUT- The coding example In Figure 22 Illustrates the usefulness
PUT paragraph), with a single instruction (BSET, BCLR) of the bit manipulation and test Instructions Assume that
Any bit In page zero Including ROM, except the DDRs, can the MCU IS to communicate with an external senal deVice
be tested, uSing the BRSET and BRCLR Instructions, and The external deVice has a data ready signal, a data output
the program branches as a result of ItS state The Carry bit line, and a clock line to clock data one bit at a time, LBS first,
equals the value of the bit referenced by BRSET or BRCLR out of the deVice The MCU walts until the data IS ready,
A Rotate Instruction may then be used to accumulate serial clocks the external deVice, picks up the data In the Carry Flag
Input data In a RAM location or register The capability to (C-blt), clears the clock line, and finally accumulates the data
work with any bit In RAM, ROM, or 1/0 allows the user to bit In a RAM location
4·158
MC6805P2
4-159
MC6805P2
BRANCH INSTRUCTIONS - The branch instructIOns CONTROL INSTRUCTIONS - The control InstructIOns
cause a branch from the program when a certain condition IS control the MCU operatIOns dUring program execution
met Refer to Table 4 Refer to Table 6
BIT MANIPULATION INSTRUCTIONS - These Instruc- ALPHABETICAL LISTING - The complete Instruction set
tions are used on any bit In the first 256 bytes of the memory IS given In alphabetical order ,n Table 7
(see Caution under INPUT/OUTPUT paragraph) One group
either sets or clears The other group performs the bit test OPCODE MAP SUMMARY - Table 8 IS an opcode map
branch operations Refer to Table 5 for the instructions used on the MCU
II
4·160
TABLE 2 - REGISTER/MEMORY INSTRUCTIONS
s:
n
~
Addressing Modes
Indexed Indexed Indexed
Immediate Direct
Extended (No Offset) (8-Blt Offset) (16-8It Offset)
Function
Op # # Op # # Op # #
MnemoOiC Code Bytes Cycles Code Bytes Cycles Code Bytes Cycles
Op # # Op # #
Code Bytes Cycles Code Bytes Cycles
OP # #
Code Bytes Cycles
;3
Load A from Memory LDA A6 2 2 B6 2 4 C6 3 5 F6 1 4 E6 2 5 D6 3 6
Load X from Memory LDX AE 2 2 BE 2 4 CE 3 5 FE 1 4 EE 2 5 DE 3 6
Store A In Memory STA B7 2 5 C7 3 6 F7 1 5 E7 2 6 D7 3 7
Store X In Memory STX BF 2 5 CF 3 6 FF 1 5 EF 2 6 DF 3 7
Add Memory to A ADD AB 2 2 BB 2 4 CB 3 5 FB 1 4 EB 2 5 DB 3 6
Add Memory and
Carry to A ADC A9 2 2 B9 2 4 C9 3 5 F9 1 4 E9 2 5 09 3 6 I
Subtract Memory SUB AO 2 2 80 2 4 CO 3 5 FO 1 4 EO 2 5 DO 3 6
Subtract Memory from I
A with Borrow SBC A2 2 2 B2 2 4 C2 3 5 F2 1 4 E2 2 5 02 3 6
AND Memory 10 A AND A4 2 2 B4 2 4 C4 3 5 F4 1 4 E4 2 5 D4 3 6
OR Memory with A ORA AA 2 2 BA 2 4 CA 3 5 FA 1 4 EA 2 5 DA 3 6
ExcluSive OR Memory
wllhA EOR A8 2 2 B8 2 4 C8 3 5 F8 1 4 E8 2 5 D8 3 6
Anthmetlc Compare A
with Memory CMP A1 2 2 B1 2 4 C1 3 5 F1 1 4 El 2 5 D1 3 6
Arithmetic Compare X
with Memory CPX A3 2 2 B3 2 4 C3 3 5 F3 1 4 E3 2 5 D3 3 6
~ Test Memory wllh
...... 811
A (Logical Compare) BIT A5 2 2 B5 2 4 C5 3 5 F5 1 4 E5 2 5 05 3 6
0)
...... Jump Unconditional JMP - - BC 2 3 CC 3 4 FC 1 3 EC 2 4 DC 3 5
- FD 1 7 ED 2
2_~~J
Jump to Subroutine JSR - - BD 2 7 CD 3 B 8 DD
- - - - _ . _ ... - -- ---
II _ _ _ _ _ _ _~ ~ 0_ _ _ _ _
- __ _
MC6805P2
..
BranchlFF Plus BPL 2A 2 4
BranchlFF Minus BMI 2B 2 4
Branch IFFlnterupt Mask
BIt IS Clear BMC 2C 2 4
Branch IFF Interrupt Mask
Bit IS Set BMS 20 2 4
Branch IFF Interrupt Line
IS Low BIL 2E 2 4
Branch IFF Interrupt Lme
IS HIgh BIH 2F 2 4
Branch to Subroutme BSR AO 2 8
Addressong Modes
Bit SellClear BIt Test and Branch
Op # # Dp # #
Function Mnemonic Code Bytes Cycles Code Bytes Cycles
Branch IFF BIt n IS set BRSET n (n =0 71 - - - 20n 3 10
Branch IFF BIt n IS clear BRCLR n (n =0 71 - - - 01 + 2 • n 3 10
Set BII n BSET n (n - 0 71 10 + 20 n 2 7 - - -
Clear bit n BCLR n (n - 0 71 11 + 2 en 2 7 - - -
Inherent
Op # #
Function Mnemonic Code Bytes Cycles
Transfer A to X TAX 97 1 2
Transfer X to A TXA 9F 1 2
Set Carry BIt SEC 99 1 2
Clear Carry Bit CLC 9B 1 2
Set Interrupt Mask BII SEI 9a 1 2
Clear Interrupt Mask BIt CLI 9A 1 2
Software Interrupt SWI 83 1 11
Return from Subroutine RTS 81 1 6
Return from Interrupt RTI 80 1 9
Reset Stack POinter RSP 9C 1 2
No-Operation NDP 90 1 2
4-162
MC6805P2
•
BLO X
•••• •
BLS X
•••• •
BMC X
•••• •
BMI
•••• •
BMS
•••• •
BNE
•••• •
BPL
•••• •
BRA
•••• •
BRN
•••• •
BRCLR X
•••• "
••••
•"
BRSET X
BSET X
••••
BSR X
•••• •0
CLL X
••••
CLI X
• 0 0• •, •
CLR X X X X
•• •
CMP X X X X X X
•• /\ /\
,
/\
COM X X X X
•• /\ /\
CPX X X X X X X
•• /\ /\ /\
DEC X X X X
•• /\ /\
•
EOR X X X X X X
•• /\ /\
•
INC X X X X
•• /\ /\
•
JMP X X X X X
•••• •
JSR X X X X X
•••• •
LDA X X X X X X
••" /\
•
LDX X X X X X X
•• /\ /\
•
LSL X X X X
• • 0" /\ /\
LSR X X X X
•• /\ /\
NEQ X X X X
•• /\ /\ /\
NOP X
•••• •
ORA X X X X X X
•• " /\
•
ROL X X X X
•• /\ /\ /\
RSP X
•••• •
Condition Code Symbols
H Half Carry (From Bit 31 C Carry/Borrow
Interrupt Mask A Test and Set If T rue, Cleared Otherwise
N Negative (Sign Bltl • Not Affected
Z Zero
4·163
MC6805P2
•
Condition Code Symbols
H Half Carry (From Bit 3) C Carry! Borrow
I Interrupt Mask A Test and Set If True, Cleared Otherwise
N Negat,ve (S'gn B,tl • Not Affected
Z Zero ? Load CC Register From Stack
4-164
s:
(')
TABLE 8 - M6805 FAMILY OPCODE MAP
~j:3
L~t
~
'0
Bit Manipulation
BTB
cx'ix,
BRSEJ~A
5 7
.ri"
BSE1~c
5 4
Branch
REL
00'\.
2 BRARFL
3 6
2
DIR
~,
NEG
DIA
5 4
.
INH A
,':,.
, NEGAINH
Read! Modify /Wnte
3
INHIXI
4
.~,
NEGX
3
INH
IX,
2
.
.~
NEG
6 6
IX
.~,
NEG
5
IX
9
1
INH
,~
RTI
Control
INH
INH
.~~
2
IMM
"~n
SUB
IMM
2 4
2
DIR
,~,
SUB
3
DIR
5
3 SUB
Register I Memory
EXT
,~
4 6
I
'~1
XT 13 SUB IX2
5 5
X,
,,~n
2 SUB
4
IXl
4
1
I
,i"
SUB
3
IX
HI....----C;-W
0
lIDO
1 IX' 1
10 5 7 5 4 3 6 6 2 2 4 3 5 4 6 5 5 4 4 3
CMP CMP CMP 1
1 2 BCL~~e 12 BRNAEL
BRCLRO RTS CMP CMP CMP
CXXll 3 STS 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IXl I IX eml
'0 5 7 5 4 3 2 2 4 3 5 4 6 5 5 4 4 3
2 BASETI BSETI BHI SBC SBC SBC SBC SBC SBC 2
00'0 3 STS 2 sse 2 AE 2 IMM 2 OIR 3 EXT 3 IX2 2 IXl 1 IX 0010
'0 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 11 10 2 2 4 3 5 4 6 5 5 4 4 3
COMA CPX CPX CPX CPX 3
2 BCL~~e 2 BLSAEL
3 BRCLRI COM COMX COM COM SWI CPX CPX
0011 3 STS 2 DIR 1 INH 1 INH 2 IXl 1 IX 1 INH 2 IMM 2 DIA 3 EXT 3 IX2 2 IXl 1 IX 0011
'0 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 4 3 5 4 6 5 5 4 4 3
4 BRSET2 BSET2 17 BCC LSR LSRA LSRX LSR LSR AND AND AND AND AND AND 4
0100 3 STS sse AEL 2 DIR 1 INH 1 INH 2 IXl 1 IX 2 IMM 2 DIR 3 EXT 3 IX2 2 IXl 1 IX 0100
10 5 7 5 4 3 2 2 4 3 5 4 6 5 5 4 4 3
BIT
2 BCL~~e
BIT BIT BIT BIT 5
5
0101 3
BACLA2
STS
I, BCSAE BI~MM IR 3 EXT 3 IX2 2 IXl 1 IX 0101
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 4 3 5 4 6 5 5 4 4 3
6
0110 3
BRSET3
STS BSE~~c 12 BNEAEL 2 ROR
DIR 1
RORA
INH 1
RORX
INH
ROR
IXl 1
ROR
IX 2
LOA
IMM 2
LOA
DIR 3
LOA
EXT 3
LOA
IX2 2
LOA
IXl 1
LOA
IX
6
0110
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 5 4 5 7 6 6 5 5 4
7 BACLA3 BCLR3 BEQ ASRA ASRX ASR ASR TAX STA , STA STA STA STA 7
7 ASR
0111 3 STS 2 asc 2 AE DIR 1 INH 1 INH 2 IXl 1 IX 1 INH 2 DIA 3 EXT 3 IX2 2 IXl 1 IX 0111
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 2 2 4 3 5 4 6 5 5 4 4 3
8 BASET4 BSET4 BHCC 2 LSL LSLA LSLX LSL LSL CLC I, EORIMM EOR EOR EOR EOR EOR 8
lem 3 TS 2 sse 2 AE DIA 1 INH 1 INH 2 IXl 1 IX H 2 DIR 3 EXT 3 IX2 2 IXl 1 IX 1000
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 2 2 4 3 5 4 6 5 5 4 4 3
2 BCL~~c
9 BRCLR4 BHCS AOL AOLA ROLX ROL AOL SEC ADC ADC ADC ADC ADC ADC 9
1001 3 STS 2 REl 2 DIA 1 INH 1 INH 2 IXl 1 IX 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IXl 1 IX 1001
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 2 2 4 4 5 4
~
...... A
1010 3BASEJis 2 BSE~~c 2
BPL
REL
2 DEC
DIR 1
DECA
INH 1
DECX
INH 2
DEC
IXl 1
DEC
IX 1
CLI
INH 2
ORA
IMM 2
ORA 4
DIR
.0 ORA
3 EXT 3
ORA
IX2
5 OAA 4
2 IXl 1
ORA
IX
A
1010
3 3
m B
10
BRCLA5
5 7
BCLR5
5 4
BMI
2
SEI
2 2
ADO
2
4 ADO 3
5
ADD
4 6
ADO' , ADO
4 4
ADD B I
01 1011 3 STS 2 ssc 2 AEL 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IXl 1 IX 1011
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 3 2 4 3 5 4 4 3 3 2
C BRSET6 BSET6 BMC INCA INCX INC RSP JMP JMP JMP JMP JMP C I
2 INC DIA .2 INC IXl IX
1100 STS 2 ssc 2 AEL 1 INH 1 INH IXl 1 IX 1 INH 2 DIA 3 EXT 3 IX2 2 1 1100
10 5 7 5 4 3 , 4 4 3 4 3 7 5 6 4 2 2 S 6 7 5 6 9 7 S 6 7
'6 JSR JSR '
0 BACL~~A , BCL~~r BMS
REL , TS~mA TSTA TSTX
INH
'2 TST
IXl
TST NOP BSR JSR
EXT
JSR
IX2 2
JSR
IXl IX
0
111
10 5 7 5 4 3
, INH 1 1 IX
2
1 INH 2
2
REL
2
2
4
DIA 3 3
5 5 , 1
4 3
'101
LOX 4 " LOX 4 , LOX
2 BSE~Ic
E BRSET7 BIL STOP LOX LOX LOX E
1110 3 BTB 2 AEL 1 INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IXl 1 IX 1110
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 2 5 4 6 5 7 6 6 5 5 4
F BACLA7 BCLA7 BIH CLR CLAA CLAX CLA CLR WAIT TXA STX STX STX STX STX F
1111 3 STS 2 __ B,~C 2 AEL 2 DIR 1 INH 1 INH -' IXl 1 IX 1 INH 1 INH 2 DIR 3 EXT 3 IX2 2 IXl 1 IX 1111
INH
IMM
Inherent
Immediate
'-'F:::;...E=+----------::::;;>,.. Opcode In Hexadecimal
DIR
EXT
REL
Direct
Extended
Relative
# of Cycles IHMOS VersIons)
Mnemonic
j.4··· ~
.. SUB
~
0
Opcode In Binary
•
MC6805P2
ORDERING INFORMATION
The Information reqUired when ordenng a custom MCU IS signed, and returned to Motorola The signed venf,cat,on
listed below The ROM program may be transmitted to form constitutes the contractual agreement for creation of
Motorola on EPROM(s) or a MOOS disk file the customer mask If deSired, Motorola Will program on
To Initiate a ROM pattern for the MCU It IS necessary to blank EPROM from the data file used to create the custom
first contact your local Motorola representative or Motorola mask and aId In the Verification process
dlstnbutor
ROM VERIFICATION UNITS (RVUs!
EPROMs - The MCM2716 or MCM2532 type EPROMs, pro- Ten MCUs containing the customer's ROM pattern Will be
grammed with the customer program (positive logiC sense sent for program venf,cat,on These units Will have been
for address and data), may be submitted for pattern genera- made uSing the custom mask but are for the purpose of
tion The EPROM must be clearly marked to indicate which ROM venf,cat,on only For expediency they are usually un-
EPROM corresponds to which address space The recom- marked, packaged In ceramiC, and tested only at room
mended marking procedure IS Illustrated below temperature and 5 volts These RVUs are Included In the
mask charge and are not production parts The RVUs are
thus not guaranteed by Motorola Quality Assurance,and
xxx should be discarded after venf,cat,on IS completed
FLEXIBLE DISKS
The disk media submitted must be Single-sided, slngle-
II 000
xxx = Customer ID
400
denSity, 8-lnch, MOOS compatible flOPPies The customer
must wnte the binary file name and company name on the
disk With a felt-tip pen The minimum MOOS system files as
well as the absolute binary object file (filename LO type of
file) from the M6805 cross assembler must be on the disk An
object file made from a memory dump uSing the ROLLOUT
After the EPROM(s) are marked they should be placed In command IS also acceptable Consider submitting a Source
conductive IC carners and securely packed Do not use Iisling as well as the follOWing files filename, LX (EXOR-
styrofoam ciser'" loadable format! and filename, SA (ASCII Source
Code! These files will of course be kept confidential and are
VERIFICATION MEDIA used 11 to speed up the process In-house If any problems
All onglnal pattern media (EPROMs or Floppy Disk! are fil- anse, and 2) to speed up the user-to-factor Interface If the
ed for contractual purposes and are not returned A com- user finds any software errors and needs assistance qUickly
puter listing of the ROM code Will be generated and returned from Motorola factory representatives
along With a lisling venficatlon form The listing should be MOOS IS Motorola's Disk Operating system available on
thoroughly checked and the venf,cat,on form completed, development systems such as EXORCisers, EXORsets, etc
4·166
MC6805P2
Country _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
OPTION LIST
Select the options for you r M CU from the following list A
manufacturing mask will be generated from this Information
Timer Prescaler
II
o2' (divide by 1) o 2' (divide by 16)
o2' (divide by 2) o 2' (divide by 32)
o2' (divide by 4) o 2' (divide by 64)
o2' (divide by 8) o 2' (divide by 128)
Clock Freq _ _ _ _ _ _ _ _ _ _ _ _ __
Title ________________________________________________________________________________
S,gnature _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
4·167
@ MOTOROLA MC680SP4
Advance InforD1ation
HMOS
(HIGH DENSITY
N·CHANNEL, SILICON-GATE.
DEPLETION LOADI
8-81T MICROCOMPUTER UNIT
8-BIT
The MC6805P4 Microcomputer Unit IMCUI IS a member of the MICROCOMPUTER
M6805 Family of low-cost single-chip microcomputers This 8-bIt
microcomputer contains a CPU, on-chip CLOCK, ROM, RAM, I/O, and
TIMER. It IS designed for the user who needs an economical microcom-
puter with the proven capabilities of the M6800-based instruction set. A
comparison of the key features of several members of the M6805 Family
IS shown on the last page of this data sheet The following are some of
the hardware and software highlights of the MC6805P4 MCU
HARDWARE FEATURES:
• S-Blt Architecture
• 112 Bytes of Standby RAM
• Standby RAM Power Pin
•
• Memory Mapped I/O
• 1100 Bytes of User ROM
• 20 TTL/CMOS Compatible Bidirectional I/O Lines (S Lines are
LED Compatlblel
• On-Chip Clock Generator
• Self-Check Mode
• Zero Crossing Detection PLASTIC PACKAGE
CASE 710
• Master Reset
• Complete Development System Support on EXORCiser'"
• 5 V Single Supply
SOFTWARE FEATURES:
• Similar to M6800 Family
• Byte Efficient Instruction Set
CERDIP PACKAGE
• Easy to Program CASE 733
• True Bit Manipulation
• Bit Test and Branch Instructions
• Versatile Interrupt Handling FIGURE 1 - PIN ASSIGNMENTS
• Versatile Index Register
• Powerful Indexed Addressing for Tables Vss ~
• Full Set of Conditional Branches INT PA7
• Memory Usable as Register/Flags VCC PA6
• Single Instruction Memory Examine/Change EXTAL PA5
• 10 Powerful Addressing Modes XTAL PA4
• All Addressing Modes Apply to ROM, RAM, and I/O
VSB PA3
USER SELECTABLE OPTIONS:
TIMER' PA2
• Internal8-Blt Timer With Selectable Clock Source IExternal Timer
Input or Internal Machine Clockl PCO/NUM PAl
• Timer Prescaler Opllon 17 Bits 2NI PCl PAO
• S Bidirectional I/O Lines With TTL or TTL/CMOS Interface Opllon PC2 PB7
• Crystal or Low-Cost Resistor OSCillator Option PC3 PB6
• Low Voltage Inhibit Opllon PBO PB5
• 4 Vectored Interrupts, Timer, Software, and 2 External PBl PB4
PB2 PB3
4-168
MC6805P4
RESET 1m
)
TIMER
NUM PBO
Accumulator PBt
A CPU PB2 Port
Data Port
Control PB3 B
Index Dir B PB4 110
Register Reg Reg PB5
x Lines
PAO PBS
PAl Condition PB7
Port PA2 Code
Port Data
A PA3 Register ec
A Oir.
liD PA4 CPU
Reg. Reg. Stack
Lmes PA5
PAS POinter
PA7 SP PCO/NUM Pon
Program Data Port
PCt C
Counter Dir C PC2 I/O
Hi h peH Reg Reg PC3 Ltnes
ALU
1100 X 8 Program
User ROM Counter
116 X 8 Self- Low pel
Check ROM VSB
MAXIMUM RATINGS
Supply Voltage
Ratlno
150
Unit
V
V
'(
O(
ThiS device contains circuitry to protect the in-
puts against damage due to high static voltages
or electncal fields, however, It IS adVised that
normal precautions be taken to avoid application
of any voltage higher than maximum rated
voltages to thiS high-Impedance circuit For pro-
per operation It IS recommended that Vin and
Vout be constrained to the range VSS~(VIn or
V out) ~ V CC Reliability of operation IS enchanc-
•
ed If unused Inputs except EXTAL are tied to an
Ceramic TJ 175 '(
appropnate logiC voltage level (e 9 , either VSS
Cerdlp 175
or Vee!
THERMAL CHARACTERISTICS
Characteristic Symbol Value Unit
Thermal Resistance
PlastiC 120
8JA 'C/W
Ceramic 50
Cerdlp 60
POWER CONSIDERATIONS
The average Chip-Junction temperature, T J, In 'C can be obtained from'
T J=TA + (PO"8JAI (1)
Where'
TA-Amblent Temperature, 'C
8JA-Package Thermal Resistance, Junctlon-to-Amblent, °C/W
Po - PINT + PPORT
PINT -ICC x V CC, Watts - Chip Internal Power
PPORT - Port Power DiSSipation, Watts - User Determined
For most applications PPORT<C PINT and can be neglected. PPORT may become significant If the deVice IS configured to
drive Darlington bases or Sink LED loads.
An approximate relationship between Po and T J (If PPORT IS neglected) IS:
PO=K+(TJ+273°C) (2)
SolVing equations 1 and 2 for K gives:
K = PO"(T A + 273°C) +8JA"P 0 2 (31
Where K IS a constant pertaining to the particular part. K can be determined from equation 3 by measuring Po (at equllibrluml
for a known T A. USing this value of K the values of Po and T J can be obtained by solVing equations (1) and (2) Iteratively for any
value of TA.
4-169
MC6805P4
SWITCHING CHARACTERISTICS IVCC= + 525 Vdc ± 05 Vdc. VSS = GND. TA =0° to 50° unless otherwise notedl
Characteristic Symbol Min Typ Max Unit
Oscillator Frequency 10SC 04 - 42 MHz
Cycle Time (4/ fascl tcyc 095 - 10 ~s
INT Zero Crossing Detection Input Frequency (± 5° Accuracy) liNT 003 - 10 kHz
ELECTRICAL CHARACTERISTICS IVCC= + 525 Vdc±O 5 Vdc. VSS= GND. TA=O' to 70 c C unless otherwise notedl
II
IVCC<4751 VCC-O 5 - Vce
INT 14 75:5VCC:55 751 VIH 40 * VCC V
VCC-O 5
IVCC<4751
* Vce
All Other 20 - VCC
Input High Voltage Timer
Timer Mode V,H 20 -
Vee V
Self-Check Mode -- 90 150
Input Low Voltage
RESET -03 - 08
-03
INT Vil * 15 V
All Other -03 - 08
RESET HysteresIs Voltage ISee Figures 11. 12. and 131
"Out of Reset" VIRES ~ 21 - 4C V
"Into Reset" VIRES - 08 - 20
INT Zero Crossing Input Voltage, Through a Capacitor VI NT 20 - 40 Va-c p-p
Internal Power DISSipation - No Port Loading Vee == 5 75 V ITA = aoe PINT - 400 TBD mW
Input Capacitance
EXTAL C,n - 25 - pF
All Other - 10 -
4-170
MC6805P4
PORT DC ELECTRICAL CHARACTERISTICS IVCC= + 525 Vdc -+ 05 Vdc, VSS = GND, T A = 0° to 70'C unless otherwise noted}
Characteristic Symbol Min Typ Max Unit I I
Port A with CMOS Drive Enabled
Output Low Voltage, ILoad= 1 6 rnA VOL - - 04 V
Output High Voltage, ILoad= -100 ~A Vm 24 - - V
Output High Voltage, ILoad= -10 ~A VOH 35 - - V
Input High Voltage, ILoad= -300 ~A Imax) VIH 20 - VCC V
Input Low Voltate, ILoad= -500 ~A Imax) VIL -30 - 08 V
HI-Z State Input Current IV,n = 2 0 V to VCC) IIH - - -300 ~A
HI-Z State Input Current IV In = 04 V) IlL - - -500 ~A
Port B
Output Low Voltage, ILoad=3 2 rnA VOL - - 04 V
Output Low Voltage, ILoad= 10 rnA ISlnk) VOL - - 10 V
Output High Voltage, ILoad= -200 ~A VOH 24 - - V
Darlington Current Drive (Source), VO= 15 V IOH -10 - -10 rnA
Input High Voltage VIH 20 - VCC V
Input Low Voltage VIL -03 - 08 V
HI-Z State Input Current ITSI - 2 20 ~A
•
Port C and Port A with CMOS Drive Disabled
Output Low Voltage, ILoad = 1 6 rnA VOL - - 04 V
Output High Voltage, ILoad - -100 ~A VOH 24 - - V
Input High Voltage VIH 20 - VCC V
Input Low Voltage VIL -03 - 08 V
HI-Z State Input Current ITSI - 2 20 ~A
FIGURE3 - TTL EQUIVALENT TEST LOAD FIGURE4 - CMOS EQUIVALENT TEST LOAD FIGURE5 - TTL EQUIVALENT TEST LOAD
(PORT B) (PORT AI (PORTS A AND C)
VCC=5 75 V
Test MMD6150
POint or Equlv 297 kW
TestPolnt~
130 pF ITotall 30
pF 24 kO MMD7000
or Equlv
I Totall
C = 40 pF 1T0tail
4-171
MC6805P4
4-172
MC6805P4
o 76543210
000 SOOO
I 0 Ports 0 Port A SOOO
Timer
1 Port B SOOl
Page Zero RAM
(128 Byles) 2 1 1 1 Port C S002
Access with 127 $07F 11
Short
~::
128 3 Not Used SOO3
Instructions Page Zero
User ROM 4 Port A DDR S004*
1128 Bytes)
255 5 Port BOOR S005*
256 S100
6 Not Used I Port C DDR S006*
Not Used
7 Not Used S007
1704 Bytes)
8 Timer Data Reg S008
959 S3BF
960 S3CO 9 Timer Control Reg S009
Main User
10 SOOA
ROM Not Used
1964 Bytes) 16 Bytes)
1923 s783
15 $oaF
1924 S784
Self Check 16 RAM $010
•
ROM (112 Bytes)
{1 1 6 Bytes}
2039 s7F7 Stack
2040 S7F8
Interrupt 131 Bytes
Vectors Maximum)
ROM
2047
(8 Bytes)
s7FF 127 t S07F
*Cautlon (DORs) are write-only, they read as $FF
I
0 Pull
CONDITION A Accumulator
n 4 1 1 1 CODE REGISTER n'l
n -2 INDEX REGISTER 10 a
n '3
L.'-'P_C=-H_-'-_ _ _ _ _ _P-'C.::L_ _ _ _...JI Program Counter
n -1 1 1 1 1
II PCH:* n '4 10 5 4
SP Stack POinter
PCL* n '5
Push
Condition Code Register
*For subroutine calls, only peL and PCH are stacked
Carry/Borrow
REGISTERS
The M6805 Family CPU has five registers available to the Zero
programmer They are shown In Figure 8 and are explained In ' - - - - - Negalive
the following paragraphs ' - - - - - - Interrupt Mask
4-173
MC6805P4
INDEX REGISTER (X) - The Index register IS an 8-bIt bit IS set the Interrupt IS latched and IS processed as soon as
register used for the Indexed addressing mode It contains the Interrupt bit IS cleared
an 8-blt value that may be added to an instruction value to Negative (Nl - Used to ,nd,cate that the result of the last
create an effective address The Index register can also be arithmetic, (oglcal or data manipulation was negative (bit 7 In
used for data manipulations uSing the read/modify/write In- result equal to a logical one)
structions. The Index register may also be used as a tem- Zero (Zl - Used to indicate that the result of the last
porary storage area arithmetic, logical or data manipulation was zero
Carry/Borrow (Cl - Used to Indicate that a carry or bor-
PROGRAM COUNTER (PC) - The program counter IS an row out of the arithmetic logiC Unit (ALU) occurred dUring
tt-blt register that contains the address of the next instruc- the last arithmetic operation. ThiS bit is also affected dUring
tion to be executed bit test and branch instructions plus shifts and rotates
•
Interrupt from being processed The MCU responds to thiS
use up to 31 levels of subroutine calls Interrupt by saving the present CPU state In the stack,
fetching the timer Interrupt vector from locations $7F8 and
CONDITION CODE REGISTER (CCI - The condition $7F9 and executing the Interrupt routine, see the INTER-
code register IS a 5-blt register In which four bits are used to RUPTS section The TIMER INTERRUPT REQUEST BIT
,nd,cate the results of the instruction lust executed These MUST BE CLEARED BY SOFTWARE
bits can be Individually tested by a program and specific ac- The clock Input to the timer can be from an external
tion taken as a result of their state. Each individual condition source (decrementmg of TImer Counter occurs on a POSItive
code register bit IS explained In the follOWing paragraphs transition of the external source) applied to the TIMER Input
pin or It can be Internal <1>2 signal. When the <1>2 signal IS used
Half Carry (HI - Set dUring ADD and ADC instructions to as the source, It can be gated by an Input applied to the
Indicate that a carry occurred between bits 3 and 4 TIM ER Input pin allOWing the user to eaSily perform pulse-
Interrupt (IJ - Thls!!!.L!s set to mask (disable) the timer Width measurements. (Note for ungated <1>2 clock Inputs to
and external Interrupt (INT) If an Interrupt occurs While thiS the timer prescaler, the TIMER pin should be tied to CCC.)
Timer
Interrupt
TIMER
Mask
Input
Pin
,..-------.
I I
I I
I I
I I
IL. ______ I
~
ManufacturIng
Mask Options
Write Read Write Read
4·174
MC6805P4
PA6 26
28 RESEr PA5 25
1 0 ~f PA4 24
XTAL PA3 23
PA2 22
~
EXTAL PAl 21
27pf ~ PAO 20
-9 V 10 kll TIMER
VCC 3 Vee
PBJ 19
18
VSB PB6
17
PB5
II
PB4 16
470 [) 15
PCO PB3
470 [) 14
PCl PB2
470 [) 13
PC2 PBt
470 [) 12
PBO
The source of the clock Input IS one of the mask options that RESETS
IS specified before manufacture of the MCU The MCU can be reset three ways by Initial power-up, by
A prescaler option, divided by 2 n , can be applied to the the external reset Input (RESETI, and by an optional Internal
clock Input that extends the timing Interval up to a maximum low voltage detect CirCUit, see Figure 11 The Internal CirCUit
of 128 counts before decrementing the counter This prescal- connected to the RESET pin consists of a Schmitt tngger
Ing mask option IS also specified before manufacture which senses the RESET line logiC level The Schmitt tngger
The timer continues to count past zero, failing through to proVides an Internal reset voltage If It senses a logiC 0 on the
$FF from zero and then continuing the count Thus, the RESET Pin Dunng power-up, the Schmitt tngger SWitches
counter can be read at any time by reading the Timer Data on (removes reset I when the RESET pin voltage nses to
Register (TORI This allows a program to determine the VIRES + When the RESET pin voltage falls to a logical 0 for
length of time since a timer Interrupt has occurred, and not a penod longer than one tcyc, the Schmitt tngger SWitches
disturb the counting process off to p'ovlde an Internal reset voltage The "switch off"
At Power-up or Reset, the prescaler and counter are- voltage occurs at VIRES _ A tYPical reset Schmitt tngger
Ir"tlallzed With all logical ones, the timer Interrupt request bit ,hysteresIs curve IS shown In Figure 12
(bit 71 IS cleared, and the timer Interrupt mask bit (bit 61 IS Upon power-up, a delay of tRHL IS needed before allOWing
set the RESET Input to go high ThiS time allows the Internal
clock generator to stabilize Connectmg a capacitor to the
SELF-CHECK i'iIm Input as shown In Figure 13, tYPically prOVides suffi-
The self-check capability of the MC6805P4 MCU provides cient delay See Figure 17 for the complete reset sequence
an Internal check to determine If the part IS functional Con-
nect the MCU as shown In Figure 10 and mOnitor the output INTERNAL CLOCK GENERATOR OPTIONS
of Port C bit 3 for an OSCillation of approximately 7 Hz A 9 The Internal clock generator CirCUit IS deSigned to reqUire a
volt level on the TIMER Input, Pin 7, energizes the ROM- minimum of external components A crystal, a reSistor, a
based self-check feature The self-check program exerCises Jumper Wire, or an external Signal may be used to generate a
the RAM, ROM, timer, Interrupts, and I/O ports system clock With vanous stability/cost tradeoffs A
4-175
MC6805P4
manufacturing mask option IS required to select either the The crystal oscillator startup lime IS a function of many
crystal oscillator or the RC oscillator CirCUit The oscillator vanables crystal parameters (especially Rsl, OSCillator load
frequency IS Internally diVided by four to produce the Internal capacitance, IC parameters, ambient temperature, and
system clocks supply voltage To ensure rapid OSCillator startup, neither the
The different connection methods are shown In Figure 14 crystal characteristics nor the load capacitance should ex~
The crystal specifications are given In Figure 15 A res stor ceed recommendations
selection graph IS given In Figure 16
5V
VCC
OV _ _ _ _ _ _- J
RESeT
Pin
------1'"
Internal
Reset
---------~
•
FIGURE 12 - TYPICAL RESET SCHMITT
TRIGGER HYSTERESIS FIGURE 13 - POWER UP RESET DELAY CIRCUIT
Out
Of
Reset ..-1-
VCc--AVV\r--r2~-B~,
RESET
Part Of
MC6805P4
MCU
In I
Reset
08V 2V 4V
XTAL XTAL
+5V
XTAL ~\AI\r---i XT AL
MC6805P4 MC6805P4
External (See Figure 16)
EXTAL MCU EXTAL MCU
Clock (Resistor Mask
Input (Crystal Mask No
Option)
Option) Connection
4-176
MC6805P4
FIGURE 15 - CRYSTAL MOTIONAL ARM PARAMETERS FIGURE 16 - TYPICAL FREQUENCY SELECTION FOR
AND SUGGESTED PC BOARD LAYOUT RESISTOR OSCILLATOR OPTION
50
I I
40
\ v CC ~ 5 v
r--
EXTAL~~XTAL
TA~25°C
!i'
~
~
~
30
>-
"~
4 5 u
z
UJ
:::J
aUJ 20
AT - Cut Parallel Resonance Crystal
s: i'---
I'-- ~
-
Co~ 7 pF Max
FREO~4 0 MHz@ CL ~24 pF 10
RS ~ 50 ohms Max
0
o 10 15 20 25 30 35 40 45 50 55 60
lal RESISTANCE Ik OHMS I
INTERRUPTS
The MC6805P2 MCU can be Interrupted three different
ways through the external Interrupt IINTI Input pin, the
Internal timer Interrupt request, or the software Interrupt in-
struction (SWII When any Interrupt occurs, processing IS
suspended, the present CPU state IS pushed onto the stack,
the Interrupt bit III In the condition code register IS set, the
address of the Interrupt routine IS obtained from the
I
appropriate Interrupt vector address, and the Interrupt
routine IS executed Stacking the CPU register, setting the
I-bit, and vector fetching requlles a total of 11 tcyc periods
for completion
A flowchart of the Interrupt sequence IS shown In Figure
17 The Interrupt service routine must end with a return from
Interrupt (RTII Instruction which allows the MCU to resume
processing of the program prior to the Interrupt (by unstack-
Ing the prevIous CPU statel Table 1 provides a listing of the
Interrupts, thell PriOrity, and the address of the vector which
Ibl contains the starting address of the appropriate Interrupt ser-
vice roullne The Interrupt PriOrtly applies to those pending
when the CPU IS ready to accept a new Interrupt RESET IS
listed In Table 1 because It IS treated as an Interrupt
However, It IS not normally used as an Interrupt When the
Interrupt mask bit In the Condition Code Register IS set the
Interrupt IS latched for later Interrupt execution
The external Interrupt IS Internally synchronized and then
latched on the failing edge of INT A SinUSOidal Input Signal
(fINT maxlmuml can be used to generate an external Inter-
rupt, as shown In Figure 18a, for use as a Zero Crossing
Detector For digital applications the INT can be driven by a
digital Signal at a maximum period of tlWL ThiS allows ap-
plications such as servIcing tlme-of-day routines and engag-
Ing/ disengaging AC power control deVices Off-chip full
wave rectification provides an Interrupt at every zero cross-
Ing of the AC Signal and thereby prOVides a 2f clock
A software Interrupt (SWt) IS an executable instruction
which IS executed regardless of the state of the I-bit In the
Note. Keep crystal leads and Circuit
Condition Code Register SWI's are usually used as break-
connections as short as possible
POints for debugging or as system calls
4-177
MC6805P4
..-----iN
Vcc
AC TTl 47k
Input {Current
If M ) Limiting)
2m MC6805P4 Level iNT MC6805P4
1~~1 ~~ ~~-g""-""----101 Dlgltal---4....~
MCU MCU
Input
AC Input::2! pF
ItlWL Maximum
10 Vpp
Period)
lJ
4-178
MC6805P4
•
state to put the ports In the Input mode The port output used to Initialize the data registers and aVOid undefined out-
registers are not initialized on Reset but may be wntten to puts, however, care must be exerCised when uSing
before setting the DDR bits to avoid undefined levels When read/modlfy/wnte instructions smce the data read cor-
programmed as outputs, the latched output data IS readable responds to the pin level of the DDR IS an Input (01 and cor-
as Input data, regardless of the logic levels at the output pin responds to the latched output data when the DDR IS an out-
due to output loading, see Figure 19 When Port B IS pro- put (11
Data
Direction Register
81t*
co "'cQ Latched
Output
c<;; "w
Data
E §
o Bit
U
Data
Direction Output Input
Register Data Output To
Bit Bit State MCU
I
I ,
a
,
a a
,
a x 3-State** Pin
4-179
MC6805P4
•
rupt masked (disabled) Set to 1 by Reset
TCR Bits 5, 4, 3, 2, 1, 0 read 1's- unused bits
-
PA5 25 PB6 18
PAD 20 PBl 13
PBO 12
PC3 11 CMOS
PC2 10 Inverters
MC14049/MCl4069
PCl 9 ITYPlcali
PCO 8
4-180
MC6805P4
PA7 PB7
PA6 PB6
MC74LS04
. 25
24
PA5
PA4
MC74LS04
or
17
16
PB5
PB4
(TYPlcali MCl4069
23 PA3 15 PB3
(TYPlcall
22 PA2 PB2
PAl PB1
PAO PBO
•
PC3
PC2
PC1
PCO
BIT MANIPULATION
The MC6805P4 MCU has the abilltity to set or clear any have ,nd,v,dual flags In RAM or to handle I/O bits as control
single random access memory or input/ output bit (except lines
the Data Dlrecllon Register, see Caution under INPUT /OUT- The coding example In Figure 22 Illustrates the usefulness
PUT paragraph), with a single instruction (BSET, BClR) of the bit manipulation and test Instrucllons Assume that
Any bit In page zero including ROM, except the DDRs, can the MCU IS to communicate with an external senal deVice
be tested, uSing the BRSET and BRClR Instrucllons, and The external deVice has a data ready signal, a data output
the program branches as a result of Its state. The Carry bit line, and clock line to clock data one bit at a time, lBS first,
equals the value of the bit referenced by BRSET or BRClR out of the deVice The MCU walts until the data IS ready.
A Rotate Instruction may then be used to accumulate senal clocks the external deVice, picks up the data In the Carry Flag
Input data In a RAM location or register The capability to (C-bltl, clears the clock line, and finally accumulates the data
work with any bit In RAM, ROM, or I/O allows the user to bit In a RAM location
4·181
MC6805P4
•
Ing the opcode byte The Signed relative 8-blt offset IS In the
EXTENDED - I n the extended addreSSing mode, the ef- third byte and IS added to the value of the PC If the branch
fective address of the argument IS contained In the two bytes condlllOn IS true ThiS Single 3-byte Instruction allows the
follOWing the opcode Instructions uSing extended address- program to branch based on the condition of any readable
Ing are capable of referenCing arguments anywhere In bit In the first 256 locations of memory The span of
memory with a single 3-byte Instruction When uSing the branching IS from + 130 to -125 from the opcodeaddress
Motorola assembler, the programmer need not specify The state of the tested bit IS also transfered to the Carry bit
whether an Instruction uses direct or extended addreSSing of the Condition Code Register See Caution under the
The assembler automatically selects the shortest form of the INPUT /OUTPUT paragraph
instruction
INHERENT - In the Inherent addreSSing mode, all the in-
RELATIVE - The relative addreSSing mode IS only used In formation necessary to execute the instruction IS contained
branch Instructions In relative addreSSing, the contents of In the opcode Operations speCifYing only the Index register
the 8-bIt signed byte follOWing the opcode Ithe offsetlls add- or accumulator, as well as controllnstrucllOn With no other
ed to the PC If and only If the branch conditIOn IS true Other- arguments, are Included In thiS mode These InstrucllOns are
Wise, control proceeds te the next instruction rhe span of one byte long
relative addreSSing IS from -126 to + 129 from the opcode
address. The programmer need not worry about calculating INSTRUCTION SET
the correct offset when uSing the Motorola assembler, since The MC6805P4 MCU has a set of 59 baSIC InstrucliOns,
It calculates the proper offset and checks to see If It IS within which when combined With the 10 addreSSing modes pro-
the span of the branch duce 207 usable opcodes. They can be diVided Into five dif-
ferent types. register/memory, read/modifY/Write, branch,
INDEXED, NO OFFSET - In the Indexed, no offset ad- bit manipulation, and control. The follOWing paragraphs
dreSSing mode, the effective address of the argument IS con- briefly explain each type. All the instructions Within a given
tained In the 8-bIt Index register Thus, thiS addreSSing mode type are presented In indiVidual tables
can access the first 256 memory locations These instruc-
tions are only one byte long ThiS mode IS often used to REGISTER/MEMORY INSTRUCTIONS - Most of these
move a pOinter through a table or to hold the address of a instructions use two operands One operand IS either the ac-
frequently referenced RAM or I/O location cumulator or the Index register The other operand IS obtain-
ed from memory uSing one of the addreSSing modes The
INDEXED, 8-BIT OFFSET - In the Indexed, 8-blt offset Jump uncondltlonallJMP) and Jump to subroutine IJSRIIn-
addreSSing mode, the effective address IS the sum of the structlons have no register operands Refer to Table 2
contents of the unSigned 8-blt Index register and the unsign-
ed byte follOWing the opcode ThiS addreSSing mode IS READ/MODIFY/WRITE INSTRUCTIONS - These In-
useful In selecting the kth element In an n element table structions read a memory location or a register, modify or
With thiS 2-byte InstrucliOn, k would tYPically be In X with test ItS contents, and write the modified value back to
the address of the beginning of the table In the instruction. memory or to the register Isee Caution under INPUT /OUT-
As such tables may begin anywhere within the first 256 ad- PUT paragraphl The test for negative or zero (TSTI Instruc-
dressable locations and could extend as far as location 511 tion IS Included In read/modifY/Write instructions though It
1$1FE) does not perform the write Refer to Table 3
4-182
MC6805P4
BRANCH INSTRUCTIONS - The branch instructions CONTROL INSTRUCTIONS - The control instructions
cause a branch from the program when a certain condition IS control the MCU operations dUring program execution
met Refer to Table 4 Refer to Table 6
BIT MANIPULATION INSTRUCTIONS - These Instruc- ALPHABETICAL LISTING - The complete Instruction set
tions are used on any bit In the first 256 bytes of the memory IS given In alphabetical order In Table 7
(see Caution under INPUT/OUTPUT paragraph) One group
either sets or clears The other group performs the bit test OPCODE MAP SUMMARY - Table 8 IS an opcode map
branch operations Refer to Table 5 for the instructions used on the MCU
4·183
•
TABLE 2 - REGISTER/MEMORY INSTRUCTIONS
s:
~~
AddresslOq Modes
Indexed Indexed Indexed
Immediate Direct Extended (No Offset) f8 a,t Offset) (16 Bit Offset)
Function
Op # # Op # Op
MnemOnic Code Bytes Cycles Code Bvtes Cycles Code Bytes Cycles
• • • Op •
Code Bytes Cycles
• Op • OP •
Code Bytes Cycles Code Bytes Cycles
• •
Load A from Memory LDA A6 2 2 B6 2 4 (6 3 5 F6 1 4 ,6 2 5 D6 1 6
Load X from Memory LDX AE 2 2 BE 2 4 Cf 3 5 FE 1 4 EO 2 5 Df 3 6
Store A In Memory STA B7 2 5 C7 3 6 F7 1 5 EO 2 6 D7 3 7
Store X In Memory STX BF 2 5 CF 3 6 FF 1 5 EF 2 6 DF 3 7
Add Memory to A ADD AB 2 2 BB 2 4 CB 3 5 FB 1 4 EB 2 5 DB 3 6
Add Memory and
Carry to A ADC A9 2 2 B9 2 4 C9 3 5 f9 1 4 ,9 2 5 D9 3 6
Subtract Memory SUB AO 2 2 BO 2 4 CO 3 5 Fa 1 4 EO 2 5 DO 3 6
Subtract Memory from
A with Borrow SBC A2 2 2 B2 2 4 C2 3 5 F2 1 4 E2 2 5 02 3 6
AND Memory to A AND A4 2 2 B4 2 4 C4 3 5 F4 1 4 f4 2 5 04 3 6
OR Memory With A ORA AA 2 2 BA 2 4 CA 3 5 FA 1 4 EA 2 5 DA 3 6
ExcluSIve OR Memory
with A EaR A8 2 2 B8 2 4 C8 3 5 F8 1 4 E8 2 5 08 3 6
ArithmetIC Compare A
With Memory CMP A1 2 2 B1 2 4 C1 3 5 F1 1 4 El 2 5 D1 3 6
Aflthmetlc Compare X
With Memory CPX A3 2 2 83 2 4 C3 3 5 F3 1 4 E3 2 5 03 3 6
f"
...... a,tTest Memory With
1
A (logical Compare) 81T A5 2 2 B5 2 4 C5 3 5 F5 4 E5 2 5 D5 3 6
CD JMP FC 1 3 EC 2
-I:>- Jump UnconditIOnal 8C 2 3 CC 3 4 4 DC 3 5
Jump to Subroutine JSR BO 2 7 CO 3 8 FD 1 7 ED 2 8 DD 3 9
Function
Op # #
Mnemonic Code Bytes Cycles
Op # # Op #
Code Bytes Cycles Code Bytes Cycles
• Op
•
Code Bytes Cycles
• Op #
Code Bytes Cycles
•
increment INC 4C 1 4 5C 1 4 3C 2 6 7C 1 6 6C 2 7
Decrement DEC 4A 1 4 5A 1 4 3A 2 6 7A 1 6 6A 2 7
Clear CLR 4F 1 4 5F 1 4 3F 2 6 7F 1 6 6F 2 7
Complement COM 43 1 4 53 1 4 33 2 6 73 1 6 63 2 7
Negate
r---
(2 5 Complement} NEG 40 1 4 50 1 4 30 2 6 70 1 6 60 2 7
Rotate Left Thru Carry ROL 49 1 4 59 1 4 39 _ 2 6 79 1 6 69 2 7
Rotate Right Thru Carry ROR 46 1 4 56 1 4 36 2 6 76 1 6 66 2 7 I
Logical ShIft Left LSL 48 1 4 58 1 4 38 2 6 78 1 6 68 2 7
Logical Shift Right LSR 44 1 4 54 1 4 34 2 6 74 1 6 64 2 7
Arithmetic Shift Right ASR 47 1 4 57 1 4 37 2 6 77 1 6 67 2 7
Test for Negative
or Zero TST 4D 1 4 5D 1 4 3D 2 6 7D 1 6 6D 2 7
--- - - -
MC6805P4
•
Branch IFF Interupt Mask
Bit IS CI~ar BMC 2C 2 4
Branch IFF Interrupt Mask
Bit IS Set BMS 2D 2 4
Branch IFF Interrupt Line
IS Low Bil 2E 2 4
Branch IfF Interrupt Line
IS High BIH 2F 2 4
Branch to Subroutine BSR AD 2 8
Addressmg Modes
Bit Set/Clear Bit Test and Branch
Op # # Op # I ~
Inherent
Op # #
Function Mnemonic Code Bytes Cycles
Transfer A to X TAX 97 1 2
Transfer X to A TXA 9F 1 2
Set Carry Bit SEC 99 1 2
Clear Carry Bit ClC 98 1 2
Set Interrupt Mask Bit SEI 9B 1 2
Clear Interrupt Mask Bit CLI 9A 1 2
Software Interrupt SWI 83 1 11
Return from Subroutine RTS 81 1 6
Return from Interrupt RT! 80 1 9
Reset Stack POinter RSP 9C 1 2
No-Operation NOP 9D 1 2
4-185
MC6805P4
•
BIT X X X X X X
•• /\ /\
•
BlO X
•••• •
BlS X
•••• •
BMC X
•••• •
BMI
•••• •
BMS
•••• •
BNE
•••• •
BPl
•••• •
BRA
•••• •
BRN
•••• •
BRClR X
•••• /\
BRSET X
•••• /\
BSET X
•••• •
BSR X
•••• •0
Cll X
••••
CLI X
• 0 0• • •
ClR X X X X
•• 1
•
CMP X X X X X X
•• /\ /\ /\
COM X X X X
•• /\ /\ 1
CPX X X X X X X
•• /\ /\ /\
DEC X X X X
•• /\ /\
•
EOR X X X X X X
•• /\ /\
•
INC X X X X
•• /\ /\
•
JMP X X X X X
•••• •
JSR X X X X X
•••• •
lDA X X X X X X
•• /\ /\
•
lDX X X X X X X
•• /\ /\
•
lSl X X X X
•• /\ /\ /\
lSR X X X X
••0 /\ /\
NEO X X X X
•• /\ /\ /\
NOP X
•••• •
ORA X X X X X X
•• /\ /\
•
ROl X X X X
•• /\ /\ /\
RSP X
•••• •
Condition Code Symbols
H Half Carry (From Bit 31 C Carry/Borrow
Interrupt Mask A Test and Set If T rue, Cleared OtherwIse
N Negative (Sign Bigi • Not Affected
Z Zero
4-186
MC6805P4
, , N, Z, C,
Mnemonic Inherent Immediate Direct Extended Relative INo Offsetl IB Bltsl 116 Bltsl Clear Branch H I
RTI X
RTS X
•• • • •
SBC X X X X X X
••"" "
SEC X
•••• 1
SEI X
• ••1
•
STA X X X X X
••"" •
STX X X X X X
• • " "t, •
SUB X X X X X X
••"
SWI X
• ••1
•"
TAX X
•• • • •
TST X X X X
••"" •
TXA X
•••• •
•
Condition Code Symbols
H Half Carry I From Bit 3) C Carry/Borrow
I Interrupt Mask /I Test and Set If True, Cleared Otherwise
N Negative I Sign Bigi • Not Affected
Z Zero 7 Load CC Register From Stack
4-187
• s:
~
TABLE B - M6805 FAMILY OPCODE MAP
,
. .
Bk MIIllpulotion Brlnch Road/Modlfv/Wnte Control Reaester/Memory
I HX IX 1NIf 1NIf IMM DR E I JX I
~i .:., .J"
4
~.
3 6
.l.,
5 4
.~
3 4
,~,
3 7
.~
6 6
.["
5 9
,:" ,£,
2
,tt. 2 4 3
,!" 4
foo ,g, 11~0 ·,it, H~
~
'~RSETO' 12 BSE~~c
7
NEGA NEG X NEG NEG ATI " SUB SUB SUB I ' SUB 4 I' SUB 3
k -JiiiL 12 BA-";,EL NEGm• , I I INH IXI I IX I INH 1M
, SUB
OIR 3 EXT I IX ril.,
,
3 IX2 12 IXl
,0 ,~. 4 , 6 6 2 2 4 3 5 4 6 5 5 4 4 1 1
J,
7 .'
BRCLr,'l, 12 BCL~~r I, BANR" I
ATS
INH
CMP
IMM 2
CMP
01.3
CMP
EXT 3
CMP
IX2 , CMP
IXI I
CMP
0001
"
.t.Q -.i. ,BSE~l;
T~ASET1· I I,
4
4
BHI."
3
3 6 5 4 3 4 3 7 6 6 5 11 10
2
2
SBC
2 4
IMM 2
,
4
SBC
3
OIR
, SBC
3
4
,XT 3
4
SBC
5
IX2
5
2
SBC
4
IXI I
SBC
IX
2
0010
1'~RCL~i: 1 7,BCL~lc " 5 CPX 6 CPX 5 5 CPX 4 4 CPX 3
COMOIR COM~H I COM~H I, COMIXI I COM IX SWI CPX CPX
J" "
5 4
BLSREL
3 6 5 4 3 4 3 7 6 6 5
I INH 2
2
IMM 2
2 4
01.
3
3 'XT 3
4
IX2 2 IXI ,
4
IX
3
0011
o:to I'SRSET2'
-Bfa I, BSE1~c ,2 BCCREL I, LSAOIR ,
LSAA
INH , LSAX 12 LSA
INH IX'
LSA
IX , ,
2
AND
IMM 2
AND
01.
, AND
3 XT 3
AND'
IX2 .2
5 AND 4
, AND 01~
1'~RCLR2·
5 4 3 • 2 , BIT 3 5 4 6 5 ' ,
IXI
4 4 "3
o~, -BTB 12 BCL~~c
BCSREL
,
BIT
1M ,
, DIA
, BIT
'XT
BIT IX? , BIT 'XI , BIT IX 11~1
5 6 5 4 3 4 3 7 6 6 5 4 35 4 6 5 5 4 4 3
1'~ASEJJ: 4 BNE '
, LOA o~o
LOA LOA
n~n I, BS~~c , AOA~H "
AOAA LOA LOA , LOA
-."
I, ADAm.
6 5 4
I
3 4 3 7
ADA X,
6
, ROA IX
6 5 , , IMM 2
5
OIR
4
3 EXT 3 IXl IXI >X
..
4 3 6 5 4 3 4 3 7 " 6 6 2 4 4 6 4 4 3
'~RCLA4'
5 3 5 5 5
,£, -BT8
7 .'
I, BCL~~c , BHC~EL I, AOLOIA AOL~H , AOLX :, AOL
INH IX' , ROL
IX , SECINH, ADC
IMM 2
ADC
OIR 3
ADC
EXT 3
ADC
IX'
ADC
IX' , ,ADC
IX
9
'00'
~
..
4 3 6 5 4 3 4 3 7 6 6 5 4
......' ,tto I'SRSrn5
-BTB I, BSE~c , BPLREL I, DECOlA , DEC~H
4 3
, DECX
INH ,
DEC
IX' , DEC
IX , CLI
INH , OAA
IMM ,
OAA ' , OAA
OIR 3 'XT 3
OAA 5
IX'
OAA
>X,
4
, , OAA ox
4
A
101(.
, '~ACLA76
F
1111 3 BTO , BCLA,' 4 BIH 3
BSC 2 - REL 2
CLR
OIA ,
CLAA
INH , CLAX
~-I:! '-,
CLR
~X}
, CLA IX• , WAITINH , TXAINH ,
, STX 4
• STX
OIR 3 EXT 3
STX •
1 6 STX '
IXI
IX' , , STX
IX
F
1111
LEGEND
AbbcevIationI for AddNM Modea
j
;>'
IMM Immed,ate
DIR
EXT
Direct
Extended # of Cycles (HMOS Versions! 4 "'~ ~ Opcode In Binary
REL Relative MnemonIC .. SUB 0
BSC Bit Set! Clear Bytes 1 IX 0000
J
BTB Bit Teat and Branch
IX Indexed INo Offsetl # of Cycles (CMOS Verslonsl------~ " Address Mode
IXl Indexed, 1 Byte (8-Blt) Offset
1X2 Indexed, 2 Byte (18-Blt) Offset
CMOS Venoions Onlv
MC6805P4
ORDERING INFORMATION
The Information required when ordenng a custom MCU IS signed, and returned to Motorola. The signed venficatlon
listed below. The ROM program may be transmitted to form constitutes the contractual agreement for creation of
Motorola on EPROM(s) or a MDOS disk file. the customer mask If desired, Motorola will program on
To Inillate a ROM pattern for the MCU It IS necessary to blank EPROM from the data file used to create the custom
first contact your local Motorola representative or Motorola mask and aid In the venflcallon process.
dlstnbutor
ROM VERIFICATION UNITS (RVUs)
EPROMs - The MCM2716 or MCM2532 type EPROMs, pro- Ten MCUs containing the customer's ROM pattern will be
grammed with the customer program (positive logic sense sent for program venflcatlon. These Units will have been
for address and data), may be submitted for pattern genera- made uSing the custom mask but are for the purpose of
tion The EPROM must be clearly marked to Indicate which ROM venflcatlon only For expediency they are usually un-
EPROM corresponds to which address space. The recom- marked, packaged In ceramiC, and tested only at room
mended marking procedure IS Illustrated below temperature and 5 volts These RVUs are Included In the
mask charge and are not production parts The RVUs are
thus not guaranteed by Motorola Quality Assurance,and
xxx xxx should be discarded after venflcatlon IS completed
FLEXIBLE DISKS
•
The disk media submitted must be Single-sided, slngle-
denSity, 8-lnch, MDOS compatible flOPPies. The customer
must wnte the binary file name and company name on the
disk With a felt-tip pen The minimum MDOS system files as
000 400 well as the absolute binary object file (filename LO type of
file) from the M6805 cross assembler must be on the disk. An
xxx = Customer ID object file made from a memory dump uSing the ROLLOUT
After the EPROM(s) are marked they should be placed In command IS also acceptable. Consider submitting a source
conductive IC carners and securely packed. Do not use listing as well as the follOWing files filename, LX (EXOR-
styrofoam ciser" loadable format) and filename, SA (ASCII Source
Code) These files Will of course be kept confidential and are
VERIFICATION MEDIA used 1) to speed up the process In-house If any problems
All onglnal pattern media (EPROMs or Floppy Disk) are fil- anse, and 2) to speed up the user-to-factor Interface If the
ed for contractual purposes and are not returned A com- user finds any software errors and needs assistance qUickly
puter listing of the ROM code will be generated and returned from Motorola factory representatives.
along with a listing venflcatlon form The listing should be M DOS IS Motorola's Disk Operating system available on
thoroughly checked and the venflcatlon form completed, development systems such as EXORCisers, EXORsets, etc
4·189
MC6805P4
CustomerCon~ctPemon ______________________________________
OPTION LIST
Select the options for your MCU from the followmg list A
manufacturing mask Will be generated from this mformatlon
•
Timer Clock Source
o Internal <1>2 clock
o TIMER Input pm
Timer Prescaler
o 2" (divide by 1) o 24 (divide by 16)
o 2' (diVide by 2) o 2' (divide by 32)
o 22 (divide by 4) o 2" (divide by 64)
o 2' (diVide by 8) o 2' (divide by 128)
Tltle _______________________________________________
S,gnature _______________________________________________
4-190
!
® MOTOROLA MC680SR2
~PSUFFIX
• 2048 8ytes of User ROM
• 24 TTL/CMOS Compatible 81dlrectlOnaii/0 Lines 18 lines are LED
Compatlblel
•
• 2 to 5 Digital Input Lines ~!;rrt I'·· PLASTIC PACKAGE
• A/D Converter . CASE 711
8-81t Conversion, Monotonic
~SSUFFIX
1 to 4 Multiplexed Analog Inputs
± 1/2 LS8 Quantizing Error
± 1/2 LS8 All Other Errors ~1{ [[l L I " • CERDIP PACKAGE
± 1 LSB Total Error Imaxl
Ratlometnc Conversion CASE 734
• Zero-Crossing Detection
• On-Chip Clock Generator
FIGURE 1 - PIN ASSIGNMENTS
• Self-Check Mode
• Master Reset
• Complete Development System Support On EXORCiser" PA7
• 5 V Single Supply
PA6
SOFTWARE FEATURES: PA5
Similar to M6800 Family
PA4
Byte EffiCient Instruction Set
Easy to Program PA3
T rue Bit Manipulation PA2
Bit Test and Branch Instructions
PAl
Versatile Interrupt Handling
Versatile Index Register PAO
Powerful Indexed AddreSSing for Tables PB7
Full Set of ConditIOnal Branches
Memory Usable as Register/Flags PB6
Single Instruction Memory Examlne/ Change PB5
10 Powerful AddresSing Modes PB4
All AddreSSing Modes
User Callable Self-Check Subroutines PB3
PB2
USER SELECTABLE OPTIONS:
PBl
• InternalS-Bit Timer With Selectable Clock Source IExternal Timer
Input or Internal Machine Clockl PBO
• Timer Prescaler Option 17 Bits 2N) PDO/ANO
• 8 BidirectionalI/O Lines With TTL or TTLI CMOS Interface Option
PD1/ANl
• Crystal or Low-Cost Resistor OSCillator Option
• Low Voltage Inhibit Option PD2/AN2
• 4 Vectored Interrupts, Timer, Software, and 2 External PD3/AN3
4-191
MC6805R2
,,- 7
Prescaler J
FIGURE 2 -
Tlmerl
8 Counter
Timer Control
MC8806R2 HMOS MICROCOMPUTER BLOCK DIAGRAM
H
Xl
l
Oscillator
EJl
~
RESET NUM
T
I •
PA0 ' "
PA1 _ Accumulator AID !\
J:...J
a: a:
Analog
MUX
1
Port PA 8 ~ »
~::
Port Data CPU
A PA A 0" t- Index Control
110
lines
PA. 4 ' "
PA
Reg Reg Register 10- IINT2 ~ PDQ/ANO
~=
8 X t- PD1/AN1
PA r- PD2/AN2 Port
Condition
PA. 7 _
Code PD3/AN3 o
.
Input
5 Register CC VRl
CPU Lines
VRH_
Stack PD6I1NT2
•
POinter PD7
PB0 _ 5 SP
PB 1..... Program
~ .~
Port PB 2 _
1
Port Data
•
Counter Port 0
B
110
lines
PB3 _
PB
PB
PB 6
~:::
7_.....
_
B
Reg
0"
Reg
r-< 4 High
Program
Counter
PCH AlU Input
J
PB 8 low PCl
1
::: PCO
PC1
1 T Data Port
C
:: PC2
PC3
Port
C
204B x 8
User ROM
64x8
RAM
0"
Reg Reg
::: PC4
PC5
110
lines
Self-Check
ROM
::: PC6
PC7
MAXIMUM RATINGS
Rating Symbol Value Unit
Supply Voltage VCC -03 to + 70 V
Input Voltage V in -03 to + 70 V
Stresses above those listed under "MaXimum
Operating Temperature Range TA o to 70 ·C
Ratings" may cause permanent damage to the
Storage Temperature Range T~ -55 to +150 ·C
device ThiS IS a stress rating only and functional
Junction Temperature operation of the device at these or any other con-
Plastic Package 150 ditIOns above those indicated In the operational
Ceramic Package TJ 175 ·C sections of thiS specification IS not Implied Ex-
Cerdlp 175 posure to absolute maximum rating conditions
for extended penods may affect device reliability
THERMAL CHARACTERISTICS Reliability of operation IS enhanced If unused in-
puts are tied to an appropnate logic voltage level
Characteristic Symbol Value Unit
(e g • either VSS or VCC)
Thermal Resistance
PlastiC 100
8JA ·C/W
Ceramic 50
Cerdlp 60
4-192
MC6805R2
POWER CONSIDERATIONS
ELECTRICAL CHARACTERISTICS (VCC = + 525 Vdc ± 05 Vdc VSS = GND TA = 0° to 70°C Unless Otherwise Noted)
V,H
Min
40
VCC-O 5
40
Typ
-
-
*
Max
VCC
VCC
VCC
Unit
V
•
IVCC<475) VCC-O 5 * VCC
AI) Other 20 - VCC
Input High Voltage Timer
Timer Mode V,H 20 - VCC V
Self-Check Mode - 90 150
Input Low Voltage
RESET -03 - 08
INT V,L -03 * 15 V
All Other (Except AID Inputs) -03 - 08
RESET HysteresIs Voltages (See Figures 11, 12, and 13)
"Out of Reset" V'RES+ 21 - 40 V
"Into Reset" V,RES- 08 - 20
INT Zero Crossing Input Voltage, Through a Capacitor V,NT 2 - 4 Vac pop
Power DISSipation - No Port Loadrng V CC = 5 75 V, T A = O'C Po - 600 - mW
Input Capacitance
EXTAL Crn - 25 - pF
All Other Except Analog Inputs - 10 -
Low Voltage Recover VLVR - - 475 V
Low Voltage Inhibit VLVR - 35 V
Input Current
- - 20
TIMER (V rn = 0.4 V)
- 20 50
INT (V rn = 2 4 V to VCC)
Irn - - 10 ~A
EXTAL (V rn =2 4 V to VCC Crystal OptlOnl
(V,n=O 4 V Crystal OptIOn)
- - -1600
-40 - -50
RESET (V ,n = 08 VI
I External Capacitor Charging Current)
NOTE Port 0 Analog Inputs, when selected, C,n = 25 pF for the first 5 out or 30 cycles
*Due to rnternal biaSing thiS Input (when unusedl floats to approximately 2 0 V
4·193
MC6805R2
AID CONVERTER CHARACTERISTICS IVCC= +525 Vdc ±O 5 Vdc, VSS=GND, TA=O' to 70°C Unless Otherwise Notedl
Characteristic Min Typ Max Un~ Comments
Resolution 8 8 8 Bits
Non-Linearity - - ± 1/2 LSB For VRH-4.0 to 5 0 V and VRL OV
Quantizing Error - - ± 1/2 LSB For VRH - 4.0 to 5.0 V and VRL OV
Conversion Range VRL - VRH V
VRH - - 50 V AID Accuracy may decrease proportionately as
VRL - 0.2 V VRH IS reduced below 4 0 V The sum of VAH and
VSS
VRL must not exceed 5 0 V
Conversion Time 30 30 30 tcyc Includes sampling time
MonotontClty Inherent {Within total error!
Zero Input Reading 00 00 01 hexadeCimal V,n-O
Ratlometnc Reading FF FF FF hexadeCimal V,n - VRH
Sample Time 5 5 5 tcyc
Sample I Hold Capacitance, Input - - 25 pF
Analog Input Voltage VRL - VRH V Negative tranSients on VAL are not
allowed at any time dUring converSion
SWITCHING CHARACTERISTICS IVCC= +5 25 Vdc ±O 5 Vdc, VSS'=GND, TA=O° to 70°C Unless Otherwise Notedl
•
Characteristic Symbol Min Typ Max Unit
OSCillator Frequency losc 04 - 42 MHz
Cycle Time 14/1osc l tCYC 095 - 10 ~s
PORT ELECTRICAL CHARACTERISTICS IVCC= + 525 Vdc ± 05 Vdc, VSS = GND, TA = 0° to 70°C Unless Otherwise Notedl
Characteristic Symbol I Min I Typ I Max Unit
Port A with CMOS Drive Enabled
Output Low Voltage ILoad= 1 6 mA V_OJ. - - 04 V
Output High Voltage ILoad = -100 I'A VOH 24 - - V
Output High Voltage ILoad lO~A VOH 35 - - V
Input High Voltage ILoad 300 I'A Imaxi VH 20 - Vce V
Input Low Voltag~ ILoad- 500 I'A Imaxl VIL -0.3 - 08 V
H,-Z-State Input Current IV In 2 U V to VCO IIH - - -300 ~A
H,-Z State Input Current IV In = 0 4 VI IlL - - -500 I'A
Port B
Output Low Voltage ILoad=3 2 mA VOL - - 04 V
Output Low Voltage ILoad-10 mA ISlnkl VOL - - 10 V
Output High Voltage ILoad= -200 I'A VOH 24 - - V
Darlington Current Dnve ISourcel VO= 1 5 V IOH -10 - -10 mA
Input High Voltage VIH 20 - VCC v
Input Low Voltage VIL -03 - 08 V
HI-Z-State Input Current ITSI - 2 20 I'A
Port C and Port A with CMOS Device Disabled
Ouput Low Voltage ILoad= 1 6 mA VOL - - 04 V
Output High Voltage ILoad- -100 I'A VOH 24 - - V
Input High Voltage VIH 20 - VCC V
Input Low Voltage VIL -0.3 - 0.8 V
H,-Z-State Input Current ITS I - 2 20 ~A
Port D (Dig~llnputs Only)
Input High Voltage J Vlt:L 2.0 - Vce I V
Input Low Voltage I VIL -03 - 08 I V
Input Current* I", - - 20 I'A
*VRL/PD4- VRH/PD5 The AID conversIon resistor (11.6 k nomlnall IS connected internally between these two lines, Impacting the" use as
digital Inputs In some applications.
4-194
MC6805R2
FIGURE3 - TTL EQUIVALENT TEST LOAD FIGURE4 - CMOS EQUIVALENT TEST LOAD FIGURE 5 - TTL EQUIVALENT TEST LOAD
{PORT BI {PORT AI {PORTS A AND CI
VCC~575V VCC~575V
Test MMD6150 Test
POint or Equlv POint
15kll
TestPOtnt~
SIGNAL DESCRIPTION five digital Inputs All port D lines can also be directly read
The Input and output signals for the MCU, shown In and used as binary Inputs The voltage reference pinS (VRH
Figure 1, are described In the following paragraphs and VRll for the A/D converter are also read as a part of
port D Refer to INPUT/OUTPUT, A/D CONVERTER, and
Vee AND VSS - Power IS supplied to the MCU uSing
•
INTERRUPTS for additional Information
these two pinS VCC IS power and VSS IS the ground con-
nection MEMORY - The MCU IS capable of addreSSing 4096
INT - This pin provides the capability for asynchronously bytes of memory and I/O registers with ItS program counter
applYing an external Interrupt to the MCU Refer to INTER- The MC6805R2 MCU has implemented 2316 of these bytes.
RUPTS for addltonal Information ThiS consists at- 2048 user ROM bytes, 192 self-check ROM
bytes, 64 user RAM bytes, 7 port I/O bytes, 2 timer registers,
XTAL AND EXTAL - These PinS provide control Input 2 A/ D registers and a miscellaneous register, see Figure 6 for
for the on-chip clock oscillator CIrCUit. A crystal, a resistor, or the Address Map The user ROM has been split Into three
an external signal depending on user selectable manufactur- areas. The first area IS memory locations $080 to $OFF, and
Ing mask opllon, can be connected to these pinS to provide a allows the user to access these ROM locations utilizing the
system clock with various degrees of stability/cost tradeoffs direct and table look-up Indexed addreSSing modes The
lead length and stray capacitance on these two pins should main user ROM area IS from $7CO to $F37. The last 8 user
be minimized Refer to INTERNAL CLOCK GENERATOR ROM locations at the top of memory are for the Interrupt
OPTIONS for recommendations about these Inputs vectors
The MCU reserves the first 16 memory locations for I/O
TIMER - The pin allows an external Input to be used to features, of which 12 have been Implemented These loca-
decrement the Internal timer CIrcuitry Refer to TI M ER for tions are used for the ports, the port DDRs, the timer, the
additional information about the timer circuitry INT2 miscellaneous register, and the A/D Of the 64 RAM
bytes, 31 bytes are shared With the stack area The stack
RESET - ThiS Pin allows resetting of the MCU at times
must be used With care when data shares the stack area
other than the automatic resetting capability already In the
The shared stack area IS used dUring the processing of an
MCU The MCU can be reset by pulling RESET low Refer to
Interrupt or subroutine calls to save the contents of the CPU
RESETS for additional Information
state The register contents are pushed onto the stack In
NUM (Non-User Model - ThiS pin IS not for user applica- order shown In Figure 7. Since the Stack pOinter decrements
tion and must be connected to VSS dUring pushes, the low order byte (PCL) of the Program
Counter IS stacked first. then the high order four bits (PCHI
INPUT/OUTPUT LINES (PAO-PA7, PBO-PB7, PCO-PC7, are stacked. ThiS ensures that the program counter IS loaded
PDO-PD7) - These 30 lines are arranged Into three 8-blt correctly dUring pulls from the stack Since the stack pOinter
ports {A, B, and CI plus port D with 6 Inputs Ports A, B, and Increments when It pulls data from the stack. A subroutine
C are programmable as either Inputs or outputs, under soft- call results In only the Program Counter (PCl, PCHI con-
ware control of the data direction registers Port D has from tents bing pushed onto the stack, the remaining CPU
one to four analog Inputs, an INT2 Input, and from one to registers are not pushed
4-195
MC6805R2
7 o 76543210
000 $000
1/0 Ports 0 Port A Data $000
Timer
Page Zero 1 Port 8 Data $001
RAM
Access with 1128 Bytes) 2 Port C Data $002
Short 127 $07F
Instructions
128 $080 3 Port 0 Data $003
Page Zero
I~FF
User ROM 4 Port A DDR* $004*
1128 Bytes)
255 5 Port B DDR* $005*
256 $100 6 Port C DDR* $006*
Not Used
11728 Bytes) 7 Not Used $007
•
ROM 14 AID Control/Status $ooE
1192 Bytes)
4087 $FF7 15 AID Result $ooF
4088 $FF8 16
Interrupt Not Used
Vectors 63 148 Bytesl $03F
ROM 64 $040
18 Bytes) RAM
4095 $FFF
164 Bytes)
Stack
131 Bytes Maximum)
*Caution. Data 0 frectiOn Registers IDDRs) are
wnte-o nly, they read as $FF 127 t $07F
n-4 11 1 I Condition
Code Register n+l
dress, data, and control buses
REGISTERS
n-3 Accumulator n+2
The M6805 Family CPU has five registers available to the
programmer. They are shown In Figure a and are explained In
n-2 Index Register n+3
the following paragraphs.
4·196
MC6805R2
7 a
I...______A_ _ _ _-'I Accumulator
a
x I Index Register
11 a
PCH PCl I Program Counter
11 54 a
10101010101 SP I Stack POinter
Condition Code Register
arry/Borrow
L----INegat've
'-------llnterrupt Mask
II
' - - - - - - - - H a l f Carry
PROGRAM COUNTER (PC) - The Program Counter IS a Half Carry (H) - Set dUring ADD and ADC opera lions to
12-blt register that contains the address of the next instruc- indicate that a carry occurred between bits 3 and 4
tion to be executed
STACK POINTER (SP) - The Stack POinter IS a 12-blt Interrupt (I) - When thiS bit IS set, the timer and external
register that contains the address of the next free location on Interrupts liNT and INT21 are masked (disabled). If an inter-
the stack DUring an MCU reset or the Reset Stack POinter rupt occurs While thiS bit IS set the Interrupt IS latched and IS
(RSPI Instrucllon, the Stack POinter IS set to locallon $07F processed as soon as the Interrupt bit IS cleared.
The Stack POinter IS then decremented as data IS pushed on-
to the stack and Incremented as data IS then pulled from the Negative (N) - When set, thiS bit Indicates that the result
stack. The seven most-Significant bits of the Stack POinter of the last arithmetiC, logical, or data manipulation was
are permanently set to 0000011 Subroutines and Interrupts negative (bit 7 In the result IS a logical onel
may be nested down to location $061 (31 bytes maxlmuml
which allows the programmer to use up to 15 levels of
Zero (Z) - When set, thiS bit Indicates that the result of
subroutine calls lIess If Interrupts are allowed)
the last arithmetiC, logical, or data manipulation was zero.
CONDITION CODE REGISTERS (CC) - The Condilion
Code Register IS a 5-blt register In which four bits are used to Carry/Borrow (C) - When set, this bit Indicates that a
indicate the results of the Instruction Just executed. These carry or borrow out of the ArithmetiC LogiC Unit (ALU)
bits can be IndiVidually tested by a program and specific ac- occurred dUring the last arithmetiC operation ThiS bit IS also
tion taken as a result of their state Each bit IS explained In affected dUring bit test and branch Instructions plus shifts
the follOWing paragraphs and rotates.
4·197
MC6805R2
TIMER TIMER Input pin allOWing the user to eaSily perform pulse-
The MC6805R2 MCU timer circuitry IS shown In Figure 9. Width measurements. (NOTE· For ungated </>2 clock Input to
The 8-blt counter may be loaded under program control and the timer prescaler, the TIMER Pin should be tied to VCC'
is decremented toward zero by the clock Input (or prescaler The source of the clock Input IS one of the mask options that
output). When the timer reaches zero, the tlmar Interrupt re- IS specified before manufacture of the MCU
quest bit (bit 7) In the Timer Control Register (TCR) IS set.
A prescaler optiOn can be apphed to the clock Input that
The timer Interrupt can be masked (disabled) by setting the
extends the timing Interval up to a maximum of 128 counts
timer interrupt mask bit (bit 6) In the TCR The Interrupt bit
before decrementing the counter ThiS prescahng mask op-
(I-bit) In the Condition Code Register also prevents a timer
tion IS also speCified before manufacture To aVOid trunca-
Interrupt from being processed. The MCU responds to thiS
tion errors, the prescaler IS cleared when bit 3 of Timer Con-
interrupt by saving the present CPU state In the stack,
trol Register IS written to a logiC 1 (thiS bit always reads as a
fetching the timer Interrupt vector from locatiOns $FF8 and logiC 01. .
$FF9 and executing the Interrupt routine (see the INTER-
The timer continues to count past zero, falhng through to
RUPT section). THE TIMER INTERRUPT REQUEST 81T
$FF from zero and then continUing the count. Thus, the
MUST BE CLEARED BY SOFTWARE. The timer and iiiiT2
counter can be read at any time by reading the Timer Data
share the same Interrupt vector THE INTERRUPT ROUTINE
Register (TOR) ThiS allows a program to determine the
MUST CHECK THE REQUEST BITS TO DETERMINE THE
length of time since a timer Interrupt has occurred, and not
SOURCE OF THE INTERRUPT
disturb the counting process.
The clock Input to the timer can be from an external
At power-up or reset, the prescaler and counter are In-
source (decrementing of Timer Counter occurs on a POSitive
Itialized With all logical ones; the timer Interrupt request bit
transItiOn of the external source) apphed to the TIMER Input
(bit 7) IS cleared and the timer Interrupt request mask bit (bit
Pin, or It can be the Internal </>2 signal. When the </>2 signal IS
II
6) IS set.
used as the source, It can be gated by an Input applied to the
Timer
Interrupt Not
TIMER Mask
Input
Pin
,..------,
I I
:L______!I
Manufactunng
Mask Options
Wrtte Read Write Read
ln_te_r_na_I_D_a_ta_B_u_s________________
L-_______________ ~I·
SELF-CHECK
The self-check capability of the MC6805R2 MCU prOVides clear If any error IS detected; otherwise the Z-blt IS set The
an internal check to determine If the part is functional. Con- walking diagnostic pattern method IS used.
nect the MCU as shown in Figure 10 and moMor the output The RAM test must be called With the stack pOinter at
of Port C bit 3 for an oscillatiOn of approxlmaty 7 Hz. A 9 volt $07F.When run, the test checks every RAM cell except for
level on the T(MER Input, pin 8, energizes the ROM-based $07F and $07E which are assumed to contain the return
self-check feature. The self-check program exercises the address.
RAM, ROM, timer, AID, interrupts, and (f0 ports. The A and X registers and all RAM locations except the
Several of the self-check subroutines can be called by a top two are modified
user program with a JSR or BSR instruction. They are the ROM CHECKSUM SUBROUTINE - The ROM self-check
RAM, ROM, and 4-channel AID tests. The timer routine IS called at location $F8A and returns with the Z-blt cleared If
may also be called if the timer input IS the Internal </>2 clock. any error was found; otherwise Z = 1. X = 0 on return, and A
RAM SELF-CHECK SUBROUTINE - The RAM self- IS zero If the test passed. RAM locations $040-$043 are over-
check is called at location $F6F and returns With the Z-bit written.
4·198
MC6805R2
- -
RESET r-:l.
-
1-
r
I 40
VSS PA7
10-.... 39
MC6805R2 PA6
I'FT
2 RESET
PA5 1L-
3 INT
PA4 JL.
4 VCC
- ' - 10)'F PA3 36
+ 525 5
:r: ....1....'5.
*25
tXTAL
PA2 35
- :r:~ 4~ PAl 34
-- MHz
XTAL
7 NUM PAO
33
10k
8 TIMER
+ 9V LED tl. 510 9 PCO PS7 32
LEDb. ... 510·
10 PCl PS6 31
.. LED~' "'512-
II PC2 R-
•
PB5
LED~ 51
... " ... 0 " 12 PC3 PS4 ~
c...1l PC4 PS3 28
~ PC5 PS2 27
~ PD6/1iNT21 24
PDD/AND
19 VRH
T
PD1/AN1 23
01 22
PD2/AN2
20 VRL PD3/AN3 21
J:.
-
*Thls connection depends on clock oscillator user selectable mask option Use Jumper If the RC mask option IS selected
LED Meanings
CO C1 C2 C3 Remarks [1:LED ON; O:LED OFF]
I 0 1 0 Sad 110
0 0 I 0 Bad Timer
I I 0 0 Sad RAM
0 I 0 0 Bad ROM
I
0
0
0
0
0
All Flashing
I
0 Sad AID
0 Bad Interrupts or Request Flag
Good Part
Anything else bad Part, Sad Port 3, Sad ISP, etc
A-TO-D CONVERTER SELF-CHECK - The AID self- In order to work correctly as a user subroutme, the Internal
check IS called at location SFA4 and returns with the l-blt <1>2 clock must be the clocking source and mterrupts must be
cleared If any error was found, otherwise l = 1. disabled. Also, on eXit, the clock IS runnmg and the mterrupt
The A and X register contents are lost. The X register must mask not set so the caller must pr6tect from mterrupts If
be set to 4 before the call. On return X = 8 and AI D channel 7 necessary.
IS selected. The AI D test uses the mternal voltage references The A and X register contents are lost The timer self-
and confirms port connections check routme counts how many times the clock counts 10
128 cycles. The number of counts should be a power of two
TIMER SELF-CHECK SUBROUTINE - The timer self- Since the prescaler IS a power of two If not, the timer
check IS called at location SFCF and returns with the l-blt probably IS not countmg correctly. The routme also detects a
cleared If any error was found; otherwise l= 1. timer which IS not running.
4·199
MC6805R2
• 5V
ov
vee _______.J
FIGURE 1t - POWER AND RESET TIMING
RESET
Pin
-------~
Internal
Reset _ _ _ _ _ _ _ _ _ _--J
Out
Of
Reset --.!-
Vce_~~r-~2~a~-,
REsET
I
Part Of
MC8805R2
MCU
In
Reset L--i-~-~~-+-------
oav 2V 4V
4·200
MC6805R2
XTAL XTAL
+5V
XTAL XTAL
MC6805R2
External MC6805R2
4 ISee Figure 16) 4 EXTAL MCU
Clock EXTAL MCU
(Resistor Mask
Input ICrystal Mask No
OptlOnl
OptlOnl Connection
NOTE
External Clock Approximately 10% Accuracy
External Resistor
(Excludes Resistor Tolerance)
The recommended CL value with a 4 0 MHz cry tal IS 27 pF, maXimum, Inlcudlng system dlstnbuted capacitance There IS an Internal
II
capacitance of approximately 25 pF on the XTAL pin For crystal frequencies other than 4 MHz, the total capacitance on each Pin
should be scaled as the Inverse of the frequency ratio For example, with a 2 MHz crystal, use approximately 50 pF on EXTAL and ap-
proximately 25 pF on XTAL The exact value depends on the Motional-Arm parameters of the crystal used
EqUlv:~:~:a~~ XTAL
5 ~E---J 6
4-201
MC6805R2
1'\ I 1
VCC=5 V
Internal timer Interrupt request, the external port D bit 6
(lNT21 Input pin, and a software Interrupt instruction ISWII
N 40 TA=25'C - When any Interrupt occurs, processing IS suspended, the
I
~
>- 30
~ present CPU state IS pushed onto the stack, the Interrupt bit
II-bltl in the Condition Code Register IS set, the address of
u the Interrupt routine IS obtained from the appropriate inter-
zw "",- rupt vector address, and the Interrupt routine IS executed
::J
~ 20
Stacking the CPU registers, setllng the I-bit, and vector
c: .......... fetching reqUires a total of 11 tcyc periods for completion
u.
i'-- r--.. Refer to Figure 17 for a flowchart The Interrupt service
10 routine must end With a Return from Interrupt IRTII,nstruc-
' ..... tlon which allows the MCU to resume processing of the pro-
gram prior to the Interrupt Table 1 proVides a listing of the
o Interrupts, their PriOrity, and the address of the vector which
o 5 10 15 20 25 30 35 40 45 50 55 60
RESISTANCE (k OHMSI
TlJnt-'f
Put on FFE
Address Bus
N
Timer
or INT2 FF8/FF9
Fetch
Instruction
PC-PC+ 1 I--'S"W.:.':.....,.J
Load PC
from
FFE/FFF
Execute
Instruction
4-202
MC6805R2
contains the starting address of the appropriate Interrupt ser- Miscellaneous Register (MR), refer to Figure 18 The INT2
vice routine. The Interrupt Priority applies to those pending Interrupt IS Inhabited when the mask bit IS set The INT2 IS
when the CPU IS ready to accept a new Interrupt RESET IS always readable as a digital Input of Port D The INT2 and
listed in Table 1 because It IS processed similar to an Inter- timer Interrupt request bitS, If set, causes the MCU to pro-
rupt. However, It IS not normally used as an Interrupt. When cess an Interrupt when the condition code I-bit IS clear
the Interrupt mask bit In the Condition Code Register IS set
the Interrupt IS latched for later Interrupt execution TABLE 1 - INTERRUPT PRIORITIES
NOTE
The timer and INT2 share the same vector address. Interrupt Priority Vector Address
The Interrupt routine must determine the source by RESET 1 $FFE and $FFF
SWI 2* $FFC and $FFD
examining the Interrupt request bits ITCR7 and MR7)
INT 3 $FFA and $FFB
Both TCR7 and M R7 can only be written to 0 by soft- TIMER/OO2 4 $FF8 and $FF9
ware.
The external Interrupts, INT and INT2, are set on the fail- * Pnorlty 2 applies when the I-bit
In the Condition Code Register IS
Ing edge of the Input signal The INT2 has an Interrupt re- set When 1=0, SWI has a pnorlty of 4, Irkeany other Instruction,
quest bit (bit 7) and a mask bit (bit 6) located In the the PriOrity of iN"f thus becomes 2 and the timer becomes 3
•
a
6 5 4 3 a 7 a
MSB LSB I $ooF
4·203
MC6805R2
A sinusoidal Input signal (fINT maxlmuml can be used to responding bit In the port DDR to a logic "1" for output or a
operate an external Interrupt IINTI, as shown In Figure 19, logic "0" for input. On reset all the DDRs are initialized to a
for use as a Zero-Crossing Detector with hysteresIs Included. logic "0" state, plaCing the ports In the Input mode. The port
An Interrupt request IS generated for each negative-slope, output registers are not Inilialized on reset and should be
zero crossing of the AC signal. For digital applications, the Initialized by software before changing the DDRs from Input
INT can be driven directly by a digital Signal at a maximum to output When programmed as outputs, all I/O pinS read
period of tIWL. This allows applications such as servIcing latched output data, regardless of the logic levels at the out-
tlme-of-day routines and engaglng/ disengaging AC power put pin due to output loading, refer to Figure 20
control devices Off-chip full wave rectification prOVides an All Input/output lines are TTL compatible as both Inputs
Interrupt at every zero crossing of the AC Signal and thereby and outputs Port A lines are CMOS compatible as outputs
provide a 2f clock uSing a mask option. Port B, C, and D lines are CMOS com-
A software Interrupt (SWII IS an executable instruction patible as Inputs. Port D lines are Input only, thus, there IS no
which IS executed regardless of the state of the I-bit In the corresponding DDR When programmed as outputs, Port B
Condition Code Register SWI's are usually used as break- IS capable of Sinking 10 milliamperes and sourcing 1 0
pOints for debugging or as system calls milliampere on each pin
INPUT/OUTPUT Port D prOVides the multiplexed analog Inputs, reference
There are 30 Input or Input/ output pins The INT pin may voltages, and INT2 All of these lines are shared With the Port
also be polled With branch Instructions to provide an addi- D digital Inputs Port D may always be used as digital Inputs
tional Input pin All pins on ports A, B, and C are program- and may also be used as analog Inputs The VRL to VRH
mable as either Inputs or outputs under software control of lines (PD4 and PD51 are Internally connected by the A/D
the corresponding Data Direction Registers !DDRsl The resistor Analog Inputs may be pre-scaled to attain the V RL
•
port I/O programming IS accomplished by setting the cor- to VRH recommended Input voltage range
Vce
AC
Input (Currer,t TTL 47 K:
IflNT Max) Limiting) 3 iNi MC6805R2 Level ~ 3 iNT
MC6805R2
-rr
DI9,tal---4'--I
R,; 1 MU ~~---;1+~-"""-\ MCU MCU
Input
AC Input", 10 Vpp 01 p.F (1IWL Maximum
Period)
Data
Direction Register
Blt*
Latched
Output
Data
Bit
Data
Direction Output Input
Register Data Output To ~DDR IS a write-only register and reads as all 1's
Bit Bit State MCU ··Ports A (With CMOS dnve disabled), 8, and C are three-state
1 a 0 a ports Port A has optional Internal puHup devices to proVide CMOS
1 1 drive capability See Electrical Characteristics tabies for complete
a X 3-5tat.** Pin Information
4-204
MC6805R2
Figure 21 provides some examples of port connections. write-only registers (locallOns $004, $005, and $0061 A
The Address Map In Figure 6 gives the addresses of data read operation on these registers IS undefined Since
registers and DDRs The Register Configuration IS provided BSET and BCLR are read/modify/write funcllons, they
In Figure 18 cannot be used to set or clear a DDR bit lall "unaffected"
CAUTION bits would be setl It IS recommended that all DDR bits In
The corresponding DDRs for Ports A, B, and Care a port be written uSing a single-store Instruction
a. Output Modes
-
PA5 38 PB5 30
(1 TTL Loadl _Ib
PM 37 PB4 29 10 mA
PA3 36 16 mA PB3 2B
PA2 35 PB2 27
PAl 34 PBl 26
Port A, Bit 7 Programmed as Output. DriVing
PAO 33 CMOS Loads and Bit 4 one TTL Load Directly PBO 25
(Using CMOS Output Openon)
Port B, Bit 5 Programmed as Output, Dnvlng
Darhngton·Base Directly
PB7
PB6
PB5
PB4
32
31
30
29
+ V
PC7
PC6
PC5
PC4
16
15
14
13
+ V
II
PB3
PB2
28
27
1 f PC3
PC2
12
"
CMOS Inverter
MCI4049/14089
PCl 10 ITYPlcail
PBl 26
PCO
PBO 25
4--10mA
Port B, Bit 0 and Bit 1 Programmed as Output, Dnv" Port C, Bits 0·3 Programmed as Output. DriVing
tng LEOs Directly CMOS Loads, USing External Pullup ReSIstors
b. Input Modes
30 P85
38 PA5 MC74LS04 or MC14069 29 PB4
(TYPical)
MC74LS04 (TYPical) 37 PA4
28 PB3
36 PA3
27 PB2
35 PA2
PBl
PBO
PC7
15 PC6
14 PC5
13 PC4
12 PC3
11 PC2 POO/iNT2
10 PCl PD7
(TYPical)
CMOS and TTL DriVing Port C Directly Port 0 used as 4-Channel AID Input with Bit 7 used
as CMOS Digital Input
4-205
MC6805R2
The latched output data bit (see Figure 181 may always be The converter operates contlnously uSing 30 machine
wntten Therefore, any write to a port writes all of Its data cycles to complete a converSion of the sampled analog Input
bits even though the port DDR IS set to input. This may be When conversion IS complete, the digitized sample or digital
used to Initialize the data registers and aVOid undefined out- value is placed In the AID Result Register (ARR), the conver-
puts However, care must be exercised when uSing sion complete flag IS set, the selected Input IS sampled again,
read/modlfy/wnte instructions since the data read cor- and a new converSion IS started
responds to the pin level If the DDR IS an Input (0) and cor- The AID IS ratlometric Two reference voltage (VRH and
responds to the latched output data when the DDr IS an out- VRLI are supplied to the converter via Port D pinS An, Input
put (11 voltage equal to VRH converts to $FF (fuli'scale) and an in-
put voltage equal to VRL converts $00 An Input voltage
ANALOG-TO-DIGITAL CONVERTER (AID) The greater than VRH converts to FF16 and no overflow Indica-
MC6805R2 MCU has an 8-blt AID converter Implemented on tion IS proVided For ratlometnc converSions, the source of
the chip uSing a successive approximation technique, as each analog Input should use VRH as the supply voltage and
shown In Figure 22 Up to four external analog Inputs, via be referenced to VRL.
port D, are connected to the AID through a multiplexer
Four Internal analog signals may be selected for calibration
purposes (VRH, VRHf2. VRH/4, VRLI CAUTION
The multiplexer selection IS controlled by the AID Control ThiS device contains circUitry to protect the Inputs
Register (ACR) bits 0, 1, and 2, see Table 2. ThiS register IS against damage due to high static voltages or electnc
cleared dunng any Reset condition. Refer to Figure 18 for field, however, the deSign of the Input circuitry for the
Register Configuration analog reference voltage pinS (19 and 20) does not of-
•
Whenever the ACR IS Written, the conversion In progress fer the SAME level of protection Precautions should
IS aborted, the conversion complete flag (ACR bit 7) is be taken to aVOid applications of any voltage higher
cleared, and the selected Input is sampled and held inter- than maximum-rated voltage or handled In any en-
nally. vironment prodUCing high-static voltages
D/A
Control
10 k ITyp I Count
LogiC
PDO/ANO
PD1/ANl Select
PD2/AN2 Multiplexer
PD3/AN3
8
AID AID
Result
Register
4·206
MC6805R2
BIT MANIPULATION
The MC6805R2 MCU has the ability to set or clear any 1/0 bits as control lines
single RAM or Inputloutput bit lexcept the Data Direction The coding example In Figure 23 Illustrates the usefulness
Registers, see Caution under INPUT 10UTPUT paragraphl of the bit manipulation and test InstructIOns Assume that
with a single instruction IBRSET, BCLR) Any bit In page the MCU IS to communicate with an external serial deVice
zero Including ROM, except the DDRs, can be tested uSing The external deVice has a data ready signal. a data output
the BRSET and BRCLR Instructions and the program line, and a clock line to clock data one bit at a time, LBS first,
branches as a result of Its state The carry bit ICI equals the out of the deVice The MCU walts until the data IS ready,
value of the bit referenced by BRSET or BRCLR. The clocks the external deVice, picks up the data In the Carry Flag
capability of work with any bit In RAM, ROM, or 1/0 allows I C-bltl, clears the clock line and finally accumulates the data
the user to have ,nd,v,dual flags In RAM or to handle single bits In a RAM location
ADDRESSING MODES
The MC6805R2 MCU has ten addressing modes aVailable
for use by the programmer They are explained briefly In the
follOWing paragraphs For additional details and graphical
Illustrations, refer to the M6805 Family Users Manual
The term "effective address" lEA) IS used In describing the
addreSSing modes EA IS defined as the address from which
the argument for an Instruction IS fetched or stored
IMMEDIATE - In the Immediate addreSSing mode, the
INDEXED, NO OFFSET - In the ,ndexed, no offset
addreSSing mode, the effective address of the argument IS
contained In the S-blt Index register Thus, thiS addreSSing
mode can access the first 256 memory locations These in-
structions are only one byte long ThiS mode IS often used to
move a pOinter through a table or to hold the address of a
frequently referenced RAM or 1/0 location
INDEXED, 8-BIT OFFSET - In the Indexed, S-blt offset
addreSSing mode, the effective address IS the sum of the
•
operand IS contained In the byte Immediately follOWing the contents of the unSigned S-blt Index register and the unsign-
opcode The Immediate addreSSing mode IS used to access ed byte follOWing the opcode ThiS addreSSing mode IS
constants which do not change dUring program execution useful In selecling the kth element In an n element table
Ie g , a constant used to Initialize a loop counterl With thiS 2-byte InstructIOn, k would tYPically be In X With
DIRECT - In the direct addreSSing mode, the effective the address of the beginning of the table In the instruction
address of the argument IS contained In a Single byte follow- As such tables may begin anywhere Within the first 256
Ing the opcode byte Direct addreSSing allows the user to addressable locations and could extend as far as location 511
directly address the lowest 256 bytes In memory With a single ($lFEI
2-byte instruction ThiS address area Includes all on-chip INDEXED, 16-BIT OFFSET - In the Indexed, 16-bit offset
RAM and 1/0 registers and 12S bytes of ROM Direct addreSSing mode, the effective address IS the sum of the
addreSSing IS an effective use of both memory and time contents of the unSigned S-blt Index register and the two un-
EXTENDED - In the extended addreSSing mode, the ef- Signed bytes follOWing the opcode ThiS addreSSing mode
fective address of the argument IS contained In the two bytes can be used In a manner Similar to Indexed, S-blt offset ex-
follOWing the opcode Instructions With extended addreSSing cept that thiS 3-byte Instruction allows tables to be anywhere
mode are capable of referenCing arguments anywhere In In memory As With direct and extended, the Motorola
memory With a Single 3-byte instruction When uSing the assembler determines the shortest form of Indexed address-
Motorola assembler, the user need not speCify whether an Ing
instruction uses direct or extended addreSSing The BIT SET/CLEAR - In the bit setlclear addreSSing mode,
assembler automatically selects the shortest form of the in- the bit to be set or cleared IS part of the opcode, and the byte
struction follOWing the opcode speCifies the direct address of the byte
RELATIVE - The relative addreSSing mode IS only used In In which the speCified bit IS to be set or cleared Thus, any
branch instructions In relative addreSSing, the contents of readlwrlte bit In the first 256 locations of memory, including
1/0, can be selectively set or cleared With a Single 2-byte in-
the B-blt Signed byte follOWing the opcode Ithe offsetl IS
added to the PC If, and only If, the branch condition IS true struction See Caution under INPUT IOUTPUT paragraph
Otherwise, control proceeds to the next instruction The BIT TEST AND BRANCH - The bit test and branch
span of relative addreSSing IS from + 129 to -126 from the addreSSing mode IS a combination of direct addreSSing and
opcode address. The programmer need not worry about relative addreSSing The bit which IS to be tested and condi-
calculating the correct offset If he uses the Motorola tion (set or clear) Included In the opcode, and the address of
assembler, Since It calculates the proper offset and checks to the byte to be tested IS In the Single byte Immediately follow-
see If It IS Within the span of the branch. Ing the opcode byte. The Signed relative S-blt offset In the
4·207
MC6805R2
third byte IS added to the PC If the specified bit IS set or clear ed from memory uSing one of the addreSSing modes The
in the specified memory location. This single 3-byte Instruc- Jump uncondltlonallJMP) and Jump to subroutine IJSR) in-
lion allows the program to branch based on the condition of structions have no register operand Refer to Table 3
any readable bit In the first 256 location of memory The span READ/MODIFY/WRITE INSTRUCTIONS - These in-
of branching IS from + 130 to - 125 from the opcode structions read a memory location or a register, modify or
address The state of the tested bit IS also transferred to the test ItS contents, and write the modified value back to
Carry bit of the Condition Code Registers. See Caution memory or to the register, see Caution under INPUT/OUT-
under INPUT/OUTPUT paragraph. PUT paragraph The test for negative or zero ITST) instruc-
INHERENT - In the Inherent addressing mode, all the in- tion IS Included in the read/modify/write instruction though
formallon necessary to execute the instruction IS contained It does not perform the write. Refer to Table 4
In the opcode Operations specifYing only the Index register BRANCH INSTRUCTIONS - The branch instructions
or accumulator, as well as control Instructions with no other cause a branch from the program when a certain condition IS
arguments, are Included In thiS mode These instructions are met Refer to Table 5
one byte long.
BIT MANIPULATION INSTRUCTIONS - The Instruc-
INSTRUCTION SET tions are used on any bit In the first 256 bytes of the memory,
The MC6805R2 MCU has a set of 59 baSIC instrucllons, see Caution under INPUT (OUTPUT paragraph One group
which when combined with the 10 addressing modes pro- either sets or clears The other group performs the bit test
duce 207 usable opcodes They can be diVided Into five dif- and branch operations Refer to Table 6
ferent types register/memory, read/modlfy/wnte, branch, CONTROL INSTRUCTION - The control Instructions
bit manipulation, and control The following paragraphs control the MCU operations dUring program execution
briefly explain each type. All the instructions within a given Refer to Table 7
•
type are presented In indiVidual tables ALPHABETICAL LISTING - The complete instruction set
REGISTER/MEMORY INSTRUCTIONS - Most of these IS given In alphabetical order In Table 8
instructions use two operands One operand IS 8Ither the ac- OPCODE MAP - Table 9 IS an opcode map for the in-
cumulator or the Index register The other operand IS obtaln- struction used on the MCU
4-208
TABLE 3 - REGISTER/MEMORY INSTRUCTIONS s:
n
~
Addressmq Modes
Indeked Indexed Indelled
Immediate Direct Extended (No Offset) (8 Sit Offset) (' 6 alt Offset)
Function
Op # # Op Op
•
MnemOniC Code Bytes Cycles Code Bytes Cycles Code Bytes Cycles
• • • Op # Op # # #
Code Bytes Cycles Code Bytes Cycles
OP #•
Code Bytes Cycles
:JJ
N
Load A from Memory lDA A6 2 2 B6 2 4 C6 3 5 F6 1 4 E6 2 5 D6 3 6
Load X from Memory lDX AE 2 2 8E 2 4 CE 3 5 FE 1 4 EE 2 5 Df 3 6
Store A 10 Memory STA - 87 2 5 C7 3 6 F7 1 5 E7 2 6 D7 3 7
Store X 10 Memory STX - - 8F 2 5 CF 3 6 FF 1 5 EF 2 6 DF 3 7
Add Memory 10 A ADD A8 2 2 88 2 4 C8 3 5 F8 1 4 E8 2 5 D8 3 6
Add Memory and
Carry to A ADC A9 2 2 89 2 4 C9 3 5 F9 1 4 E9 2 5 D9 3 6
Subtract Memory SUB AD 2 2 80 2 4 CO 3 5 FO 1 4 EO 2 5 DO 3 6
Subtract Memory from
A with Borrow SBC A2 2 2 82 2 4 C2 3 5 F2 1 4 E2 2 5 D2 3 6
AND Memory to A AND A4 2 2 84 2 4 C4 3 5 F4 1 4 E4 2 5 04 3 6
O~ Memory with A ORA AA 2 2 BA 2 4 CA 3 5 FA 1 4 EA 2 5 DA 3 6
EKclusl've OR Memory
with A EOR AB 2 2 BB 2 4 CB 3 5 F8 1 4 EB 2 5 D8 3 6
Arithmetic Compare A
with Memory CMP A1 2 2 B1 2 4 C1 3 5 F1 1 4 El 2 5 D1 3 6
Arithmetic Compare X
with Memory CPX A3 2 2 83 2 4 C3 3 5 F3 1 4 E3 2 5 D3 3 6
~
BIt Test Memory with
i\) A (Logical Compare) 81T A5 2 2 85 2 4 C5 3 5 F5 1 4 E5 2 5 D5 3 6
o Jump Unconditional JMP BC 2 3 CC 3 4 FC 1 3 EC 2 4 DC 3 5
CO - - -
Addressing Modes
Indexed Indexed
Inherent tAl Inherent (Xl Direct (No Offset) (8 Bit Offset)
Function
Op # #
MnemOniC Code Bytes Cycles
Op #
•
Op
Code Bytes Cycles Code Bytes Cycles
• • Op #
Code Bytes Cycles
• Op
•
Code Bytes Cycles
•
Increment INC 4C 1 4 5C 1 4 3C 2 6 7C 1 6 6C 2 7
Decrement DEC 4A 1 4 5A 1 4 3A 2 6 7A 1 6 6A 2 7
Clear ClR 4F 1 4 5F 1 4 3F 2 6 7F 1 6 6F 2 7
Complement COM 43 1 4 53 1 4 33 2 6 73 1 6 63 2 7
Negate
(2's Complement) NEG 40 1 4 50 1 4 30 2 6 70 1 6 60 2 7
Rotate Left Thru Carry ROl 49 1 4 59 1 4 39 2 6 79 1 6 69 2 7
Rotate RIght Thru Carry ROR 46 1 4 56 1 4 36 2 6 76 1 6 66 2 7
LogIcal ShIft Left lSl 48 1 4 58 1 4 38 2 6 78 1 6 68 2 7
LogIcal ShIft RIght lSR 44 1 4 54 1 4 34 2 6 74 1 6 64 2 7
ArithmetIc ShIft RIght ASR 47 1 4 57 1 4 37 2 6 77 1 6 67 2 7
Test for Negative
I or Zero TST 4D 1 4 5D 1 4 3D 2 6 7D 1 6 6D 2 7
II
MC6805R2
I
BIt IS Clear BMC 2C 2 4
Branch IFF Interrupt Mask
Btt IS Set BMS 20 2 4
Branch IFF Interrupt Line
IS Low Bil 2E 2 4
Branch IFF Interrupt Line
IS HIgh BIH 2F 2 4
Branch to Subroutme BSR AD 2 8
Addressing Modes
Bit SetlClear Bit Test and Branch
Op # # Op # /:
Function Mnemonic Code Bytes Cycles Code Byles Cycles
Branch IFF BIt n IS set BRSET n (n = 0 71 - - - 2 on 3 10
Branch IFF BIt n IS clear BRClR n (n = 0 71 - - - 01 + 2 en 3 10
Set Bit n BSET n (n - 0 71 10+2.n 2 7 - - -
Clear bIt n BClR n (n = 0 71 11 + 2 en 2 7 - - -
Inherent
Op # #
Function Mnemonic Code Bytes Cycles
Transfer A to X TAX 97 1 2
Transfer X to A TXA 9F 1 2
Set Carry a,t SEC 99 1 2
Clear Carry B.t ClC 98 1 2
Set Interrupt Mask Bit SEI 9B 1 2
Clear Interrupt Mask Bit CLI 9A 1 2
Software Interrupt SWI 83 1 11
Return from Subroutine RTS 81 1 6
Return from Interrupt RTI 80 1 9
Reset Stack POinter RSP 9C 1 2
No-Operatton NOP 9D 1 2
4-210
MC6805R2
•
Bil X
BIT X X X X X X
•• II II
•
BlO X
•••• •
BlS X
•••• •
BMC X
•••• •
BMI
•••• •
BMS
• • • •• •
BNE
••• •
BPl
•••• •
BRA
•••• •
BRN
•••• •
BRClR X
•••• II
BRSET X
•••• II
BSET X
•••• •
BSR X
•••• •0
Cll X
••••
Cli X
• 0 •0 •1 •
ClR X X X X
•• •
CMP X X X X X X
•• II II II
COM X X X X
•• II II 1
CPX X X X X X X
•• II II II
DEC X X X X
•• II II
•
EOR X X X X X X
•• II II
•
INC X X X X
•• II II
•
JMP X X X X X
•••• •
JSR x X X X X
•••• •
lOA X x X X X X
•• II II
•
lOX X X X X X X
•• II II
•
lSl X X X X
••0 II II II
lSR X X X X
•• II II
NEO X X X X
•• II II II
NOP X
•••• •
ORA X X X X X X
•• II II
•
ROl X X X X
•• II II II
RSP X
CondItIOn Code Symbols
•••• •
H Half Carry (From BIt 3) C Carry I Borrow
I Interrupt Mask /I Test and Set If True, Cleared OtherwIse
N NegatIVe (SIgn BIll • Not Affected
Z Zero
4·211
MC6805R2
•
ConditIOn Code Symbols
H Half Carry I From Bit 3) C Carry/Borrow
I Interrupt Mask fI Test and Set If True, Cleared Otherwise
N Negative (Sign Bill • Not Affected
Z Zero ? Load CC Register From Stack
4-212
s:
Read/Modify/Write
M6805 FAMILY OPCODE MAP
4
R
rJi.
BRA'
6
01
001,
, 4
INH A
4
01 ..
3 4
INHIXI
5
0101
3 7
IXl
o,~o
6 6
IX
7
0111
, 9
INH
8
'''' 9
.
I H
,,
9
2
IMM
A
1010
2 4 3 I'
OIR
B
1011
4
EXT
C
11 . .
1X2
0
6
1101
SUB ,x,
, I'
11
E
1110
SUB 4
4
IX
F
1111
SUB 3
H~t:a:
0
~ BRSEl~B I 2 BSE~~e NEGX RTI SUB SUB
DIR I 3 SUBEXT
NEGA
10 , 7 , 4
Rl
3
12 NEG
DIR I INH 1 INH
2 NEG 1X1 1 NEG IX
1
6
INH
6 2
IMM
2 4 3
CMP
4 , 6
CMP
5 ,
12
CMP
IXl
4
1
4
CMP
IX
3
0000
1
1 BRClRO BClRO BRN ATS CMP CMP
0001 3 BTB
'SASET1'
2
7
BSe
,
2
4
REl
3
1 INH 2
2
IMM 2
7 , DIR 3
3
EXT
4 , 3
6 5,
IX2 2
,
IXI I
4
IX
3
rool
2
I 2 BSE~le SBC SBC SBC SBC SBC SBC 2
0010 3
10
BTB
5 7 5 ,
BHIREL
3 6 5 4 3 4 3 7 6 6 , 11 10 ,
2 IMM 2
2 4
DIR 3
3 5
EXT
, 3
6 ,,
IX2 2
,
IXI 1
4
IX 0010
3
3 BRClRl BClRl BlSREL COMA COM~H COMJX1 COM SWI CPX CPx CPX CPX CPX CPX
0011 3
10
BTB
5
2
7
Bse
5 , 3
.. .2. COM IR
6 , 1
4
I
3
1
4 3 7 6
1
6
IX
, 1 INH
,
2 IMM 2
2 4
DIR 3
3
EXT
4 , 3
6
IX2
5
2
5
IXI
4
1
4
AND
IX
3
0011
4
4 BRSET2 I , BSE~~c BCC lSRA lSRX lSR lSR AND AND AND AND
.'00 3
10
BlB
5 7 5
2
4
Rl
3
2 LSR01R
1 INH 1 INH IXI 1 IX
,
2 IMM 2
2 4
DIR
13 AND
3 5
EXT
4
3
6
IX2
5
2
5
IXI
4
1
4
BIT
IX
3
0100
3BRCl:1B ! 2 BCl~!c
5 BCS BIT BIT BIT BIT 5
0101
10 , 7 , 2
4
Rl
3 6 , 4 3 , 3 7 6 6 5 , IMM
2 4
DIR I 3
3 5
EXT
, 6 ,
IX2
2 BIT
5
IXI
4
1
4
IX
3
0101
0110
6
3
BRSET3
10 ,
BTS 2
7
BSE~~e
, 2
4
BNE
Rl
3
,
6
ROR
,
IR 1
4
RORA
INH 1
3
RORX
,
INH
3 7
ROR IX1
6
1
6
ROA
IX
, 2 2
, lOA
IMM 2
lOA
, DIR 3
lOA
EXT
4 6 , 3
7
lOA
IX2
6
2
6
lOA
,,
IXI 1
LOA
IX
4
6
0110
7 3BRCl~,3s ,BCl~~c BEQ ASR ASAA ASRX ASR ASR TAX STA STA STA STA STA 7
0111
10 , 7 , 2
4
Rl
3
2
6
DIR
, 1
4
INH 1
3 4
INH
3 7
IXI
6
1
6
IX
5 ,
1 INH
2 2 2
2 , DIR
3 ,3 EXT, 3
6
IX2
5 ,
2 ,
'Xl 1
4
IX
3
0111
, , 8HC~Fl
8SE~~c
,,
8 lSl lSlA lSlX lSl lSl ClC EaR EOR EaR EaR EaR EaR 8
~
1000
10 ,
3 8RSEl1 ! ,
7 3
2
6
DIR
5 ,
1 INH 1
3 4
INH
3 7
IXI
6
1
6
I
, 2
INH
2 2
IMM 2
2 4
DIR
3 ,
3 EXT
4
3
6 , IX3
IX2
5
IXI
4
1 1000
N
9 BRClR4 2 BCl~ic BHCS ROl
,
AOlA AOlX
,
ROl ROl SEC
, ADC ADC ADC
,
ADC ADC
, , IX
ADC 9
.... 1001
1{~0
3
10
STS
5 7
13BRSEl.? I ,BSE~~e
5 ,
2
BPl
REL
3
2
6
, DEC
DIR
5
1 INH 1
DECA
3
INH
DECX
3
2
7
DEC
IXI
6
1
6
DEC
IX
5
1
2
CLI
INH
2 2
ORA
IMM 2
2 4
ORA'
DIR 3
ORA
EXT
ORA
3
6
ORA
IX2
ORA
5
2
5
IXI 1 1001
A
(.)
10 5 7 5 , REl
3
DIR 1 INH 1 INH 2 IXI 1 IX 1 INH
2
2 IMM 2
2
DIR
3
3
, ADDIX2 2 IXI , IX
EXT 3
5 5 4
1 1010
C 2 BSE~~e BM~EL INC INCA INCX INC INC RSP JMP JMP JMP JMP JMP C
1100 3
1~. '
BTB
7 ,
2
4 3
2
6
DIR
, ,
1 INH
3 ,
1 INH
3
2
7 ,
IXI 1
6
IX
4 ,
1 INH
2 S
2
6 7
DIR
, 3
S
EXT
6
3
9
IX2
7
2 IXI
6
1 IX 1100
0 13BRCl~~ I ,BCl~~c BM~Fl TSTA TSTX TST TST NOP BSR JSR JSR JSR JSR JSR D
,,01
10 , 7 , 4 3
, TST
IR 1 INH 1 INH IXI 1 IX
2
1 INH 2
2
REl 2
2
DIR
4 lOX 3
3
,
EXT
4
3
lOX
IX2 2 IXI
4
1
4
IX
3
1101
1111
F
3
BRClR7
STB 2
BClR7
__~~C;_ -'--
81H
REl 2
ClR
DIR 1
ClRA
INH 1
ClRX
INH , ClR
IXI 1
ClR
IX 1
WAIT
INH 1
TXA
INH
, STX
2 DIR 3
STX
EXT 3
STX
IX2 2
STX
IXI 1
STX
IX
F
1111
l(
DIR Direct
r-IF::;...t=+----------::;77' Opcode In Hexadecimal
j
EXT Extended
AEL Relative
BSC Bit Set! Clear ."' ,~,. «MO",,,""", 4 ... ~ Opcode In Binary
BTB Bit Test and Branch MnemOniC .. SUB 0
IX Indexed INa Offsetl Bytes 1 IX 0000
IX1 Indexed, 1 Byte 18-Bnl Offset
IX2 Indexed, 2 Byte 116-B,tI Offset # of Cycles (CMOS Versions I 7 " Address Mode
II
MC6805R2
FLEXIBLE DISKS
The disk media submitted must be Single-sided, slngle-
denSity, 8-lnch, MOOS compatible flOPPies The customer
I
must write the binary file name and company name on the
disk With a felt-tip pen The minimum MOOS system files as
000 400 well as the absolute binary object file Ifilename LO type of
file) from the M6805 cross assembler must be on the disk An
xxx ~ Customer 10 object file made from a memory dump uSing the ROLLOUT
After the EPROM(s) are marked they should be placed In command IS also acceptable Consider submitting a source
conductive IC carners and securely packed Do not use listing as well as the follOWing files filename LX (EXOR-
styroforam ciser'" loadable format) and filename SA (ASCII Source
Code) These files will of course be kept confidential and are
VERIFICATION MEDIA used 1) to speed up the process In-house If any problems
arise, and 2) to speed up the user-to-factory mterface If the
All original pattern media (EPROMs or Floppy Disk) are user finds any software errOrs and needs assistance qUickly
filed for contractual purposes and are not returned A com- from Motorola factory representatives
puter listing of the ROM code will be generated and returned MOOS IS Motorola's Disk Operating System available on
along with a listing verification form The listing should be development systems such as EXORCisers, EXORsets, etc
4·214
MC6805R2
Phone _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Extenslon _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
OPTION LIST
Select the options for your MCU from the followtng itst A
manufacturing mask will be generated from this tnformatlon
II
Timer Clock Source
o Internal ",2 clock
o TIMER Input pm
Timer Prescaler
o 2° (divide by 11 o 2' (divide by 16)
o 2' (divide by 2) o 2' (divide by 32)
o 2' (divide by 4) o 2' (divide by 64)
o 2' (divide by 8) o 2' (divide by 128)
Clock Freq _ _ _ _ _ _ _ _ _ _ _ _ __
Tllle _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
S,gnature _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
4·215
® MOTOROLA MC680ST2
Advance Information
HMOS
8-BIT MICROCOMPUTER UNIT WITH PLL LOGIC IHIGH DENSITY
N"CHANNEL. SILICON-GATE
The MC6805T2 Microcomputer Unit I MCU) with PLL logic IS a DEPLETION LOAD)
member of the M6805 Family of low-cost single-chip microcomputers 8-BIT
This 8-bit microcomputer contams a CPU, on-chip CLOCK, ROM,
RAM, 1/0, TIMER, and the PLL logic for an RF synthesizer It IS design- MICROCOMPUTER
ed for the user who needs an economical microcomputer with the WITH PLL LOGIC
proven capabilities of the M6800-based mstructlon set, as well as the
necessary logic reqUired for frequency synthesIs applications A com-
panson of the key features of several members of the M6805 Family of
microcomputers is shown on the last page of this data sheet The
following are some of the hardware and software highlights of the
MC6805T2 MCU
HARDWARE FEATURES:
• 8-Blt Architecture
• 64 Bytes of RAM
4-216
MC6805T2
•
PBS Comparator
PB7 ",CaMP
Self-Check
ROM
MAXIMUM RATINGS
Rating Symbol Value Unit This device contains circuitry to protect the
Inputs against damage due to high 'italic
Supply Voltage VCC -03to +70 V
voltages or electnc fields, however, It IS ad~
Input Voltage V ln -03to +70 V Vised that normal precautions be taken to
Operating Temperature Range TA o to + 70 'c aVOid application of any voltage higher than
maximum rated voltages to this hlgh-
Storage Temperature Range Tstg -55 to + 150 'c Impedance circuit For proper operation It IS
recommended that V In and Vout be con~
THERMAL CHARACTERISTICS strained to the range VSSS(V In or V out )
Characteristic Symbol Value Unit sVCC Reliability of operation IS enhanced If
Thermal Resistance unused Inputs are tied to an appropriate logiC
Plastic 120 voltage level Ie 9 • eltner VSS or VCCI
Ceramic 9JA 50 'C/W
Cerdlp 60
POWER CONSIDERATIONS
The average chip-Junction temperature. T J. In 'c can be obtained from
T J=TA+ (PO-BJA) (1)
Where
TA-Amblent Temperature. °c
BJA- Package Thermal ReSistance. JunctlOn-to-Amblent. °C/W
PO- PINT + PPORT
PINT-ICC x VCC. Watts - Chip Internal Power
PPORT-Port Power DISSipation. Watts - User Determined
For most applicatIOns PPORT~ PINT and can be neglected PPORT may become Significant If the deVice IS configured to
drive Darlington bases or sink LED loads
An approximate relationship between Po and TJ Ilf PPORT IS neglected) IS
PO= K+ (T J + 273°C) (2)
SolVing equations 1 and 2 for K gives.
K = PO-IT A + 273°C) + BJAoP 0 2 (3)
Where K IS a constant pertaining to the particular part K can be determined from equation 3 by measunng Po (at eqUilibrium)
for a known T A USing thiS value of K the values of Po and T J can be obtained by solVing equations (1) and (2) Iteratively for any
value of TA
4·217
MC6805T2
SWITCHING CHARACTERISTICS (VCC= 525 Vdc -+ 05 Vdc VSS = GND TA = 0 to 70·C unless otherwise notedl
Characteristics Symbol Min Typ Max Unit
Oscillator Frequency fosc 04 - 42 MHz
Cycle Time (4lfoscl tcyc 095 - 10 ~A
INT and TIMER Pulse Width tWH,tWL t cyc +250 - - ns
RESET Pulse Width tRWL t cyc +250 ns
f1E:SE~ Delay Time (External Capacllance-l 0 ~Fl tRHL 100 ms
Input Frequency fin 1 - 16 MHz
Input Frequency Rise Time at fin tlNR - - 20 ns
Input Frequency Fall Time at fin tlNF - 20 ns
Duty Cycle of fin and External Input on EXTAL - 40 - 60 %
Injection Pulse Active Time tarr 70 ns
TIQj Zero-Crossing Detection Input Frequency (for ± 5° Accuracy flNT 003 10 kHz
ELECTRICAL CHARACTERISTICS (VCC=5 25 Vdc ±O 5 Vdc, VSS=GND, TA=O to 70·C unless otherwise notedl
•
Characteristic Symbol Min Typ Max Unit
Input High Voltage
RESET (4 75sVCC,s5 751 40 - VCC
(VCC<4751 VCC-O 5 -, VCC
INT (4 75,sVCC,s5 751 VIH 40 VCC V
,
(VCC<4751 VCC-O 5 VCC
All Other Except fin 20 - VCC
Input High Voltage <l>COMP
Normal Mode - - VCC
VIH
Self-Check Mode - 90 150 V
Input Low Voltage
RESET -03 -, 08
INT VIL -03 15 V
All Other Except fin -03 - 08
iiiiT Zero-Crossing Input Voltage, through a Capacitor VINT 20 - 40 Vac p-p
Internal Power DIssipation - No Port Loading,
VCC=575 V, TA=O·C PINT - 400 - mW
Input CapaCItance
EXTAL - 25 -
All Others Cin - 10 - pF
AC Coupled Input Voltage SWing VFIP 05 12 - Vac p-p
Input Current (VIH = VCCI IFH - - 40 ~A
Ouput Low Current (VOL = 1 0 V) ICML - 300 - ~A
Output High Current (VOH- VCC-l V) ICMH - 200 - y.A
Leakage Current (V ,n - VCC) IOFF - 2 - nA
RESET HysteresIs Voltage (See Figures 11 and 121
"Out of Reset" VIRES+ 21 - 40 V
"Into Reset" VIRES- 08 - 20
Input Current
TIMER (V,n=O 4 VI - - 20
INT (VIn=O 4 VI - 20 50
EXTAL (V In =2 4 V to VCC Crystal Option I 1m - - 10 ~A
_ _ (V ,n = 0 4 V Crystal OptIOn) - - -1600
RESET (VIn=O 8 V) -40 - -50
(External Capacttor Charging Current!
4-218
MC6805T2
PORT ELECTRICAL CHARACTERISTICS IVCC= +525 Vdc ±O 5 Vdc, VSS= GND, TA=O' to 70'C unless otherwise noted I
•
Port C and Port A with CMOS Drive Disabled
Output Low Voltage, ILoad= 16 rnA VOL - - 04 V
Output High Voltage, ILoad- -100 ~A VOH 24 - V
Input High Voltage VIH 20 -
VCC V
Input Low Voltage VIL 03 - 08 V
HI-Z State Input Current ITS I - 2 20 ~A
FIGURE 3 - TTL EQUIVALENT TEST LOAD FIGURE 4 - CMOS EQUIVALENT TEST LOAD FIGURE 5 - TTL EQUIVALENT TeST LOAD
(PORT BI (PORT AI (PORTS A AND CI
VCC=575V
Test MMD6150
POint or Equlv 297 kll
TestPolnt~
I 30 pF IT otal1 30 pF
1T0tail
24 kll MMD7000
or Equlv
C = 40 pF !Totall
SIGNAL DESCRIPTION oscillator Lead length and stray capacitance on these two
The Input and output signals for the MCU, shown In pinS should be minimized Refer to INTERNAL
Figure 1, are described In the following paragraphs OSCILLATOR for recommendations about these pinS
VCC AND VSS - Power IS supplied to the MCU uSing fin - The high frequency digital Input to the variable
these two pins VCC IS power and VSS IS the ground con- divider portion of the on-chip frequency synthesizer IS on the
nection fin pin The reference frequency for the phase lock loop IS
divided down from the crystal oscillator. Refer to the PHASE
INT - ThiS pin provides the capability for asynchronously LOCK LOOP section for details on the frequency synthesizer
applYing an external Interrupt to the MCU Refer to INTER- features
RUPTS for additional information.
cj>COMP - ThiS three-state output IS the result of compar-
XTAL AND EXTAL - These PinS provide control Input for 109 the mternal reference frequency to the vanable divider
the on-chip clock oscillator CirCUit A crystal or an external signal Refer to PLL for details In Self-Check, cj>COMP IS
signal can be connected to these pins to provide the Internal raised to .. 9 V
4-219
MC6805T2
Rem - This Pin allows resetting of the MCU at times The MCU reserves the first 16 memory locations for I/O
other than the automatic resetting capability already In the features, of which 10 have been Implemented. These loca-
MCU. Refer to RESETS for additional information tions are used for the ports, the port DDRs, the timer, and
the PLL registers.
NUM - ThiS Pin IS not for user application and must be Sixty-four bytes of user RAM are provided Of the 64
connected to VSS. bytes, 31 bytes are shared With the stack area The stack
must be used With care when data shares the stack area
INPUT/OUTPUT LINES (PAo-PAl, PBo-PBl, PCO-PC21 The shared stack area IS used dUring the processing of
- These 19 lines are arranged Into two 8-bIt ports (A and BI Interrupt and subroutine calls to save the processor state
and one 3-blt port (CI All lines are programmable as either The register contents are pushed onto the stack In the
Inputs or outputs under software control of the data direc- order shown In Figure 7 Since the stack pOinter decrements
tion registers. Refer to INPUT/OUTPUTS for additional in- dUring pushes, the low order byte (PCL) of the program
formation The PCO/TIMER pin also serves as an external in- counter IS stacked first, then the high order four bits (PCH)
put to the Internal timer Refer to the TIMER section for in- are stacked ThiS ensures that the program counter IS loaded
formation on the timer modes correctly follOWing pulls from the stack, since the stack
pOinter Increments when It pulls data from the stack A
MEMORY subroutine call results In only the program counter (PCH,
The MCU memory IS configured as shown In Figure 6 The PCL) contents being pushed onto the stack, the remaining
MCU IS capable of addreSSing 4096 bytes of memory and 1/0 CPU registers are not pushed.
registers With ItS program counter The MCU has Im-
plemented 2698 of these memory locations ThiS consists of.
II
2508 bytes user ROM, 116 bytes self-check ROM, 64 bytes of REGISTERS
user RAM, 6 bytes of port I/O, 2 timer registers, and 2 PLL The MCU has five registers available to the programmer
registers The user ROM IS split Into four areas. The first area They are shown In Figure 8 and are explained In the follOWing
beginS at memory location $080, which allows the user to paragraphs
access ROM locations utiliZing the direct and table look-up
Indexed addreSSing modes The second user ROM area ACCUMULATOR (AI - The accumulator IS a general pur-
begins at memory location $100 The last eight user ROM pose 8-blt register used to hold operands and results of
locations, at the top of memory, are for the Interrupt vectors arithmetiC calculations or data manipulations
7 o 7 6 5 4 3 2 o
0 PortA $000
1/0 Ports, RAM $000
PLL, Timer
1 Port 8 $001
$07F
Page Zero
User ROM
$080 2 1 1 1 1 1 I PortC $002
2047
(1792 bytes) \
$7FF
5 Port B DDR $006'
2048 $800
6 NOT USED I Port C DDR $006'
\
ROM User RAM
(116 bytes) (84 bytes)
4087 $FF7
4al8 $FFS
Stack
Interrupt Vectors (S bytes)
(31 bytes ;aXlmum)
4096 $FFF
127 $07F
'Caullon Data Dlfectlon Register !DORs) are wnte-only, they read as $FF
4·220
MC6805T2
5 4 Pull o
I
0
CONOITION A Accumulator
n 4 1 1 1 CODE REGISTER n ·1
o
n ·3 ACCUMULATOR n -2 L.._ _ _ _ _x_ _ _ _...I1 Index Register
r1 -2 INDEX REGISTER n -3 11 0
---I1
.:..p.;:C:.;H_...L_ _ _ _-:...PC::L=-_ _ Program Counter
I
LI_ _
n ·1 1 1 1 1 PCW n -4
1 11 5 4
SP Stack Pomter
PCL" n -5
Push
Condilion Code Register
• For subroutme calls only PCH and pel are stacked
Carry I Barrow
Zero
' - - - - Negative
' - - - - - - Interrupt Mask
4-221
MC6805T2
q,2
I l n t e m a nr-
B -,
I I
I
I I
Pm ~_.J
PCG/TiMER
TCR5
TImer
TCR4 Interrupt
Mask
r---,
I I
I I
I I Clock
L. ___ J
Manufacturing
Input
Mask OptIOn
INTERNAL OSCILLATOR
The Internal OSCillator CirCUit has been deSigned to require
a minimum of external components The use of a crystal or
an external signal may be used to drive the Internal OSCillator
The different connection methods are shown In Figures 13
At Powerup or Reset, the prescaler and counter are and 14 The crystal specifications are given In Figure 15.
Initialized with all logical ones; the timer Interrupt request bit The crystal OSCillator startup time IS a function of many
Iblt 71 IS cleared; the timer Interrupt mask bit Iblt 61 IS set; the variables crystal parameters (especially RsI, OSCillator load
external timer source bit Iblt 51 IS cleared and the timer capaCItances, IC parameters, ambient temperature, and sup-
disable bit Iblt 41 IS cleared ply voltage To ensure rapid OSCillator startup, neither the
crystal characteristics nor the load capacitance should ex-
SELF-CHECK ceed recommendallons.
The self-check capability of the MCU provides an Internal
check to determine If the port IS functional. Connect the INTERRUPTS
MCU as shown In Figure 10 and mOnitor the output of Port C The MCU can be Interrupted three different ways through
bit 3 for an OSCillation of approximately 7 Hz A 9-volt level on the external Interrupt I INTI Input pin, the Internal timer inter-
the ",COMP input, pin 7, energizes the ROM-based self- rupt request, or the software Interrupt Instruction (SWII.
check feature The self-check program exercises the RAM, When any Interrupt occurs, processing is suspended, the
ROM, timer, Interrupts, and 1/0 ports present CPU state IS pushed onto the stack, the Interrupt bit
III In the ConditIOn Code Register IS set, the address of the
RESETS Interrupt routine is obtained from the appropriate Interrupt
The MCU can be reset two ways' by the external reset In- vector address, and the Interrupt routine is executed. Stack-
put IRESETI and dUring power up time. See Figure 11 Ing the CPU registers, setting the I-bit, and vector fetching
The Internal CirCUit connected to the ~ pin consists requires a total of 11 tcyc periods for completion
of a Schmitt trigger which senses the RESET line logiC level A flowchart of the Interrupt sequence IS shown In Figure
The Schmitt trigger proVides an Internal reset voltage If It 16 The Interrupt service routine must end With a return from
senses a logical 0 on the RESET pin. DUring power up, the Interrupt (RTII Instruction which allows the MCU to resume
Schmitt trigger sWitches on (removes resetl when the processing of the program prior to the interrupt (by unstack-
RESET pin voltage rises to VIRES +. When the RESET Pin Ing the prevIous CPU statel. Table 1 proVides a listing of the
voltage falls to a logical 0 for a period longer than one t cyc , Interrupts, their PriOrity, and the address of the vector which
the Schmitt trigger sWitches off to provide an Internal reset contains the starling address of the appropriate Interrupt ser-
voltage The "switch off" voltage occurs at VIRES _. A vice routine The Interrupt priOrity applies to those pending
typical reset Schmitt trigger hysteresIs curve IS shown In when the CPU IS ready to accept a new Interrupt. RESET is
Figure 12. listed In Table 1 because It IS treated as an Interrupt.
Upon power up, a delay of tRHL IS needed before allOWing However, It IS not normally used as an Interrupt When the
the reset Input to go high. This time allows the Internal clock Interrupt mask bit In the Condition Code Register IS set the
generator to stabilize. Connecting a capacitor to the RES ET Interrupt IS latched for later Interrupt execution
4-222
MC6805T2
MC6805T2 26
PA6
10"F 28 25
r-1 CL
R'E'SEi' PA5
PA4 1!..-
4 23
~
-- ~
EXTAL PA3
PA2
22
T 5
XTAL PAl 21
PAO ~
7
+9V ",COMP
PBl .l2....-.
6 18
NUM PB6
'CC
~ 17
- PB5
II
16
PB4
J.72D 8
PCO/TIMER PB3 .!L-.
J.7..iX;. 9
PCl PB2
14
.
J.7..00 10
PC2 PBl
13
VCC= Pin 3
- 11
fin PBO
12
VSS= Pin 1
5V
VCC
OV _ _ _ _ _ _- J
RESET
Pin
-------r'
Internal
Reset _ _ _ _ _ _ _ _ _ _....
Out
Part Of
MC6805T2
MCU
InReset L-~~~~I_~-+--- ___
O.BV 2V 4V
4·223
MC6805T2
~ 4 EXTAL
External
4 EXTAL
Clock
(See Note) c:J MC6805T2 Input MC6805T2
5 XTAL MCU 5 XTAL MCU
Crystal
External Clock
•
mately 25 pF on XT Al. The exact value depends on the
MotIOnal-Arm parameters of the crystal used
Recommended
Crystal MotIOnal Arm Parameters Cl
n:'C,;3-":.c
AT - Cut Parallel Resonance Crystal
Co~ 7 pF Max
FREO~4 0 MHz @ CL ~24 pF
RS = 50 ohms Max.
(a) (bl
4·224
MC6805T2
l-ll,n CCA)
07F- SP
O-DDA's Stack
CLA INT Logic PC, X, A, CC
FF-Tlmer
7F-Prescaler
7F- TCA
•
iNT FFA/FFB
Timer FFB/FF9
Fetch
Instruction
Load PC
from
FFE/FFF
Execute
Instruction
mET 1 $FFE and $FFF There are 19 input/outpul pins (The INT pm may also be
SWI 2" $FFC and $FFD polled with branch mstructions to provide an additional Input
INi' 3 $FFA and $FFB pin.! All pins (Ports A, B, and C) are programmable as either
Timer 4 $FF8 and $FF9 Inputs or outputs under software control of the correspond-
mg Data Direction Registers (DDRI. The port I/O program-
*PrlOrity 2 applies when the I-bit In the Condition Code Aeglster IS mmg IS accomplished by writing the corresponding bit In the
set When 1=0, SWI has a Priority of 4, like any other Instruction, port DDR to a logiC "1" for output or a logic "0" for mput.
the Priority of iNi' thus becomes 2 and the timer becomes 3 On Reset all DDRs are Initialized to a logiC "0" state to put
the ports in the Input mode, The port oulput registers are not
mitlallzed on Reset but may be written to before setting the
The external Interrupt IS mternally synchronized and then DDR bits to avoid undefined levels. When programmed as
latched on the falhng edge of INT. A smusoidal input signal outputs, lhe latched output data IS readable as input data,
(fINT maximum) can be used to generate an external mter- regardless of the logiC levels at the output pm due to output
rupt, as shown In Figure 17, for use as a Zero-Crossing loadmg; see Figure 18. When Port 8 IS programmed for out-
Detector. For digital applicatIOns the INT can be driven by a puts, It IS capable of slnkmg 10 mA and sourcmg 1 mA on
digital signal at a maximum period of tlWL each pin.
4-225
MC6805T2
VCC
AC TTL 47 k
Input (Current
IfINT Max I Limiting) MC6805T2 Level 2 TIiIT MC6805T2
Rs 1 Mil ~---<Q,.--t--I MCU DI9Ital---4t--I
Input
MCU
AC Input~ O.lI'F
(tlWL MaXimum
10 Vpp
Penod)
lJ
I Data
FIGURE 18 - TYPICAL PORT 1/0 CIRCUITRY
Direction Register
Bit-
Latched
Output
Data
Sit
To Timer
for PCO/TIMER Pin
Data
Direction Output Input
Register Data Output To
Bit B~ State MCU
1 0 0 0
1 1 1 1
0 X 3-State"" Pin
4·226
MC6805T2
All Inputloutput lines are TTL compatible as both Inputs used to Initialize the data registers and avoid undefined out-
and outputs Ports Band C are CMOS compatible as Inputs puts, however, care must be exercised when usmg readl
Port A may be made CMOS compatible as outputs with a modlfy/wnte Instructions smce the data read corresponds to
mask option Figure 19 provides some examples of port con- the pin level If the DDR IS an Input (0) and corresponds to the
nections The address map In Figure 6 gives the address of latched output data when the DDR IS an output (1)
the data registers and DDRs The register configuration IS
shown m Table 2
Caution PHASE LOCK lOOP (PLL)
The corresponding DDRs for ports A, B, and Care wnte-
only registers (registers at $004, $005, and $006) A read The Pll section consists of a 14-bIt bmary vanable
operation on these registers IS undefined Smce BSET and divider, a fixed 10-stage divider, ~ digital phase and fre-
BClR are read/modlfy/wnte functions, they cannot be used quency comparator with a three-state output, and circUitry
to set or clear a DDR bit (all "unaffected" bits would be set) to aVOid "backlash" effects In phase lock conditions
It IS recommended that all DDR bits m a port be wntten uSing With a sUitable high-frequency prescaler and an active
a smgle-store Instruction mtegrator the user can easily establish a frequency syn-
The latched output data bit (see Figure 18) may always be theSizer system dnvmg a voltage controlled OSCillator, as
wntten Therefore, any wnte to a port wntes all of ItS data shown m Figure 20 The equations governmg the Pll are
bits even though the port DDR IS set to mput ThiS may be given In Figure 21
o II
121 1= Output, 0= Input Cleared to 0 by Reset
131 Port A Addr= $004
Port B Addr= $005
Port C Addr=$006
4-227
MC6805T2
-
PA5 25 PB6 18
PA4 24 II TTL Loadl PB5 17
-Ib
PA3 23 PB4 16
16mA 10mA
PA2 PB3 15 2N8386 ITYPlcal!
22
PAl 21 PB2 14
PAO PBl 13
20
PBO 12
-
Port A, Bit 7 Programmed as Output, OrlYlng
CMOS Loads and Bit 4 Orlvlng one TTL Load Port B, Bit 6 Programmed as Output, DrlYlng
Directly luslng CMOS output optlonl Darlington-Base Directly.
+V + V
PB7 19
PB6 18
•
PB5 17
PB4 16
- If If
PB3 15 lamA CMOS
lmaxl PC2 10 Inverters
PB2 14 MCI4049/MCI4069
PBl 13
PCl 9 (TYPical)
PBO 12 PCO 8
_10mAlmaxl
Port B, Bit a and Bit 1 Programmed as Output, Port C, Bits 0·3 Programmed as Output, DnY'
DrlYlng LEDs Directly Ing CMOS Loads, USing External Pullup
ReSistors
b. Input Modes
PA7 PB7
PA6 PB6
MC74LS04
. 25
24
PA5
PA4
MC74LS04
or
17
16
PB5
PB4
ITYPlcal! MCI4069
23 PA3 15 PB3
ITYPlcall
22 PA2 PB2
PAl PBI
PAO PBO
MCI4069
PCI
peo/riMER
4·228
MC6805T2
VARIABLE DIVIDER The use of the 14-blt latch synchronizes the data transfer
The variable divider IS a 14-blt binary down counter which between two asynchronous systems, namely, the CPU and
communicates with the CPU via two read/write registers the variable divider
located at address $OOA, for the LS byte, and $OOB, for the At power up reset both the variable divider and the con-
M S byte The upper two bits In register $OOB, always read tents of the PLL registers are set to logical "l's"
as logical "l's" When the variable divider count has reached The variable frequency Input pin, fin, IS self biased requir-
zero a preset pulse, fVAR, IS generated. This IS used to Ing an ac coupled signal with a normal sWing of a 5 V The
reload the variable divider with the contents of the 14-blt Input frequency range of fin allows the device, together with
latch as shown In Figure 22 a SUitable prescaler, to cover the enttre TV frequency spec-
Data transfers from registers $OOA and $OOB to the latch trum
occur outside the preset time and only dUring a write opera- REFERENCE DIVIDER
tion performed on register $OOA For example, a 6-blt data ThiS la-stage binary counter generates a reference fre-
transfer to register $OOB IS only transferred to the variable quency, fREF, which IS compared with the output of the
divider If followed by a write operation to register $OOA variable diVider The reference diVider IS mask program-
Figure 23 shows a tYPical error free manipulation of the mable, thus, allOWing the user a chOice of reference fre-
14-blt data In the fine tuning operations quency, see Figure 22.
fVCO
•
""COMP
Vancap
.-- ,-----------------
I I
I I
Band
Information
MC6805T2 I
___________ ...1
4-229
MC6805T2
Variable D,v,der
tCL
tREF = 4,12', 2',
'---y--J
lout of 10 Mask Option
4-230
MC6805T2
'VAR 'REF
II
",COMP 3-State
Output
o HIgh-Impedance
'VAR
'REF--+-........
1-
",COMPIST
0-
.. Phaselead
.. II
Phaselag
.. Stable State
4-231
MC6805T2
r-
ldeal
y /
/
/
/
-"""T'"------7'hoIF--f-----..--- WLLOtREF
-2..
•
FIGURE '0 - PHASE COMPARATOR WITH PULSE INJECTION
Ideal
y /
/
/
/
/
--.--------,jC---+~+---r_ ... WLLOtREF
-2..
/
/ No Backlash Zone
/
/
----./
4·232
MC6805T2
4MHz
MCl4497
Remote
Control
Transmitter
MCS805T2
000
CE
000
KEYBOARD
V'Vaneap
Band
or ~CMl44102-CMOS Memory
SMA 2901/MCM 2801 NMOS 18x16
Non-Volatile
II
BIT MANIPULATION
The MCU has the ability to set or clear any single random- have individual flags In RAM or to handle I/O bits as control
access memory or Input/ output bit (except the Data Direc- lines
tIOn Registers, see Caution under INPUT/OUTPUT The coding example In Figure 29 Illustrates the usefulness
paragraph), with a single instruction (BSET, BCLR) Any bit of the bit manipulation and test instructions Assume that
In page zero including ROM, except the DDRs, can be the MCU IS to communicate With an external senal device
tested, uSing the BRSEl and BRCLR instructions, and the The external device has a data ready signal, a data output
program branches as a result of ItS state The Carry bit line, and a clock line to clock data one bit at a time, LSB first,
equals the value of the bit referenced by BRSEl and BRCLR out of the device The MCU walts until the data IS ready,
A Rotate instruction may then be used to accumulate senal clocks the external device, picks up the data In the Carry Flag
Input data In a RAM location or register The capability to (C-blll, clears the clock line and finally accumulates the data
work with any bit In RAM, ROM, or I/O allows the user to bits In a RAM location
4-233
MC6805T2
•
fective use of both memory and time of the byte to be tested IS In the single byte Immediately
follOWing the opcode byte The Signed relative 8-blt offset In
EXTENDED - In the extended addreSSing mode, the ef- the third byte IS added to the value of the PC If the branch
fective address of the argument IS contained In the two bytes condition is true. ThiS single 3-byte instruction allows the
follOWing the opcode Instructions uSing extended address- program to branch based on the condition of any readable
Ing are capable of referenCing arguments anywhere In bit In the first 256 locations of memory The span of branch-
memory with a single 3-byte Instruction When uSing the Ing IS from + 130 to -125 from the opcode address The
Motorola assembler, the programmer need not specify state of the tested bit IS also transferred to the Carry bit of
whether an instruction uses direct or extended addreSSing the Condition Code Register See Caution under the IN-
The assembler automatically selects the shortest form of the PUT /OUTPUT paragraph
Instruction
INHERENT - In the Inherent addreSSing mode, all the in-
RELATIVE - The relative addreSSing mode IS only used In formation necessary to execute the instruction IS contained
branch Instructions In relative addreSSing, the contents of In the opcode Operations speCifYing only the Index register
the 8-blt signed byte follOWing the opcode Ithe offsetl IS add- or accumulator, as well as control instruction with no other
ed to the PC If and only If the branch condition IS true. Oth8f- arguments, are Included In thiS mode These instructions are
Wise, control proceeds to the next Instruction The span of one byte long
relative addreSSing IS from - 126 to + 129 from the opcode
address. The programmer need not worry about calculating INSTRUCTION SET
the correct offset when uSing the Motorola assembler, since The MCU has a set of 59 baSIC instructions, which when
It calculates the proper offset and checks to see If It IS within combined with the 10 addreSSing modes produce 207 usable
the span of the branch. opcodes. They can be diVided Into five different types
register/memory, read/modify/write, branch, bit manipula-
INDEXED, NO OFFSET - In the Indexed, no offset ad- tion, and control The follOWing paragraphs briefly explain
dressing mode, the effective address of the argument IS con- each type. All the instructions within a given type are
tained In the 8-blt Index register. Thus, thiS addreSSing mode presented In indiVidual tables
can access the first 256 memory locations. These instruc-
tions are only one byte long ThiS mode IS often used to REGISTER/MEMORY INSTRUCTIONS - Most of these
move a pOinter through a table or to hold the address of a instructions use two operands. One operand IS either the ac-
frequently referenced RAM or I/O location cumulator or the Index register The other operand IS obtain-
ed from memory uSing one of the addreSSing modes The
INDEXED, 8-BIT OFFSET - In the Indexed, 8-blt offset Jump uncondltlonallJMP) and Jump to subroutine IJSR) in-
addreSSing mode the effective address IS the sum of the con- structions have no register operand. Refer to Table 3.
tents of the unsigned 8-blt Index register IXI and the unsign-
ed byte follOWing the opcode. ThiS addreSSing mode IS READ/MODIFY/WRITE INSTRUCTIONS - These in-
useful In selecting the kth element In an n element table. structions read a memory location or a register, modify or
With this 2-byte instruction, k would tYPically be In X with test ItS contents, and write the modified value back to
the address of the beginning of the table In the Instruction. memory or to the register Isee Cautions under INPUT/OUT-
As such tables may begin anywhere within the first 256 ad- PUT paragraph). The test for negative or zero ITST) instruc-
dressable locations and could extend as far as location 511 tion IS Included In the read/modlfy/wnte instructions though
1$1FEI. It does not perform the write. Refer to Table 4.
2·234
TABLE 3 - REGISTER/MEMORY INSTRUCTIONS s:
~
Addressmg Modes
Indexed Indexed Indexed
Immediate Direct Extended (No Offset! (8 elt Offset) (16-8It Offset)
Addressing Modes
Indelled Indexed
Inherent (A) Inherent (Xl Direct (No Offsetl (8 Bit Offset)
Function
Op #
Mnemonic Code Bytes Cycles
• Op
• # Op
•
Code Bytes Cycles Code Bytes Cycles
• Op
•
Code Bytes Cycles
• Op #
Code Bytes Cycles
•
Increment 1NC 4C 1 4 5C 1 4 3C 2 6 7C 1 6 6C 2 7
Decrement DEC 4A 1 4 5A 1 4 3A 2 6 7A 1 6 6A 2 7
Clear CLA 4F 1 4 5F 1 4 3F 2 6 7F 1 6 6F 2 7
Complement COM 43 1 4 53 1 4 33 2 6 73 1 6 63 2 7 I
Negate I
(2'5 Complement) NEG 40 1 4 50 1 4 30 2 6 10 1 6 60 2 7
Rotate Left Thru Carry AOL 49 1 4 59 1 4 39 2 6 79 1 6 69 2 7
Rotate Right Thru Carry AOR 46 1 4 56 1 4 36 2 6 76 1 6 66 2 7
logical Shift Left LSL 48 1 4 58 1 4 3B 2 6 78 1 6 68 2 7
Logical ShIft RIght LSA 44 1 4 54 1 4 34 2 6 74 1 6 64 2 7
Anthmetlc Shift Right ASA 47 1 4 57 1 4 37 2 6 77 1 6 67 2 7
Test for NegatIve
or Zero TST 4D 1 4 5D 1 4 3D 2 6 7D 1 6 6D 2 7
II
MC6805T2
BRANCH INSTRUCTIONS - The branch instructions CONTROL INSTRUCTIONS - The control Instructions
cause a branch from the program when a certain condition is control the MCU operations dUring program execution
met. Refer to Table 5. Refer to Table 7.
BIT MANIPULATION INSTRUCTIONS - These instruc- ALPHABETICAL LISTING - The complete instruction set
tions are used on any bit In the first 256 bytes of the memory IS given In alphabetical order In Table 8
Isee Cautions under INPUT/OUTPUT paragraph). One
group either sets or clears. The other group performs the bit OPCODE MAP SUMMARY - Table 9 IS an opcode map
test branch operations Refer to Table 6. for the instructions used on the MCU.
4·236
MC6805T2
II
Branch IFF Interupt Mask
alt IS Clear BMC 2C 2 4
Branch IFF Interrupt Mask
Bit IS Set aMS 20 2 4
Branch IFF Interrupt Lme
IS Low BIL 2E 2 4
BranchlFFlnterrupt Line
IS High BIH 2F 2 4
Branch to Subroutine aSR AO 2 8
Addressing Modes
Bit Set/Clear ait Test and Branch
Op # # Op # #
Function Mnemonic Code Bytes Cycles Code Bytes Cycles
Branch IFF Bit n IS set BRSEl n (n = 0 71 - - - 20n 3 10
Branch IFF a,t n IS clear aRCLR n (n = 0 71 - - - 01 + 2 en 3 10
Set a,t n aSEl n (n - 0 71 10 + 20 n 2 7 - - -
Clear bit n BCLR n (n = 0 7) 11 + 2 on 2 7 - - -
Inherent
Op # #
Function Mnemonic Code Bytes Cycles
Transfer A to X TAX 97 1 2
Transfer X to A TXA 9F 1 2
Set Carry a,t SEC 99 1 2
Clear Carry Bit CLC 98 1 2
Set Interrupt Mask a,t SEI 9B 1 2
Clear Interrupt Mask Bit CLI 9A 1 2
Software Interrupt SWI 83 1 11
Return from Subroutine RTS 81 1 6
Return from Interrupt RTI 80 1 9
Reset Stack Pomter RSP 9C 1 2
No-Operation NOP 90 1 2
4-237
MC6805T2
"•""
ADC X X X X X X
ADD X X X X X X
"•""
"
AND X X X X X X
•• •"
ASl X X X X
• • "" "" "
ASR X X X X
••
BeC X
• • •" •" •"
BelR X
•••• •
BeS X
•••• •
BEQ X
•••• •
BHCC X
•••• •
BHCS X
•••• •
BHI X
•••• •
BHS X
•••• •
BIH X
•••• •
Bil X
•••• •
X X
••"" •
I
BIT X X X X
BlO X
•••• •
BlS X
•••• •
BMC X
•••• •
BMI
•••• •
BMS
•••• •
BNE
•••• •
BPl
•••• •
BRA
•••• •
BRN
•••• •
BRClR X
•••• "
BRSET X
••••
BSEl X
•••• •"
BSR X
•••• •
ClL X
•••• a
CLI X
• ••a
•
ClR X X X X
•• a 1
•
CMP X X X X X X
••
COM X X X X
• • "" "" 1"
CPX X X X X X X
• .'" "
DEC X X X X
••"" •"
EaR X X X X X X
•• •
INC X X X X
• • "" "" •
JMP X X X X X
•••• •
JSR X X X X X
•••• •
X X X X X
•• •
• • "" ""
LOA X
lOX X X X X X X
•
X X X X
••
• • " ""
lSl
LSR X X X X
"
X X
••""
a
"
NEG
Nap X
X X
•••• "•
ORA X X X X X X
••"" •
X x
••
• • •" •" •"
ROl X X
RSP X
Condition Code Symbols
H Half Carry IFrom Bit 31 C Carry/Borrow
I Interrupt Mask 1\ Test and Set If True, Cleared Otherwise
N Negative ISlgn Bltl • Not Affected
Z Zero
4·238
MC6805T2
•••• •
.,
TXA X
4-239
TABLE 9 - M6805 FAMILY INSTRUCTION OPCODE MAP
• ~
("')
Bit Manipulation
T
Branch
RL R AI
Read/Modify/Write
INH(X Xl IX INH
Control
I IMM DIR
Register I Memory
EXT 1X2 11 IX
~jj
6
~ ~, 8 9 A 8 0 E F
.i" o,~ o,~, C
Low ,J" oo'io 0110 0111 '000 '00' 1010 1011 1100 1101 1110 1111 ~w
'0 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 9 9 2 2 4 3 5 4
SUB' , SUB
DIR 13 SU~XT
BRSE:~B BRA NEGA NEGX RTI SUB '
rk 10 5
2
7
BSETO
B e
5
2
4
RE
3
2
NEG
DIR 1 INH I INH
2 NEG
IXI 1
NEG
IX 1
6
INH
6 2
SUB
IMM
2 4
SUB
3 5 4
3
6
IX2
5 5
IXl
4
1
4
IX
3
40.
1 BRClRO BClRO BRN RTS CMP CMP CMP CMP CMP CMP 1
0001 3 BTB Bse 2 RE 1 INH 2 IMM 2 OIR 3 EXT 3 IX2 2 IXI I IX 0001
10 5 7 5 4 3 2 2 4 3 5 4 6 5 5 4 4 3
2 BRSETl 2 BSETlc ,? BHIRFI SBC SBC SBC SBC SBC SBC 2
0010 3 BTB 2 IMM 2 DIR 3 EXT 3 IX2 2 IXI 1 IX 0010
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 11 10 2 2 4 3 5 4 6 5 5 4 4 3
2 BCl~le 12
3 BRClRl BlSREl COM COMA COMX 2 COM COM SWI CPX CPX CPX CPX CPX CPX 3
0011 3 BTB DIR 1 INH 1 INH lXl I IX 1 INH 2 IMM 2 D1R 3 EXT 3 IX2 2 IXl 1 IX 0011
3 3 4 3 5 2 2 4 3 5 4 3
'~RSET25
7 5 4 6 5 4 7 6 6 4 6 5 5 4
4 BSET2 BCC lSR LSRA lSRX 2 lSR lSR AND MJO AND AND AND AND 4
0100 3 BTB B e 2 REl 2 DiR 1 INH 1 INH IXl I IX 2 IMM 2 DIR 3 EXT 3 IX2 2 IXl 1 IX 0100
10 5 7 5 4 3 2 2 4 3 5 4 6 5 5 4 4 3
5 BRClR2 BClR2 BCS BIT BIT BIT BIT BIT BIT 5
0101 3 BTB 2 B e 2 REL IMM 2 DIR 3 EXT IX2 2 IXl 1 IX 0101
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 4 3 5 4 6 5 5 4 4 3
0110
6 BRSEJiB 2 BSE~~c 2
BNE
REl 2
ROR
DIR I
RORA
lNH 1
RORX
INH 2
ROR
IXI 1
ROR
IX 2
LDA
IMM 2
LOA
DIR 3
lOA
EXT 3
LOA
IX2 2
LOA
IXl I
LOA
IX
",-
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 5 4 6 5 7 6 6 5 5 4
2 BCl~~e
7 BRClR3 12 BEGREl ASR ASRA ASRX ASR ASR TAX STA STA STA STA STA 7
0111 3 BTB 2 DIR I INH 1 INH 2 IXl 1 IX 1 INH 2 DIR 3 EXT 3 IX2 2 'Xl 1 IX 0111
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 2 2 4 3 5 4 6 5 5 4 4 3
1£. 3BRSE
10
:ie 5 7
BSET1c.
5
12. BHC:ful
4 3 6
LSl
DIR
5
1
4
lSLA
INH
3
1
4
lSlX
INH
3 7
LSL
IXl
6
1
6
LSl
IX
5 2
ClC
INH
2 2
EOR
IMM 2
2 4
EOR
OIR
3
3
5
EOR
EXT
4
3
6
EOR
1X2
5
2
5
EOR
IXl
4
1
4
EOR
IX
3
8
1000
~ 1001
9 3BRCl~~ 2
BClR4
BS
,? BHCS
REl 2
ROl
DIR 1
ROlA
INH 1
ROlX
lNH 2
ROl
IXI 1
ROl
IX 1
SEC
INH 2
ADC
IMM 2
ADC
DIR 3
ADC
EXT 3
ADC
IX2 2
ADC
IXI 1
ADC
IX
9
1(1()1
r\) 10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 2 2 4 4 6 5 5 4 4
ORA 4
~ 110
A BRSEJ-PB BSE~~e I, BPL
REl 2
DEC
DIR 1
DECA
INH 1
DECX
INH 2
DEC
IXl 1
DEC
IX 1
CLI
INH 2
ORA
IMM 2 DIR 3
ORA
EXT 3
ORA
IX2 2
ORA
IXI 1
ORA
IX
A
1010
o B
10
BRClR5
5 7
BClR5
5 4
BMI
3 2
SEI
2 2
ADD
4
ADD
3 5
ADD
4 6
ADD
5 5
ADD
4 4
ADD B
1011 3 8TB 2 Bse 2 REl I INH 2 IMM 2 DIR 3 EXT 3 IX2 2 IXl 1 IX 1011
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 3 2 4 3 5 4 4 3 3 2
C BRSET6
BTB 2 BSE~~e BMC
2
INC
DIR
INCA
INH
INCX
INH 2
INC
IXl
INC
IX 1
RSP
INH 2
JMP
DIR
JMP
EXT
JMP
IX2 2
JMP
IXl
JMP
IX
C
"""0 10
3BRCl:~B
5 7 5
2
4
2 BClR~e ,2 BMSRE
REL
3 6
TST
4
1
4
TSTA
3
1
4
TSTX
3 7
TST
5
1
6
TST
4 2
NOP
2 8
BSR
6 7
JSR
5
3
I' JSR
6
3
9
JSR
7 8
JSR
6
1
JSR
5
1100
D
1101 iR 1 INH 1 INH 2 IXl 1 IX 1 INH 2 REL 2 DIR 3 EXT 3 IX2 2 IXl I IX 1101 .
10 5 7 5 4 3 2 2 2 4 4 6 5 5 4 4 3
lDX 3
11~
BRSET7 BSET7 Bil STOP lOX LDX lOX lDX LDX E
BTB 2 BS 2 REL 1 INH 2 IMM 2 DIR 3 EX, 3 IX2 2 IXl 1 IX 111L: i
10 5 7 5 4 3 6 5 4 3 4 3 7 6 6 5 2 2 2 5 4 6 5 7 6 6 5 5 4
F BRClR7 BClR7 BIH ClR ClRA ClRX ClR (lR WAIT TXA STX STX STX STX STX F
1111 3 BTB 2 sse 2 REl 2 DIR 1 INH 1 INH 2 IXl 1 IX 1 INH 1 INH 2 DIR 3 EXT 3 IX2 2 IXI 1 IX 1111 I
AbbnIviations for Add .... Modes LEGEND
INH Inherent
r--F--:;;:::+---------::7'
F ... Opcode Hexadecimal
j
IMM Immediate In
DIR Direct
EXT Extended # of Cycles (HMOS Versions) 4 ... ~ ~
REL Relallve MnemOniC .. SUB 0 Opcode In Binary
BSC Bit Setl Clear Bytes 1 IX <XXX>
BTB Bit Test and Branch 7
IX Indexed (No Offset) # of Cycles (CMOS VerSionsl / " Address Mode
IXI Indexed, 1 Byte (8-BIIl Offset
IX2 Indexed,2 Byte (I6-Blt) Offset
CMOS Versions Only
MC6805T2
FLEXIBLE DISKS
The disk media submitted must be Single-sided, Single-
denSity, 8-Inch, MOOS-compatible flOPPies The customer
•
must wnte the binary file name and company name on the
disk With a felt-tip pen The minimum MOOS system files as
000 400 well as the absolute binary oblect file Ifllename, .LO type of
file) from the M6805 cross assembler must be on the disk An
xxx = Customer 10 object file made from a memory dump using the ROLLOUT
command IS also acceptable Consider submitting a source
After the EPROM Is) are marked they should be placed In
listing as well as the follOWing files. filename, . LXI EXOR-
conductive IC carners and securely packed Do not use
ciser- loadable format) and filename, .SA IASCII Source
styrofoam
Code). These files will of course be kept confidential and are
used 1) to speed up the process In-house If any problems
VERIFICATION MEDIA anse, and 2) to speed up the user-te-factory Interface If the
All onglnal pattern media IEPROMs or Floppy Disk) are user finds any software errors and needs assistance qUickly
filed for contractual purposes and are not returned. A com- from Motorola factory representatives
puter listing of the ROM code will be generated and returned MOOS IS Motorola's Disk Operating' System available on
along With a listing venf,cat,on form The listing should be development systems such as EXORCiser, EXORsets, etc.
4-241
MC6805T2
Phone _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Extenslon _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
OPTION LIST
Select the options for your MCU from the followmg list. A
manufacturing mask will be generated from this information.
II
Timer Clock Source
o Internal ",2 clock
o TIMER Input pin
Timer Prescaler
o 2" (divide by 1) o 24 (divide by 16)
o 2' (divide by 2) o 2' (divide by 32)
o 2' (divide by 4) o 2' (divide by 64)
o 2' (divide by 8) o 2' (divide by 128)
Internal Oscillator Input Low Voltage Inhibit Port A Output Drive
o Crystal oDisable o CMOS and TTL
o Resistor o Enable o TTL Only
Clock Freq. _ _ _ _ _ _ _ _ _ _ _ __
Title _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Signature _ _ _ _ _ _ _ _ _ _ _ _ _ _ ~ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
4·242
® MOTOROLA MC680SU2
Advance InforIllation
HMOS
8-BIT MICROCOMPUTER UNIT WITH AID IHIGH DENSITY
N-CHANNEL, SILICON-GATE
The MC6805R2 Microcomputer Unit IMCU) IS a member of the M6805
DEPLETION LOAD)
Family of low-cost single-chip Microcomputers The 8-blt microcomputer
contains a CPU, on-chip CLOCK, ROM, RAM, 1/0, 4-channeI8-bit AID,
and TIMER It IS designed for the user who needs an economical 8-BIT
microcomputer with the proven capabilities of the M6800-based Instruction MICROCOMPUTER
set A comparison of the key features of several members of the M6805
Family of microcomputers IS shown on the last page of this data sheet The
following are some of the hardware and software highlights of the
MC6805R2 MCU
HARDWARE FEATURES:
• 8-Blt Architecture
• 64 Bytes of RAM
• Memory Mapped 1/0 CASE 715
~PSUFFIX
• 2048 Bytes of User ROM
• 24 TTL! CMOS Compatible Bidirectional 1/0 Lines 18 lines are LED
•
Compatlblel
• 2 to 5 Digital Input Lines ~-{" - ;,' PLASTIC PACKAGE
• AI D Converter CASE 711
~SSUFFIX
8- Bit ConverSion, Monotonic
1 to 4 Multiplexed Analog Inputs
± 1/2 LSB Quantizing Error
± 1/2 LSB All Other Errors ~lllllill ' 'CERDIP PACKAGE
± 1 LSB Total Error Imax)
CASE 734
Ratlometrlc Conversion
• Zero-Crossing Detection
• On-Chip Clock Generator
FIGURE 1 - PIN ASSIGNMENTS
• Self-Check Mode
• Master Reset
• Complete Development System Support On EXORciser'" Vss PA7
• 5 V Single Supply REID PA6
4-243
MC6805U2
Timer
,--__ t
PAO
PAl Accumulator
Port PA2 Data a A
CPU iN'f2
A PA3 D" Inde, Control
110 PA4 Reg Register PD~
Lines PA5 a x PDl
PA6
Condition PD2
PA7 Port D
Code PD3
Register Input
CC
CPU PD4 Lines
Stack PD5 _
POinter PD6i1NT2
PBO 5 SP PD7
PBl Program
Port PB2 Port Data Counter
•
B PB3 B D" 4 High PCH
I/O PB4 ALU
Reg Reg
Lines PB5 Program
PB6 Counter
PB7 8 Low PCO
PCl
PC2 Port
Data POlt
PC3 C
D" C 1,0
Reg Reg PC4
PC5 lines
PC6
PC7
MAXIMUM RATINGS
ThiS deVice contains CircUItry to protect the
Rating Symbol Value Unit
mputs against damage due to high static
Supply Voltage VCC -03to +70 V voltages or electnc fields, however, It IS ad-
Input Voltage (Except Pin 61 V in -03to +70 V ViSed that normal precautions be taken to
THERMAL CHARACTERISTICS
Characteristic Symbol Value Unit
Thermal Resistance
PlastiC 100
Ceramic 9JA 50 °C/W
Cerdlp 60
4-244
MC6805U2
POWER CONSIDERATIONS
ELECTRICAL CHARACTERISTICS IV CC =
V,H
Min
40
VCC-O 5
40
VCC-O 5
20
Typ
-
-
*
*-
Max
VCC
VCC
VCC
VCC
Unit
V
•
VCC
Input High Voltage Timer
Timer Mode VIH 20 - VCC V
Self-Check Mode - 90 150
Input Low Voltage
RESET -03 - 08
INT
All Other
VIL -03
-03
'"
-
15
08
V
'" Due to Internal biaSing. thiS Input Iwhen unusedl floats to approximately 20 V
4·245
MC6805U2
PORT ELECTRICAL CHARACTERISTICS IVCC= + 525 Vdc ±O 5 Vdc, VSS = GND, TA = 0' to 70'C Unless Otherwise Notedl
Characteristic I Symbol. L Min J Typ I Max I Unit
Pon A with CMOS drive enabled
Output Low Voltage ILoad= 16 mA VOL - - 04 V
Output High Voltage ILoad= -100 ~A VOH 24 - - V
Output High Voltage ILoad - -10 ~A VOH 35 - - V
Input High Voltage ILoad= -300 ~A Imaxl VIH 20 - VCC V
•
Input Low Voltage ILoad- -500 ~A Imaxl VI -03 - 08 V
H,-Z State Input Current IV In =2 0 V to VCCI IIH - - -300 ~A
HI-Z State Input Current IV,n = 04 VI IlL - - -500 ~A
Pon B
Output Low Voltage ILoad = 32 mA VOL - - 04 V
Output Low Voltage ILoad= 10 mA ISlnk) VOL - - 10 V
Output High Voltage ILoad= -200 ~A VOH 24 - - V
Darlington Current Dnve ISourcel VO-1 5 V IOH -10 - -10 mA
Input High Voltage VIH 20 - Vrr V
Input Low Voltage VIL -03 - 08 V
H,-Z State Input Current ITSI - 2 20 ~A
Pon C and Pon A with CMOS drive disabled
Output Low Voltage ILoad= 16 mA VOL - - 04 V
Output High Voltage ILoad = -100 ~A VOH 24 - - V
Input High Voltage VIH 20 - VCC V
Input Low Voltage VIL -03 - 08 V
HI-Z State Input Current ITSI - 2 20 ~A
Pon D (Inputs)
Input High Voltage I VIH I 20 I - VCC I V
Input Low Voltage I VI I -03 I - I 08 I V
Input Current I lin I - I - I 20 I ~A
FIGURE 3 - TTL EQUIVALENT TEST LOAD FIGURE 4 - CMOS EQUIVALENT TEST LOAD FIGURE 5 - TTL EQUIVALENT TEST LOAD
IPORT BI IPORT AI IPORTS A AND C)
VCC=575V VCC=5.75 V
MMD6150 Test MMD6150
V
t
Test
POint or Equlv POint or Equlv ...-:
1 5 k!l 2.97 kO
Test Paint ~
40 pF
11 olall
12 kO MMD7000
or Equlv
130 pF ITotall 30 pF
ITotall
~ 24 kO MMD7000
or Equlv.
4·246
MC6805U2
•
additional information about the timer circuitry. The MCU reserves the first 16 memory locations for 1/0
features, of which 10 have been Implemented These loca-
RESET - ThiS pin allows resetllng of the M CU at times
tions are used for the ports, the port DDRs, the timer, and
other than the automatic resetting capability already In the
the INT2 miscellaneous register Of the 64 RAM bytes, 31
MCU. The MCU can be reset by pul"ng RESET low Refer to
bytes are shared With the stack area The stack must be used
RESETS for additional Informallon
With care when data shares the stack area
NUM (Non-User Mode) - ThiS pin IS not for user applica- The shared stack area IS used during the processing of
tion and must be connected to VSS Interrupt and subroutine calls to save the processor state
7 o 76543210
000 SOOO
110 Ports 0 Port A Data sOOO
Timer
Page Zero 1 Port B Data SOOI
RAM
Access With 1128 Bytes) 2 Port C Data S002
Short 127 S07F
Instructions
128 ~080 3 Port 0 Data S003
Page-Zero
I~F
User ROM 4 Port A DDR*' SOO4*
1128 Bytesl
255 5 Port B DDR*' s005*
256 $100 Port C DDR* $006*
6
Not Used
11728 Bytesl 7 Not Used s007
8 Timer Data Reg s008
1983 S7BF
1984 S7CO
9 Timer Control Reg SOO9
Mam User
ROM 10 M,sc Reg SOOA
11912 Bytes)
3895 SF37 11 SOOB
3896 SF38 Not Used
Self-Check (53 Bytes)
ROM 63 $03F
1192 Bytes) 64 $040
4087 $FF7
4088 SFF8 RAM
Interrupt
(64 Bytes)
Vectors
ROM Stack
(8 Bytes) (31 Bytes
4095 $FFF
MaXimum)
127 t S07F
*CaullOn Data Dlfecllon Registers (DDRs) are wnte-only, they read as $FF
4-247
MC6805U2
The register contents are pushed onto the stack In the order ACCUMULATOR (AI - The Accumulator IS a general
shown In Figure 7 Since the Stack POinter decrements dur- purpose 8-blt reglstAr used to hold operands and results of
Ing pushes, the low order byte (PCL) of the Program Counter arithmetiC calculations or data manipulations.
IS stacked first, then the high order four bits (PCHI are stack-
ed This ensures that the program counter IS loaded correctly
INDEX REGISTER (XI - The Index Register IS an 8-bIt
dUring pulls from the stack Since the stack pOinter in-
register used for the Indexed addreSSing mode It contains an
crements when It pulls data from the stack A subroutine call
8-blt value that may be added to an Instruction value to
results In only the Program Counter (PCl, PCHI contents be-
create an effective address The Index register can also be
Ing pushed onto the stack, the remaining CPU registers are
used for data manipulations uSing the read/modify/write in-
not pushed
structIOns The Index Register may also be used as a tem-
porary storage area
FIGURE 7 INTERRUPT STACKING ORDER
a PROGRAM COUNTER (PCI - The Program Counter IS a
n-4
7 6
t t t
5
I4 3
Condition
Code Register
2 1
n+1
Pull
12-blt register that contains the address of the next instruc-
tion to be executed
n- 3 Accumulator n+2
STACK POINTER (SPI - The Stack POinter IS a 12-blt
n- 2 Index Register n+3 register that contains the address of the next free location on
the stack DUring an MCU reset, or the Reset Stack POinter
•
n- t 1 1 t 1 PCH* n+4 The Stack POinter IS then decremented as data IS pushed on-
to the stack and Incremented as data IS then pulled from the
n PCl* n+5
stack The seven most-Significant bits of the Stack POinter
PUSh are permanently set to 0000011 Subroutines and Interrupts
*For subroutine calls, only PCH and pel are stacked
may be nested down to location $061 (31 bytes maxlmuml
which allows the programmer to use up to 15 levels of
CENTRAL PROCESSING UNIT subroutine calls (less If Interrupts are allowed I
The CPU of the M6805 Family IS Implemented In-
dependently from the I/O or memory configuration Conse-
quently, It can be treated as an Independent central pro- CONDITION CODE REGISTERS (CCI - The Condition
cessor communicating With I/O and memory via Internal ad- Code Register IS a 5-blt register In which four bits are used to
dress, data, and control buses indicate the results of the instruction Just executed These
bits can be indiVidually tested by a program and speCifiC ac-
REGISTERS tion taken as a result of the" state Each bit IS explained In
The M6805 Family CPU has five registers available to the the follOWing paragraphs
programmer They are shown In Figure 8 and are explained In
the follOWing paragraphs.
Half Carry (HI - Set dUring ADD and ADC operations to
FIGURE 8 - PROGRAMMING MODEL indicate that a carry occurred between bits 3 and 4
a
' -_ _ _ _ _ _A_ _ _ _ -'I Accumulator Interrupt (I) - When thiS bit IS set. the timer and external
Interrupts (lNT and INT21 are masked (dlsabledl If an Inter-
a rupt occurs while thiS bit IS set, the Interrupt IS latched and IS
x I Index Register processed as soon as the Interrupt bit IS cleared
11 a
I PCH PCl I Program Counter
Negative (NI - When set, thiS Olt Indicates that the result
11 54 a of the last arithmetiC, logical, or data manipulation was
10101010101 I SP I Stack POinter negative (bit 7 In the result IS a logical onel
Condition Code
Zero (ZI - When set, thiS bit indicates that the result of
Register
the last arithmetiC, logical, or data manipulation was zero
Carry I Borrow
4-248
MC6805U2
•
pin, or It can be the tnternal ",2 signal When the ",2 signal IS Iblt 7) IS cleared and the timer Interrupt mask bit Iblt611S set
Timer
Interrupt Not
TIMER Mask
Input
Pin
r------,
I I
IL______ I!
Manufacturing
Mask Options
Write Read Wnte Read
SELF-CHECK clear If any error IS detected, otherWise the l-blt IS set The
The self-check capability of the MC6805U2 MCU proVides walktng diagnostic pattern method IS used
an tnternal check to determtne If the part If functional Con- The RAM test must be called With the stack pOinter at
nect the MCU as shown In Figure 10 and monttor the output $07F When run, the test checks every RAM cell except for
of Port C bit 3 for an OSCillation of approximately 7 Hz A 9 $07F and $07E which are assumed to contain the return
volt level on the TIMER tnput, ptn 8, energIZes the ROM- address
based self-check feature. The self-check program exercises The A and X registers and all RAM locations except the
the RAM, ROM, timer, interrupts, and 110 ports top two are modified
Two of the self-check subroutines (the RAM and ROM ROM CHECKSUM SUBROUTINE - The ROM self-check
tests) can be called by a user program With a JSR or BSR In- IS called at location $F8A and returns With the l-blt cleared If
struction. The timer routine may also be called If the timer In- any error was found, otherwise l= 1 X= 0 on return, and A
put IS the Internal ",2 clock. IS zero If the test passed RAM locations $040-$043 are over-
RAM SELF-CHECK SUBROUTINE - The RAM self- wrttten. The checksum IS the compliment of the exclUSive
check IS called at location $F6F and returns with the l-blt OR of the contents of the user ROM
4·249
MC6805U2
RESET r-:l.
-
.1
r
1 40
VSS PA7
10-"- 39
MC6805U2 PA6
I'F'T"
2 RESET
PA5 ~
3 INT
4 VCC
PA4 PL
•
525 -L 1O I'F PA3 36
5
:r: ..L '5 .4:,
EXTAL
PA2 35
- If::;
- 4~ XTAL
MHz
PAl 34
33
7 NUM PAO
10 k
8 TIMER
+ 9V LED :tJ. 510
9 PCO PB7
32
LEDl!. 5~ll" " 10 PCl PB6 31
510
"1ED.l!." 11 PC2 PB5 ~
LEDL!. • ~10;""
...-. -"""
12 PC3 PB4 ~
c.l,;l PC4 PB3 28
'----.l.1 PC5 PB2 27
15 PC6 PBl ~ f--
16 PC7 PBO
F
,----l1 PD7
.1§ PD6111NT21 POO
24
19 PD5 23
T
POl
01 22
PD2
20 PD4 PD3 21
.J-
• ThiS connection depends on clock oscillator user selectable mask. option Use Jumper If the RC mask option IS selected
LED Meamnas
CO Cl C2 C3 Ramarl<s [1:LED ON; O:LED OFF[
1 0 1 0 Sad 110
0 0 1 0 Bad Timer
1 1 0 0 Sad RAM
0 1 0 0 Sad ROM
1 0 0 0 Sad AID
0 0 0 0 Bad Interrupts or Request Flag
All Flashlnn Good Part
Anything else bad Part, Sad Port 3, Sad ISP, etc
4-250
MC6805U2
5V
VCC
OV-------J
RESET
FIGURE tl - POWER AND RESET TIMING
•
Pin
---------------¥
Internal
Reset _ _ _ _ _ _ _ _ _ _ _....J
Out
Of I
Reset
VCC _-"-V\.I\r_+=2=a_~
:::r: 1.0 ~F
Part Of
MC6805U2
MCU
In
Reset
oav 2V 4V
4-251
MC6805U2
5 XTAL XTAL
+5V
5 XTAL XTAL
R MC6805U2
External MC6805U2
4 ISee Figure 161 4 EXTAL MCU
Clock EXTAL MCU
(Resistor Mask
Input I Crystal Mask No
Option I
Optlonl Connection
II External Clock
a
Approximately 10% Accuracy
External Resistor
(Excludes Resistor Tolerance)
NOTE The recommended CL value with a 4 MHz crystal IS 27 pf, maXImum, including system distributed capacitance There IS an rnternal
capacitance of approXimately 25 pf on the XTAL Pin For crystal frequencies other than 4 MHz, the total capacitance on each, prn
should be scalled as the Inverse of the frequency ratto For example, with a 2 MHz crystal, use approXimately 50 pF on EXTAL and
approXimately 25 pF on XTAL The exact value depends on the Motional-Arm parameters of the crystal used
EqUIVEa:~~:~~ XTAL
5 ~E---J 6
4-252
MC6805U2
\ VCC=5 V
I 1 mternal timer mterrupt request, the external port D bit 6
(lNT2) Input pin, and a software Interrupt Instruction (SWIl.
40 f-- When any mterrupt occurs, processmg IS suspended, the
TA=25'C
N
present CPU state IS pushed onto the stack, the mterrupt bit
'"
J:
::; (I-bit) m the Condition Code Register IS set, the address of
;: 30 the mterrupt routme IS obtained from the appropriate Inter-
u "-
z
UJ
is 20
I'-..r--, rupt vector address, and the Interrupt routine IS executed
Stacking the CPU registers, settmg the I-bit and vector
.......... fetchmg reqUIres a total of 11 tcyc periods for completion
...
UJ
a:
.........
.........
10
..... Refer to Figure 17 for a flowchart The Interrupt service
routmes must end With a Return from Interrupt (RTIl mstruc-
tIon which allows the MCU to resume processmg of the pro-
10 15 20 25 30 35 40 45 50 55 60 gram prior to the mterrupt Table 1 provides a listmg of the
mterrupts,thelr PriOrity, and the address of the vector which
RESISTANCE Ik OHMS)
•
Slack
CLR INT LogiC PC, X, A, CC
FF- Timer
7 F-Prescaler
7F- TCR
7F-MR
Tont'r
Pul on FFE
Address Bus
Timer
or iiii'l1 FF8/FF9
Felch
Instruction
PC_PC+ll-...:S",W.:.;I.-J
Load PC
from
FFE/FFF
Execute
Instruction
4-253
MC6805U2
contains the starting address of the appropriate Interrupt ser- quest bit (bit 71 and a mask bit (bit 61 located In the
vice routine The Interrupt PriOrity applies to those pending Miscellaneous Register (MRI, refer to Figure 18 The INT2
when the CPU IS ready to 'accept an Interrupt or a new inter- Interrupt IS inhibited when the mask bit IS set The I'/iITI IS
rupt RESET IS listed In Table 1 because It IS processed always readable as a digital Input of Port D The INT2 and
slmlliar to an Interrupt However, It IS not normally used as timer Interrupt request bitS, It set, causes the M CU to pro-
an Interrupt When the Interrupt mask bit In the Condition cess an Interrupt when the condition code I-bit IS clear
Code Register IS set the Interrupt IS latched for later Interrupt
execution
6 5 4 3
1 I I I
1 1 1 1 I I SOOA
4·254
MC6805U2
A sinusoidal Input signal IflNT maXimum) can be used to tlonallnput pin All pins on ports A. B, and C are program-
operate an external Interrupt liNT), as shown In Figure 19, mable as either Inputs or outputs under software control of
for use as a Zero-Crossing Detector with hysteresIs Included the corresponding Data Direction Registers IDDRsl The
An Interrupt request IS gAnerated for each negative-slope, port 1/0 programming IS accomplished by setting the cor-
zero crossing of the AC signal For digital applications, the responding bit In the port DDR to a logiC "1" for output or a
TNT can be driven directly by a digital signal at a maXimum lOgiC "0" for Input On reset all the DDRs are Initialized to a
period of trWL This allows applications such as servIcing logiC "0" state, plaCing the ports In the Input mode The port
tlme-of-day routines and engaging! disengaging AC power output registers are not Initialized on reset and should be
control deVices Off-chip full wave rectificatIOn provides an Initialized by software before changing the DDRs from Input
Interrupt at every zero crossing of the AC signal and thereby to output When programmed as outputs, all 1/0 pinS read
provide a 2f clock latched output data, regardless of the logiC levels at the out-
A software Interrupt ISWI) IS an executable Instruction put Pin due to output loading, refer to Figure 20
which ,s executed regardless of the state of the I-bit In the All Inputloutput lines are TTL compatible as both Inputs
ConditIOn Code Register SWI s are usually used as break- and outputs Port A lines are CMOS compatible as outputs
pOints for debugging or as system calls uSing a mask option Port B, C, and D lines are CMOS com-
patible as Inputs Port D lines are Input only, thus, there IS no
INPUTIOUTPUT corresponding DDR When programmed as outputs, Port B
There are 32 Input or Input/output pinS The INT pin may IS capable of Sinking 10 milliamperes and SOurcing 1 0
also be polled with branch instructIOns to provide an add 1- milliampere on each pin
AC
AC
Inpui
(tiNT Max)
R", 1 Mn
Inpur", 10 Vpp
a -
Limiting)
Zero Crossing Interrupt
iCurreflt
--'\III'v~-r;"'----'--l
~ 011'F
MC6805U2
MCU
TTL
b -
Level
Digital Signal Interrupt
47 K
Dlglral---4"'~
Input
ItlWL MaXimum
VCC
iN'f
MC6805U2
MCU
•
Period)
Dara
DireCtion Register
Bll*
Latched
Output
Data
Sir
Data
Direction Output Input
Register Data Output To * DOR a write-only register and reads as all "s
IS
Brt Brt State MCU ** Ports A (With CMOS drive disabled), 8, and C are three-state
1 0 0 o ports Port A has optional Internal pull up deVices 10 proVide CMOS
1 1 dllve capability See Electncal CharacterIstIcs tables for complete
o X 3-5ta1.** informatIon
4-255
MC6805U2
Figure 21 provides some examples of port connections. bits would be setl. It IS recommended that all
The Address Map In Figure 6 gives the addresses of data DDR bits In a port be written usong a single-store
registers and DDRs. The Register Configuration IS provided instruction.
in Figure 18 The latched output data bit (see Figure 181 may always be
wrotten Therefore, any wrote to a port wrotes all of ItS data
CAUTION bits even though the port DDR IS set to Input ThiS may be
The corresponding DDRs for Ports A, B, and C used to initialize the data registers and aVOid undefined out-
are wrote-only registers (iocatlons $004, $005, and puts However, care must be exercised when uSing
$0061. A read operation on these registers is read/modify/wrote Instructions sonce the data read cor-
undefined. Since BSET and BClR are responds to the pon level If the DDR IS an onput (01 and cor-
read/modify/wrote functions, they cannot be responds to the latched output data when the DDr IS an out-
used to set or clear a DDR bit (all "unaffected" put (1)
PA6 39 PB6 31
PA5
PM
38
37
- 11 TTL Loadl
PB5
PB4
30
29
_Ib
10 rnA
•
PA3 36 1 6mA PB3 28
'-"\A""+-'V\A~. 2N6386 !TYPIcal)
PA2 35 PB2 27
PAl 34 PBl 26
Port A. BIt 7 Programmed as Output, DriVIng
PAO 33 CMOS Loads and Bit 4 one TTL Load DIrectly PBO 25
(Using CMOS Output OptIon)
Port S, BII 5 Programmed as Output. Dnvlr'9
Darlington-Base Directly
PCl 16
PB7 32
+ V
PC6 15
PB6 31
PB5 30 PC5 14
PB4 29 PC4 13
PC3 12
PB3 28 CMOS Inverter
PC2 11 MC14049 14069
PB2 P ,TYPical)
PCl 10
PBl 28
PBO 25 PCO
Port B, BIt 0 and Bit 1 Programmed as Output, Dnv- Port C. Blis 0-3 Programmed as Output DriVing
Ing LEOs DIrectly CMOS Loads. Usmg External Puliup ReSistors
b. Input Modes
PA7
PBl
PA6
PB6
38 PA5
30 PB5
37 PA4
29 PB4
MC74LS04 nYPlcall • MCl4lS04 oc MC14069
36 PA3
(TYPIcal! 2B PB3
35 PA2
27 PB2
PB1
PBO
PC?
14 PC5
13 PC4
12 PC3
11 "C2
10 PC1
PCO
4-256
MC6805U2
BIT MANIPULATION
The MC6805U2 MCU has the ability to set or clear any control lines
single RAM or Input/output bit (except the Data Direction The coding example In Figure 22 illustrates the usefulness
Registers, see Caution under INPUT/OUTPUT paragraph! of the bit manipulation and test instructions Assume that
with a single instruction (BSET, BCLR! Any bit In page zero the MCU IS to communicate with an external serial device
including ROM, except the DDRs, can be tested uSing the The external device has a data ready signal, a data output
BRSET and BRCLR instructions and the program branches line, and a clock line to clock data one bit at a time, LBS first,
as a result of ItS state The carry bit (C! equals the value of out of the device The MCU walls until the data IS ready,
the bit referenced by BRSET and BRCLR The capability to clocks the external device, picks up the data In the Carry Flag
work with any bit In RAM, ROM, or I/O allows the user to IC-bltl, clears the clock line and finally accumulates the data
have individual flags In RAM or to handle single I/O bits as bits In a RAM location
FIGURE 22 - BIT MANIPULATION EXA MPLE
MCU
BRSET 2,PORTA~ WAIT FOR READY Ready I--
2P
Serial 0
* BSET 1, PORTA CLOCK NEXT BIT IN
DeVice Clock
1 R
BRClR 0, PORTA, NEXT PICKUP BIT IN C-BIT
NEXT BClR 1, PORTA RETURN CLOCK LINE HIGH T
ASR RAMlOC MOVE C-BIT INTO RAM Data
°A
~
ADDRESSING MODES
The MC6805U2 MCU has 10 addreSSing modes available
for use by the programmer They are explained briefly In the
follOWing paragraphs For additional details and graphical Il-
lustrations, refer to the M6805 Family User Manual
The term "effective address" (EA!ls used In describing the
addreSSing modes EA IS defined as the address from which
the argument for an instruction IS fetched or stored
IMMEDIATE - In the Immediate addreSSing mode, the
INDEXED, NO OFFSET - In the Indexed, no offset
addreSSing mode, the effective address of the argument IS
contained In the 8-blt Index register Thus, thiS addreSSing
mode can access the first 256 memory locations These in-
structions are only one byte long ThiS mode IS often used to
move a pOinter through a table or to hold the address of a
frequently referenced RAM or I/O location
INDEXED, 8-BIT OFFSET - In the Indexed, 8-blt offset
addreSSing mode, the effective address IS the sum of the
•
operand IS contained In the byte Immediately following the contents of the unsigned 8-blt Index register and the unsign-
opcode The Immediate addreSSing mode IS used to access ed byte follOWing the opcode ThiS addreSSing mode IS
constants which do not change dUring program execution useful In selecting the kth element In an n element table
Ie g , a constant used to initialIZe a loop counter! With thiS 2-byte InstructIOn, k would tYPically be In X With
DIRECT - In the direct addreSSing mode, the effective the address of the beginning of the table In the instruction
address of the argument IS contained In a single byte follow- As such tables may begin anywhere Within the first 256
Ing the opcode byte Direct addreSSing allows the user to addressable locations and could extend as far as location 511
directly address the lowest 256 bytes In memory with a single ($1 FE!
2-byte instructIOn ThiS address area Includes all on-chip INDEXED, 16-BIT OFFSET - In the Indexed, 16-blt offset
RAM and I/O registers and 128 bytes of ROM Direct addreSSing mode, the effective address IS the sum of the
addreSSing IS an effecllve use of both memory and time contents of the unsigned 8-blt Index register and the two un-
EXTENDED - In the extended addreSSing mode, the ef- signed bytes follOWing the opcode ThiS addreSSing mode
fective address of the argument IS contained In the two bytes can be used In a manner Similar to Indexed, 8-blt offset ex-
following the opcode Instructions with extended addreSSing cept that thiS 3-byte Instruction allows tables to be anywhere
mode are capable of referenCing arguments anywhere In In memory As With direct and extended, the Motorola
memory With a Single 3-byte InstructIOn When uSing the assembler determines the shortest form of Indexed address-
Motorola assembler, the user need not specify whether an Ing
Instruction uses direct or extended addreSSing The BIT SET/CLEAR - In the bit setlclear addreSSing mode,
assembler automatically selects the shortest form of the in- the bit to be set or cleared IS part of the opcode, and the byte
struction follOWing the opcode specifies the direct address of the byte
In which the specified bit IS to be set or cleared Thus, any
RELATIVE - The relative addreSSing mode IS only used In
read/Write bit In the first 256 locations of memory, including
branch Instructions In relative addreSSing, the contents of
I/O, can be selectively set or cleared With a Single 2-byte in-
the 8-blt signed byte follOWing the opcode (the offset! IS
struction See Caution under INPUT IOUTPUT paragraph
added to the PC If, and only if, the branch condition IS true
OtherWise, control proceeds to the next InstructIOn The BIT TEST AND BRANCH - The bit test and branch
span of relative addreSSing IS from + 129 to - 126 from the addreSSing mode IS a combination of direct addreSSing and
opcode address, The programmer need not worry about relative addreSSing The bit which IS to be tested and condi-
calculating the correct offset If he uses the Motorola tion (set or clear) Included In the opcode, and the address of
assembler, since It calculates the proper offset and checks to the byte to be tested IS In the Single byte Immediately follow-
see If It IS Within the span of the branch Ing the opcode byte The signed relative 8-bll offset In the
4-257
MC6805U2
third byte IS added to the PC If the specified bit IS set or clear ed .from memory uSing one of the addressing modes The
In the specified memory location This single 3-byte instruc- lump uncondltlonallJMP) and jump to'subroutlne IJSR) in-
tion allows the program to branch based on the condition of structions have no register operand Refer to Table 2
any readable bit In the first 256 location of memory The span READ/MODIFY/WRITE INSTRUCTIONS - These in-
of branching IS from + 130 to -125 from the opcode structions read a memory location or a register, modify or
address The state of the tested bit IS also transferred to the test Its contents, and wnte the modified value back to
Carry bit of the CondlllOn Code Registers See Caution memory or to the register; see Caution under INPUT /OUT-
Linder INPUT/OUTPUT paragraph PUT paragraph The test for negative or zero (TST) Instruc-
INHERENT - In the Inherent addressing mode, all the in- lion IS Included In the read/modlfy/wnte instruction though
formation necessary to execute the Instruction IS contained It does not perform the write Refer to Table 3
In the opcode Operations specifYing only the Index register BRANCH INSTRUCTIONS - The branch InstrucllOns
or accumulator, as well as control instructions with no other cause a branch from the program when a certain condition IS
arguments, are Included In this mode These instructions are met Refer to Table 4
one byte long BIT MANIPULATION INSTRUCTIONS - The instruc-
INSTRUCTION SET tions are used on any bit In the first 256 bytes of the memory,
see Caution under INPUT/OUTPUT paragraph One group
The MC6805U2 MCU has a set of 59 baSIC InstrucllOns,
which when combined with the 10 addressing modes pro- either sets or clears The other group performs the bit test
and branch operations Refer to Table 5
duce 207 usable opcodes They can be diVided Into five dif-
ferent types register/memory, read/modlfy/wnte, branch, CONTROL INSTRUCTION - The control Instructions
bit manipulation, and control The following paragraphs control the M CU operations dunng program execution
•
briefly explain each type All the instructions within a given Refer to Table 6
type are presented In individual tables ALPHABETICAL LISTING - The complete instruction set
REGISTER/MEMORY INSTRUCTIONS - Most of these IS given In alphabetical order In Table 7
instructions use two operands One operand IS either the ac- OPCODE MAP - Table 8 IS an opcode map for the In-
cumulator or the Index register The other operand IS obtaln- strucllOn used on the MCU
4-258
TABLE 2 - REGISTER/MEMORY INSTRUCTIONS
3::
Function
00
Mnemonic Code Bytes
Immediate
• •
Cycles
00
Direct
Code Bytes
• •
Cycles
Op •
Addressing Modes
Extended
•
Code Bytes Cycles
• Op
Indexed
(8 SIt Offset)
•
Code Bytes Cycles
• OP
Code Bytes
Indexed
(16 B,t Offset)
• •
Cycles
i
cN
Load A from Memory LOA A6 2 2 B6 2 4 C6 3 5 F6 1 4 E6 2 5 D6 3 6
load X from Memory LOX AE 2 2 BE 2 4 CE 3 5 FE 1 4 EE 2 5 Df 3 6
Store A In Memory STA B7 2 5 C7 3 6 F7 1 5 E7 2 6 D7 3 7
Store X In Memory STX BF 2 5 CF 3 6 FF 1 5 EF 2 6 OF 3 7
Add Memory to A ADD AB 2 2 BB 2 4 CB 3 5 FB 1 4 EB 2 5 DB 3 6
Add Memory and
Carry to A ADC A9 2 2 B9 2 4 C9 3 5 F9 1 4 E9 2 5 D9 3 6
Subtract Memory SUB AO 2 2 BO 2 4 CO 3 5 FO 1 4 EO 2 5 DO 3 6
Subtract Memory from
A With Borrow SBC A2 2 2 B2 2 4 C2 3 5 F2 1 4 E2 2 5 02 3 6
AND Memory to A AND A4 2 2 B4 2 4 C4 3 5 F4 1 4 E4 2 5 04 3 6
O~ Memory With A ORA AA 2 2 BA 2 4 CA 3 5 FA 1 4 EA 2 5 DA 3 6
Exclusrve OR Memory
With A
ArithmetiC Compare A
EOA A8 2 2 BB 2 4 CB 3 5 F8 1 4 EB 2 5 DB 3 6 I
With Memory
Anthmellc Compare X
CMP Al 2 2 Bl 2 4 Cl 3 5 F1 1 4 El 2 5 Dl 3 6 I
~ With Memory CPX A3 2 2 B3 2 4 C3 3 5 F3 1 4 E3 2 5 D3 3 6 I
r\l BII Test Memory With I
C1I
<0
A (Logical Compare) BIT A5 2 2 B5 2 4 C5 3 5 F5 1 4 E5 2 5 05 3 6 I
Jump Unconditional JMP BC 2 3 CC 3 4 FC 1 3 EC 2 4 DC 3 5
Jump to Subroutine JSR - BD 2 7 CD 3 8 FD 1 7 ED 2 8 DD 3 9J
TABLE 3 - READ/MODIFY/WRITE INSTRUCTIONS
AddreSSing Modes
Indexed Indexed
Inherent (A) Inherent (X) Direct (No Offset) (8 Bit Offset)
Function
00
Mnemonic Code Bytes
• •
Cycles
Op
Code Bytes
• • Op •
Cycles Code Bytes Cycles
• Op
Code Bytes
• •
Cycles
Op
Code Bytes
• •
Cycles
Increment INC 4C 1 ·4 5C 1 4 3C 2 6 7C 1 6 6C 2 7
Decrement DEC ·4A 1 4 5A 1 4 3A 2 6 7A 1 6 6A 2 7
Clear CLR 4F 1 4 5F 1 4 3F 2 6 7F 1 6 6F 2 7
Complement COM 43 1 4 53 1 4 33 2 6 73 1 6 63 2 7
Negate
(2 s Complement) NEG 40 1 4 50 1 4 30 2 6 70 1 6 60 2 7
Rotate Left 1 hru Carry ROL 49 1 4 59 1 4 39 2 6 79 1 6 69 2 7
Rotale RIght Thru Carry ROA 46 1 4 56 1 4 36 2 6 76 1 6 66 2 7
LogIcal ShIft Left LSL 4B 1 4 58 1 4 38 2 6 78 1 6 6B 2 7
LogICal Shift RIght LSR 44 1 4 54 1 4 34 2 6 74 1 6 64 2 7
AnthmetlC Shdt R!ght ASR 47 1 4 57 1 4 37 2 6 77 1 6 67 2 7
Test for Negat!ve
TST 4D 1 4 5D 1 4 1 6D
or Zero
.- - }~- 2 6 70 6
---- -
2
~--
II
MC6805U2
•
Bit IS CI~ar BMC 2C 2 4
Branch IFF Interrupt Mask
Bit IS Set BMS 20 2 4
Branch IFF Interrupt Line
IS Low Bil 2E 2 4
Branch IFF Interrupt Line
15 High BIH 2F 2 4
Branch to SubroLltlne BSA AD 2 8
AddreSSing Modes
Bit SeliC lear Bit Test and Branch
Op # # Op # t
FunctIon MnemOniC Code Bytes Cycles Code Bytes Cycles
Branch IFF BIt n IS set BRSET n (n 00 71 -- - - 2.n 3 10
Branch IFF Bit n IS clear BRClR n (n 0 0 71 - - - 01 . 2. n 3 10
Set Bit n BSET n (n 00 71 10 + 2. n 2 7 - - -
Clear bit n BClR n (n 00 71 11 + 2. n 2 7 - - -
Inherent
Op # #
Function MnemOniC Code Bytes Cycles
Transfer A to X TAX 97 1 2
Transfer X to A TXA 9F 1 2
Set Carry Bit SEC 99 1 2
Clear Carry Bit ClC 98 1 2
Set Interrupt Mask 81t SEI 9B 1 2
Clear Interrupt Mask 81t CLI 9A 1 2
Software Interrupt SWI 83 '1 11
Return from Subroutine RTS 81 1 6
Return from Interrupt RTI 80 1 9
Reset Stack POinter RSP 9C 1 2
No-Operaflon NOP 90 1 2
4·260
MC6805U2
•
BIL X
BIT X X X X X X
••"" •
BLO X
•••• •
BLS X
•••• •
BMC X
•••• •
BMI
•••• •
BMS
•••• •
BNE
•••• •
BPL
•••• •
BRA
•••• •
BAN
•••• •
BACLR X
•••• "
BRSET X
••••
BSET X
• • • • •"
BSR X
• • • • 0•
CLL X
••••
CLI X
• ••0 •
CLR X X X X
•• 0 1
•
CMP X X X X X X
••"" "
COM X X X X
••"" 1
CPX X X X X X X
••
DEC X X X X
• • "" "" •"
EOR X X X X X X
•• •
INC X X X X
• • "" "" •
JMP X X X X X
•••• •
JSR X X X X X
•••• •
X X X X X
•• •
• • "" ""
LDA X
LDX X X X X X X
•
LSL X X X X
••"" "
LSR X X X X
•• " 0
"
NEQ X X X X
••""
NOP X
•••• •"
X X X X X
•• •
• • "" ""
ORA X
ROL X X X X
RSP X
Condition Code Symbols
•••• •"
H Half Carry (From Bit 31 C Carry/Borrow
I Interrupt Mask A Test and Set If T rue, Cleared Otherwise
N Negative (Sign B,t) • Not Affected
Z Zero
4·261
MC6805U2
•
H Half Carry (From Bit 3) C Carry! Borrow
I Interrupt Mask 1\ Test and Set If True, Cleared Otherwise
N NegatIve ISlgn Bltl • Not Affected
Z Zero , Load CC RegIster From Stack
4-262
3:
(')
TABLE 8 - M6805 FAMilY OPCOOE MAP
Bit Manioulation
T8
Branch
R 01 I HA
Read/Modifv/Write
I HI 11 ~. INH
Control
H 1M OIR
RegISter/Memory
EX 1X2 1 IX
~
C
~' rk 0001 ooio ";', 01"00
5
0101 01~O
7
01"
8
1000
9
1001
A
1010
8
lOll
C
1100
0
1101
E
1110 ,,,,
F Hl ___ U;W
N
4 4 3 7 6 6 5 2 4 3 4 5 4 4
J:" 'l'lRSETO'
-BTB 12 BSE1~: BR"",, 2
o NEG '
-DIR 1
NEGA
INH
4 NEGX '
1 INH
12 NEG
IXl 1
NEG
IX
i' RTI
1 IN
SUB
IMM
2 SUB
OIR 3
SUB
EXT
"
3
SUB
IX
SUB
1X1 1
SUB j
IX cJo·
10 5 7 5 4 3 6 6 2 2 4 3 5 4 6 5 5 4 4 3
1 BRCLAO BCLAO RTS CMP CMP CMP CMP CMP CMP 1
0001 3
10
BTB 2
5 7
BSe
5
2
4
BANREL
3
1 INH 2
2
IMM 2
4, DIR
3
3
5
EXT
4
3
6
1X2
5
2
5
IXl
4
I
4
'x3 OOJl
~
1&;0 BTB DIR 1 INH 1 INH 2 IXl 1 IX 1 INH 2 IMM 2 DIR 3 EXT 3 ,X2 2 1 1010 I
B
10
BRCLR5
5 7
BCLR5
5 4
BMI
3
SEI < ADD < 4 ADD 3 5 ADD
4 6
ADD , ADD
'Xl
4 4
ADD
" B I
(,.) 1011 3
10
BTB
5
2
7
BSC
5
2
4
REL
3 6 5 4 3 4 3 7 6 6 5
1
2
INH
2
2 IMM 2
3
DIR 3
4, EXT
3
3
5
IX2
4 4
2 IXl
3
1
3 ,
IX 1011
•
MC6805U2
FLEXIBLE DISKS
The disk media submitted must be Single-Sided, Single-
denSity, 8-lnch, MDOS compatible floppies The customer
•
must write the binary file name and company name on the
000 400 disk With a felt-tip pen The minimum MDOS system flies as
well as the absolute binary object file I filename LO type of
XXx. = Customer 10 fllel from the M6805 cross assembler must be on the disk An
object file made from a memory dump uSing the ROLLOUT
command IS also acceptable ConSider submitting a source
After the EPROMlsl are marked they should be placed In
listing as well as the follOWing flies filename LX I EXOR-
conductive IC camers and securely packed Do not use
ciser'" loadable format! and filename SA IASCII Source
styrofoam
Codel These flies Will of course be kept confidential and are
VERIFICATION MEDIA used 11 to speed up the process In-house If any problems
arise, and 21 to speed up the user-to-factory Interface If the
All Original pattern media IEPROMs or Floppy Disk) are user finds any software errors and needs assistance qUickly
filed for contractual purposes and are not returned A com- from Motorola factory representatives
puter listing of the ROM code will be generated and returned MDOS IS Motorola's Disk Operating System available on
along With a listing verification form The listing should be development systems such as EXORCisers, EXORsets, etc
4·264
MC6805U2
Address MC _ _ _ _ _ __
-----------------------------------------------SC
City _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ State _ _ _ _ _ _ _ _ _ _ _ _ _ ZIP _________ -------
Country _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Phone _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Extenslon _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
OPTION LIST
Select the options for your MCU from the following list A
manufacturing mask will be generated from this Information
•
Timer Clock Source
o Internal q,2 clock
o TIMER Input pin
Timer Prescaler
o 2° (divide by 11 o 2' (divide by 161
o 2' (divide by 21 o 2' (divide by 321
o 2' (divide by 41 o 2' (divide by 641
o 2' (divide by 81 o 2' (divide by 1281
Clock Freq _ _ _ _ _ _ _ _ _ _ _ _ __
Title _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Slgnature _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
4-265
MC6809
(1.0 MHz)
@ MOTOROLA MC68A09
(1.5 MHz)
MC68B09
(2.0 MHz)
L SUFFIX
CERAMIC PACKAGE
MC6800 COMPATIBLE CASE 715
• Hardware - Interfaces with All M6800 Peripherals
• Software - Upward Source Code Compatible Instruction Set and
Addressing Modes ~
~~ ••• ~
PSUFFIX
•
PLASTIC PACKAGE
ARCHITECTURAL FEATURES , ' ' CASE 711
• Two 16-blt Index Registers
~
• Two 16-blt Indexable Stack POinters
• Two 8-blt Accumulators can be Concatenated to Form One 16-81t
Accumulator SSUFFIX
, I .' • I • CERDIP PACKAGE
• Direct Paqe Reqlster Allows Direct Addressing Throughout Memory , I • CASE 734
HARDVVAREFEATURES
• On-Chip Oscillator (Crystal Frequency=4XEI
• DMA/BREQ Allows DMA Operation on Memory Refresh
• Fast Interrupt Request Input Stacks Only Condllion Code Register FIGURE 1 - PIN ASSIGNMENT
and Program Counter
.MRDY Input Extends Data Access Times for Use with Slow Memory
• Interrupt Acknowledge Output Allows Vectoring 8y Devices Vss
• SYNC Acknowledge Output Allows for Synchronization to External NMi XTAL
Event
TIm EXTAL
• Single Bus-Cycle RESET
• ~Ie 5-Volt SUPPIYR~~Eitlon Fiim mIT
• IIIliilT Inhibited After Until After First Load of Stack POinter BS MROY
• Early Address Valid Allows Use VV,th Slower Memories
• Early VVnte-Data for Dynamic Memories BA
4-266
MC6809· MC68A09. MC68B09
MAXIMUM RATINGS
Rating Symbol Value Unit
This deVice contains circuitry to protect the
Supply Voltage Vcc - 03 to + 70 V
Inputs against damage due to high static
Input Voltage V ,n - 03 to + 70 V voltages or electnc fields. however, It IS ad-
Operating Temperature Range TL to TH vised that normal precautions be taken to
MC6809. MC68A09. MC68809 TA o to + 70 'c avoid application of any voltage higher than
MC6809C. MC68A09C. MC68809C - 40 to + 85 maximum rated voltages to thiS high Irn*
Storage Temperature Range T5tg -55 to + 150 DC pedance Circuit Reliability of operation IS
enhanced If unused Inputs are tied to an ap-
THERMAL CHARACTERISTICS propriate logiC voltage levels Ie g, either
VSS or VCCI
Characteristic Symbol Value Unit
Thermal ReSistance
Ceramic 50
8JA 'C/W
Cerdlp 60
Plastic 100
POWER CONSIDERATIONS
•
Where
T A'" Ambient Temperature, 'c
OJA'" Package Thermal ReSistance, Junctlon-to-Amblent, °C/W
PO'" PINT+ PPORT
PINT'" ICC x VCe. Watts - Chip Internal Power
PPORT'" Port Power OISSlpatlon, Watts - User Oetermlned
For most applicatIOns PPORT<Ii PINT and can be neglected PPORT may become significant If the deVice IS configured to
drive Oarllngton bases or sink LEO loads.
An approximate relationship between Po and T J Ilf PPORT IS neglected) IS
PO~K-ITJ+273°C) 121
Solving equations 1 and 2 for K gives
K ~ PO·IT A + 273°C) + OJA·P 0 2 (3)
Where K IS a constant pertaining to the particular part K can be determined from equation 3 by measuring Po lat eqUIlibrium)
for a known T A USing thiS value of K the values of Po and TJ can be obtained by solving equations (1) and (2) iteratively for any
value of T A
4-267
MC6809- MC68A09- MC68B09
R/VV,Address----t~~~~J\.~~~t_-=~----------_i_r--------------------~------------rt~~~
SA, SS
~-+----------__ ~~L---~N~0~t~e~3------------~
•
Write Data
--@)----..t
2 Pulse Width, E Low PWEL 430 5000 280 5000 210 5000 ns
3 Pulse Width, E High PWEH 450 15500 280 15700 220 15700 ns
4 Clock Rise and Fall Time tr, tf - 25 - 25 - 20 ns
5 Pulse Width, Q High PWQH 430 5000 280 5000 210 5000 ns
6 Pulse Width, a Low PWOL 450 15500 280 15700 220 15700 ns
7 Delay Time, E to Q Rise tAvs 200 250 130 165 80 125 ns
9 Address Hold Time' ISee Note 41 tAH 20 - 20 - 20 - ns
10 SA, 8S, R/W, and Address Valid Time to a Rise tAO 50 - 25 - 15 - ns
17 Read Data Setup Time tDSR 80 - 60 - 40 - ns
18 Read Data Hold Tlme* tDHR 10 10 10 ns
20 Data Delay Time from Q tDDO - 200 - 140 - 110 ns
21 Write Data Hold Time· tDHW 30 - 30 - 30 - ns
29 Usable Access Time ISee Note 31 tACC 695 - 440 - 330 - ns
Processor Control Setup Time IMRDY, Interrupts, DMA/BREO, - - - ns
tpcs 200 140 110
HALT, RESETllFlgures 7,9,10,11,13, and 141
Crystal OSCillator Start Time I Figures 7 and 81 tRC - 100 - 100 - 100 ms
Processor Control Rise and Fall TIme iFlgures 7 and 9) IpCr, tpCf - 100 - 100 - 100 ns
'Address and data hold times are periodically tested rather than 100% tested
NOTES.
1 Voltage levels shown are VL:SO 4 V, VH",2 4 V, unless otherWise specified,
2 Measurement POints shown are 0 8 V and 2 0 V, unless otherWise specified
3 Usable acce~me IS computed by 1-4- 7 max + 10-17
4 Hold time I \211
for SA and SS IS not specified.
5 MaXimum tcyc dUring MRDY or DMA/BREQ IS 16 p.S
4·268
MC6809- MC68A09- MC68B09
<4--Vee
<4--VSS
Instruction
Register
OMA/BREO
R/W
RAC'f
BA
BS
XTAL
•
EXTAL
MROY
L-_-.E
' - - - -... 0
* Internal Three-State Control
FIGURE 4 - BUS TIMING TEST LOAD PROGRAMMING MODEL
As shown In Figure 5, the MC6809 adds three registers to
the set available In the MC6800, The added registers Include
50V a Direct Page Register, the User Stack pOinter and a second
Index Register
ACCUMULATORS (A, S, D)
The A and B registers are general purpose accumulators
which are used for arithmetic calculations and manipulation
of data
e Certain Instructions concatenate the A and B registers to
MMD7000 form a single 16-blt accumulator ThiS IS referred to as the D
or EqUiv Register, and IS formed with the A Register as the most
significant byte
4-269
MC68Q9-MC68A09-MC68B09
15 o
}~,"",
x- Index Register
Y - Index Register
U - User Stack POinter ",""""
S - Hardware Stack POinter
PC Program Counter
,
A
I B
,
Accumulators
v
D
Carry
constant or register offset. DUring some Indexed modes, the Overflow
contents of the Index register are Incremented or L.~--Zero
L-_ _ _ _ Negative
decremented to pOint to the next Item of tabular type data
L--_ _ _ _ _ _ IRO Mask
All four pOinter registers IX, Y, U, SI may be used as Index L--_ _ _ _ _ _ _ Half Carry
registers.
L - - - - - - - - - F I R O Mask
STACK POINTER (U, SI L - - - - - - - - - - - E n t l r e Flag
The Hardware Stack POinter (S) is used automatically by
the processor dUring subroutine calls and interrupts. The
stack pOinters of the M C6809 point to the top of the stack, In
contrast to the MC6800 stack pOinter, which pOinted to the
next free location on the stack The User Stack POinter lUl,s
controlled exclusively by the programmer thus allowing CONDITION CODE REGISTER
arguments to be passed to and from subroutines with ease. DESCRIPTION
Both Stack Pointers have the same Indexed mode address- BITO (C)
.ing capabilities as the X and Y registers, but also support
Bit 0 IS the carry flag, and IS usually the carry from the
Push and Pull instructions. ThiS allows the MC6809 to· be us-
binary ALU C IS also used to represent a 'borrow' from sub-
ed efficiently as a stack processor, greatly enhancing ItS abili-
tract like instructions ICMP, NEG, SUB, SBCI and IS the
ty to support higher level languages and modular programm-
complement of the carry from the binary ALU
Ing.
4·270
MC6809· MC68A09· MC68B09
BIT 7 (E)
Bit 7 IS the entire flag, and when set to a one indicates that
HALT
A low level on thiS Input pin will cause the MPU to stop
running at the end of the present Instruction and remain
halted indefinitely Without loss of data. When halted, the BA
output IS driven high indicating the buses are high Im-
I
the complete machine state lall the reglstersl was stacked, pedance. BS IS also high which indicates the processor IS In
as opposed to the subset state (PC and CCI The E bit of the the Halt or Bus Grant state. While halted, the MPU will not
stacked CC IS used on a return from Interrupt (RT!) to deter- respond to external real-time requests (FIRO, iRa) although
mine the extent of the unstacklng Therefore, the current E DMA/BREO will always be accepted, and NMI or RESET will
left In the Condition Code Register represents past action be latched for later response. DUring the Halt state 0 and E
continue to run normally If the MPU IS not running (REm,
DMA/BREO), a halted state (BAoBS = 1) can be achieved
by pulling HALT low while RESET IS still low. If DMA/BREO
and HALT are both pulled low, the processor Will reach the
PIN DESCRIPTIONS
last cycle of the instruction (by reverse cycle stealing) where
the machine Will then become halted See Figure 9.
POWER (VSS, Veel
Two pinS are used to supply power to the part VSS IS BUS AVAILABLE, BUS STATUS (BA, BS)
ground or 0 volts, while VCC IS + 50 V ± 5%
The Bus Available output IS an Indication of an Internal
ADDRESS BUS (AO-A15) control Signal which makes the MOS buses of the MPU high
Sixteen pins are used to output address Information from Impedance. ThiS Signal does not Imply that the bus Will be
the MPU onto the Address Bus When the processor does available for more than one cycle When BA goes low, a
not reqUire the bus for a data transfer, It will output address dead cycle Will elapse before the MPU acqUires the bus
ft!i16, R/Vii = 1, and BS = 0; thiS IS a "dummy access" or
VMA cycle Addresses are valid on the riSing edge of 0 Isee The Bus Status output Signal, when decoded With BA,
Figure 21 All address bus drivers are made high-Impedance represents the M PU state (valid With leading edge of 0)
when output Bus Available (BA) IS high. Each Pin will
drive one Schottky TTL load or four LS TTL loads, and MPU State
MPU State Definition
90 pF BA BS
0 0 Normal IRunnlng)
DATA BUS (00-07)
0 1 Interrupt or Reset Acknowledge
These eight pins prOVide commUnication with the system
1 0 Sync Acknowledge
bi-directlonal data bus. Each pin will drive one Schottky TTL
1 1 Halt or Bus Grant Acknowledge
load or four LS TTL loads, and 130 pF
4-271
• s:
n
~•
s:
BS \\\\\\~ ! \ if ! \'--______
'NOTE: Pans with dat.. codes prefixed by 7F or 5A will come out of RESEi' one cycle sooner than shown
MC6809. MC68A09· MC68B09
~ ~
)
( 101
VCC
~CD~
Co
MC6809
•
38 Y1 39
Y1 C,~ Cout
8 MHz
6 MHz
4 MHz
18 pF
20 pF
24 pF
18 pF
20 pF
24 pF
D
Cout
Co 35 pF 65 pF 4-6 pF 4-6 pF
C1 0015 pF 0025 pF 001-002 pF 001·002 pF
Q >40K >30K >20 K >20 K
All parameters are 10%
·NOTE These are representative AT-cut crystal parameters only Crystals of other
types of cut may also be used
NOTE Waveform measurements for all Inputs and outputs are specIfied
at logiC high 2 0 V and logiC low 0 8 V unless otherwise specIfied
Other Signals
Not Wifed In
This Area
~
4-273
MC6809- MC68A09-MC68B09
FiAIT
~--4~---------------~~---
Address
Bus
Fetch Execute
I ,
R/W
(S
BA 1 \'--____-'1
•
H~--------------~\ I~-------
BS 1
Data
Bus _ _~"L_---1 }---4~-----------<~--
Instruction
Opcode
NOTE' Waveform measurements for all Inputs and outputs are specified at logiC high 2.0 V and logiC low 0 8 V unless otherwise specified
Interrupt Acknowledge IS Indlca~ur~ot~cles of a Interrupt cannot be Inhibited by the program, and also has a
hardware-vector-fetch (RESET, NMI, FIRO, IRO, SWI, higher Priority than FIRO, iRCi or software Interrupts. DUring
SWI2, SWI3) ThiS signal, plus decoding of the lower four recognition of an NMI, the entire machine state IS saved on
address hnes, can provide the user With an Indication of the hardware stack After reset, an NMI Will not be recogniz-
which Interrupt level IS being serviced and allow vectoring by ed until the first program load of the Hardware Stack POinter
deVice See Table 1 (S) The pulse Width of NMIIow must be at least one E cycle.
Sync Acknowledge IS indicated while the MPU IS waiting If the NMI Input does not meet the minimum set up With
for external synchrOnization on an Interrupt hne. respect to 0, the Interrupt Will not be recognized until the
next cycle See Figure 10
HaitI Bus Grant IS true when the M C6809 IS In a Halt or Bus
Grant condition .
"NMt FIRQ, and TAO requests are sampled on the falhng edge of Q One cycle IS reqUired for synchronization before these Interrupts are recog-
nized. The pending Interruptls) Will not be serviced until completion of the current Instruction unless a SYNC or CWAI condition IS present If rna
and J!iJm'do not remain low until completion of the current Instruction they may not be recognized However, NMlls latched and need only re-
maIO low for one cycle No Interrupts are recognized or latched between the falhng edge of mrr and the rising edge of BS Indicating
REm acknowledge.
4-274
s::
1 m-2 1 m-l 1 m
Interrupt Stacking and Vector Fetch Sequence
1m+ 1 1 m+21 m+31 m+41 m+51 m+61 m+ 71 m+SI m+9Im+ 10Im+lllm+ 121m+ 131m+ 141m+ 15Im+16Im+ 171m+1SI
Instruction
• J
Fetch
n 1 n+ 1 1
!
s::
~OJ
~;;~~;t;;;t~~~~~~~;;~;;~~~~~;':~~~~~~~~~~~~~~~~~
E'
Q
~
Address
Bus
~r ~rpcs .
~~~~~ti''''_'\lnu~'
Daw
---A--~~--JL---A----~V~M~AJL~P~Cl~~P~C~H~-U~S-l~~U~SH~~IY~l-A~I~Y~H~-I-Xl~~IX~H~--D-P~A-C-C~BJLA-C~C-AA-C~C~A~~~==~~N-ew~-N-ew--A:V=M=A~--~~~
-f'" PCH PCl
N
......
U'I BA~
A/W~ \~_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /r----------------
NOTE Waveform measurements for all onputs and outputs are specified at logiC high =2 0 V and logiC low =0 S V unless otherwise specified
E clock shown for reference only
•
• ~
Last Cycle
lof Current I....
Instruction
FIGURE 11 - FIRQ INTERRUPT TIMING
E"
Q
I m-2 I m-l m I m+l m+2 I m+3 I m+4 I m+5 I m+6 I m+7 I m+8 I m+9 n+ 1 n+
I
•
~
-4 r
Address
Bus
m
txJ
tpcs PC PC ~
FiRQ
Data
.j:o.
N
-...I
m
R/W~ \ I
BA~~_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _
NOTE Waveform measurements for all Inputs and outputs are specified at logiC high = 20 V and logiC low= 08 V unless otherwise specified
E clock shown for reference only
MC6809-MC68A09-MC68B09
XTAL,EXTAL the MPU Into a Halt mode to three-state the machine, but
These Inputs are used to connect the on-chip oscillator to MRDY Will not stretch the clocks
an external parallel-resonant crystal. Alternately, the pin The mask set for a particular part may be determined by
EXT AL may be used as a TTL level Input for external timing examining the markings on top of the part Below the part
by grounding XT AL The crystal or external frequency IS four number IS a string of characters The first two characters are
times the bus frequency See Figure 8 Proper RF layout the last two characters of the mask set code If there are only
techniques should be observed In the layout of printed C"CUlt four digitS the part IS the G7F mask set The last four digits.
boards the date code, show when the part was manufactured
These four dlgtts represent year and week For example a
ceramic part marked
E,O
E IS Similar to the M C6800 bus timing signal <1>2, Q IS a
/~-.
quadrature clock signal which leads E Q has no parallel on
the MC6800 Addresses frorn the MPU will be valid with the
leading edge of Q Data IS latched on the falling edge of E
Timing for E and Q IS shown In Figure 12
•
ed In Integral multiples of quarter ( Y. I bus cycles, thus allow- The DMA/BREQ Input prOVides a method of suspending
Ing Interface to slow memOries, as shown In Figure 13(A) execution and acquiring the MPU bus for another use. as
DUring non-valid memory access (VMA cyclesl MRDY has shown In Figure 14 TYPical uses Include DMA and dynamiC
no effect on stretching E and Q, thiS Inhibits slOWing the pro-
cessor dunng "don't care" bus accesses MRDY may also be
memory refresh =-:-::-==;::-
TranSitions of DMAJ BREQ should occur dUring Q A low
used to stretch clocks (for slow memory) when bus control level on thiS pin Will stop Instruction execution at the end of
has been transferred to an external deVice (through the use the current cycle unless pre-empted by self· refresh The
of HALT and DMA/BREQ) MPU Will acknowledge DMA/BREQ by setting BA and BS to
NOTE Four of the early production mask sets (G7F, T5A, a one The requesting deVice Will now have up to 15 bus
P6F, T6M) require synchrOnization of the MRDY Input With cycles before the MPU retrieves the bus for self-refresh Self-
the 4f clock The synchronization necessitates an external refresh reqUires one bus cycle With a leading and trailing
OSCillator as shown In Figure 13(B) The negative transition dead cycle See Figure 15 The self-refresh counter IS only
of the MRDY signal, normally denved from the chip select cleared If DMA/BREQ IS Inactive for two or more MPU
decoding, must meet the tpcs timing. With these four cycles
mask sets, MRDY's POSitive transItion must occur With the TYPically. the DMA controller Will request to use the bus
nSlng edge of 4f by asserting DMAI BREQ pin Iowan the leading edge of E
In addition, on these same mask sets, MRDY Will not When the MPU replies by setting BA and BS to a one. that
stretch the E and Q signals If the machine IS executing either cycle Will be a dead cycle used to transfer bus mastership to
a TFR or EXG instruction dunng the HALT hlgh-to-Iow tran- the DMA controller
Sition If the MPU executes a CWAllnstructlon, the machine False memory accesses may be prevented dUrlcg any dead
pushes the Internal registers onto the stack and then awaits cycles by developing a system DMAVMA Signal which IS
an Interrupt DUring thiS waiting penod, It IS pOSSible to place LOW In any cycle when BA has changed
I
\'--~:-
rtAVSy
Q
I Address Valid I
NOTE Waveform iT.easurements for all Inputs and outputs are speCified at logiC high 20 V and logiC low 0 8 V unless otherwise speCified
-The on-board clock generator furnishes E and 0 to both the system and the MPU When MRDY IS pulled low, both the system clocks and the
Internal MPU clocks are stretched Assertion of OM AI BREQ Input stops the Internal MPU clocks while allOWing the external system clocks
to RUN (I e , release the bus to a DMA controller) The Internal MPU clocks resume operation after DMAI BREQ IS released or after 16 bus
cycles (14 DMA, 2 dead), whichever occurs first While DMA7iiRECi IS asserted It IS sometimes necessary to pull MRDY low to allow DMA to/
from sloW' menory/penpherals As both MADY and OMA/BREQ control the Internal MPU clocks, care must be exercised not to Violate the
maximum tcyc speclf,caliOn for MRDY or OMA/BRrn (See Note 5 In Bus Timing)
4·277
MC6809.MC68AOO. MC68BOO
When BA goes low (either as a result of DMA/BREQ = This sequence begins after RESET and IS repeated Indefinite-
HIGH or MPU self-refresh), the DMA deVice should be taken ly unless altered by a special instruction or hardware occur-
off the bus Another dead cycle will elapse before the MPU rence. software instructions that alter normal MPU operation
accesses memory, 10 allow transfer of bus mastership are: SWI. SWI2, SWI3, CWAI, RTI and SYNC. An Interrupt,
without contention HALT, or DMA/BREQ can also alter the normal execution of
Instructions. Figure 16 illustrates the flowchart for the
MC6B09.
MPU OPERATION
\ / \ / 'Ie~
t,- ____
I
I
0
/ \ / \
, )~
I "'I'} /
•
I t<.
tpcs
MRDY
",\\\\i I
I l
XTAL 39
EXTAL~~~ ______________________________~____-,
Part of
MC6809 MRDY~36~__~M~R~D~Y~S~tffi~t=C~h__ +-__________~
MRDY
12 Synchronization
7474
D
ActIve La
Chip Select
For Slow
Memory or
Peripheral
MRDY Stretch
L--"S-"tre",tc",h~=:::....::O,-,7,-,R"C,-_____________ To Memory
4-278
MC6809·MC68A09· MC68B09
DMAIBREO
BA, BS
I \ I "-
•
DMAVMA-
AD DR ) C
(MPU)
ADDR
(DMAC) ( >
~.~
1 I
~--------
1I 1 I
.~ IS a signal whIch is developed externally, but IS a system requIrement for DMA. Refer to Apphcatlon Note AN-8.
NOTE: Waveform measurements for all Inputs and outputs are specIfIed at I~glc hIgh 2 0 V an~ logIC low O.B V unless otherwIse speCIfIed
4-279
•
FIGURE 16 - FLOWCHART FOR MC8II09 INSTRUCTIONS s::
is::•
n
l_F-
l-R!W
ClrNMI
Logic
I
Disarm NMI
-r--
~s:•
n
~
CD
~
~
N
Q)
o
SYNC
CWAI
Bua State BA BS
Normal (Running) 0 0
Interrupt or Reset Acknowledge 0 1
Sync Acknowledge 0
Halt or Bus Grant Acknowledge
~OTE: Asserting RESET will result in entering the reset sequence from any point In the flow chan.
MC6809-MC68A09- MC68B09
ADDRESSING MODES
II
faster than extended addressing Of course, only 256 loca-
Accumulator Offset tions (one page) can be accessed Without redef,mng the con-
Auto Increment/Decrement tents of the DP register Since the DP register IS set to $00 on
Indexed Indirect Reset. direct addressing on the MC6809 IS compatible With
Relative direct addressing on the M6800 Indirection IS not allowed In
Short/Long Relative Branching direct addressing Some examples of direct addressing are
Program Counter Relative Addressing
LDA $30
INHERENT (INCLUDES ACCUMULATOR) SETDP $10 (Assembler dlrectlvel
In thiS addressing mode, the opcode of the instruction LDB $1030
contains all the address Information necessary Examples of LDD < CAT
Inherent Addressing are ABX, DAA, SWI, ASRA, and
CLRB NOTE: < IS an assembler directive which forces direct
addreSSing
IMMEDIATE ADDRESSING
In Immediate Addressing, the effective address of the data
IS the location Immediately following the opcode (, e., the REGISTER ADDRESSING
data to be used In the instruction Immediately follows the op- Some opcodes are followed by a byte that defines a
code of the instruction). The MC6809 uses both Band 16-bIt register or set of registers to be used by the Instruction ThiS
Immediate values depending on the size of argument IS called a postbyte Some examples of register addreSSing
specified by the opcode. Examples of instructions With Im- are'
mediate Addressing are' TFR X, Y Transfers X Into Y
LDA #$20 EXG A, 8 Exchanges A With B
LOX #$FOOO PSHS A, B, X, Y Push y, X, B and A onto S
LDY #CAT PULU X, Y, D Pull D, X, and Y from U
NOTE: # slgmfles Immediate addressing, $ s,gmf,es hexa-
decimal value.
INDEXED ADDRESSING
EXTENDED ADDRESSING
In all Indexed addreSSing, one of the pOinter registers (X,
In Extended Addressing, the contents of the two bytes Im-
Y, U, S, and sometimes PCI,s used In a calculation of the ef-
mediately following the opcode fully specify the 16-blt effec-
fective address of the operand to be used by the instruction
tive address used by the Instruction. Note that the address
Five baSIC types of indeXing are available and are discussed
generated by an extended instruction defines an absolute ad-
below The postbyte of an Indexed instruction specifies the
dress and IS not posItIOn Independent. Examples of Extended
baSIC type and variation of the addreSSing mode as well as
Addressing Include
the pOinter register to be used Figure 17 lists the legal for-
LDA CAT mats for the postbyte Table 2 gives the assembler form and
STX MOUSE the number of cycles and bytes added to the baSIC values for
LDD $2000 Indexed addresSing for each variation
4·281
MC6809·MC68A09· MC68B09
FIGURE 17 - INDEXED ADDRESSING POSTBYTE Zero-Offset Indexed - In thiS mode, the selected pOinter
REGISTER BIT ASSIGNMENTS register contains the effective address of the data to be used
Indexed by the Instruction, ThiS IS the fastest IndeXing mode,
Post-Byte RegIster Bit
Addressing Examples are
7 6 5 4 3 2 1 0
Mode
LOO Q,X
0 R R d d d d d EA ~ ,R + 5 BIt Offset
LOA S
1 R R 0 0 0 0 0 ,R+
1 R R I 0 0 0 1 ,R+ + Constant Offset Indexed In thiS mode, a
1 R R 0 0 0 1 0 ,- R two's-complement offset and the contents of one of the
1 R R , 0 0 1 1 ,- - R pOinter registers are added to form the effective address of
1 R R , 0 1 0 0 EA ~ ,R +0 Offset the operand The pOinter register's lnillal content IS un-
1 R R , 0 1 0 I EA ~ ,R + ACCB Offset changed by the addition
1 R R , 0 1 1 0 EA ~ ,R + ACCA Offset Three sizes of offsets are available,
1 R R , 1 0 0 0 EA ~ ,R +8 B't Offset 5 -bit (- 16 to + 151
1 R R , 1 0 0 1 EA ~ ,R + 16 Bit Offset 8 -bit (- 128 to + 1271
1 R R , 1 0 1 1 EA - ,R + 0 Offset 16-blt (- 32768 to + 327671
1 x x , 1 1 0 0 EA - ,PC + 8 B't Offset The two's complement 5-blt offset IS Included In the
1 x x , 1 1 0 1 EA ~ ,PC + 16 B,t Offset post byte and, therefore, IS most effiCient In use of bytes and
,
1
- A R
-~
1 1 1 1 EA
I
16-blt offset IS In the two bytes follOWing the post byte In
most cases the programmer need not be concerned with the
' - - - - - - - - I n d l r e c t Field
size of thiS offset Since the assembler Will select the optimal
IS'gn b,t when b7 ~ 01
sIze automatically,
Examples of constant-offset IndeXing are
' - - - - - - - - - - - - R e g ' s t e r F,eld RR LOA 23,X
00 ~ X
LOX -2,S
01 ~ Y
10 ~ U LOY 3OO,X
11 ~ S LOU CAT,Y
x = Don't Care
d ~ Offset BI1
0= Not Indirect
1 = Indirect
:and +# Indicate the number of additional cycles and bytes for the particular vanatlon
4-282
MC6809-MC68AOS-MC68BOS
•
register IS decremented prior to use as the address of the The bytels) follOWing the branch opcode IS lare) treated as
data. The use of auto decrement IS similar to that of auto in- a Signed offset which may be added to the program counter
crement; but the tables, etc., are scanned from the high to If the branch condition IS true then the ca)culated address
low addresses. The size of the increment! decrement can be IPC + Signed offsell IS loaded Into the program counter
either one or two to allow for tables of either a or 16-bIt data Program execution pontlnues at the new location as In-
to be accessed and IS selectable by the programmer. The dicated by the PC, short 11 byte offset) and long 12 bvtes off-
pre-decrement, post-Increment nature of these modes allow set) relative addreSSing modes are available All of memory
them to be used to create additional software stacks that can be reached In long relative addreSSing as an effective ad-
behave Identically to the U and 5 stacks. dress IS Interpreted modulo 216 Some examples of relative
Some examples of the auto Increment! decrement ad- addreSSing are:
dressing modes are: BEQ CAT Ishort)
LOA ,X+ BGT DOG (shorll
STD ,Y++ CAT LBEQ RAT (long)
LOa ,-Y DOG LBGT RABBIT liang)
LOX ,- -5
4-283
MC680ge MC68A0ge MC68B09
The instruction set of the MC6809 IS similar to that of the register, while bits 0-3 represent the destination register
MC6800 and IS upward compatible at the source code level. These are denoted as follows.
The number of opcodes has been reduced from 72 to 59, but
TRANSFER/EXCHANGE POST BYTE
because of the expanded architecture and additional ad-
dressing modes, the number of available opcodes (with dif- [}OtIRC~ I o~sTI~ATloN I
ferent addressing modes) has risen from 197 to 1464
Some of the new Instructions are described In detail REGISTER FIELD
below 0000 OIAS) 1000 - A
0001 ~ X 1001 S
0010 ~ Y 1010 CCR
PSHU/PSHS 0011 . U 1011 OPR
The push Instructions have the capability of pushing onto 0100 5
0101 pc
either the hardware stack (S) or user stack (U) any Single
register, or set of registers with a single instruction. NOTE: All other combinations are undefined and INVALID
PULU/PULS LEAX/LEAY/LEAU/LEAS
The LEA (Load Effective Address) works by calculating
The pull Instructions have the same capability of the push
the effectIVe address used In an Indexed instruction and
Instruction, In reverse order The bYte Immediately following
stores that address value, rather than the data at that ad-
the push or pull opcode determines which register or
dress, In a pOinter register This makes all the features of the
registers are to be pushed or pulled The actual PUSH/PULL
•
Internal addreSSing hardware available to the programmer
sequence 15 fixed, each bit defines a unique register to push
Some of the Implications of this Instruction are Illustrated In
or pull, as shown below.
Table 3
The LEA instruction also allows the user to access data
and tables In a posItion Independent manner. For example.
PUSH/PULL POST BYTE STACKING ORDER
LEAX MSG1, PCR
PULL ORDER
LBSR PDATA (Print message routine)
CCR Jc •
A
L-_ _ _ 'S
A
B
•
'--_ _ _ _ OPR MSG1 FCC 'MESSAGE'
OP
' -_ _ _ _ _ x X H, This sample program prints 'MESSAGE' By writing
'-------y
' - _ _ _ _ _ _ _ S/U
X Lo M SG 1, PCR, the assembler computes the distance between
YH,
' -_________ pc YLo the present address and MSG 1 This result 15 placed as a
U/SHI constant Into the LEAX Instruction which will be Indexed
U/S Lo from the PC value at the time of execution No matter wherf3
PC HI
PC La
the code 15 located, when It 15 executed, the computed offset
+ from the PC Will put the absolute address of MSG11nto the X
PUSH ORDER pOinter register. This code 15 totally position Independent
INCREASING The LEA Instructions are very powerful and use an Internal
MEMORY holding register (temp), Care must be exercised when uSing
~ the LEA instructions With the autOincrement and autodecre-
ment addreSSing modes due to the sequence of Internal
operations The LEA Internal sequence 15 outlined as follows:
4·284
MC68Q9- MC68A09- MC68B09
II
offset IS added to the value of the program counter to be us- FFFF VMA Cycle
ed as the effective address ThiS allows the program to FFFF VMA Cycle
AOOO Computed Branch Address
branch anywhere In the 64K memory map Posltlon-
FFFF 1 VMA Cycle
Independent code can be easily generated through the use of EFFF 80 0 Stack High Order Byte of
relative branching Both short (8-blt) and long (16-blt) bran- Return Address
ches are available EFFE 03 Stack Low Order Byte of
Return Address
SYNC
After encountering a Sync Instruction, the MPU enters a Example 2: DEC {Extendedl
Sync state, stops processing Instructions and walts for an In-
$8000 DEC $AOOO
terrupt If the pending Interrupt IS non-maskable (NMI) or
maskable (FIRO, IRQ) With ItS mask bit (F or I) clear, the pro-
••
cessor Will clear the Sync state and perform the normal Inter- $ABOOO $80
•
rupt stacking and serVice routine Since FIRO and IRO are
not edge-triggered, a low level With a minimum duration of CYCLE-BY-CYCLE FLOW
three bus cycles IS reqUired to assure that the Interrupt Will Cycle # Address Data Rl'iN Description
be taken If the pending Interrupt IS maskable (FIRO, IRO) 1 8000 7A 1 Opcode Fetch
With ItS mask bit (F or I) set, the processor Will clear the Sync 2 8001 AO Operand Address, High Byte
state and continue processing by executing the next Inllne 3 8002 00 Operand Address, Low Byte
Instruction Figure 18 depicts Sync timing 4 FFFF VMA Cycle
5 AOOO 80 Read the Data
Software Interrupts 6 FFFF VMA Cycle
A Software Interrupt IS an instruction which Will cause an 7 AOOO 7F Store the Decremented Data
Interrupt, and ItS associated vector fetch These Software In-
"The data bus has the data at that particular address
terrupts are useful In operating system calls, software
debugging, trace operations, memory mapping, and soft-
MC6809 INSTRUCTION SET TABLES
ware development systems Three levels of SWI are available
on the MC6809, and are prioritIZed In the follOWing order
SWI, SWI2, SWI3 The Instructions of the MC6809 have been broken down
Into five different categories They are as follows '
16-Bit Operation 8-Blt operation (Table 4)
The M C6809 has the capability of processing 16-blt data 16-Bll operation (Table 51
These instructions Include loads, stores, compares, adds, Index register/stack pOinter Instructions ITable 6)
subtracts, transfers, exchanges, pushes and pulls Relative branches Iiong or short I (Table 7)
Miscellaneous Instructions ITable 81
CYCLE-BY-CYCLE OPERATION HexadeCimal values for the Instructions are given In
Table 9
The address bus cycle-by-cycle performance chart Il-
lustrates the memory-access sequence corresponding to
each possible instruction and addreSSing mode In the
MC6809 Each Instruction begins With an opcode fetch PROGRAMMING AID
While that opcode IS being Internally decoded, the next pro- Figure 21 contaills a compilation of data that Will assist In
gram byte IS always fetched (Most Instructions Will use the programmlllg the MC6809
4·285
.' 3:
i
3:
!
FIGURE 18 - SYNC TIMING
3:
~OJ
a
f6
Address
~
N
Data r-x;
(Xl
0)
R/W '------<d~)~~------+----------------J~---------------------
( I
-v---\ )
BA~ I t
BS
~{
Fi'RLi
~ See Note 2
NMI tpcs
NOTES
1 If the associated mask bit IS set when the Interrupt IS requested, this cycle will be an Instruction fetch from address location PC+ 1 However, If the in-
terrupt IS accepted (NMI or an unmasked FIRG or TAO) mterrupt processing contmues with this cycle as (m) on Figures 10 and 11 (Interrupt Timing)
2 If mask bits are clear, IRQ and FlAG must be held low for three cycles to guarantee Interrupt to be taken, although only one cycle IS necessary to bnng
the processor out of SYNC
NOTE Waveform measurements for all Inputs and outputs are speclfred at logiC high 2 0 V and logiC low 0 8 V unless otherwise specified
(
FIGURE 19 - ADDRESS BUS CYCLE-BY-CYCLE PERFORMANCE
fetch)
i
ADDR-Addressof Opcode IFetch)
~
Addr-Addr+ 1
,
~
Long
Brar-T-Inhe.ent
Short Immediate and
--.-- I ,
Indexed
I
~
~DJ
Auto Aut
I 1
ACCS
R + 5 Brt
R+B Bit
ADDR- ADDR-
ADDR+l ADDR+l
ADDR- ADDR-l
ADDR+ 1 ADDR+ 1
VMA PC -t 8 Bit ADDR- ADDR- ADLlR- ADDR-
ADDR+ 1 ADDR+ 1 ADDi'I+ 1- ADDR+ 1
I I
~
I\) VilA ilfTA VIh
(Xl
...... VliilA vffA vk ~
NOTES
1 All subsequent Page 2 and Page 3 pre-bytes will be'lgnomd dftel 111I1Itii Opf odo Illt{ h
2 Write operation dunng store Instruction
3 ADDR refers to the state of the address bu,
•
FIGURE 2O(a) -
•
OPERATION: ADDRESS BUS CYCLE-BY-CYCLE PERFORMANCE s:
Inherent Page From Figure 19
Continued
~•
ASLA
ASLB
ABX RTS ·TFR EXG MUL PSHU
PSHS
PULU
PULS
SWI
SWI2
CWAI
RT'l on Next
Page
s:
!
SWI3
ASRA
ASRB ADDR-ADDR+1 STACK IRI
CLRA
CLRB VMA VMA VMA VMA VMA vk
s:•
COMA VMA I I
COMB VMA VMA VMA
DAA VMA
~tIl
DECA
DECB
INCA STACK IRI VMA VMA
I
ADDR-SP
STACKIW: STACKIWI
STACKIWI STACKiWI Y
~
INCB STACKIRI VMA VMA I E~l
STACK IWI STACK IWI >--
LSLA
LSLB
VMA VMA
VMlI
VMA
VMA
Note 3
g
! Stack IWl1 1 STACKIWI
STACKIWi
STACKIWI
STACKIWI
STACK
STACK
IRI
IRI
LSRA \ilViA VMA N
IStack IRI162 STACK IWi STACK IWI STACK IRI
LSRB
NEGA
VMA VMA
VMA
I Note 3 ST ACK IWI
ST ACK IWI
STACK IWI
STACK IWI
STACK
STACK
IRI
IR'
NEGB VMA STACKIWI STACKIWI STACK IRI STACK IRI
NOP VMA
-1=>0 ST ACK IWI STACK IWI S1 ACK IRI STACK IRI
ROLA
r\) STACKIWI STACKIWI STACK IRI
ROLB
(X) STACKIWI STACKIWI STACK IRI
RORA
(X)
RORB
SEX ADDR-SP
VMA
I
IVMAI""
I . STACK
,....----
STACK
IRI
IRI
I Note4
VECTOR IHI. VeCTOR IHI.
BUSY-I BUSY-1 Addr-SP
VECTOR Ill. VECTOR IL~'
BUSY -0 BUSY-O
I I
VMA VM-'I
, , J J J r 1 1
To Figure 19
NOTES
1 Stack IWI refers to the following sequence SP- SP -1, then ADDR- SP "lth R/W = 0
Stack IRI refers to the following sequence ADDR-SP with RiW= 1, then SP-SP+ 1
PSHU, PULU instructions use the user stack pOInter (! e, SPi!IE'U) and PSHS PULS use ttle hClrdware stack pOinter (I e. SP15S)
Vector refers to the address of an Interrupt or reset vector (see Table 1)
The number of stack accesses will vary according to the number of bytes saved
VMA cycles will occur until an Interrupt occurs
~
FIGURE 20(bl - OPERATION: ADDRESS BUS CYCLE-BY-CYCLE PERFORMANCE (")
~•
(CONTINUED)
To Figure 19
•
MC680ge MC68AOSe MC68BOS
•
MUL Unsigned multiply IA x B - DI
NEG, NEGA, NEGB Negate accumulator or memory
OAA,ORB Or memory with accumulator
ROL, AOLA, ROLB Rotate accumulator or memory left
AOA,AOAA,AORB Rotate accumulator or memory right
SBCA,SBCB Subtract memory from accumulator with bouow
STA, STB Store accumulator to memory
SUBA,SUBB Subtract memory from accumulator
TST, TSTA, TSTB Test accumulator or memory location
TFA Al, A2 Transfer Al to A2 IA1, A2 ~ A, B, CC, DPI
NOTE A, B, CC or DP may be pushed to Ipulled froml either stack with PSHS, PSHU IPULS,
PULUI Instructions
NOTE D may be pushed Ipulledl to either stack With PSHS, PSHU (PULS,
PULUI Instructions
4-290
MC6809. MC68A09· MC68B09
•
BNE, LBNE Branch If nOt equal
BMI, LBMI Branch If minus
BPL, LBPL Branch If plus
BCS, LBCS Branch If carry set
BCC, LBCC Branch If carry clear
BVS, LBVS Branch If overflow set
BVC, LBVC Branch If overflow clear
SIGNED BRANCHES
SGT, LBGT Branch If greater (signed)
BVS, LBVS Branch If invalid 2's complement result
BGE, LBGE Branch If greater than or equal (signed)
BEQ, LBEQ Branch If equal
BNE, LBNE Branch If not equal
BLE, LBLE Branch If less than or equal (signed)
BVC, LBVC Branch If valid 2'~ complement result
BLT, LBLT Branch If less than (signed)
UNSIGNED BRANCHES
BHI, LBHI Branch If higher (unsigned)
BCC, LBCC Branch Ii higher or same (unsigned)
BHS, LBHS Branch If higher or same (unsigned)
BEQ, LBEQ Branch If equal
BNE, LBNE Branch If not equal
BLS, LBLS Branch If lower or same (unsigned)
BCS, LBCS Branch If lower (unsigned)
BLO, LBLO Br8r>ch If lower (unsIgned)
OTHER BRANCHES
BSR, LBSR I Branch to subroutine
BRA, LBRA Branch always
BRN, LBRN I Branch never
TABLE B - MISCELLANEOUS INSTRUCTIONS
InstructIon Descnption
ANDCC AN[' condition code register
CWAI AN;) condition code register, then walt for Interrupt
NQP No operation
ORCC OR condition code register
JMP Jump
JSR Jump to subroutine
RTI Return from Interrupt
RTS Return from subroutine
SWI, SWI2, SWI3 Software Interrupt (absolute Indirect)
SYNC Synchronize with Interrupt line
4-291
MC680ge MC68AOOe MC68BOO
I
00 ASL, LSL 6 38 68 ASL, LSL 6+ 2+
09 ROL 6 39 RTS 5 69 ROL 6+ 2+
OA OEC 3A ABX 3 6A OEC i 6+ 2+
08
OC
00
OE
OF
INC
TST
JMP
CLR Direct
6
6
3
6
2
2
2
2
3B
3C
30
3E
3F
RTI
CWAI
MUL
SWI Inherent
6/15
;;,20
11
19
6B
6C
60
6E
6F
INC
TST
JMP
CLR
j
Indexed
6+
6+
3+
6+
2+
2+
2+
2+
•
11 Page 3 41 71
12 NDP Inherent 42 72
13 SYNC Inherent ;;,4 43 COMA 73 COM
14 44 LSRA 74 LSR
15 45 75
16 LBRA Relative 5 46 RORA 76 ROR 3
17 LBSR Relative 9 47 ASRA 77 ASR 3
18 48 ASLA, LSLA 78 ASL, LSL 3
19 DAA Inherent 49 ROLA 79 ROL 3
1A ORCC Immed 4A DECA 7A DEC 3
1B 4B 7B
1C ANDCC Immed 4C INCA 7C INC 3
10
1E
1F
SEX
EXG
TFR
Inherent
•
Inherent
2
2
40
4E
4F
TSTA
CLRA Inherent
70
7E
7F
TST
JMP
CLR
1
Extended
3
3
3
LEGEND
- Number of MPU cycles (less possible push puB or mdexed-mode cycles)
# Number of program bytes
.. Denotes unused opcode
4·292
MC6809- MC68AOO- MC68BOO
T
CO SUBB
91 CMPA 4 2 Cl CMPB Page 2 and 3 Machine
92 SBCA 4 C2 SBCB Codes
93 SUBO 6 C3 ADOO
94 ANOA C4 ANDB 1021 LBRN Relative 5 4
95 BITA C5 BITB Immed 1022 LBHI 4
5161
96 LOA C6 LOB Immed 1023 LBLS 5161 4
97 ST~ C7 1024 LBHS, LBCC 516) 4
EORA
1
98 C8 EORB 1025 LBCS, LBLO 5161 4
99 AOCA 4 C9 ADCB 1026 LBNE 5161 4
9A ORA 4 CA ORB 1027 LBEO 5161 4
9B AOOA 4 CB AODB 1028 LBVC 5161 4
9C
90
9E
9F
CMPX
JSR
LOX
STX
6
7
5
5
CC
CD
CE
CF
LDD
LDU
1
Imrr,ed 3
1029
102A
102B
102C
LBVS
LBPL
LBMI
LBGE
5161
5161
5161
5161
4
4
4
4
Direct 4 1020 LBLT 5161 4
AO SUBA' Indexed 4+ 2+ DO SUBB
Dl CMPB
102E LBGT 5161 4
Al CMPA 4+ 2+ Relative 5161 4
D2 4 102F LBLE
A2 SBCA 4+ 2+ SBCB
•
ADDD 103F SWI2 Inherent 20 2
A3 SUBO 6+ 2+ 03 6
D4 ANOB 4 1083 CMPO Immed 5 4
A4 ANOA 4+ 2+
A5 BITA 4+ 2+ D5 BIT8 4 108C CMPY I 5 4
lOBE LOY Immed 4 4
06 LDB 4
A6
A7
A8
A9
LOA
STA
EORA
AOCA
4+
4+
4+
4+
2+
2+
2+
2+
D7
08
09
STB
EORB
AOCB
4
4
4
1093
109C
109E
CMPO
CMPY
LOY
Dr 7
7
6
3
3
3
OA ORB 4 109F STY Direct 6 3
AA ORA 4+ 2+ lOA3 CMPO 3+
AB AOOA 4+ 2+ DB ADDB Ind.xed ; :
DC LDD
lOAC CMPY 3+
AC
AD
CMPX
JSR
6+
7+
2+
2+ DO STD 5 10AE LOY t 6+ 3+
DE LDU 5 lOAF STY Indexed 6+ 3+
AE LOX 5+ 2+
AF STX Indexed 5+ 2+ OF STU Direct 5 lOB3 CMPO Extefded 8 4
10BC CMPY 4
EO SUBB Indexed 4+ 2+ lOBE LOY 4
BO SUBA Extended El CMPB 4+ 2+ 10BF STY Extended 4
Bl CMPA 3 E2 SBCB 4+ 2+ Immed 4
lOCE LOS 4
B2 SBCA 3 E3 AODD 6+ 2+ lODE LOS Direct 6 3
B3 SUBO 3 E4 ANDB 4+ 2+ 100F STS Direct 6 3
B4 ANOA 5 3 E5 BITB 4+ 2+ lOEE LOS Indexed 6+ 3+
B5 BITA 5 3 E6 LDB 4+ 2+ lOEF STS Indexed 6+ 3+
B6 LOA 5 3 E7 STB 4+ 2+ 10FE LDS Extended 7 4
B7 STA 5 3 E8 EORB 4+ 2+ 10FF STS Extended 7 4
B8 EORA 5 3 E9 AOCB 4+ 2+ 113F SWI3 Inherent 20 2
B9 ADCA 5 3 EA ORB 4+ 2+ 1183 CMPU Immed 4
BA ORA 3 EB ADOB 4+ 2+ 118C CMPS Immed 5 4
BB ADDA 3 EC LOO 5+ 2+
1j
1193 CMPU Direct 7 3
BC CMPX 3 ED STD 5+ 2+ 119C CMPS Direct 7 3
BO JSR 3 EE 2+
LDU 5+ 11A3 CMPU Indexed 7+ 3+
BE LDX 3 EF STU Indexed 5+ 2+ 11AC CMPS Indexed 7+ 3+
BF STX Extended 6 3 llB3 CMPU Extended 8 4
FO SUBB Extended 5 3
llBC CMPS Extended 8 4
Fl CMPB 5 3
F2 SBCB 5 3
F3 AOOO 7 3
F4 ANOB 5 3
F5 BITB 5 3
F6 LOB 5 3
F7 STB 5 3
NOTE All unused opcodes are both undefined F8 EORB 5 3
and Illegal F9 ADCB 5 3
FA ORB 5 3
FB AODB Extended 5 3
FC LDD Extended 6 3
FO
FE
FF
STD
LDU
STU
t
Extended 6
~
3
3
3
4-293
MC6809-MC68A09-MC68B09
Instruction Forms
Immediate
Op - # Op
Direct
- #
Indexed
OJ! - # Op
Extended
- , Op
Inherent
- I Description
5 3 2 1 0
H N Z V C
ABX
ADC ADCA
ADCB
89
C9
2
2
2
2
99
D9
4
4
2
2
A9
E9
4+
4+
2+
2+
B9
F9
5
5
3
3
3A 3 1 B+X-X (Unsigned)
A+M+C-A
B+M+C-B
···· ·
I
I
I
I
I
I
I
I
I
I
ADD AOOA 88 2 2 9B 4 2 A8 4+ 2+ 88 5 3 A+M-A I I I I I
AOOB CB 2 2 DB 4 2 EB 4+ 2+ FB 5 3 8+ M-8 I I I I I
AND
AOOO
ANDA
C3
84
4
2
3
2
03
94
6
4
2
2
E3 6+
A4 4+
2+
2+
F3
B4
7
5
3
3
D+M M+ 1-D
AA M-A ·· I
I
I
I
I
0
I
··
AN DB
ANOCC
C4
1C
2
3
2
2
D4 4 2 E4 4+ 2+ F4 5 3 B A M-B
CC A IMM-CC · I I a
7
~I[H
ASL ASLA 48 2 1 8 I I I I
ASLB
ASL 08 6 2 68 6+ 2+ 78 7 3
58 2 1
M c
Ililllll-o
b7 bO
8
8
I
I
I
I
I
I
I
I
~lqlmTIlHJ ···
ASR ASRA 47 2 1 8 I I I
ASR8 57 2 1 8 I I I
ASR 07 6 2 67 6+ 2+ 77 7 3 b7 60 c 8 I I I
BIT BITA
BITB
85
C5
2
2
2
2
95
D5
4
4
2
2
A5
E5
4+
4+
2+
2+
85
F5
5
S
3
3
Bit Test A (M A A)
Bll Test B (M A BJ ·· ··
I
I
I
I
a
a
···
CLR CLRA 41 2 1 a-A a 1 a a
CLRB 5F 2 1 O-B a 1 a a
•
CLR OF 6 2 6F 6+ 2+ 7F 7 3 O-M a 1 a 0
CMP CMPA 81 2 2 91 4 2 A1 4+ 2+ B1 5 3 Compare M from A 8 I I I I
CMPB C1 2 2 D1 4 2 E1 4+ 2+ F1 5 3 Compare M from B 8 I I I I
CMPO 10
83
5 4 10
93
7 3 10
A3
7+ 3+ 10
B3
8 4 Compare M M + 1 from 0
·I I I I
CMPS 11
8C
5 4 11
9C
7 3 11
AC
7+ 3+ 11
BC
8 4 Compare M M + 1 from S
· I I I I
CMPU 11
83
5 4 11
93
7 3 11
A3
7,
" 11
B3
8 4 Compare M M + 1 from U
· I I I I
··
CMPX BC 4 3 9C 6 2 AC 6+ 2+ BC 7 3 Compare M M + 1 from X I I I I
CMPY 10 5 4 10 7 3 10 7+ 3+ 10 8 4 Compare M M + 1 from Y I I I I
8C 9C AC 8C
COM COMA 43 2 1 A-A
·t I a 1
··
COM8 53 2 1 B-B I I a 1
COM 03 6 2 63 6+ 2+ 73 7 3 M-M I I 0 1
CWAI 3C "2( 2 CC A IMM-CC Walt for Interrupt 7
DAA
DEC OECA
19
4A
2
2
1 DeCimal Adju,,\ A
1 A-1 A ·· ·
I
I
I
I
0 I
·· ··
I
OECB 5A 2 1 B-1-B I I I
DEC OA 6 2 bA 6+ 2+ 7A 7 3 M-1-M I I I
EOR EORA
EOR8
88
C8
2
2
2
2
98
08
4
4
2
2
A8 4+
E8 4+
2+
2+
B8
F8
5
5
3
3
A¥M-A
B¥ M-B ·· ··
I
I
I
I
a
0
EXG
INC
R1, R2
INCA
1E
4C
8
2
2 nJ- R22
1 A+ 1-A ·· · · · ··
I I I
··· · · · ···
INCB 5C 2 1 B + 1-8 t I I
INC OC 6 2 6C 6+ 2t 7C 7 3 M+ l-M I I I
JMP OE 3 2 6E 3+ 2+ 7E 4 3 EA3_ PC
JSR
LD LOA 86 2 2
90
96
7
4
2
2
AD
A6
7+
4+
2+
2+
BD
B6
8
5
3
3
Jurnp to Subroutine
M-A I
·· · · · ··
I 0
··· ···
LOB C6 2 2 06 4 2 E6 4+ 2+ F6 5 3 M-B I I 0
LOD cC 3 3 DC 5 2 EC 5+ 2+ FC 6 3 MM+l-D I I a
LOS 10 4 4 10 6 3 10 6+ 3+ 10 1 4 MM+l-S I I a
CE DE EE FE
LOU
LOX
CE
8E
3
3
3
3
DE
9E
5
5
2
2
EE
AE
5+
5+
2+
2+
FE
BE
6
6
3
3
MM+l-U
M M -+ l-X
I
I ··I
I
0
0 ··
LOY 10
8E
4 4 10
9E
6 3 10
AE
6+ 3+ 10
BE
7 4 M M-+ l-Y I I
· a
·
LEA LEAS
LEAU
32
33
4+
4+
2+
2+
EA3_. S
EA3_ U ·· ·· ·· ·· ··
·· ·· ·· ··
LEAX 30 4+ 2+ EA3_X I
LEAY 31 4+ 2+ EA3_ y I
4·294
MC6809-MC68AOO-MC68BOO
Inltruction Forma Op
Immediate
- , Op
Direct
- , Op
Indexed
- , Extended
Op - , Op
Inherent
- , Description
5 3 2 1 0
H N Z VI"
LSL LSLA
·
··· ·
48 2 1 I I I I
LSLB
tSL 08 6 2 58 6+ 2+ 78 7 3
58 2 1 ~I[H
A
c b7
-
11111111-
bO
0 I I I I
I I I I
a
~Io ~ 1t t t t t t HJ
LSR LSRA 44
·· ··
2 1 I I
LSRB 54 2 1 a I I
LSR 04 6 2 64 G+ 2+ 74 7 3 M b7 bO c a I I
MUL
NEG NEGA
NEGB
3D
40
50
11
2
2
1 Ax B-O IUnslgnedl
1 A+ I-A
1 B+ l-B
8
B
·· ·
I
I
I
I
I
I
I
9
I
I
NEG 00 6 2 60 6+ 2+ 70 7 3 M+l-M 8 I I I I
··· · · · ···
NOP 12 2 1 No Operatloll
OR ORA 8A 2 2 9A 4 2 AA 4+ 2+ BA 5 3 A V M-A I I a
ORB CA 2 2 DA 4 2 EA 4+ 2+ FA 5 3 B V M-B I I 0
ORCC lA 3 2 CC V IMM-CC 7
PSH PSHS
PSHU
34 5+
36 5+ 4
2
2
PUS!I Registers on S Stack
Push Reqlsters on U Stack ·· ·· ·· ·· ··
PUL PULS
PULU
35 5+
37 5+ 4
2
2
Pull ReglstPfs irorn S Stack
Pull Registers !rom U Stack ·· ·· ·· ·· ··
ROL ROLA 49 2 1
~1L{Ht ·
I I I I
··· ·
t t t t t tP
II
ROLB £,g 2 1 I I I I
ROL 09 6 2 69 6+ 2+ 79 7 3 c b7 50 I I I I
~l qJ:Oj t t t t t t tP
ROR RORA 46 2 1 I I I
RTI
RORB
ROR 06 6 2 66 6+ 2+ 76 7 3
56
3B 6/lt
2 1
c b7
1 Return From Interrupt
bO ·· ··
I
I
I
I
I
I
7
RTS
SBC S8CA
SBCB
82
C2
2
2
2
2
92
D2
4
4
2
2
A2
E2
4+
4+
2+
2+
82
F2
5
5
3
3
39 5 1 Return trOni Subroutine
A M C-A
8 - M"- C- 8
8 I
8 1
·····
I
I
I
I
I
I
··· a ···
SEX lD 2 1 Sign Extend B ,nlO A I I 0
ST STA 97 4 2 A7 4+ 2+ B7 5 3 A-M I I a
STB D7 4 2 E7 4+ 2+ F7 5 3 B-M I I
·· ··
STD DD 5 2 ED 5+ 2+ FD 6 3 D-MM+l I I a
STS 10 6 3 10 6+ 3+ 10 7 4 S-M M t 1 I I 0
DF EF FF
STU
STX
DF
9F
5
5
2
2
EF
AF
5+
5+
2+
2+
FF
BF
6
6
3
3
U-MM+l
X-M M + 1
I
I·· a ··
I
I
a
0
SUB
STY
SUBA 60 2 2
10
9F
90 4
6 3
2
10
AF
AO
6+
4+
3+
2+
10
BF
BO
7
5
4
3
Y-MM+l
A-M-A 8
I
I
· ·
I
I I I
SUB8 CO 2 2 DO 4 2 EO 4+ 2+ Fa 5 3 B- M-B 8 I I I I
SWI
SU8D
SWI 6
83 4 3 93 6 2 A3 6+ 2+ B3 7 3 D-M M+l-D
·· · · · ·
I I I I
· ·· · ·
3F 19 1 Software Interrupt 1
SWI6 10 20 2 Software Interrupt 2
3F
SWI6 11
3F
20 1 Software If"1terrupt 3
·····
SYNC
TFR Rl, R2
13
IF
2:4
6
1 Synchronize to Interrupt
2 Rl-Ril
·· ·· ·· ·· ··
··· ···
TST TSTA 4D 2 1 Test A I I a
TSTB 5D 2 1 Test B I I a
TST aD 6 2 6D 6+ 2+ 7D 7 3 Test M I I a
Notes
ThiS column gives a base cycle and byte count To obtam total count, add the values obtamed from the INDEXED ADDRESSING MODE table,
Table 2
Rl and R2 may be any pair of 8 bit or any pair of 16 bit registers
The 8 bit registers are A, B. CC. DP
The 16 bit registers are X. Y. U. S. D. PC
EA IS the effective address
4 The PSH and PUL Instructions require 5 cycles plus 1 cycle for each byte pushed or pulled
5(61 means 5 cycles If branch not taken, 6 cycles If taken (Branch instructions)
6 SWI sets I and F bits SWI2 and SWI3 do not affect I and F
Conditions Codes set as a direct result of the Instruction
8 Vaue of half-carry flag IS undefined
9 SpeCial Case - Carry set If b7 IS SET
4·295
MC6809- MC68A09-MC68B09
Branch Instructions
Addl8lling Addressmg
Mode Mode
InatruCbon Fonno OP
u·
-9 , DeacrlptlOn
S 3 2 1 0
H N Z V C Instruction Forms OP - I Description
5 3 2 1 0
H N Z V C
BCC BCC
lBCC
24
10
3
5161
2 Branch C-O
4 Long Branch ·· ·· ·· ·· ·· BlS BlS 23 3 2 Branch Lower
·····
·····
Of Same
24 c=o lBlS 10 5161 4 Long Branch Lower
BCS BCS
lBCS
25
10
25
3
5161
2 Branch C= 1
4 long Branch
C=1
·· ·· ·· ·· ·· BlT BLT
lBlT
23
;c--
or Same
2D 3" 2 Branch < Zero
10 516} 4 Long Branch<Zero ·· ·· ·· ·· ··
BEQ BEQ 27 3 2 Branch Z=l
·· ·· ·· ·· ·· 2D
·· ·· ·· ·· ··
lBEQ 10 5161 4 long Branch BMI BMI 2B 3 2 Branch Mmus
27 z=o LBMI 10 5161 4 Long Branch Mmus
BGE BGE
lBGE
2C
10
2C
3
5161
2 Branch~Zero
4 long Branch~Zero ·· ·· ·· ·· ·· BNE BNE
lBNE
2B
26 3 2 Branch Z=O
10 5161 4 Long Branch ·· ·· ·· ·· ··
·· ·· ·· ·· ··
BGT BGT 2E 3 2 Branch>lero 26 Z.. O
·· ·· ·· ·· ··
lBGT 10 5161 4 long 8ranch>Zero BPl BPl 2A 3 2 Branch Plus
2E lBPl 10 5161 4 Long Branch Plus
·· ·· ·· ·· ··
CaiiI 2A
•
lBHI 10 5161 4 Long Branch Higher BRA BRA 20 3 2 Branch Always
22 LBRA 16 5 3 Long Branch Always
BHS BHS 24 3 2 Branch Higher
·· · ·· BRN BRN
LBRN
21 3
5
2 Branch Never
4 Long Branch Never
·····
·····
or Same 10
lBHS 10 5161 4 Long Branch Higher 21
· ·· ·· ·· ··
24 or Same BSR BSR BD 7 2 Branch to Subroutine -
BlE BlE
lBlE
2F 3
10 5161
2 Branch:s Zero
4 Long BranchsZero ·· ·· ·· ·· ·· lBS" 17 9 3 Long Branch to
Subroutine
··...·· ·· ·· ··
2F BVC BVC 28 3 2 Branch V-O
·· ·· ·· ·· ··
-.-
fsi:o' BlO 25 3 2 Branch lower lBVC 10 5161 4 Long Branch
lBlO 10 I 5(6) 4 Long Branch Lower 2B v=o
-:- ·· ·· ··
BVS BVS 2B 3 2 Branch V-1
25 lBVS 10 5161 4 Long Branch
1 2B V~1
SIMPLE BRANCHES
OP SIMPLE CONDITIONAL BRANCHES (Notes 1-4)
BRA 20 3 Test True OP Fal.e OP
lBRA 16 5 N=l BMI 2B BPl 2A
BRN 21 2 Z=1 BEa 27 BNE 26
lBRN 1021 4 V=l BVS 29 BVC 28
BSR 80 7 2 C=l BCS 25 BCC 24
lBSR 17 9 3
Notes
1 All condItIonal branches have both short and long vanatlons
2 All short branches are 2 bytes and require 3 cycles
3 All condItional long branches are tormed by prefixing the short branch opcode with $10 and uSing a 16 blt destination offset H
4 All conditional long branches require 4 bytes and 6 cycles If the branch IS taken or 5 cycles If the branch IS not taken
4-296
MC6809. MC68A09. MC68B09
ORDERING INFORMATION
MC68A09C P
BEITER PROGRAM
Levell "S'~
Level 2 add "D" Level 3 add "DS"
4·297
MC6809E
(1.0 MHz)
@ MOTOROLA MC68A09E
(1.5 MHz)
MC68B09E
(2.0 MHz)
~
AddreSSing Modes
ARCHITECTURAL FEATURES
PSUFFIX
~"':; ...
•
• Two 16-blt Index Registers PLASTIC PACKAGE
• Two 16-blt Indexable Stack POinters
• Two 8-blt Accumulators can be Concatenated to Form One 16-Bit
f,.;' <.f CASE 711
~
Accumulator
• Direct Page Register Allows Direct AddreSSing Throughout Memory ........... SSUFFIX
HARDWARE FEATURES . . . . . . . . CERDIP PACKAGE
• External Clock Inputs, E and Q, Allow SynchronizatIOn CASE 734
• TSC Input Controls Internal Bus Buffers
• L1C Indicates Opcode Fetch
• AVMA Allows EffiCient Use of Common Resources In
A Multiprocessor System
• BUSY IS a Status Line for Multiprocessing FIGURE 1 - PIN ASSIGNMENT
• Fast Interrupt Request Input Stacks Only Condition Code Register
and Program Counter Vss
• Interrupt Acknowledge Output Allows Vectoring By DeVices
• SYNC Acknowledge Output Allows for SynchronizatIOn to External NMi
Event iRa
• Single Bus-Cycle RESET
• ~Ie 5-Volt Supply Operation
Fi1i1l
• NMI Inhibited After REStT Until After First Load of Stack POinter SS'
• Early AddreSil Valid Allows Use With Slower MemOries SA
• Early Write-Data for DynamiC MemOries
SOFTWARE FEATURES Vee
• 10 AddreSSing Modes AO
• M6800 Upward Compatible AddreSSing Modes
AI'
• Direct AddreSSing Anywhere In Memory Map
• Long Relative Branches A2
• Program Counter Relative A3
• True Indirect AddreSSing
• Expanded Indexed AddreSSing: A4
0, 5, 8, or 16-blt Constant Offsets A5
8, or 16-blt Accumulator Offsets
Auto-Increment/ Decrement by 1 or 2 A6 14
• Improved Stack Manipulation A7 15
• 1464 Instructions With Unique AddreSSing Modes AB 16
• 8 x 8 Unsigned Multiply
• 16-blt ArithmetiC A9 17
• Transfer/Exchange All Registers Al0 18
• Push/Pull Any Registers or Any Set of Registers
• Load Effective Address All 19
A12 20
4-298
MC6809EeMC68A09EeMC68B09E
MAXIMUM RATINGS
Rating Symbol Value Unit ThiS device contains circuitry to protect the
Supply Voltage -03to+70 V Inputs against damage due to high static
Vcc
voltages or electriC fields, however, It IS ad-
Input Voltage Vin -03to+70 V
vised that normal precautions be taken to
Operating Temperature Range TL to TH avoid application 01 any voltage higher than
MC6809E, MC68A09E, MC68B09E TA o to + 70 °c maximum rated voltages to thiS high Im-
Storage Temperature Range Tstg -55to+150 pedance CirCUit.
°c
Reliability of operation IS enhanced If unus-
ed Inputs are tied to an appropriate logic
voltage level le.g., either VSS or VCC!.
THERMAL CHARACTERISTICS
Characteristic Symbol Value Unit
Thermal Resistance
Ceramic 50
Cerdlp 8JA 60 °C/W
Plastic 100
POWER CONSIDERATIONS
•
8JA. Package Thermal Resistance, Junctlon-to-Amblent, °C/W
PO- PINT+ PPORT
PINT-ICCxVCC, Watts - Chip Internal Power
PPORT- Port Power OISSlpatlon, Watts - User Oetermlned
For most applications PPORT<C PINT and can be neglected. PPORT may become Significant If the device IS configured to
drive Oarllngton bases or sink LEO loads.
An approximate relationship between Po and T J Ilf PPORT IS neglectedl IS'
PO= K - IT J+273°CI 121
SolVing equations 1 and 2 for K gives.
K = PoolT A + 273°CI +8JAo P0 2 131
Where K IS a constant pertaining to the particular part K can be determined from equation 3 by measuring Po lat equllibrluml
for a known T A USing thiS value of K the values of Po and TJ can be obtained by solVing equations 111 and 121 iteratively for any
value of T A
4-299
MC6809Ee MC68A09Ee MC68B09E
2 Pulse Width. E Low PWEL 450 9500 295 9500 210 9500 ns
3 Pulse Width. E High PWEH 450 9500 280 9500 220 9500 ns
4 Clock Rise and Fall Time t r , tf - 25 - 25 - 20 ns
5 Pulse Width, 0 High PWOH 450 9500 280 9500 220 9500 ns
7 Delay Time, E to 0 Rise tEO 1 200 - 130 100 ns
7A Delay Time, 0 High to E Rise tE02 200 - 130 - 100 - ns
7S Delay Time, E High to 0 Fall tE03 200 - 130 - 100 - ns
7C Delay Time, 0 High to E Fall tE04 200 - 130 - 100 - ns
9 Address Hold Time tAH 20 - 20 - 20 - ns
11 Address Delay Time from E Low (SA. BS, R/WI tAD - 200 - 140 .- 110 ns
17 Read Data Setup Time tDSR 80 - 80 40 ns
18 Read Data Hold Time tDHR 10 - 10 - 10 - ns
20 Data Delay Time from 0 tDDO - 200 - 140 - 110 ns
21 Wrrte Data Hold Time tDHW 30 - 30 - 30 - ns
29 Usable Access Time tACC 695 - 440 - 330 - ns
•
Control Delay Time (Figure 21 tCD - 300 - 250 .- 200 ns
Interrupts, HALT, RESET, and TSC Setup Time tpcs 200 - 140 - 110 - ns
(Figures 7, 8, 9, 10, 13, and 141
TSC Drrve to Valid LogiC Level (Figure 141 tTSV - 210 - 150 - 120 ns
TSC Release MaS Buffers to High Impedance I Figure 141 tTSR - 200 - 140 - 110 ns
TSC Three·State Delay Time (Figure 141 tTSC - 120 85 - 80 ns
tPCr, - 100 100 - 100 ns
Processor Control Rise and Fall Time (Figure 8) -
tPCf
R/W, Address--n7V6i:x;1O(xlr-t--------t---------"~----__ttt'1\ii7
8A, BS
Read Data
Non-Muxed ---t--'t----t-t--------::::------------~-----_+-~
Write Data
NOTES:
~-----tCD------~
P<X')(XX)4
Not Valid
1. Voltage levels shown are VLSO 4 V, VIH",2 4 V, unless otherwise specified' 3 Hold time ( ®
I for SA and as IS not specified
2. Measurement pOints shown are 0.8 V and 2 0 V, unless otherwise specified 4 Usable access time IS computed by. 1 - 4 - 11 max - 17
4-300
MC6809E- MC68A09E-MC68B09E
+--VCC
+--VSS
Instruction
Register
FiAO
•
IRO
'--.rr=::::!'-. LlC
. . - - - - l.. AVMA
R/iN
TSC
HALT
BA
BS
BUSY
PROGRAMMING MODEL
FIGURE 4 - BUS TIMING TEST LOAD As shown In Figure 5, the MC6809E adds three registers to
the set available In the MC6800. The added registers Include
a Direct Page Register, the User Stack pOinter and a second
50V Index Register.
ACCUMULATORS (A, B, D)
The A and B registers are general purpose accumulators
which are used for arithmetic calculations and manipulation
Test POint o-..--.~ ..........
~ of data.
Certain instructions concatenate the A and B registers to
c form a single 16-blt accumulator. ThiS is referred to as the D
MM07000
Register, and IS formed with the A Register as the most
or EqUlv
significant byte
4-301
MC6809E-MC68A09E-MC68B09E
15 o
,~,,~
x- Index Register
Y - Index Register
PC Program Counter
, A I B
/
Accumulators
v
D
7 0
LI_____D_P_ _ _ _-'I Direct Page Register
7 0
I ElF I I I Iz I I I
H I N V C cc - Condition Code Register
'-----Zero
Carry
Overflow
' - - - - - - Negative
' - - - - - - - IRQ Mask
registers ' - - - - - - - - Half Carry
' - - - - - - - - - - FIRO Mask
STACK POINTER (U, 51 ' - - - - - - - - - - - - E n t l r e Flag
4-302
MC6809E-MC68A09E-MC68B09E
BIT3(N) Reset vectors are fetched from locations FFFE16 and FFFF16
Bit 31s the negative flag, which contains exactly the value (Table 1) when Interrupt Acknowledge IS true,
of the MSB of the result of the preceding operation Thus, a (BA - BS = 11 DUring Initial power-on, the Reset line should
negative two's-complement result will leave N set to a one. be held low until the clock Input signals are fully operational
Because the MC6809E Reset pin has a Schmitt-trigger in-
BIT 4 (I) put With a threshold voltage higher than that of' standard
Bit 4 IS the TRTI mask bit. The processor will not recognize peripherals, a simple R/ C network may be used to reset the
Interrupts from the mIT line If this bit IS set to a one NMI, entire system ThiS higher threshold voltage ensures that all
FTRQ, f!il1, m:sTI, and SWI all set I to a one, SWI2 and peripherals are out of the reset state before the Processor
SWI3 do not affect I
HALT
BITS (H) A low level on thiS Input pin Will cause the MPU to stop
Bit 5 IS the half-carry bit, and IS used to indicate a carry running at the end of the present Instruction and remain
from bit 3 In the ALU as a result of an 8-blt addition only halted indefinitely Without loss of data When halted, the BA
(ADC or ADD), This bit IS used by the DAA instruction to output IS driven high Indicating the buses are high Im-
perform a BCD decimal add adjust operation. The state of pedance BS IS also high which Indicates the processor IS In
this flag IS undefined In all subtract-like instructions the Halt state While halted, the MPU Will not respond to ex-
ternal real-time requests (FIRO, IROi although NMI or
BIT 6 IF) RESET Will be latched for later response DUring the Halt
Bit 6 IS the FIRO mask bit. The processor Will not °
state and E should continue to run normally A halted state
•
recognize Interrupts from the FIRO line If this bit IS a one (BA-BS= 11 can be achieved by pulling HALT low while
NMI, FIRO, SWI, and RESET all set F to a one. IRO, SWI2 RESET IS stili low See Figure 8
and SWI3 do not affect F.
BUS AVAILABLE, BUS STATUS (BA, BS)
BIT7 (E) The Bus Available output IS an Indication of an Internal
Bit 71s the entire flag, and when set to a one Indicates that control signal which makes the MOS buses of the MPU high
the complete machine state (all the registers) was stacked, Impedance When BA goes low, a dead cycle will elapse
as opposed to the subset state (PC and CC) The E bit of the before the MPU acqultes the bus BA Will not be asserted
stacked CC IS used on a return from Interrupt (RTIl to deter- when TSC IS actIVe, thus allOWing dead cycle consistency
mine the extent of the unstacklng. Therefore, the current E
left In the Condition Code Register represents past action. The Bus Status output signal, when decoded With BA,
represents the MPU state (valid With leading edge of 01
4-303
• s:
~
m
s:•
I m
FIGURE 7 - RESET TIMING
I m + 1 I m + 2 I m + 3 I m + 4 I m + 5 I m + 6 Im + 7 I I n I n + 1 I n + 2 I n + 3 I n + 4 I n + 5 I n + 6 I n + 7 I n + 8 I n + 9 I n + 10 I
I
m
s:•
~CD
~
m
Address -'-'-'",-,-UJl,==".J'==J'-,==J'-,-==-,''-,-,==-,,==,,.J'==J'-,_-=c! . ____ . ____ . ____ • ____ • ____ • ____ • ____ .,
~
Daw~Ul~~~_-1L-_-A__Jl_~~~~~~>r!.~~~~~~~_~L-_-J'~_~
~
Lie ..\,.\\l..lI..\,.I_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _- f
NOTE Tlmmg measurements are referenced to and from a low voltage of a8 volts and a high voltage of 2 0 volts, unless otherwise noted
s:
(')
FIGURE 8 - HALT AND SINGLE INSTRUCTION EXECUTION TIMING FOR SYSTEM DEBUG ~
m
s:•
(')
~
Dead lnstructlon!lnstructlon! Dead
Cycle ! Fetch Execute Cycle Halted
m
Q
s:•
E
m
OJ
~
m
.J>. Bus
W Fetch Execute
0
01 R/W
BA _ _ _ _ _-----JI... \ I
BS ---------'/... \ I~---
Data
Bus
Instruction
Opcode
AVMA ~ ry I ,'-___
UC /
~----~ ~
NOTE Timing measurements are referenced to and from a low voltage of a 8 volts and a nigh voltage of 20 volts, unless otherwise noted
II
MC6809Ee MC68A09Ee MC68B09E
Sync Acknowtedge is indicated while the MPU IS waiting defer the rearbitration of the next bus cycle to Insure the In-
for external synchronization on an interrupt line. tegrity of the above operations. ThiS difference prOVides the
HaitI Acknowledge is indicated when the MC6809E IS In a indivisible memory access required for a "test-and-set"
Halt condition. primitive, uSing anyone of several read-modify-wrlte instruc-
tions.
NON MASKABL.E INTERRUPT INMII" Busy does not become active dUring PSH or PUL opera-
A negative transition on this input requests that a non- tions. A typical read-modify-wrlte instruction (ASL) IS shown
maskable interrupt sequence be generated. A non-maskable In Figure 12. Timing information is given In Figure 13. Busy IS
interrupt cannot be inhibited by the program, and also has a valid tCD after the rising edge of O.
higher priority than Fiim, iRO or software interrupts. During
recognition of an NMi, the entire machine state is saved on AVMA
the hardware stack. After resat, an NMI will not be racog- AVMA is the Advanced VMA signal and Indicates that the
nized until the first program load of the Hardware Stack MPU will use the bus In the follOWing bus cycle The predic-
Pointer lSI. The pulse width of NMi low must be at least one tive nature of the AVMA Signal allows effiCient shared-bus
E cycle. If the Nfiifl input does not meet the minimum set up multiprocessor systems. AVMA IS LOW when the MPU IS In
with respect to 0, the interrupt will not be racognlzed until either a HALT or SYNC state AVMA IS valid tCD after the
the next cycle. See Figure 9. rising edge of O.
I
quence has PriOrity over the standard Interrupt Request of every instruction, and ItS tranSition from HIGH to LOW
(iRO), and is fast in the sense that it stacks only the contents will Indicate that the first byte of an opcode Will be latched at
of the condition code register and the program counter. The the end of the present bus c'{cle. L1C will be HIGH when the
interrupt service routine should clear the source of the inter- MPU is Halted at the end of an instruction, h.e., not In CWAI
rupt before dOing an RT!. See Figure 10. or RESET) In SYNC state or while stacking dUring Interrupts
L1C is valid tCD after th\l riSing edge of O.
INTERRUPT REQUEST liRO)*
A low level input on thiS pin will Initiate an Interrupt Re-
quest ~ence provided the mask bit (I) in the CC is clear. TSC
Since IRO stacks the entire machine state it provides a TSC (Three-State Controll will cause MOS address, data,
slower response to interrupts than FiRO. IRO also has a and R/iN buffers to assume a high-Impedance state. The
lower priOrity than FIRO. Again, the interrupt service routine control Signals (BA, BS, BUSY, AVMA and L1CI Will not go
should clear the source of the interrupt before dOing an RT!. to the high-impedance state. TSC IS Intended to allow a
See Figure 9. Single bus to be shared With other bus masters (processors
or DMA controllersl.
CLOCK INPUTS E, 0 While E is low, TSC controls the address buffers and R/W
directly. The data bus buffers dUring a write operation are In
E and 0 are the clock signals reqUIred by the MC6809E. 0
a high-impedance state until 0 rises at which time, If TSC IS
must lead E; that is, a transition on 0 must be followed by a
true, they will remain in a high-Impedance state. If TSC IS
similar tranSition on E after a minimum delay. Addresses will
held beyond the rising edge of E, then it will be Internally lat-
be valid from the MPU, tAD after the falling edge of E, and
ched, keeping the bus drivers in a high-Impedance state for
data will be latched from the bus by the falling edge of E.
the remainder of the bus cycle. See Figure 14.
While the 0 input is fully TIL compatible, the E input diractly
drives internal MOS circuitry and, thus, requires a high level
above normal TTL levels. This approach minimizes clock
skew Inherent With an Internal buffer. Timing and waveforms
for E and 0 are shown In Figure 2 while Figure 11 shows a MPU OPERATION
Simple clock generator for the MC6809E.
During normal operation, the MPU fetches an Instruction
BUSY from memory and then executes the requested function
Busy will be high for the read and modify cycles of a read- This sequence begins after RESET and IS repeated indefinite-
modify-write instruction and dUring the access of the first ly unless altered by a special Instruction or hardware occur-
byte of a double-byte operation (e.g., LOX, STD, ADDDI. rence. Software instructions that alter normal MPU opera-
Busy is also high during the first byte of any indirect or other tion are: SWI, SWI2, SWI3, CWAI, RTI and SYNC. An in-
vector fetch le.g., jump extended, SWI indirect etc.l. terrupt or HALT input can also alter the normal execution of
In a multi-processor system, busy indicates the need to instructions Figure 15 IS the flow chart for the MC6809E
'iiiMi, Film, and iiiO requests are sampled on the failing edge of O. One cycle IS reqUired for synchrOnization before these Interrupts are rec.st
nlzad. The pending interrupt(sl will not be serviced until completion of the current Instruction unless a SYNC or CWAI oondlllon IS present. If IRO
and FIRO do not remain low until completion of the current Instruction they may not be recognized. However, iiiMi IS latched and need only re-
!!!!!!!..!.ow for one cycle. No Interrupts are reoognlzed or latched between the failing edge of ifESEf and the roSlng edge of BS Indicating
RESET acknowledge. See REID sequence in the MPU flowchart In Figure 15.
4·306
s:
i
~
FIGURE 9 - IRQ AND NMi INTERRUPT TIMING s:
last cycle
of Current
Instruction
I m-2 I m-l I
I·
m
Interrupt Stacking and Vector Fetch Sequence
I m+ 1 I m+2 I m+3 I m+4 I m+5 I m+6 I m+ 7 I m+S I m+9 Im+ 101 m+ 11 Im+ 12 Im+ 13 Im+ 14 Im+ 151m+ 161m+ 17 Im+ lSi
InstructIOn
•
Fetch
I
n n+ 1 I
I
m
s:•
~OJ
E·
~
Address ~~~>r----~--~---->r---'~---v----cr---'r----v----cr---'r---,r----v----'r---,,----\,---'r---,,----v----,r---.r----v---~~
B~
m
IRQ or
NMI
.j::>.
~
Data
VMA PCl PCH USl USH IYl IYH IXl IXH ~~~~
BS~ /
~
AVMA~===~A~:'==~~~======================================~~~~~~~~~~~~
==>.
BUSY
L1C / , 1\ c=..
L--_ _ __
•
• s::
~m
FIGURE 10 -FIRQ INTERRUPT TIMING
I
s::•
Last Cycle Iinstruction
lof Current ,- Interrupt Stacking and Vector Fetch Sequence • Fetch
InstructIon
!
I m-2 I m-1 m I m+1 m+2 I m+3 I m+4 I m+5 I m+6 I m+7 I m+B I m+9 n+1 n+
E'
Q '1'
s::
A~~:SS~ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
-1 i..-tpcs PC PC FFFF SP - 1 SP - 2 SP - 3 $FFFF $FFF6 $FFF7 $FFFF New PC New PC+ 1 ~aI
~
~~~_I----------------------------------------------------------------------------------------- m
Data
i R/W~ \
PCH CCR New PCH
" - - - - - - - - -
New PCl
BA~
BS~~-------=------
~=-----------------~I \~___________
AVMA
BUSV:=J 1\ ~
LIC , - ---
\
E
r ------------------,
I I
I I
I I
I I
I I
Optional
IMADY
MRDY(lrcUlt
I
I I
I I
I
!...----- ___ ..J
><:H~-{:>E to Processor
4X
Q
+5V
S'i'REi"Ci=i -----------111
Memory Memory
Location Contents Contents Descnptlon
--
$0203 $00 Indirect Address La-Byte
--
$6300~ Effective Address HI-Byte
Target Data
4-309
Last Cycle of
• 3:
~'1'
FIGURE 13 - BUSY TIMINC,
Current Instr
m-1 m I m+1 m+2 m+3 m+4 m+5 m+6 m+7 m+B m+9 I m+10 I n
Q 3:
!
m
•
3:
BUSY
LlC _ _ _-'
A~ ________________________________________________~
i
AVMA _ _ _-' ~
m
E
~
(,.)
.....
o
FIGURE 14 - TSC TIMING
Q\ 1 1 f_t pcs _
, ",Jk \ ~~
'"
R/W. AOOR
I77Jj f""
-
"''"1 t: "'"~ f -1
I
--l !---tDow ~
r\...-tT_sV_ _
;.;:..1-....:..;tTS,-,-V_ _
MPU DATA
-------,> c:J '-see
<'--r--
Note~
NOTE Data will be asserted by the MPU only dUring the Interval while R/W IS low and IE or OJ IS high
A composite bus cycle IS shown to give most cases of timing
Timing measurements are referenced to and from a low voltage of 0 B volts and a high voltage of 2 0 volts. unltess otherwise noted
s:
~
FIGURE 15 - FLOWCHART FOR MC6809E INSTRUCTIONS
m
•
s:
(')
~
~
s:
~OJ
~
m
~
~
.....
.....
CWAI
Bus State BA I BS
Running 010
Interrupt or Reset Acknowledge o I 1
Sync Acknowledge o
Halt Acknowledge
•
MC6809E-MC68A09E- MC68B09E
ADDRESSING MODES
•
Constant Offset faster than extended addreSSing Of course, only 256 loca-
Accumulator Offset tions lone page! can be accessed without redefining the con-
Auto Incrementl Decrement tents of the DP register. Since the DP register IS set to $00 on
Indexed Indirect Reset, direct addreSSing on the MC6809E IS upward compati-
Relative ble with direct addreSSing on the M6800 Indirection IS not
Short/Long Relative Branching allowed In direct addreSSing. Some examples of direct ad-
Program Counter RelatIVe Addressing dreSSing are'
LDA where DP = $00
INHERENT (INCLUDES ACCUMULATOR! LDB where DP=$10
In this addressing mode, the opcode of the instruction LDD <CAT
contains all the address Information necessary Examples of
NOTE: < IS an assembler directive which forces direct
Inherent AddreSSing are ABX, DAA, SWI, ASRA, and
addreSSing
CLRB
IMMEDIATE ADDRESSING
REGISTER ADDRESSING
In Immediate AddreSSing, the effective address of the data
Some opcodes are followed by a byte that defines a
IS the location Immediately following the opcode II e., the
register or set of registers to be used by the instruction ThiS
data to be used In the instruction Immediately follows the op-
IS called a post byte Some examples of register addreSSing
code of the Instruction! The MC6809E uses both 8 and
are
16-blt Immediate values depending on the size of argument
TFR X, Y Tra~sfers X Into Y
specified by the opcode Examples of instructions with Im-
mediate AddreSSing are EXG A, B Exchanges A with B
LDA #$20 PSHS A, B, X, Y Push Y, X, B and A onto S
stack
LDX #$FOOO
PULU X, Y, D Pull D, X, and Y from U stack
LDY #CAT
NOTE: # signifies Immediate addreSSing, $ Signifies hexa-
decimal value to the MC6809 assembler.
INDEXED ADDRESSING
EXTENDED ADDRESSING
In all Indexed addreSSing, one of the pOinter registers IX,
In Extended AddreSSing, the contents of the two bytes Im-
Y, U, S, and sometimes PC! IS used In a calculation of the ef-
mediately following the opcode fully specify the 16-blt effec-
fective address of the operand to be used by the instructIOn
tive address used by the Instruction Note that the address
Five baSIC types of IndeXing are available and are discussed
generated by an extended instruction defines an absolute ad-
below The postbyte of an Indexed instruction specifies the
dress and IS not posItIOn Independent Examples of Extended
baSIC type and vanatlon of the addreSSing mode as well as
AddreSSing Include'
the pOinter register to be used. Figure 16 lists the legal for-
LDA CAT mats for the post byte Table 2 gives the assembler form and
STX MOUSE the number of cycles and bytes added to the baSIC values for
LDD $2000 Indexed addreSSing for each vanatlon
4·312
MC6809E-MC68A09E-MC68B09E
-----
1 x x I 1 1 a 1 EA - ,PC + 16 Bit Offset
1 R R I 1 1 1 1 EA = [,Addressl The two's complement 5-blt offset IS Included In the
postbyte and, therefore, IS most efficient In use of bytes and
'----Addressing Mode Field cycles. The two's complement 8-blt offset IS contained In a
'--------Indtrect Field
ISlgn bit when b7 = Ol
' - - - - - - - - - - - - R e g l s t e r Field RR
00 = X
single byte following the postbyte The two's complement
16-bIt offset IS In the two bytes following the postbyte In
most cases the programmer need not be concerned with the
size of thiS offset since the assembler will select the optimal
size automatically
II
01 = Y Examples of constant-offset indeXing are'
10 = U LOA 23,X
11 = S LOX -2,8
x = Don't Care
LDY 3OO,X
d=Offset Bit
LOU CAT,Y
0= Not Indtrec!
1=
1 = Indtrect
4·313
MC6809E-MC68A09E-MC68B09E
Accumulator-Offset Indexed - This mode IS similar to $0100 LDA [$10,Xl EA IS now $F010
constant offset Indexed except that the two's-complement
value In one of the accumulators (A, B or D) and the con- $F010 $F1 $F150 IS now the
tents of one of the pOinter registers are added to form the ef- $F011 $50 new EA
fective address of the operand The contents of both the ac-
cumulator and the pOinter register are unchanged by the ad- $F150 $AA
dition. The postbyte specifies which accumulator to use as
an offset and no additional bytes are reqUired. The advan- After Execution
tage of an accumulator offset IS that the value of the offset A=$AA (Actual Data Loaded)
can be calculated by a program at run-time X=$FOOO
Some examples are:
All modes of Indexed indirect are Included except those
LDA B,Y
which are meaningless (e.g., auto Increment!decrement by
LDX D,Y
1 Indirect!. Some examples of Indexed indirect are
LEAX B,X
LDA LXJ
Auto Increment!Decrement Indexed - In the auto incre-
LDD [10,SJ
ment addreSSing mode, the pOinter register contains the ad-
LDA [B,YJ
dress of the operand. Then, after the pOinter register IS used
LDD LX+ +J
It IS Incremented by one or two. This addreSSing mode IS
useful In stepping through tables, moving data, or for the
creation of software stacks In auto decrement, the pOinter
register IS decremented prior to use as the address of the
•
RELATIVE ADDRESSING
data The use of auto decrement IS Similar to that of auto in- The byte(s) follOWing the branch opcode IS (are) treated as
crement, but the tables, etc, are scanned from the high to a Signed offset which (!lay be added to the program counter.
low addresses. The size of the Increment! decrement can be If the branch condition IS true then the calculated address
either one or two to allow for tables of either 8- or 16-blt data (PC + Signed offsetl IS loaded Into the program counter
to be accessed and IS selectable by the programmer The Program execution continues at the new location as In-
pre-decrement, post-Increment nature of these modes allow dicated by the PC; short (1 byte offset) and long (2 bytes off-
them to be used to create additional software stacks that set) relative addreSSing modes are available All of memory
behave Identically to the U and S stacks can be reached. In long relative addreSSing as an effective ad-
Some examples of the auto Increment! decrement ad- dress Interpreted modulo 216 Some examples of relative ad-
dressing modes are: dreSSing are:
LDA ,X+
STD ,Y+ +
BEG CAT (shortl
LDB ,-V BGT DOG (short)
LDX ,--S CAT LBEQ RAT (long)
Care should be taken In performing operations on 16-blt DOG LBGT RABBIT (long)
pOinter registers (X, Y, U, S) where the same register IS used
to calculate the effective address
ConSider the follOWing Instruction
STX O,X + + (X Initialized to 0) RAT NOP
The deSired result IS to store a 0 In locations $0000 and $0001 RABBIT NOP
then Increment X to pOint to $0002 In reahty, the follOWing
occurs
O-temp calculate the EA, temp IS a holding register
X+2-X perform autOincrement PROGRAM COUNTER RELATIVE
X-Itemp) do store operation The PC can be used as the pOinter register With B or 16-blt
signed offsets As In relative addreSSing, the offset IS added
to the current PC to create the effective address The effec-
INDEXED INDIRECT tive address IS then used as the address of the operand or
All of the indeXing modes With the exception of auto In- data Program Counter Relative AddreSSing IS used for
crement! decrement by one, or a ± 5-blt offset may have an wntlng position Independent programs Tables related to a
additional level of Indirection specified In indirect address- particular routine Will maintain the same relationship after
Ing, the effective address IS contained at the locatIOn the routine IS moved, If referenced relative to the Program
speCIfied by the contents of the Index Register plus any off- Counter Examples are
set In the example below, the A accumulator IS loaded in- LOA CAT, PCR
directly uSing an effective address calculated from the Index
LEAX TABLE, PCR
Register and an offset.
Before Execution Since program counter relative IS a type of IndeXing, an
A=XX (don't additional level of indirection IS available
care) LDA [CAT, PCRJ
X=$FOOO LDU [DOG, PCR1
4·314
MC6809E-MC68A09E-MC68B09E
•
sequence is fixed; each bit defines a umque register to push LEAX MSG1, PCR
or pull, as shown below LBSR PDATA (Pnnt message routine)
4-315
MC6809E·MC68AOSE·MC68BOSE
Autolncrement-by-two and autodecrement-by-two Instruc- dress bus, R/Vii = 1 and BS = O. The follOWing examples Il-
tions work similarly Note that LEAX ,X + does not change lustrate the use of the chart; see Figure 18.
X, however LEAX ,- X does decrement X LEAX 1,X should
be used to Increment X by one Example 1: LBSR (Branch Takenl
Before Execution SP = FOOO
MUL
Multiplies the unsigned binary numbers In the A and B ac-
cumulator and places the unsigned result Into the 16-blt D
accumulator. This unsigned multiply also allows multlple- $9000 LBSR CAT
preCISion multiplications
•
7 FFFF 1 VMA Cycle
8 EFFF 80 0 Stack High Order Byte of
SYNC Return Address
After encountenng a Sync instruction, the MPU enters a 9 EFFE 03 0 Stack Low Order Byte of
Return Address
Sync state, stops processing Instructions and walts for an In-
terrupt If the pending Interrupt IS non-maskable (NMII or Example 2: DEC (Extended)
maskable (FIRO, IRO) With ItS mask bit (F or I) clear, the pro-
cessor will clear the Sync state and perform the normal Inter- $8000 DEC $AOOO
rupt stacking and service routine Since FIRO and IRO are $AOOO FCB $80
not edge-tnggered, a low level With a minimum duration of
three bus cycles IS required to assure that the Interrupt will CYCLE-BY-CYCLE FLOW
be taken If the pending Interrupt IS maskable (FIRO, IRO) Cycle # Address Data R/W Description
With ItS mask bit (F or II set, the processor will clear the Sync 1 9000 7A 1 Opcode Fetch
state and continue processing by execullng the next Inllne 2 8001 AO Operand Address, High Byte
instruction Figure 17 depicts Sync timing 3 8002 00 ~and Address, Low Byte
4 FFFF VMA Cycle
Software Interrupts 5 AOOO BO Read the Data
6 FFFF 1 VMA Cycle
A Software Interrupt IS an Instruction which will cause an 7 AOOO 7F 0 Store the Decremented Data
Interrupt, and ItS associated vector fetch. These Software In-
terrupts are useful In operating system calls, software "The data bus has the data at that particular address
debugging, trace operations, memory mapping, and soft-
ware development systems. Three levels of SWI are available
on thiS MC6B09E, and are pnontlZed In the following order MC6809E INSTRUCTION SET TABLES
SWI, SWI2, SWI3
16-Bit Operation The instructions of the MC6B09E have been broken down
IntO five different categones. They are as follows.
The MC6B09E has the capability of processing 16-blt data.
These instructions Include loads, stores, compares, adds, 8-Blt operation (Table 4)
subtracts, transfers, exchanges, pushes and pulls 16-Blt operation (Table 5)
Index register/stack pOinter Instructions (Table 61
Relative branches Iiong or short) (Table 7)
CYCLE-BY-CYCLE OPERATION Miscellaneous instructions !Table 8)
The address bus cycle-by-cycle performance chart Il- HexadeCimal values for the instructions are given In
lustrates the memory-access sequence corresponding to Table 9.
each possible Instruction and addressing mode In the
MC6B09E Each instruction begins With an opcode fetch.
While that opcode IS being Internally decoded, the next pro-
gram byte IS always fetched (Most instructions will use the
next byte, so thiS technique considerably speeds PROGRAMMING AID
throughput.) Next, the operation of each opcode will follow Figure 18 contains a compilation of data that will assist
the flow chart. VMA is an Indication of FFFF16 on the ad- you In programming the M C6B09E
4·316
s:
FIGURE 17 - SYNC TIMING ~'1'
s:
~
Last Cycle Sync Last Cycle
of PrevIous Opcode Sync Acknowledge of Sync
IInstructIOn! Fetch ! Execute !- ... -!lnstructlOn!
'1'
o
s:
n
~
Address OJ
~
m
Data~J '" ~
-~
A/W~ ~~----~----------~
•
~
W
......
BA ===:A I '" \'-_________
-..,j
BS~ "'~----~---------------------------
AVMA~ \ ~. I
LlC ~ ·~~--~-~-l.h!t-PC-f----------;X See Note 1
NOTE Timing measurements are referenced to and from a low voltage of a 8 volts and a high voltage of 2 0 volts, unless otherwIse noted
..
FIGURE 18 - ADDRESS BUS CYCLE-BY-CYCLE PERFORMANCE
• 3:
i
ADDR= STATE OF ADDRESS BUS
C Fetch)
ADDR-Address of Opcode (Fetchl
'1'
3:
Long
Branch
Short
Branch
ImmedIate and
Inherent
Auto Aut
Indexed
Addr-Addr+ 1
I
PC + Extended No
I
m
•
3:
Inc/Dec Inc/Dec
VID.
Addr-Addr+l
Addr-Addr+ 1
vt
by 1 by2 R+16 B,ts R+D 16 BIts Indlfect Offset
i
Offset
ACCA
ACCB
R+5 BII
2m
Addr- Addr- Addr- Addr-
VF.;fA R+8 BIt
Addr+l Addr+l Addr+l
PC+8 BII I
VMA V~A
~ I I
(0)
.....
CO vw.
"ilf<1A
I
"ilf<1A
VMA
vw.
I
VMA
I
"ilf<1A
w.rA
I
VF.;fA
I
VF.;fA
N VMA
I
VMA
I
Stack Wnte
I
Stack Write
NOTES:
1 Busy = 1 dUring access of f,rst byte of double byte ,mmed,ate load.
2. All subsequent Page 2 and Page 3 prebytes WIll be Ignored after IOltlal opcode fetch
3 Write operation dUring store Instruction. ~ = 1 dunng flfst two cycles of a double-byte access and the flfst cycle of read-modlfy-wrlte access
4. AVMA is asserted on the cycle before a VMA cycle
s::
~
FIGURE 191al - OPERATIONS. ADDRESS BUS CYCLE· BY-CYCLE PERFORMANCE
Inherent Page
SWI
From Figure 18 PSHU
PULU SWI2
ABX RTS TFR EXG MUL ~ PSHS SWI3 CWAI m
s::•
PULS RT.!
ASLA
I
ASLB
ASRA
ASRB ADDR
I
STACK IRI
CLRA
--.L
CLRB I VMA VMA VMA VMA VMA VMA
COMA VMA I I m
COMB
DAA
VMA
VMA
VMA VMA
s::•
~
DECA
DECB
INCA STACK IRI VMA VMA
I
ADDR-SP
STACKIW: STACKIWI
INCB STACKIWI STACKIWI
E~
OJ
LSLA
STACK IRI VMA VMA
I STACKIWI STACKIWI
~
VMA VMA VMA I Stack IWII ~ STACKIWI STACKIWI STACK IRI
LSLB VMA VMA Note 3 STACKIWi STACKIWI STACK IRI m
LSRA VlVfA VMA
IStack IRilb2STACKIWI STACKIWI STACK IRI
LSRB VMA VMA Note 3 STACK IWI STACKIWI STACK IRI
NEGA \iiV1A STACKIWI STACKIWI ST ACK IRI
NEGB VMA
~ STACKIWI STACKIWI STACK IRI STACK IRI
NOP
~
...... ROLA
VMA STACKIWI STACKIWI STACK IRI STACK IRI
STACKIWI STACKIWI STACK IRI
<0 ROLB
STACKIWI STACK IRI
RORA STICKIWI
STACK IRI
RORB
SEX
ADDR-SP I ~
STACK IRI
VMA IVMAI""
I I Note4
VECTOR IHI. VECTOR IHI.
BUSY-l BUSY-l Addr- SP
VECTOR Ill. VECTOR Ill.
BUSY-O BUSY-O
_I I
VMA VMA
~ ~
To Figure 18
NOTES
Stack IWI refers to the following sequence SP-SP-l. then ADDR-SP with Riw~o
Stack IRI refers to the follOWing sequence ADDR-SP with Riw~l. then SP-SP+ I
PSHU, PULU instructions use the user stack pOinter (I e, SP2EUl and PSHS, PULS use the hardware stack pOinter (I e, SPES)
Vector refers to the address of an Interrupt or reset vector (see Table 1)
The number of stack accesses Will vary according to the number of bytes saved
4 VMA cycles Will occur until an Interrupt occurs
II
• ~
i
FIGURE 19(b) - OPERATIONS: ADDRESS BUS CYCLE-BY-CYCLE PERFORMANCE
'1'
ADCA LDD ASL TST ADDD JSR STD ~
ADCB
I
LOS ASR CMPD STS
ADDA LDU CLR CMPS STU
ADDB LDX COM CMPU STX
ANDA LDY DEC CMPX STY
ANDB INC CMPY
BITA LSL SUBD m
BITB
CMPA
ANDCC
ORCC
LSR
NEG
•
~
CMPB
~
ROL VMA
EORA ROR STACK IWI
EORB STACK IWI
LDA aJ
LDB
ORA f6
m
ORB
SBCA
SBCB
STA
"""
CN
I\)
STB
SUBA VMA, BUSY-1
SUBB ADDR-ADDR+1, ADDR-ADDR+1
0
TSTA
TSTB
BUSY-O
VMA
I
VMA
ADDR-ADDR + 1 VMA ADDR-A DR+1IWI
To Figure 18
NOTES
Stack IWI refers to the following sequence SP-SP-1, then ADDR-SP with R/W=O
Stack IRI refers to the following sequence, ADDR-SP with R/W= 1, then SP-SP + 1
PSHU, PULCI Instructions use the user stack pOinter lie, SP= UI and PSHS, PULS use the hardware stack pOinter II e , SP= SI
2 Vector refers to the address of an Interrupt or reset vector (see Table 1)
3 The number of stack accesses will vary according to the number of bytes saved
4 VMA cycles will occur until an Interrupt occurs
MC6809EeMC68A09EeMC68B09E
Mnemonlc(s) Operation
ADCA, ADCB Add memory to accumulator with carry
ADDA, ADDB Add memory to accumulator
ANDA, AN DB And memory with accumulator
ASL, ASLA, ASLB Anthmetlc shift of ac.cumulator or memory left
ASR,ASRA, ASRB Arithmetic shift of accumulator or memory nght
BITA, BITB Bit test memory with accumulator
CLR,CLRA,CLRB Clear accumulator or memory location
CMPA, CMPB Compare memory from accumulator
COM, COMA, COMB Complement accumulator or memory location
DAA Decimal adjust A accumulator
DEC, DECA, DECB Decrement accumulator or memory location
EORA, EORB Exclusive or memory with accumulator
EXG Rl, R2 Exchange Rl with R2 IR1, R2 ~ A, B, CC, DPI
INC, INCA, INCB Increment accumulator or memory location
LDA, LDB Load accumulator from memory
LSL, LSLA, LSLB Logical shift left accumulator or memory location
LSR, LSRA, LSRB Logical shift nght accumulator or memory location
•
MUL Unsigned multiply IA x B - DI
NEG, NEGA, NEGB Negate accumulator or memory
ORA,ORB Or memory with accumulator
ROL, ROLA, ROLB Rotate accumulator or memory left
ROR, RORA, RORB Rotate accumulator or memory right
SBCA, SBCB Subtract memory from accumulator with borrow
STA, STB Store accumulator to memory
SUBA, SUBS Subtract memory from accumulator
TST, TSTA, TSTB Test accumulator or memory location
TFR Rl, R2 Transfer Rl ta R2 (Rl, R2 ~ A, B, CC, DPI
NOTE A, B, CC ar DP may be pushed ta (pulled framl 8Ither stack with PSHS, PSHU IPULS,
PULU) Instructions
NOTE D may be pushed (pulledl ta either stack with PSHS, PSHU IPULS,
PULU) Instructions
4-321
MC6809EeMC68A09EeMC68B09E
I
BNE, lBNE Branch If not equal
BMI, lBMI Branch If minus
BPl, lBPl Branch If plus
BCS, lBCS Branch If carry set
BCC, lBCC Branch If carry clear
BVS, lBVS Branch It overflow set
BVC, lBVC Branch If overflow clear
SIGNED BRANCHES
BGT, lBGT Branch If greater (signed)
BVS, lBVS Branch If Invalid 2's complement result
BGE, lBGE Branch If greater than or equal (signed)
BEC, lBEO Branch If equal
BNE, lBNE Branch If not equal
BlE, LBlE Branch If less than or equal (signed)
BVC, lBVC Branch If valid 2's complement result
BlT, lBlT Branch If less than (signed)
UNSIGNED BRANCHES
BHI, lBHI Branch If higher (unSigned)
BCC, lBCC Branch If higher or same (unSigned)
BHS, lBHS Branch If higher or same (unSigned)
BEC, lBEC Branch If equal
BNE, lBNE Branch If not equal
BlS, lBlS Branch If lower or same (unSigned)
BCS, lBCS Branch If lower (unsigned)
BlD, lBlD Branch If lower (unSigned)
OTHER BRANCHES
BSR, lBSR 1Branch to subroutine
BRA, lBRA I Branch always
BRN, lBRN I Branch never
4-322
MC6809E- MC68A09E- MC68B09E
•
10 Page 2 40 NEGA Inherent 70 NEG Extended
11 Page 3 41 71
12 NOP Inherent 42 72
13 SYNC Inherent 204 43 COMA 73 COM
14 44 LSRA 74 LSR
15 45 75
16 LBRA Relative 5 46 RORA 76 ROR
17 LBSR Relative 9 47 ASRA 77 ASR
18 48 ASLA, LSLA 78 ASL, LSL
19 DAA Inherent 49 ROLA 79 ROL
1A ORCC Immed 4A DECA 7A DEC
1B 4B 7B
1C ANDCC lmmed 4C INCA 7C INC 3
1D SEX Inherent 4D TSTA 7D TST 3
1E
1F
20
21
EXG
TFR
BRA
BRN
•
Inherent
Relative 3
3
4E
4F
50
51
CLRA
NEGB
Inherent
Inherent
7E
7F
80
81
JMP
CLR
SU8A
CMPA
Extended
lmmed
4 3
3
22 BHI 3 52 82 SBCA
23 BLS 3 53 COMB 83 SUBD
24 BHS, BCC 3 54 LSRB 84 ANDA
25 BLO, BCS 3 55 85 BITA
26 BNE 3 56 RORB 86 LDA
27 BEQ 3 57 ASRB 87
28 BVC 3 58 ASLB, LSLB 88 EORA
29 BVS 3 59 ROLB 89 ADCA
2A BPL 3 5A DECB 8A ORA
28 8MI 3 5B 8B ADDA
2C 8GE 5C INCB 8C CMPX Immed
2D BLT 5D TSTB 8D BSR Relative
2E BGT 5E 8E LOX Immed
2F BLE Relative 5F CLRB Inherent 8F
LEGEND
- Number of MPU cycles (less possible push pull or Indexed-mode cycles)
# Number of program bytes
• Denotes unused opcode
4·323
MC6809E· MC68A09E. MC68B09E
I
91 Cl CMPB 2 2 Page 2 and 3 Machine
92 SBCA 4 2 C2 SBCB 2 2 Codes
93 SUBD 6 2 C3 ADDD 4 3
94 ANDA 4 2 C4 AN DB 2 2 1021 LBRN Relative 5 4
95 BITA 4 2 C5 BITB Immed 2 2 1022 LBHI 5161 4
96 LDA 4 2 C6 LDB Immed 2 2 1023 LBLS 5161 4
97 STA 4 2 C7
I
1024 LBHS, LBCC 5161 4
98 EORA 4 2 C8 EORB 2 2 1025 LBCS, LBLO 5161 4
99 ADCA 4 2 C9 ADCB 2 2 1026 LBNE 5161 4
9A ORA 4 2 CA ORB 2 2 1027 LBEO 5161 4
9B ADDA 4 2 CB ADDB 2 2 1028 LBVC 5161 4
9C CMPX 6 2 CC LDD 3 3 1029 LBVS 5161 4
9D JSR 7 2 CD 102A LBPL 5161 4
9E LDX 5 2 CE LDU Immed 102B LBMI 5161 4
9F STX Direct 5 2 CF 102C LBGE 5161 4
4 102D LBLT 5161 4
AO SUBA Indexed 4+ 2+ DO SUBB Direct 2
102E LBGT bl61 4
Al CMPA 4+ 2+ Dl CMPB 4 2
4 2
102F LBLE Relative 5161 4
A2 SBCA 4+ 2+ D2 SBCB
103F SWI2 Inherent 20 2
•
A3 SUBD 6+ 2+ D3 ADDD 6
1083 CMPD Immed 5 4
A4 ANDA 4+ 2+ D4 AN DB 4
A5 BITA 4+ 2+ D5 BITB 4
lOBC CMPY I 5 4
lOBE LDY Immed 4 4
A6 LDA 4+ 2+ D6 LDB 4
1093 CMPD Direct 7 3
D7 STB 4
~
A7 STA 4+ 2+ l09C CMPY 7 3
A8 EORA 4+ 2+ D8 EORB 4
l09E LDY 6 3
A9 ADCA A+ 2+ D9 ADCB 4 2
l09F STY Direct 6 3
AA ORA 4+ 2+ DA ORB 4 2
4 2 10A3 CMPD Indexed 7+ 3+
DB ADDB
~
AB ADDA 4+ 2+ lOAC CMPY 7+ 3+
AC CMPX 2+ DC LDD 5 2
6+ 10AE LDY 6+ 3+
AD JSR 7+ 2+ DD STD 5 2
5 2 lOAF STY Indexed 6+ 3+
AE LOX 5+ 2+ DE LDU
10B3 CMPD Extended 8 4
OF STU Direct 5 2
~ ~
AF STX Indexed 5+ 2+ lOBC CMPY 4
EO SUBB Indexed 4+ 2+ lOBE LDY 4
BO SUBA Extended 5 3 El CMPB 4+ 2+ 10BF STY Extended 7 4
Bl CMPA 5 3 E2 SBCB 4+ 2+ 10CE LOS Immed 4 4
B2 SBCA 5 3 E3 ADDD 6+ 2+ lODE LOS Direct 6 3
B3 SUBD 7 3 E4 ANDB 4+ 2+ 10DF STS Direct 6 3
B4 ANDA 5 3 E5 BITB 4+ 2+ lOEE LOS Indexed 6+ 3+
B5 BITA 5 3 E6 LDB 4+ 2+ lOEF STS Indexed 6+ 3+
B6 LOA 5 3 E7 STB 4+ 2+ 10FE LOS Extended 7 4
B7 STA 5 3 E8 EORB 4+ 2+ 10FF STS Extended 7 4
B8 EORA 5 E9 ADCB 4+ 2+ 113F SWI3 Inherent 20 2
B9 ADCA 5 EA ORB 4+ 2+ 1183 CMPU Immed 5 4
BA ORA 5 3 EB ADDB 4+ 2+ 118C CMPS Immed 5 4
BB ADDA 5 3 EC LDD 5+ 2+ 1193 CMPU Direct 7 3
BC CMPX 7 3 ED STD 5+ 2+ 119C CMPS Direct 3
BD JSR 8 3 EE LOU 5+ 2+ llA3 CMPU Indexed 7+ 3+
BE LOX 6 3 EF STU Indexed 5+ 2+ 11AC CMPS Indexed 7+ 3+
BF STX Extended 6 3 llB3 CMPU Extended 8 4
FO SUBB Extended 5 3
llBC CMPS Extended 8 4
F1 CMPB 5 3
F2 SBCB 5 3
F3 ADDD 7 3
F4 ANDB 5 3
F5 BITB 5 3
F6 LDB 5 3
F7 STB 5 3
NOTE All unused opcodes are both undellned F8 EORB 5 3
and Illegal F9 ADCB 5 3
FA ORB 3
FB ADDB Extended 5 3
FC LDD Extended 6 3
FD
FE
FF
STD
LOU
STU
t 6
6
Extended 6
3
4·324
MC6809E-MC68A09E-MC68B09E
···
ADDD C3 4 3 03 6 2 E3 6+ 2+ F3 7 3 D+M M+l-D I I I I
··
AND ANDA 84 2 2 94 4 2 A4 4~ 2+ B4 5 3 AAM-A I I 0
ANDa C4 2 2 D4 4 2 E4 4+ 2+ F4 5 3 B A M-B I I 0
ANDCC lC 3 2 CC A IMM-CC 7
·· · ··
ASR 07 6 2 67 6+ 2+ 77 7 3 7 60 8 I I I
BIT BITA 85 2 2 95 4 2 A5 4+ h B5 5 3 Bit Test A (M A A) I I 0
81T8 C5 2 2 D5 4 2 E5 4+ 2+ F5 5 3 Bit Test B (M A 81 I I 0
CLR CLRA
CLR8
4[
5F
2
2
I
I
O-A
O-B ··
0
0
I
I
0
0
0
0
(LR
·
•
OF 6 2 6F 6+ 2+ 7F 7 3 O-M 0 1 0 0
CMP CMPA 81 2 2 91 4 2 AI 4+ 2+ Bl 5 3 Compare M from A 8 I I I I
CMP8 Cl 2 2 01 4 2 El 4+ 2+ FI 5 3 Compare M from B 8 I I I I
CMPD 10
83
5 4 10
93
7 3 10
A3
7+ 3+ 10
B3
8 4 Compare M M + 1 from 0
·I I I I
CMPS II
8C
5 4 II
9C
7 3 II
AC
7+ 3+ II
BC
8 4 Compare M M + 1 from S
·I I I I
CMPU II
83
5 4 II
93
7 3 II
A3
7+ 3+ II
83
8 4 Compare M M + 1 from U
·I I I I
··
CMPX 8C 4 3 9C 6 2 AC 6+ 2+ 8C 7 3 Compare M M + 1 from X I I I I
CMPY 10 5 4 10 7 3 10 7+ 3+ 10 8 4 Compare M M + 1 from Y I I I I
8C 9C AC 8C
···
COM COMA 43 2 1 A-A I I 0 1
COM8 53 2 1 ii-8 I I 0 I
COM 031 6 2 63 6+ 2+ 73 7 3 M-M I I 0 I
CWAI 3C ~( 2 CC A IMM - CC Walt for Interrupt 7
DAA
DEC DECA
19
4A
2
2
1 DeCimal Adjust A
1 A I-A ·· · I
I
I
I
0
I
I
I
DEC8
DEC OA 6 2 6A 6+ 2+ 7A 7 3
5A 2 1 8-1-8
M-I-M ·· ··
I
I
I
I
I
I
EaR EORA
EOR8
88
C8
2
2
2
2
98
08
•
4
2
2
A8 4+
E8 4+
2+
2+
88
F8
5
5
3
3
A ..... M-A
B¥M-B ·· ··
I
I
I
I
0
0
EXG
INC
RI, R2
INCA
IE
4C
8
2
2 Rl-R2 2
I A+ I--A ·· · · · ··
I I I
INCB
INC OC 6 2 6C 6+ 2+ 7C 7 3
5C 2 I 8+ I-B
M+l-M
I
I·· ··
I
I
I
I
··· ·· ·· ·· ···
JMP OE 3 2 6E 3+ 2+ 7E 4 3 EA:;-PC
JSR 90 7 2 AD 7+ 2+ BD 8 3 Jump to Subroutine
LD LOA B6 2 2 96 4 2 A6 4+ 2+ B6 5 3 M-A I I 0
··· ···
LD8 C6 2 2 D6 4 2 E6 4+ 2+ F6 5 3 M-8 I I 0
LDD CC 3 3 DC 5 2 EC 5+ 2+ FC 6 3 M M+l-D I I 0
LOS 10 4 4 10 6 3 10 6+ 3+ 10 7 4 M M+l-S I I 0
CE DE EE FE
LOU
LOX
CE
BE
3
3
3
3
DE
9E
5
5
2
2
EE
AE
5+
5+
2+
2+
FE
8E
6
6
3
3
M M+l-U
M M+I-X
I
I ·· ··
I
I
0
0
LOY 10
BE
4 4 10
9E
6 3 10
AE
6+ 3+ 10
BE
7 4 MM+I-Y
· · I I 0
LEA LEAS
LEAU
32
33
4+ 2+ EA3_S
EA3_U ·· ·· ·· ·· ··
·· ·· ·· ··
4+ 2+
LEAX 30 4+ 2+ EA3_X I
LEAY 31 4+ 2+ EA3_y I
Legend M Complement of M Test and set If true, cleared otherwise
OP Operation Code I Hexadecimal! Transfer Into Not Affected
Number of MPU Cycles H Half-carry Ifrom bit 31 CC ConditIOn Code Register
Number of Program Bytes N Negative ISlgn bit I Concatenation
+ Anthmetlc Plus Z Zero result V Logical or
Anthmetlc MinUS V Overflow, 2'5 complement A Logical and
Multiply C Carry from ALU ¥ Logical Exclusive or
4-325
MC6809E·MC68A09E·MC68B09E
· ·
f-O
LSL DB 6 2 68 6+ 2+ 78 7 3 c b7 bO I I I I
~l -j I I I I I I I HJ ··
lSR LSRA 44 2 1 0 I I
·· · ···
LSRB 54 2 1 0 0 I I
LSR 04 6 2 54 6+ 2+ 74 7 3 b7 bO C 0 I I
MUL 3D 11 1 A x B- 0 (Unsigned) I 9
NEG NEGA 40 2 1 A+ l-A 8 I I I I
NEGB 50 2 1 B+ 1-8 8 I I I I
NEG 00 6 2 60 6+ 2+ 70 7 3 M+l-M 8 I I I I
NOP
OR ORA 8A 2 2 9A 4 2 AA 4+ 2+ BA 5 3
12 2 1 No Operation
A V M-A ·· · · · ·· I I 0
ORB
ORCC
CA
lA
2
3
2
2
OA 4 2 EA 4+ 2+ FA 5 3 B V M-B
CC V IMM-CC · ·I I 0
7
PSH PSHS
PSHU
34 5+ 4
36 5+ 4
2
2
Push Registers on S Slack
Push ReQISlers on U Stack ·· ·· ·· ·· ··
PUL PULS
PULU
35 5+ 4
37 5+ 4
2
2
Pull Registers from S Stack
Pull Registers from U Stack ·· ·· ·· ·· ··
~I L[H I I I I I [ I f:l ··
ROL ROLA 49 2 1 I I I I
•
ROLB E,9 2 1 I I I I
ROR
ROL
RORA
09 6 2 69 6+ 2+ 79 7 3
46 2 1
C b7 I
~14}+j I I I I III P ··
· ·
bO I
I
I
I
I I
I
· ··
RORB 56 2 1 I r I
ROR 06 6 2 66 6+ 2+ 76 7 3 c b7 bO I I I
RTI 3B 6/15 1 Return From Interrupt 7
RTS
SBC SBCA 82 2 2 92 4 2 A2 4+ 2+ B2 5 3
39 5 1 Return from SubroutIne
A~M~C-A
· · ···
8 II I I I
SBCB C2 2 2 02 4 2 E2 4+ 2+ F2 5 3 B~M~C-B 8 I I , I I
SEX
ST STA 97 4 2 A7 4+ 2+ B7 5 3
10 2 1 Sign Extend B Into A
A-M
·· ·· I
I
I
I
!G
0
STB
STD
07
OD
4
5
2
2
E7 4+
ED 5+
2+
2+
F7
FO
5
6
3
3
B-M
O-M M+ 1 ·· , ·· I
I
I
I
0
0
STS 10
DF
6 3 10 6+
EF
3+ 10
FF
7 4 S-M M+l
· I: · 0
STU
STX
DF
9F
5
5
2
2
EF 5+
AF 5+
2+
2+
FF
BF
6
6
3
3
U-M M+l
X-M M+ 1 ·· ··
I
I I
0
0
SUB
STY
SUBA SO 2 2
10
9F
90
6
4
3
2
10
AF 6+
AO 4+
3+
2+
10
BF
BO
7
5
4
3
Y-M M+l
A~M-A
· · 8
I
I
I
I II
0
·· · i: ·
SUBB CO 2 2 DO 4 2 EO 4+ 2+ FO 5 3 B~M-B 8 I I I
SUBD 83 4 3 93 6 2 A3 6+ 2+ B3 7 3 D~M M+l-D I I I
SWI SWI 3F 19 1 Software Interrupt 1
·····
• I.
,
SWI6 10 20 2 Software Interrupt 2
3F i
SWI6 11
3F
20 1 Software Interrupt 3
·· · •
I
10
SYNC
TFR R', R2
13
lF
;,,4
6
1 Synchronize to Interrupt
2 Rl- R2L ·· ·· ·· ·· ··
TST TSTA
TST8
40
5D
2
2
1 Test A
1 Test 8 ·· ·· I
I
I
I
0
0
Notes
TST 00 6 2 60 6+ 2+ 70 7 3 Test M
· · I I 0
1. ThiS column gives a base cycle and byte count To obtain total count, add the values obtained from the INDEXED ADDRESSING MODE table,
Table 2
2, R1 and R2 may be any pair of 8 bit or any pair of 16 bit registers
The 8 bit registers are A, B, CC, DP
The 16 bit registers are X, Y, U, S, D, PC
3 EA IS the effective address
4. The PSH and PUL instructions reqUire 5 cycles plus 1 cycle for each byte pushed or pulled
5, 5(6) means 5 cycles If branch not taken, 6 cycles If taken (Branch instructIOns)
6 SWI sets I and F bits SWI2 and SWI3 do not affect I and F
7 Conditions Codes set as a direct result of the Instruction
8 Vaue of half-carry flag IS undefined
9, Special Case - Carry set If b7 IS SET
4-326
MC6809E-MC68A09E-MC68B09E
Branch Instructions
Addressing Addressing
Mode Mode
to!e~·~1T
5 3 2 1 0 I 5 3 2 1 0
Instruction Forms Description H N Z V C Instruction Forms OP - 5 I Description H N Z V C
BCC BCC
I LBCe
24
10
3
5(61
2 Branch C-O
4 long Branch
· · · ·· ··
BLS BLS 23 3 2 Branch Lower
or Same ·····
24 C~O LBLS 10 5161 4 Long Branch Lower
·····
· · · ·· ··
25 23 or Same
·· ·· ·· · ··
BCS BCS 3 2 Branch C = 1
LBCS 10 5(61 4 Long Branch BLT BlT 2D 3 ·2~h<Zero
25 C=:1 LBLT 10 5161 4 Long Branch < Zero
· · ·· ·· ··
BEQ BEQ 27 3 2 BranCh Z= 1 2D
·· ·· ·· · ··
LBEQ 10 5(61 4 Long Branch BMI BMI 2B 3 2 Branch Mmus
27 Z~O LBMI 10 5(61 4 Long Branch Minus
·· · ·· ··
BGE BGE 2C 3 2 Branch~Zero 2B
LBGE 10 S(S)
2C
4 long Branch~Zero BNE BNE
LBNE
26
10
3
5(6)
2 Branch 2=0
4 Long Branch ·· ·· ·· · ··
BGT BGT
LBGT
2E
2E
3
10 5(61
2 Branch> Zero
4 long Branch> Zero ·· · ·· ·· ·· BPL BPL
LBPL
26
2A
10
3
5161
UO
2 Branch Plus
4 Long Branch Plus ·· ·.!.· ·· ··
---a,:;;- BHI 22 3 2 Branch Higher
·· ·· ·· ·· 2A
•
LBHI 10 5(6) 4 Long Branch Higher BRA BRA 20 3 2 Branch Always
··· ·
·· ··· ··· ··· ···
22 LBRA 16 5 3 Long Branch AlWaYS
BHS BHS 24 3 2 Branch Higher
or Same · ··· BRN BRN
LBRN
21
10
3
5
2 Branch Never
4 Long Branch Never
LBHS 10
24
5(61 4 Long Branch Higher
or Same · ··· BSR BSR
21
BO 7 2 Branch to Subroutine
· ·· ·· · ··
BLE BLE
LBLE
2F 3
10 5151
2 Branch!!> Zero
4 Long Branch:S; Zero ·· · · ·· ·· LBSR 17 9 3 Long Branch to
Subroutine
2F
· ·· ·· ·· ··
·· · ·· ·· ··
BVe BVe 2B 3 2 Branch V - 0
~- BLO 25 3 2 Bra~ch lower LBVe 10 5(6) 4 Long Branch
LBLO 10 5161
25
4 Long Branch lower
BVS BVS
2B
29 3
V=O
2 Branch V-1 .,. · · ·
i ···
LBVS 10 5(61 4 Long Branch • I•
29 V=l
SIMPLE BRANCHES
OP SIMPLE CONDITIONAL BRANCHES (Notes 1-4)
BRA 20 3 Test True OP False OP
lBRA 16 5 N=l BMI 2B BPl 2A
BRN 21 2 Z=l BEG 27 BNE 26
lBRN 1021 4 V=l BVS 29 BVC 28
BSR 8D 2 C=l BCS 25 BCC 24
lBSR 17·
SIGNED CONDITIONAL BRANCHES (Notes 1-4) UNSIGNED CONDITIONAL BRANCHES (Notes 1-4)
Test True OP False OP Test True OP False OP
r>f'1 BGT 2E BlE 2F r>m BHI 22 BlS 23
r~m BGE 2C BlT 2D r~m BHS 24 BlO 25
r=m BEG 27 BNE 26 f=m BEG 27 BNE 26
rSm BlE 2F BGT 2E rsm BlS 23 BHI 22
r<m BlT 2D BGE 2C r<m BlO 25 BHS 24
Notes
All conditional branches have both short and long vanatlons
All short branches are 2 bytes and require 3 cycles
All conditional long branches are tormed by prefixing the short branch opcode with $10 and uSing a 16-blt destination offset
4 All conditional long branches require 4 bytes and 6 cycles If the branch IS taken or 5 cycles If the branch IS not taken
5 5(6) means 5 cycles If branch not taken, 6 cycles If taken
4-327
MC6809Ee MC68A09Ee MC68B09E
•
INDEXED
POST·BYTE REGISTER BIT
ADDRESSING
7 6 5 4 3 2 1 0
MODE
0 R R , , , , , EA - ,R + 5 Bit Offset
1 R R 0 0 0 0 0 ,R +
1 R R I 0 0 0 1 ,R + +
1 R R 0 0 0 1 0 R
1 R R I 0 0 1 1 - - R
1 R R I 0 1 0 0 EA _ ,R + 0 Offset
L~--=-:=:PC::=--=J ,"OC,," cou""
1 R R I 0 1 0 1 EA _ ,R + AceS Offset
1 R R I 0 1 1 0 EA - ,R + ACCA Offset i-A--T B_J
1 R R I 1 0 0 0 EA _ ,R + 8 Bit Offset '-.. ,/
1 R R EA ,R + 16 Bit Offset
I 1 0 0 1
o
1 R R EA _ ,R + 0 Offset
1 , ,
I
I
1
1
0
1
1
0
1
0 EA ,PC + 8 Bit Ollse! L_ DP- I DIRECT PAGE REGISTER
I L.- - - - - - I n d l r e c t Field
(Sign bit when b7 = 01
_ _ _ _ _ HALF CARRY
A
CCR Jc
A
' -_ _ _ B
' -_ _ _ _ DPR DP 6809 VECTORS
X H, FFFE Restart
X Lo FFFC NMI
' -_ _ _ _ _ _ _ _ S/U YH, FFFA SWI
' -_ _ _ _ _ _ _ _ _ PC
YLo FFF8 IRO
U/S HI FFF6 FIRQ
TRANSFER/EXCHANGE POST BYTE U/S Lo FFF4 SWI2
PC HI FFF2 SWI3
[1OU:AC~ I D~STI~AT!ON I PC Lo
!
FFFO Reserved
PUSH ORDER
REGISTER FIELD
0000 o (A B) 1000 A INCREASING
0001 X 1001 B
MEMORY
0010 Y 1010 CCR
0011
0100
U
S
1011 DPR +
0101 PC
4-328
MC6809E-MC68A09E-MC68B09E
ORDERING INFORMATION
MC68A09ECP
Motorola In ••gra.ed Corcu,.
MIIBOO Fam,ly
Blank.- 1 0 MHz
T I TTl
-
A-15MHz
B-2,O MHZ
Device Designa',on
In MIIBOO FamIly
Tempera.ure Range _ _ _ _ _ _ _ _ _...J
Blank - 0°- + 70°C
C- - 40°- + B5°C
Package
p- Plastic
S·Cerdlp
l-Ceramlc
BmER PROGRAM
4-329
MeMllO
® MOTOROLA
(1=0- z)
MeMMAIO
(l.s-lIIiz)
MeMMBIO
(2.0-lIIIz)
128x8-BIT STATIC RANDOM ACCESS MEMORY
The MCM6810 IS a byte-organized memory designed for use In bus- MOS
organized systems. It IS fabricated with N-channel slhcon-gate (N-CHANNEL, SILICON-GATE)
technology. For ease of use, the device operates from a single power
supply, has compatlblhty with TTL and DTL, and needs no clocks or
refreshing because of static operation. 128x8-BIT STATIC
The memory IS compatible with the M6800 Microcomputer Family, RANDOM ACCESS
providing random storage In byte Increments. Memory expansion IS MEMORY
provided through multiple Chip Select Inputs
• Organized as 128 Bytes of 8 Bits
• Static Operation
fIII#/IJ:~
• Bidirectional Three-State Data Input/Output
• SIX Chip Select Inputs (Four ActIVe Low, Two Active Hlghl
• Single 5-Volt Power Supply 24 ' P SUFFIX
• TTL Compatible PLASTIC PACKAGE
1 CASE 709
• MaXimum Access Tlme=450 ns - MCM6810
360 ns - MCM68A 10
•
250 ns - MCM68Bl0
Bus
~''"
~~W::RDIP~ACKAGE CASE 623
Memorv Address
and Control
PIN ASSIGNMENT
4-330
MCM6810-MCM68A10-MCM68B10
MAXIMUM RATINGS
Rating Symbol Value Unit
Supply Voltage VCC -0.3 to + 70 V This device contains Circuitry to protect the In~
Input Voltage Y,n -0.3 to + 70 V puts against damage due to high static voltages
Operating Temperature Range TL to TH or electric fields, however, It IS advised that nor-
MCM6810, MCM68A10, MCM68B10 TA o to + 70 °c mal precautions be taken to aVOId application of
MCM6810C, MCM68A10C -40 to +85 any voltage higher than maximum rated voltages
Storage Temperature Range TSjg -85 to + 150 °c to this high Impedance Circuit Reliability of
operation IS enhanced If unused In"ut5 are tied to
an appropriate logiC voltage Ie g , either VSS or
THERMAL CHARACTERISTICS VCCI
Characteristics Symbol Value Unit
Thermal Resistance
Ceramic 60
PlastiC 8JA 120 °C/W
Cerdlp 65
•
POWER CONSIDERATIONS
DC ELECTRICAL CHARACTERISTICS IVcC=5 0 Vdc ±5%, VSS=O, TA=TL to TH unless otherwise notedl
Characteristic Symbol Min Max Unit
Input High Voltage VIH VSS+20 VCC V
Input Low Voltage VIL VSS-O 3 VSS+O 8 V
Input Current IAn, R/W, CSnl IV,n=O to 5.25 VI lin - 25 ,.A
Output High Voltage IIOH = - 205I'Ai VOH 24 - V
Output Low Voltage IIOL - 1 6 mAl Vo 04 V
Output Leakage Current (Three-Statel ICS=0.8 V or CS=2 0 V, Vou t=O.4 V to 2 4 VI ITSI - 10 ,.A
Supply Current 1.0MHz
ICC
- 80
rnA
IVrr= 525 V, All Other Pins Groundedl 15,2.0 MHz - 100
Input Capacitance IAn, R/Vii, CS n' CSnl IVIn=O, TA=25°C, 1=1 0 MHz) Cin - 75 pF
Output Capacitance IDnl IVout=O, TA=25°C, 1= 10 MHz, CSO=OI Cout - 125 pF
4-331
MCM681 ()eMCM68A 10-MCM68B10
BLOCK DIAGRAM
2 DO
AO 23 3 01
A1 22 4 02
A2 21 5 03
A3 20 6 DO
A4 19 7 05
A5 18 8 06
A6 17 9 07
B5 15
B4 1.
CS3 13
B2 12
CS1 11
C$O 10
•
Read Cycle TIme teyelR) 450 - 360 - 250 - ns
Access Time tace 450 360 - 250 ns
Address Setup Time tAS 20 - 20 - 20 - ns
Address Hold Time tAH 0 - 0 - 0 - ns
Data Delay TIme (Read) 'DDR - 230 - 220 180 ns
Read to Select Delay TIme 'RCS 0 - 0 - 0 - ns
Data Hold from Address 'DHA 10 - 10 - 10 - ns
Output Hold TIme 'H 10 - 10 - 10 - ns
Data Hold from Read 'DHR 10 80 10 60 10 60 ns
Read Hold from ChIp Select 'RH 0 - 0 - 0 - ns
Address
CS
~-------'OOR-----~~
R/W
4·332
MCM6810-MCM68A10-MCM68B10
'~".=1
CS--------------~LL~~~
'AS
~ ''''''H
_____ 'cs ____...a*I__ .,j ~=============== •
~------------~Er77~~
R/Vii
rl-.·o-----'DSW
.. ----;~ r-
Dataln W&//~k----D.,-aln-Sta-ble-~~mmA
NOTES
1 Voltage levels shown are VLSO 4 V, VH202 4 V, unless otherwise specified
2 Measurement pOints shown are 0 8 V and 2 0 V, unless otherwise specified W ffi ~ Don', Ca..
3 es and CS have same timing
4·333
MCM6810-MCM68A10-MCM68B10
MM06150 RL=2.5 kO
or EqUiv.
Test POint
,
o-..,..-1r--i'....- .
11 7 kO ~ MM07000
, or EqUiv
ORDERING INFORMATION
MCM68Al0CP
P = Plastic
S= Cerdlp
L=Ceramlc
BETIER PROGRAM
4·334
MC6821
(1.0 MHz)
@ MOTOROLA MCGAA21
(1.1 11Hz)
MC68B21
(2.0 MHz)
I
CASE 734
Usable as Peripheral Control Outputs
~''"''''
• Handshake Control LogiC for Input and Output Peripheral
Operation
• High-Impedance Three-State and Direct TranSistor Drive
Peripheral Lines
1.' : ' ' PLAS~~~~~~IKAGE
• Program Controlled Interrupt and Interrupt Disable Capability
• CMOS Drive Capability on Side A Peripheral lines
• Two TTL Drive Capability en All A and B Side Buffers
• TTL-Compatible
PIN ASSIGNMENT
• Static Operation
CAl
CA2
MAXIMUM RATINGS IROA
IROB
Characteristics Symbol Value Unit
RSa
Supply Vollage vcc -0310 + 70 V
Inpul Voltage V ,n -0310 +70 V RSl
Operatmg Temperature Range h 10TH RESET
MC6821 , MC68A21, MC68821 TA 0 1070 cc
MC6821C, MC68A21C, MC68821C -40 10 +85 DO
Storage Temperature Range Tslg -5510+150 cc 01
PBO 02
THERMAL CHARACTERISTICS PBl 03
Characteristic Symbol Value Unit
PB2
Thermal ReSistance
Ceramic 50 05
8JA cC/W
PlastiC 100 06
Cerdlp 60
07
PB6
ThiS deVice contains circuitry to protect the Inputs agamst damage due to high PB7 CSl
static voltages or electriC fields, however, It IS adVIsed that normal precautions CBl
be taken to aVOid application of any voltage higher than maximum-rated
voltages to thiS high-Impedance Circuit Reliability of operation IS enhanced If C82 esa
unused Inputs are tied to an appropriate logiC voltage (I e ,either VSS or Vecl RiiN
4-335
MC6821-MC68A21-MC68B21
POWER CONSIDERATIONS
•
for a known T A USing this value of K the values of PD and TJ can be obtained by solving equatIOns 111 and 12) Iteratively for any
value of T A
DC ELECTRICAL CHARACTERISTICS IVCC~5 0 Vdc ±5%, vSS~O, TA~TL to TH unless otherwise notedl
I Characteristic I Symbol I Min I Typ Max Unit
BUS CONTROL INPUTS IR/W, Enable, RESET, RSO, RS1, CSO, C51, C521
Input High Voltage VIH VSS + 20 - VCC V
Input Low Voltage VIL VSS - 03 - VSS + 08 V
Input Leakage Current (VIn=O to 5 25 V) Irn - 10 25 ~A
Capacitance IV,n~O, TA~25°C, f~1 0 MHzl C,n - - 75 pF
INTERRUPT OUTPUTS IIROA, IRQBI
Output Low Voltage IILoad ~ 32 mAl
Three-State Output Leakage Current
Capacitance IVrn~O, TA~25°C, f~1 0 MHzl
DATA BU5 100-07)
Input High Voltage VIH VSS + 20 - VCC V
Input Low Voltage VIL VSS-03 - VSS + 08 V
Three-State Input Leakage Current IV rn ~ 04 to 2 4 VI liZ - 20 10 ~A
Output High Voltage IILoad ~ - 205 ~AI VOH VSS + 24 - - V
Output Low Voltage IILoad -1 6 mAl VOL - - VSS+O 4 V
Capacitance IV,n - 0, TA ~ 25°C, f ~ 1 0 MHzl Crn - - 125 pF
PERIPHERAL BUS IPAG-PA7 PBO-PB7 CA 1 CA2 CB1 CB2)
Input Leakage Current R/W, RESET, RSO, RSt, cso, CS1, CS2, CAl, -
lin 1O 25 ~A
IV,n~Ot05 25VI r:S 1, Enable
Three-State Input Leakage Current {Vln = 0 4 to 2 4 V) PSO,PBl, CS2 I!Z - 20 10 ~A
Input High Current IVIH - 24 VI PAO-PAl, CA2 IIH -200 -400 - ~A
Darlington Dnve Current IVO~ 15 VI PRO-PSl, CB2 IOH -1O - -10 mA
Input Low Current IVIL ~ 04 VI PAO-PAl, CA2 IlL - -13 -24 mA
Output High Voltage
IILoad~ - 200 ~AI PAO-PAl, PSO-PBl, CA2, CB2 VOH VSS + 24 - - V
IILoad~ -lO~AI PAO-PA7, CA2 VCC-10 - -
Output Low Voltage IILoad - 32 mAl VOL VSS + 04 V
Capacitance IVrn~O, TA~25°C, f~1 ° MHzl C,n - - 10 pF
POWER REQUIREMENTS
Internal Power DISSipation (Measured at T A = TU 550 mW
4·336
MC6821- MC68A21-MC68821
•
tDDR
31 Input Data Setup Time tDSW 165 - 80 - 60 ns
1-~----------------~-r~---------(3~--------~
Notes
1 Voltage levels shown are VL:SO 4 V, VH,,2 4 V, unless otherwise specified
2 Measurement POints shown are 0 8 V and 2 0 V, unless otherwise specified
4-337
MC6821-MC68A21-MC68B21
•
Delay Time, CB1 Active Transition to CB2 Positive Transition tAS2 - 2.0 - 135 - 10 p.s 3,12
Interrupt Aelease Time, IAQA and iliOll tlA - 160 - 110 - 085 p.s 5,14
Interrupt Response Time tAS3 - 10 - 10 - 10 p.s 5,13
Interrupt Input Pulse Time PWI 500 - 500 - 500 - ns 13
RESET Low Time' tAL 10 - 066 - 05 - p'S 15
'The AESET hne must be high a minimum of 1 0 p'S before addressing the PIA
5,0 V
AL=24kll
C=30pF,R=12k
(IRQ Only)
'IPAO-PA7, CA2)
50V
Test Poon,
I
:-i 3 kll
100 pF I
4-338
MC6821. MC68A21·MC68B21
FIGURE 6 - PERIPHERAL DATA SETUP AND HOLD TIMES FIGURE 7 - CA2 DELAY TIME
(Read Mode) (Read Mode; CRA·5= CRA3= 1, CRA-4= 0)
FIGURE & - CA2 DELAY TIME FIGURE 9 - PERIPHERAL CMOS DATA DELAY TIMES
(Read Mode; CRA·5= 1, CRA·3= CRA-4=O) (Write Mode; CRA·5 = CRA·3 = 1, CRA-4 = 0)
Enable
/
Enable
'C_A_'~ ~'--~-~--
CA1 _ _ _ _
CA2 ~
PAO·PA7,
CA2
Enabl.~ /
----,.I----t 'PDW
FIGURE 12 - CB2 DELAY TIME FIGURE 13 - INTERRUPT PULSE WIDTH AND iiffi RESPONSE
(Write Mode; CRB·5= 1, CRB·3= CRB-4= 0)
Note Timing measurements are referenced to and from 2 low voltage of 0.8 volts and a high voltage of 2.0 volts, unless otherwise noted.
4·339
MC6821. MC68A21. MC68B21
Enable--1
_ ---tIR=t--
"The RESET line must be a VIH for a minimum of
IRQ
1 0 f'S before addressing the PIA.
Note T ImmQ measurements are referenced to and from a low voltage of 0.8 volts and a high voltage of 2 a volts, unless otherwise noted
II
Interrupt Status
Control A
39 CA2
DO 33
01 32 Data Direction
02 31 Register A
(DORA)
03 30
04 29
05 28
06 27 2 PAC
07 26 3 PAl
4 PA2
Peripheral 5 PA3
Interface
6 PA4
A
7 PA5
Bus Input
Register 8 PAG
(SIRl 9 PA7
Vee'" Pin 20
10 PBO
VSS Pm 1
11 PBl
12 PB2
eso 13 PB3
eSl 24 14 PB4
CS2 23 15 PB5
ASO 36 16 PBS
RSl 35 17 PB7
Riw 21
Enable 25
AffiT 34
Data Direction
Register B
(00R8)
18 CBl
Interrupt Status
IROB 37 Contror B
19 CB2
4-340
MC6821·MC68A21·MC68B21
•
flag bit IS associated With a particular peripheral Interrupt
Reed/Write (R/W) - This signal is generated by the line. Also, four interrupt enable bits are provided in the PIA
MPU to control the direction of data transfers on the data which may be used to inhibit a particular Interrupt from a
bus. A low state on the PIA read/Write line enables the input peripheral device,
buffers and data is transferred from the MPU to the PIA on Servicing an Interrupt by the MPU may be accomplished
the E signal if the device has been selected, A high on the by a software routine that, on a priOritized basis, sequentially'
read/Write line sets up the PIA for a transfer of data to the reads and tests the two control registers In each PIA for 10-
bus, The PIA output buffers are enabled when the proper ad- terrupt flag bits that are set,
dress and the enable pulse E are present, The interrupt flags are cleared (zeroed) as a result of an
MPU Read Peripheral Data Operation of the corresponding
RESEt - The active low RESET line IS used to reset all data register. After bemg cleared, the Interrupt flag bit can-
register bits 10 the PIA to a logical zero (lowL ThiS line can be not be enabled to be set until the PIA IS deselected during an
used as a power-on reset and as a master reset dUring E pulse. The E pulse is used to condition the Interrupt control
system operation, lines (CA', CA2, CB', CB2L When these lines are used as
Interrupt Inputs, at least one E pulse must or"cur from the In-
Chip Selects (CSO, CS1, and CS2) - These three Input active edge to the active edge of the Interrupt Input Signal to
Signals are used to select the PIA. CSO and CS, must be condition the edge sense network, If the Interrupt flag has
high and ~ must be low for selection of the device. Data been enabled and the edge sense cirCUit has been properly
transfers are then performed under the control of the enable conditioned, the interrupt flag Will be set on the next active
and read/write Signals. The chip select lines must be stable tranSition of the Interrupt input pm.
4·341
MC6821 e MC68A21 e MC68B21
PBC-PB7 will be read properly from those lines programmed peripheral control output. As an output, this line is compati-
as outputs even if the voltages are below 2.0 volts for a ble with standard TTL; as an input the internal pullup resistor
"high" or above 0.8 V for a "low". As outputs, these lines on this line represents 1.5 standard TIL loads. The function
are compatible with standard TTL and may also be used as a of this signal line is programmed with Control Register A.
source of up to 1 milliampere at 1.5 volts to directly drive the
base .of a transistor switch: Peripheral Control (CB2) 1- Peripheral Control line CB2
may also be programmed to act as an interrupt input or
Interrupt Input (CAl and CB1) - Penpheral input lines peripheral control output. As an input, thiS line has high in-
CA 1 and CB 1 are Input only lines that set the interrupt flags put impedance and is compatible with standard TIL. As an
of the control registers. The active transition for these output it is compatible with standard TTL and may also be
signals is also programmed by the two control registers. used as a source of up to 1 milliampere at 1.5 volts to directly
dnve the base of a transistor switch. This line is programmed
Peripheral Control (CA2) - The penpheral control line by Control Register B.
CA2 can be programmed to act as an interrupt input or as a
INTERNAL CONTROLS
•
INITIALIZATION Notice the differences between a Port A and Port Bread
operation when in the output mode. When reading Port A,
A RESET has the effect of zeroing all PIA registers. ThiS
the actual Pin is read, whereas the B side read comes from an
will set PAC-PA7, PBC-PB7, CA2 and CB2 as Inputs, and all
output latch, ahead of the actual Pin.
Interrupts disabled. The PIA must be configured dUring the
restart program which follows the reset.
CONTROL REGISTERS (CRA and CRB)
There are SIX locations Within the PIA acceSSible to the
MPU data bus: two Peripheral Registers, two Data Direction The two Control Registers (CRA and CRBI allow the MPU
Registers, and two Control Registers. Selection of these to control the operation of the four peripheral control lines
locations is controlled by the RSO and RSl inputs together CAl, CA2, CB1, and CB2. In addition they allow the MPU to
With bit 2 in the Control Register, as shown In Table 1. enable the interrupt lines and mOnitor the status of the Inter-
Details of pOSSible configurations of the Data Direction rupt flags. Bits 0 through 5 of the two registers may be writ-
and Control Register are as follows· ten or read by the MPU when the proper chip select and
register select Signals are applied. Bits 6 and 7 of the two
registers are read only and are modified by external Interrupts
TABLE 1 - INTERNAL ADDRESSING occurring on control lines CAl, CA2, CB1, or CB2 The for-
Control mat of the control words IS shown In Figure 18.
Register Bit
RSI RSO CRA·2 CRB·2 LocRtlon Selected DATA DIRECTION ACCESS CONTROL BIT (CRA-2 and
CRB-2)
0 0 1 X Peripheral Register A
Bit 2, In each Control Register (CRA and CRBI, deter-
0 0 0 X Data DirectiOn Register A
mines selection of either a Peripheral Output Register or the
0 1 X X Control ~eglster A corresponding Data Direction E Register when the proper
1 0 X 1 Pertpheral Register B register select signals are applied to RSO and RS1. A "1" In
1 0 X 0 Data DirectiOn Register B bit 2 allows access of the Peripheral Interface Register, while
a "0" causes the Data Direction Register to be eddressed.
1 1 X X Control Register 8
Interrupt Rags (CRA-8, CRA-7, CRB-8, and CRB-7) -
x = Don't Care The four interrupt flag bits are set by active transitions of
signals on the four Interrupt and Peripheral Control lines
when those lines are programmed to be Inputs. These bits
cannot be set directly from the MPU Data Bus and are reset
PORT A-B HARDWARE CHARACTERISTICS
Indirectly by a Read Peripheral Data Operation on the ap-
As shown in Figure 17, the MC6821 has a pair of I/O ports propriate section.
whose characteristics differ greatly. The A Side is designed
to drive CMOS logiC to normal 30% to 70% levels, and incor- Control of CA2 and CB2 Peripheral Control Unes (CRA-3,
porates an internal pullup device that remains connected CRA-4, CRA-5, CRB-3, CRB-4, and CRB-6) - Bits 3, 4, and
even in the Input mode. Because of this, the A Side requires 5 of the two control registers are used to control the CA2 and
more drive current in the input mode than Port B. In con- CB2 Peripheral Control lines. These bits determine If the con-
trast, the B side uses a normal three-state NMOS buffer trol lines will be an Interrupt input or an output control
which cannot pullup to CMOS levels without external signal. If bit CRA-5 (CRB-5) is low, CA2 (CB2) IS an Interrupt
resistors. The B side can drive extra loads such as Darl- input line similar to CAl (CBll. When CRA-5 (CRB-5) IS
ingtons without problem. When the PIA comes out of reset, high, CA2 (CB2) becomes an output signal that may be used
the A port represents inputs with pull up resistors, whereas to control peripheral data transfers. When in the output
the B side (input mode also) will float high or low, depending mode, CA2 and CB2 have slightly different loading
upon the load connected to it. characteristics.
4-342
MC6821. MC68A21· MC68B21
Control of CAl and CBl Interrupt Input Lines (CRA-o. enable the, MPU Interrupt signals iRQA and iRTIli. respec-
CRB-l. CRA-l. and CRB-l) - The two lowest-order bits of tively. Bits CRA-l and CRB-l determine the active transition
the control registers are used to control the Interrupt Input of the interrupt Input signals CAl and CB1.
lines CAl and CB1. Bits CRA-O and CRB-O are used to
Port A Port B
Vee Vee
Port Pin
Data Direction
DATA~.., __ Port Pin
Data_--,,_-,
•
Direction
(1- OutPllt Pin)
IO-lnput Plnl
Read of B
Data When
In Output
Mode
4-343
MC6821-MC68A21-MC68821
Determine Active CAli CB 1) Transition for Setting FIGURE 18 - COl<jTROL WORD FORMAT
Interrupt Flag IRCAIB)l - lbit 7)
b1=0: IROAIB)l set by hlgh-to-Iow tranSlltOn on CAl
ICB1)
bl =1 IROAIB)l set by low-to-hlgh transition on CAl CAtICB1) Interrupt RequeIrt Enable/ Disable
ICB1) bO=O' Disables IROAIB) MPU Interrupt by CAl
ICB1) active transit Ion.'
bO=l Enable IROAIB) M PU Interrupt by CAl ICB1)
active transition
IRCAIB) 1 Interrupt Flag Ibit 7) 1 IROAIB) will ocbur on next IMPU generated) positive
Goes hlg h on active transition of CAl ICB1), Automa- transition of bO If CAl (C81) active transition De-
tlcally cleared by MPU Read of Output Register AlB) curred while Interrupt wa s disabled
May also be cleared by hardware Reset.
~ -1-
I I J I I I I bOl
b7 b6
Control Register IIROAIS)l IIROAIB)2
Flag Flag
I b5 b4
CA2ICB2)
Control
b3 b2
DDR
Access I
bl
CA1ICB1)
Control I
IRCAIB)2 Interrupt Flag Ibit 6)
I
When CA2 ICB2) IS an Input, IROAIB) goes high on ac- Determines Whether Data Direction Register Or Output
tive transition CA2 I CB2), Automatically cleared by Register is Addresaed
•
MPU Read of Output Register AlB) May also be b2= 0 Data Direction Register selected
cleared by hardware Reset b2 = 1 Output Register selected
CA2 ICB2) Establtshed as Output Ib5= 11. IROAIB)
2= 0, not affected by CA2 ICB2) transitions
1 L
CA2ICB2) Established as Output by b5= 1 CA2 ICB2) Established as Input by b5=O
INote that operaltOn of CA2 and CB2 output
b5 b4 b3 functions are not Identical) Q§ b4 b3
- - F---+-
1 0
CA2
b3=0 Read Strobe with CA 1 Restor.
o L CA2 ICB2) Interrupt Request Enable/Disable
CA2 goes Iowan first hlgh-to-Iow b3=0Disables IROAIAI MPU Interrupt by
E transition following an MPU read CA2 ICB21 active transition."
of Output Register A, returned high b3= 1 Enables IROAIB) MPU Interrupt by
by next active CAl tranSition, as CA2 ICB2) active transition
specified by bit 1 "IROAIB) will occur on next IMPU generat-
b3=1 Read Strobe with E Restore ted) positive transition of b3 If CA2 (CB2)
CA2 goes Iowan ftrst hlgh-to-Iow active tranSition occurred while Interrupt
E tranSItion following an MPU read was disabled
of Output Register A, returned high _Determines Active CA2 ICB2) Transition for
by next hlgh-ta-Iow E transition dur- Setting Interrupt Flag IRCAIB)2 - IBit b6)
I ng a deselect
b4=0' IRQAIB)2 set by hlgh-to-Iow transl-
~ CB2 tton on CA2 (CB2)
b3= 0 Writ. Strobe with CBI Restor. b4= 1 IROAIBI2 set by low-to-hlgh transI-
CB2 goes Iowan ftrst low-to-hlgh tion on CA2 (CB2)
E tranSition following an MPU write
Into Output Register B, returned
high by the next active CB 1 tranSI-
ItOn as specified by bit 1 CRB-b7
must first be cleared by a read of
data
b3 = 1 Write Stmbe with E Restor.
CB2 goes Iowan ftrst low-to-hlgh
--L
E transitIOn followmg an MPU write
Into Output Register B, returned
b5 b4 b3 high by the next low-to-hlgh E tran-
Sltlon following an E pulse which
occurred while the part was de-
selected
1 1 Set/Reset CA2ICB2)
CA2 ICB2) goes low as MPU wrttes
b3=0 Into Control Register
CA2 ICB2) goes high as MPU writes
b3= 1 Into Control Register
4-344
® MOTOROLA MC6822
•
shifters are required) The IIA IS also Ideal for Industrial applications
when Increased nOise margins are reqUired
The functional configuration of the IIA IS programmed by the MPU
dUring system initialization Each of the penpheral data lines can be pro-
grammed to act as an Input or output, and each of the four con-
trol/Interrupt lines may be programmed for one of several control
modes ThiS allows a high degree of fleXibility In the overall operation of
the Interface
• Two Bidirectional 8-Blt Ports for Interface wltr Peripherals VSS CAl
PAO CA2
• Two Programmable Control Registers PAl iRciA
PA2 4 IROB
• Two Programmable Data Direction Registers
PA3 RSO
PA4 RS1
• Four IndiVidually-Controlled Interrupt Lines, Two Usable as
Penpheral Control Outputs RESET
DO
• Handshake Control LogiC for Input and Output Penpheral Operation Dl
PBO D2
• Open Drain Penpheral Lines Capable of InterfaCing With Industrial
EqUipment D3
PB2 D4
• Program Controlled Interrupt and Interrupt Disable Capability PB3 13 D5
PB4 14 D6
• CMOS Drive Capability on All Penpheral Lines PB5 15 D7
PB6 16
• Pin Compatible With MC6821 PIA
PB7 17 CSl
4-345
MC6822
The IIA Interfaces with the MC6800 MPU via an B-blt bidirec- trol of the Enable and Read/Write Signals. The chip select
tional data bus, three chip select lines, two register select lines must be stable for the duration of the E pulse The
lines, two Interrupt request lines, read/write line, enable line, deVice IS deselected when any of the chip selects are In the
and reset line. These signals, In conjunction with the Inactive state.
MC6800 VMA output, permit the MPU to have complete
control over the IIA. VMA should be utilized In conjunction
with an MPU address line Into a chip select of the IIA IIA REGISTER SELECT (RSO AND RS1)
The two register select lines are used to select the various
IIA BIDIRECTIONAL DATA (DO-D7) registers Inside the IIA These two lines are used In conJunc-
The bidirectional data lines (00-07) allow the transfer of tion with Internal Control Registers to select a particular
data between the MPU and the IIA The data bus output register that IS to be written or read
drivers are three-state devices that remain In the hlgh- The register and chip select lines should be stable for the
Impedance (off) state except when the MPU performs an IIA duration of the E pulse while In the read or write cycle
read operation. The Read/Write line IS In the Read (high)
state when the IIA IS selected for a Read operation
INTERRUPT REOUEST (iROA AND IROB)
IIA ENABLE (E) The active low Interrupt Request lines (IRQA and IROB)
act to Interrupt the MPU either directly or through Interrupt
The enable pulse, E, IS the only timing signal that IS sup-
PriOrity circuitry These lines are "open drain" (no load
plied to the IIA. Timing of all other signals IS referenced to
deVice on the chip!. ThiS permits all Interrupt request lines to
I
the leading and trailing edges of the E pulse This signal will
be tied together In a Wire-OR configuration
normally be a derivative of the MC6800 </>2 Clock
Each Interrupt Request line has two Internal Interrupt flag
bits that can cause the Interrupt Request line to go low. Each
IIA READ/WRITE (R/W)
flag bit IS associated With a particular peripheral Interrupt
This signal IS generated by the MPU to control the direc- line Also, four Interrupt enable bits are proVided In the IIA
tion of data transfers on the Data Bus A low state on the IIA which may be used to Inhibit a parllcular Interrupt from a
Read/Write line enables the Input buffers and data IS peripheral deVice
transferred from the MPU to the IIA by the E signal If the ServIcing an Interrupt by the MPU may be accomplished
device has been selected. A high on the Read/Write line sets by a software roullne that, on as prioritIZed baSIS, sequential-
up the IIA for a transfer of data to the bus. The IIA output ly reads and tests the two control registers In each IIA for in-
buffers are enabled when the proper address and the enable terrupt flag bits that are set.
pulse E are present The Interrupt flags are cleared (zeroed) as a result of an
MPU Read Peripheral Data Operation of the corresponding
RESET data register After being cleared, the Interupt flag bit cannot
The active low RESET line IS used to reset all register bits be enabled to be set unlll the IIA IS deselected dUring an E
In the IIA to a logical zero (Jaw) This line can be used as a pulse The E pulse IS used to condition the Interrupt control
power-on reset and as a master reset dUring system opera· lines (CA 1, CA2, CB 1, CB2) When these lines are used as In-
tlon terrupt Inputs, at least one E pulse must occur from the inac-
tive edge to the active edge of the Interrupt Input Signal to
IIA CHIP SELECT (CSO-CS1 AND CS2) condition the edge sense network If the Interrupt flag has
These three Input Signals are used to select the IIA C50 been enabled and the edge sense CIrCUIt has been properly
and CS 1 must be high and C52 must be low for selectIOn of conditIOned, the Interrupt flag will be set on the next active
the deVice Data transfers are then performed under the con- transition of the Interrupt Input Pin
4·346
MC6822
4-347
® MOTOROLA MC6828
MC8501
Note: The dual numbering system emphaSIS that
thiS deVice IS a bipolar LSI service and directly
compatible with the M6800X Microprocessor
Family The Priority Interrupt Controller may be
ordered by uSing either part number
•
Signal which can be used to slow the processor clock while fetching
Interrupt routine starting addresses. The Stretch Signal allows the
Interrupt structure to be deSigned without concern for faster opera-
tion due to Improvements In processor speeds l SUFFIX
CERDIP PACKAGE
CASE 623-03
Latched Inputt
BLOCK DIAGRAM
PSUFFIX
PLASTIC PACKAGE
CASE 649-03
24
4'J 1
.
IN711 1-of-8
IN610 Priority Vector
IN5 9
IN4 8 -.b'7'1=T."'CriL~8~IL~~~;~P
IN3 7
IN2 6
IN1 5
INO 4 f - - - - + - - - - - < > 2 3 INT PIN ASSIGNMENT
4 24
23
Vector 22
8us
E 18 4 21
R/W 17
20
eso 3
eS1 1 ~22Z4 6 19
L....=T'-"'--...Jor Address --<> 21 2;3
4 18
I Address --02022
Bus 4 4 --019 Z1 8 17
9 16
L....______________ ~ 2 Str~ch
Vee'" PIn 24 10 15
Gnd = Pm 12 11 14
12 13
4-348
MC682S-MC8507
MAXIMUM RATINGS
Rating Symbol Value Unit
Supply Voltage Vcc -05 to + 7 0 Vde
Input Voltage VIR -10 to +5 5 Vde
Output Voltage VOH -0 4to +70 Vde
THERMAL CHARACTERISTICS
Characteristic Symbol Max Unit
Thermal Resistance Cerdlp ReJA 65 °CIW
PlastIc 120
POWER CONSIDERATIONS
4·349
MC6828-MC8507
•
FIGURE 1 - FUNCTIONAL WAVEFORMS
NON-MASKED MODE MASKED MODE
Load
Load and MPU Outputs Interrupt Load & Mask 0
Store Vector Register Load Store (Reset) &
FFF8 & FFF9 Mask 8 Interrupt 0 Enable INT
(2 Cycles)
I I I
E
L..F\.... OV
iN'i thru
iN?
11
'MINT t-
R/W ~ ~
~ II
~
@J :' ~
At __A-____~~--~,~~~------~~----~~------~~-- ~ :, ~
A2 __~____~~__ ~~______~~____~~____~~-- ~ :, ~
~ :, ~
A4 --"-------'"'"1'-----1 ~ :, ~
Zt __f'-____~~~~~~~------~'----------~----~~-
Notes:
Z2 __n-____~~~~~~~------~'----------~----~~- 1. ~ Data not valid
Z3 _ " -____--''"'''-''\--...
Z4 __n-____~~1-~
4·350
MC6828-MC8507
OPERATING CHARACTERISTICS
The primary purpose of the Priority Interrupt Controller The 1-of-8 Priority encoder enables a vector corres-
(PIC) IS togenerate a modified address to ROM In response ponding to the stored Interrupt with the highest Priority
to prioritIZed Inputs. With the PIC, each interrupting device and places It on the vector Input port of a data selector In
IS assigned a unique ROM location which contains the addition an Interrupt request signal INT IS generated to
starting address of the appropriate service routine After signal the MPU that an Interrupt has been dstected The
the MPU detects and responds to an Interrupt, the PIC mask location register overrides and inhibits all Interrupts
directs the MPU to the proper memory location. with Priority below the mask level The mask can be
The basIc functions of the PIC are shown In the block thought of as a movable partition allowing responses to
diagram The 8-blt request register IS an edge clocked Inputs equal to or greater than the mask value For
D-type register with Internal 6 kfl pullup resistors on the inter- example If the stored mask level was 4, Inputs INO, iN'i,
rupt Inputs (INO thru IN7) Note the Inputs are active low IN2, and IN3 would not generate an Interrupt to the MPU
The Interrupt register IS loaded on the failing edge of the system The Input request register IS not affected by the
enable when the PIC IS not selected mask, and If the mask IS cleared (by loading It with zeros),
any previously stored Inputs will generate an IRQ signal
•
FIGURE 2 - MC6B2B TRUTH TABLE FOR M6BOO MICROPROCESSOR SYSTEMS
Output When
Selected
Active Equivalent Address ROM Bytes
Input Z4 Z3 Z2 ZI Hex Address Contain Address of:
Highest IN7 1 0 1 1 FFD6-FFD7 Priority 7 Routine
IN6 1 0 1 0 FFD4-FFD5 PriOrity 6 Routine
IN5 1 0 0 1 FFD2-FFD3 Prlonty 5 Routine
IN4 1 0 0 0 FFDO-FFD1 PriOrity 4 Routine
IN3 0 1 1 1 FFCE-FFCF PriOrity 3 Routine
IN2 0 1 1 0 FFCC-FFCD PriOrity 2 Routine
IN1 0 1 0 1 FFCA-FFCB Prlonty 1 Routine
INO 0 1 0 0 FFC8-FFC9 Priority 0 Routine
Lowest None 1 1 0 0 F FFI8-FFF9 Default Routine IIRQ)
4-351
MC6828-MC8507
Chip Select and Stretch The Influence of the mask register on the Priority encoder
The chip select and decode circuitry controls all Internal IS shown In the truth table of Figure 6. The actual use olthe
functions of the PIC. The selected mode IS defined as the mask register Will vary with the system needs and the
logical AND function A1 . A2· A3· A4· CSO· CS1 . R;W. imaginative software programmer.
When the device IS not In the selected mode the request Special Cases
register clock IS enabled and the address Inputs A, passes As originally conceived, the PIC was only meant to be
directly through the data selector to the Z, outputs. When used with the MC6800 MPU. With the advent of higher
the MPU responds to the Interrupt request and the PIC performance/function microprocessors such as the
decodes the select address, the request register IS inhib- MC6809/MC6802/MC6808, priOritIZed Interrupts are
Ited and the data selector places the vector on the Z out- still reqUired. The Interrupt vector map for the M6800 IS
puts. The address delay added tothe MPU system IS shown located from FFF8 to FFFF With the MC6809, this vector
In Figure 4 This delay may be critical In some systems. A map extends downward to FFFO As can be seen in Figure 2.
stretch signal, which indicates the selected mode, IS pro- the normal configuration of the PIC places Priority Interrupt
vided for use with special MPU clock drivers to stretch the vectors from FFE8 to FFF7 which conflict with the eXisting
clock cycle when accessing slow ROM. This stretch signal MC6809 Interrupt vectors Figure 1 shows appropriate
IS applicable only to those microprocessors which incor- Circuitry reqUired to Interface with the MC6809. Figure 3
porate external clock generators, I.e., 6800, 6809E. The gives the "modified Priority vectors'" associated with thiS
user cannot directly connect stretch to MRDY on the hardware modification.
MC6809 or MC6802. as stretching the clock circuit with a
•
signal which IS derived from the clock will latch up the Note 1 Smce dUring normal operation of the MPU the address hnes and
MPU An alternative to this problem IS to use a one-shot the R/W line can be In an Indetermmate state, VMA should be
logically ANDed with one of the chip select Inputs of the PIC to
which would provide the reqUired amount of access time
prevent erroneous writes Into the mask register (non-6800
Figure 8 illustrates a tYPical such CirCUIt. The CSO output systems)
has one less gating level than the remainder of the select
decode logiC. This allows an external NAND gate to be
used for the fu II address decode without any Increase In
delay times
Programming the PIC
Changing the PriOrity level, or mask, In the PIC IS done FIGURE 4 - HIGH ROM ADDRESS
DELAY ADDED TO M6BOOX SYSTEMS
by writing to the deVice Unlike normal programming of a
peripheral where a specific data pattern IS written Into a
selected register, the PIC IS programmed by accessing a
location determined by A 1 through A4 while R/W IS low.
The decode logiC also controls the loading of the mask
location register. This register will be loaded on the failing \'--______1
edge olthe enable pulse when enabled by the logical AND
function CSO' CS 1 . R/W (Note 1). This means that In the
load mask mode the data on the data bus IS a don't care.
4>2 \ '--._ _---I/
However, in this mode the ROM will also be accessed and
both the ROM and MPU will be driVing the data bus. There-
fore the read/write line should be used as an active high
chip select or enable signal for ROM decoding.
Al-A4 f£;;~;;)( Valid
Address
1'---~I-tA-z-----------------
Figure 5 shows the tYPical operation flow diagram for
'7/77'?77m=~
the PIC in an M6800 system. The functional timing for Z1-Z4 %"lnval1d Interrupt Valid ROM
thiS flow IS as shown in the first part of the waveforms in ~ Vector Addre..
Figure 1. The second half of Figure 1 shows the operation
of the mask. Interrupts will be stored even if they are
masked. When the mask is released the INT signal will
then be generated.
4·352
MC6828·MC8507
•
FIGURE 6 - MASK OPERATION
,,,
0 0 0 0 0 0 0 0
,, 0 ,
0 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
,, 0 ,,0
,
0 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
,
,
0
0 0 ,
0 0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
,, ,, 0
,
0
,,,
0 0
0
,
0
0
0
0
0
0
0
0
0
0
0
0
0
0 ,, 0 ,
0
,, ,, ,, ,
0 0
0
0
0
0
0
0
0
0
0
0
,,
0
,
0
,, , , ,, 0 0 0 0
,,, ,, ,, , ,, ,
0 0 0 0 0
•• Must Have Been
Previously
0
0
0
0 0 ,
0
,
, , , , , , ,
0 0
0
Stored RAM 0 0 0 0
4-353
MC6828-MC8507
+50
MC6800/02/08/01/09 33 k
F/IRQ 23
R/W
INO
A15
INl
A14
A13 - IN2
II
A12 IN3 8 Interrupt
All Inputs from
IN4 PI As or Latches
Al0
A9 CSl IN5
10
A8 IN6
A7 11
IN7
A6
A5
MC6828
VMAon
Non~6809
Systems
~
A3 Zl Al
A4 13 20
.p A4 Z2 A2
::i' 24 21
+50 VCC Z3 A3
12 22
VSS Z4 A4
AO
- A5
A5 I Non-SaOg Connect
ROM Decode
"Not Required In
Non-GaOg Systems
4-354
MC6828- MC8507
74121
14
4
A2
}
R1
3 11 Set Values
A1 for Appropriate
Length of Stretch
5 C1
B
10
Q
L....r
~------------. . . To MRDY on MC6809/MC6802!M6808
II
Ordering Information
4·355
® MOTOROLA
Advance Infor:rnation
•
process system .
• Expands Memory Address Space from 64K to 2 Megabytes
• Each MMU is Capable of Handling Four Separate Tasks
• Up to Eight MMUs can be Used in a· System
• ProVides Task Isolation and Write Protection
• Provides Efficient Memory Allocation; 1024 Pages of 2K Bytes Each PLASTIC PACKAGE
• Designed for Efficient Use with DMA CASE 711
a KVA 15 03
Q 16 02
DO-D7
17 01
BA 18 00
BS 10 Vee;
RESET 20 R/W
4·356
MC6829· MC68A29· MC68B29
MAXIMUM RATINGS
This device contains circuitry to protect the In-
Characteristics Symbol Value Unit puts against damage due to high static voltages
Supply Voltage Vcc -03to+70 V or electnc fields, however, It IS advised that nor-
Input Voltage Vin -03to +70 V mal precautlOns be taken to avoid application of
any voltage higher than maximum rated voltages
Operating Temperature Range h to TH to this high-Impedance CirCUIt Reliability of
MC6829. MC68A29. MC68B29 TA o to 70 'c
operation IS enhanced If unused Inputs are tied to
MC6829C. MC68A29C. MC68B29C -40 to +85
an appropriate logiC voltage level (e.g, either
Storage Temperature Range TstQ -55 to + 150 °C
VSS or VCC)
THERMAL CHARACTERISTICS
Symbol Value Rating
Thermal ReSistance
Plastic 100
6JA °C/W
Cerdlp 60
Ceramic 50
DC ELECTRICAL CHARACTERISTICS (VCC~5 0 Vdc ±5%. vss~O. TA~TL to TH unless otherWise notedl
Characteristic Symbol Min Typ Max Unit
Input High Voltage All Inputs VIH VSS + 20 - VCC V
Input Low Voltage All Inputs VIL VSS 03 VSS+OB V
Input Leakage Current (V in - 0 to 5 25 V) Vcc-Max lin - 10 25 ~A
Three-State IOff State) Input Current IV In ~ 04 to 24 V) DO-D7 liZ - 20 10 ~A
Output High Voltage
(iload = -145 ~A) DO-D7 VOH VSS+24 - - V
Vcc~mm PA11-PA20 VSS + 24 - -
Output Low Voltage
(iload ~ 20 mAl DO-D7 VOL - - VSS+O 5 V
Vcc=max PA11-PA20 - - VSS+O 5
Internal Power DIsSipation (Measured at TA- TLI PINT 800 mW
"Input l;apacltance IV,n O,IA 2b°l;, f 1 bMHz) All Inputs l;1n IUU ILU P
Output Capacitance (V in =0, TA - 25'C, 1-1 5 MHz) All Outpu,s Cout - - 120 pF
4-357
MC~MC~MC~B~
•
31 Input Data Setup Time tDSW 165 - 80 - 60 - ns
See Figures
2 and 3
Three-State Address Delay tTAD - 90 - 80 - 60 ns
~--------~2t-----------~~ ________________________ ~
R/VV,Address----~~~~~~,,~~~--~-,~~~----t1r---------------------------------i_~~?f7
(Non-Muxedl
Wrote Data_
Non-MlIxed
-==!Jt==:~:- ________________ .....:M;;.p..:u:........w_r;;.lte:..:.D.:.at=a_N;;.o;;.n_-M.....:ux..:e..:d-_ _ 1~=~
l"'--;'-----:::-+-""r
Notes
1 Voltage levels shown are VLSO 4 V, VH:.2 4 V, unless otherwise specified
2 Measurement pOints shown are 0 8 V and 2 0 V, unless otherWise specified
4·358
MC6829-MC68A29-MC68B29
A11-A1S
SA, SS
PA11-PA20 II
FIGURE 3 - RESET TIMING
\~---'/ \~---'/
E _ _ _ _/
PA11-PA20 If!!111mI//Jffflt
Note: Timing measurements are referenced to and from a low voltage of 0.8 volts and 8 high voltage of 2.0 volts, unless otherwise noted.
4-359
MC682ge MC68A2ge MC68B29
PIN DESCRIPTION RESET - RESET (Input). A low level on this input causes
the MMU to initialize its registers to a known state. An inter-
The following section describes each pin of the MMU In nal flag IS also set which forces $3FF onto the physical ad-
detail. dress lines until the Key Value Register is wntten. mET
must be low for at least one cycle.
VCC. VSS - Supplies power to the MC6829. VCC is +5
volts and VSS is ground.
R/W - Read/Write Line Input; 1 = Read, 0= Wnte. For every processor cycle, the MMU supplies a mapped
address based on the processor address and the current task
00-07 - Bi-dlrectional Data Bus. The data bus IS used number (refer to Figure 4), The current task number IS kept
when the M M U registers are to be read or written. In an on-chip register called the OPERATE KEY. Changing
the value of the operate key causes a new map to be
Al1-A15 - Logical Address Lines (Input to MMU). The selected.' The MMU also contains automatic task switching
physical address lines are generated by the M M U for every logiC to cause pre-defined task numbers to override the task
number In the operate key for certain events (Interrupts,
•
bus cycle. When multiple MMUs are present in a system, on-
ly one M M U will output a phYSical address. Each physical ad- Direct Memory Access, Reset)
dress line Will drive one Schottky TTL load or four TTL loads The MMU registers always appear as a block of 64 byes
and a maximum of 90 pF. located on the last page of task #0 (refer to Figure 5), When
the registers are accessed;the MMU outputs a phYSical ad-
PA11-PA20 - Physical Address Lines (Output from dress of $3FF (PA ll-PA20 all high) ThiS IS necessary Since
MMU). The phYSical address lines are generated by the the mapping RAM of the MMU cannot map an address and
MMU for every bus cycle. When multiple MMUs are present be modified at the same time.
in a system, only one MMU will output a phYSical address The exact location of the MMU registers Within the last
Each phYSical address line Will dnve one Schottky TTL load page of physical memory IS determined by the REGISTER
or four LS TTL loads and a maximum of 90 pF. ACCESS (RA) signal which IS Similar to a chip select line.
The RA Signal Will normally be denved from processor ad-
RSO-RS6 - Register Select Lines (Access to MMU dress lines A7-A 10 uSing a Simple 4-lnput gate. For example,
Registers). When accessing the MMU registers, the register a 4-lnput NOR gate would place the MMU registers ~t $FBOO
select lines determine which byte of Information IS being to $F87F In systems uSing DMA, the RA Input must Include
referenced Within the MMU. Valid addresses are detailed in the externally derived DMA/VMA Signal to prevent dead bus
the Register Select Truth Table. cycles from affecting the MMU Refer to Programming Con-
Siderations
BA, BS - Bus Available and Bus State (Inputs). These in- Inputs RSO-RS6 to the MMU are the register select lines.
puts are directly connected from the BA, BS lines of the These lines are normally connected to the low order address
MC6809. They proVide the MMU With information about the lines AO-A6 from the processor. The MMU registers are only
class of bus operation for each cycle. Note that when com- accessible if:
Ing out of a DMA cycle, the MC6809 BA, BS pinS change 1. the current task number IS zero;
back from DMA acknowledge (BA= I, BS= 1) to running 2 processor address lines All-A15 are aliI's,
(BA = 0, BS = 0) one cycle before the end of the DMA. 3. the Register Access line (RA) IS asserted low;
4. Register Select lines (RSO-RS6) contain a defined
RA - Register Access (Chip Select for MMU Registers).
register address, and
ThiS active low Input determines the location of the MMU
registers. Since the MMU registers are only accessible from 5. the System Bit (S-bit) IS set (for a write operation
the last page of task #0 ($FBOO-$FFFF), thiS Signal can be only).
derived from address lines A 10-A7 of the processor. When As a result of the above restnctlons on accessing the
RA IS asserted low, the MMU registers are selected If the MMU registers, the portion of the software that sets up and
current task number IS zero and AI5-All are all 1'5. maintains the memory maps for all tasks must run as task
zero ..
KVA - Key Value Access select line (Input). ThiS active The first 64 bytes of the MMU's register area comprise a
low Input enables access to the 3-blt Key Value register on "Window" through which anyone of the 4 maps may be
the MMU. Reading the Key Value Register IS allowed only Viewed or changed. The task number to be Viewed through
when the current task IS zero, address lines A ll-A 15 are all thiS "Window" IS written Into a read/write register called the
ones, RA=O (asselted), RS6-RSO are Within the range ACCESS KEY Thus, to examine or change the map for any
$40-$47 and KVA = 0 (also asserted), Wntlng the Key Value task, the processor must first wnte the task number into the
Register has the additional requirement of haVing the S-blt Access Key. Once set, the Access Key Will retain ItS value
set until expliCitly changed
"Refer to Register Select Truth Table for exact procedure to change thiS register
4-360
MC6829- MC68A29- MC68B29
Task # Aol
~
Interrupt ......
Mapping RAM
DMA_
~
PA11I PA10
Physical Address
Access
Key
Register
00
01
02
03
04
05
D7
PAlS
PAlS
PAlS
D6
PA17
PA17
PA17
FIGURE 5 - MMU REGISTER MODEL
D5
PA16
PA16
PA16
D4
PA15
PA15
PA15
D3
PA14
PA14
PA14
D2
PA13
PA13
PA13
Dl
PA20
PA12
PA20
PA12
PA20
PA12
DO
PA19
PAll
PA19
PAll
PA19
PA11
Logical Address
$OOOO-07FF
$08OO-$OFFF
$lOOO-$17FF
•
"Window"
./' ./
./ o
./
./' o
./
./ o ./
./' o /.
3E I I I I I PA20 I PA19
$F800-$FFFF
3F PAlS I PA17 I PA16 I PA15 I PA14 PA13 I PA12 I PAll
40 KV MMUO
41 KV MMUl Only one Key Value Register for
42 KV MMU2 each MMU, but all Key Value
43 KV MMU3 RegIsters fall In thiS range
44 KV MMU4
45 KV MMU5
46 KV MMU6'
47 KV MMU7
48 I S System! User flag bit
49 Fuse Map SWitch Fuse
T ask Currently Accessed Through
4A I Access Key
Register #$0-$3F
46 I Operate Key
Current Task
4C o
./ 0 ./
./' . / Undefined
. / ' 0 . /
7F rl----4------+----~----~?----_4----_+------+_--~
Notes
1 The contents of bytes $4C through $7F are undefined and do not respond to any reads or wntes
2 The Access, Operate and Key Value Registers are cleared on reset
-the S-blt IS set
3 Unused bits of defmed registers always read zeros
4, Locations $40-$47 are accessible only when KV A = 0
5 In multiple MMU configuratIOns, the MMU whose Key Value Register matches the upper three bits of the access key will respond to a pro-
cessor read of locations $48-$48 Processor wntes to these registers wIll cause the data to be wntten to all M~Us simultaneously
4-361
MC682ge MC68A2ge MC68B29
Pages in physical memory require 10 bits to define their BUILDING AN MMU SYSTEM
location (refer to Figure 5), These 10 bits are arranged as a Up to 8 chips may be connected in parallel to~te a max-
pair of bytes in the MMU in order to allow the use of double imum of 32 tasks. All MMU pins except one (KVA) may be
byte instructions (e.g., LDD) in manipulating the MMU wired in parallel. Each M M U chip contains 1280 bits of fast
registers. These first 64 bytes of the register area are then ac- on-chip lookup RAM. ThiS RAM IS accessible 10 bits at a
cessed as 32 pairs of bytes with each pair describing the time for mapping purposes, and as 2 and 8 bits at a time
logical-to-physical mapping for one 2K page. Registers 0 and when the Operating System OS IS changing the contents of
1 contain the page number for Igoical addresses the RAM. In addition to the lookup RAM, each MMU con-
$000Q-$07FF, register 2 and 3 control logical addresses tains a separate copy of the Access Key, Operate Key, Fuse
$08QO-$OFFF, etc. Register, Key Value Register, and S-bit. A CPU write to the
Each MMU has a 3-bit register called the KEY VALUE Access, Operate, or Fuse Register causes all registers on all
REGISTER. This register determines the range of task MMUs to be updated. In contrast, the lookup RAM for each
numbers an MMU controls. The top three bits of the Operate chip is updated only when the top three bits of the Access
Key must match the Key Value Register for that task to be Key match the Key Value Register for that chip. DUring map-
active. Similarly, the Key Value Register must match the top ping operations, each MMU compares the value In Its
three bits of the Access Key to change or view registers #0 Operate Key (top three bits) with Its Key Value Register and
through #$3F. Each MMU must receive a unique key value responds only If a match is found. Similarly, when the pro-
when the system is initialized to guarantee that no two cessor reads the RAM, each MMU compares Its Key value
MMUs control the same range of tasks. To be able to write with the Access Key (Figure 6).
to each MMU's Key Value Register separately, an external
•
decoder must be provided. ThiS decode function can be REGISTER SELECT TRUTH TABLE
derived from address lines AO, A 1 and A2 uSing a 3-to-8 line .Table 1 shows how the M M U registers are accessed by
decoder. Writing to locations $40-$47 Will cause the Key the processor It IS assumed that the current task IS zero and
Value of the MMU to be updated only if the KVA Input IS that the processor address Il'nes A 11-A 15 are all ones. If the
low. In systems uSing a single MMU, the KVA Input may be S-blt IS not set, the registers are stili readable, but cannot be
wired low. modified
RA R/W KVA RS6 RS5 RS4 RS3 RS2 RS' RSO register addressed
, X X X X X X X X X none
0 X 1 ,, 0 0 0 X X X none
0
0
1
0
0
0 , 0
0
0
0
0
0
X
X
X
X
X
X
read Key Value Register
write Key Value Register
0 0 X ,, 0 0
,
1 0 0
,
0 none I Note 21
0
0
0
0
X
X , 0
0
0
0 1
0
0
0
1
,
0
write
wnte
Fuse Register
Access Key
0 0 X 1 0 0 1 0 1 wnte Operate Key
0
0 ,
1 X
X
1
1
0
0
0
0
1
1
0
0
0
0
0
1
read
read
S-blt INote 31
Fuse Register (Note 3)
0 1 X 1 0 0 1 0 1 0 read Access Key INote 31
0 1 X 1 0 0 1 0 1 1 read Operate Key INote 31
0 X X 1 0 0 1 1 X X none
0 X X 1 0 1 X X X X none
0 X X 1 1 X X X X X none
Notes
1 The MMU RAM IS accessible only If the Key Value Register IS equal to the top 3 bits of the Access Key Register The lower two bits of the
Access Key Register then determines which task IS to be accessed (R IWl
2 The S-bit IS read-only
3 The S-blt, Fuse, Access or Operate registers are readable only If the Key Value Register IS equal to the top 3 bits of the Access Key Register
ThiS Insures that only one MMU Will respond to a read request of these locations
4·362
MC6829- MC68A29- MC68B29
Up to 86829s
Task 28-31 In Parallel
•••
Task 8-11
BA r------,J~ 6829
BSf------~
Task 0
PA20
Ef------~
Task 1
Q~----+l
System Bus
Al0
AO
Task 0= Operating System Task
Task 1 = DMA Task
Tasks 2-31 = User Tasks
PAO
•
System
Memory
MC6809
MC6809E
DO-D7 VMA
BA. BS. E. Q
R/W
DO-Dl
R/Vi
4-363
MC6829-MC68A29-MC68B29
Cycle by tv'vnta 14
Access Key - S-blt R/W register that contains the task Cycle to Fuse Address Address Task N
number of a task to be Viewed or changed ThiS register re- Operation Register JMP High Low \iMA Opcode
taons ItS value until expliCitly changed Fuse Register 0 4 3 2 t 0
•
C'Ontents
Register #fJ to #3F - 64 bytes accessed as 32 pairs of
bytes With each pair descrlbong the logical to phYSical mapp- Refer to Section MMU in a MC6EKJ9 System for Fuse
Ing for one 2K page. Refer to Figure 5. Register use In returning from an Interrupt
4-364
MC6829-MC68A29-MC68B29
INTERRUPTS/MAP SWITCHING The MMU uses these two signals directly from the pro-
cessor to determine what action to take for every bus cycle.
The MC6829 monttors the Bus Available (BA) and Bus The MMU, unhke other M6800 peripherals, Introduces an
Status (BS) lines from the processor to determine what type additIOnal delay (tMAD) In the system configuratIOn as it ac-
of bus operation IS occurring When an Interrupt IS detected, cepts address signals from the MPU and maps the MC6809
the current task IS overridden by Task #0 The map sWitch logical address to the system physical address When a
occurs dUring the processor vector fetch (BA=O, BS= 1) so system IS constructed this additional delay must be con-
that Task #0 supphes the Interrupt vector address Detecting Sidered
an Interrupt also sets the S-bit within the MMU allowing The system clock frequency IS determmed by these ad-
Task #0 to be the operating task while the Interrupt IS ser- dress timing delays. Figure 7 shows this data. The System
viced. Cycle time may be determined by adding
1 the MPU E to a rise delay tAVO (max)
2 the MPU address vahd to a rise to tAO (min)
DMA OPERATION
3 the MMU mapping delay tMAD (max)
For a DMA transfer, the memory map IS sWitched to Task 4 the system decode and buffer time tB (thiS IS the delay
#1 This allows transfers of up to 64K bytes without pro- due to bus buffers and decoding circuitry)
cessor Intervention and without interfering with any other 5 the address setup time reqUired by peripherals tAS
task (An external DMAIVMA signal should be Included In (note the setup time IS reqUired for the peripheral to
the decode CirCUitry for the RA Input to prevent dead bus determine If It IS selected as well as deselected dUring
cycles from affecting the MMU) At the end of the DMA every bus cycle)
•
transfer, the MC6829 returns to the task being used before 6 the MPU pulse Width high tPWEH
the transfer began (refer to Programming Considerations) NOTE
This equation must be satisfied
MMU IN A MC6809 SYSTEM tPWEL'" tAVO - tAO + tMAD+ tB+tAS
~------tPWEL0~------J"i
4-365
MC682geMC68A29-MC68B29
CHANGING TASK TO OPERATING SYSTEM (OS) - may be masked with external hardware during IRO opera-
The OS map (Task 10) IS automatically selected to service all tions.
interrupts. The Interrupt Acknowledge (lACK; BA=O, A typical interrupt service routine beginS like this:
BS = 1) signal is used to determine when an interrupt vector
ORCC I'+F
is being fetched. The map is sWitched at this time in order to STS SAVESP
supply the processor with an Interrupt vector from the OS LOS OSSP
address space, not the user's. At the time lACK is asserted,
all of the registers have been stacked for the interrupt in the
user's address map. This means that the only Information RETURNING FROM THE OS TO TASK N - The OS must
the OS needs to save concerning the running process IS ItS execute an RTI Instruction to get the processor to reload the
stack pointer. All other Information about the task is saved user registers. The map switch must occur after the opcode
on the user's stack and in the MMU registers. The map for the RTI IS fetched and before the first register is pulled
sWitch IS latched since lACK will only be present for two from the stack. Prior to the RTI, the OS must reload the
machine cycles, yet the OS must retain control until the In- stack pOinter from the one that corresponds to the task
terrupt IS serviced. This latched information is kept In a flag about to run. There must be no Interrupts from the time the
register called the S-bit. This bit is set on any lACK and re- stack pOinter is reloaded until the RTI is executed. The signal
mains set until cleared by software. The first thing the OS to the MMU that the map should be returned to the user task
must do is save the interrupted task's stack pOinter in a table is noted by a write to a 3-bit down counter called the FUSE
I
and load the stack pointer with the current top of stack In the REGISTER. When a write to thiS register IS detected, the
OS map. ThiS IS a critical section of code and must not be in- value written IS loaded into the counter and It begins to
terrupted. For this reason, an MMU system cannot accept decrement by one for every processor cycle. When the
two Interrupts In a row. The first interrupt causes the map to counter under flows, the S-bit is cleared and the next pro-
SWitch to task zero. The second Interrupt would stack the cessor cycle Will be mapped uSing the task number In the
machine state at the wrong address In the operating system Operate Key. For most systems, a 1 would be written to the
As a consequence of thiS, Non-Maskable Interrupts (NMIl Fuse Register immediately before the RTI opcode is ex-
must be forbidden In multi-tasking systems since an NMIIS ecuted. Note that DMA operations are still possible Within
possible at any time (even dUring another Interrupt). Similar- thiS critical section. The Fuse Register counts only non-DMA
ly, normal Interrupts (IRQ) do not set the Fast Interrupt cycles after the write to the Fuse Register In order to be sure
(FIRQ), bit F of the status register, in the processor and, of when to sWitch the map. Bus dead cycles are also exclud-
thus, potentially allow another Interrupt before the processor ed when clocking the Fuse Register. Thus, the Fuse Register
has a chance to sWitch stack pOinters. Simple extarnal hard- IS inhibited from counting whenever BA is high, and for the
ware can be used to disable FIRO when IRO IS pending. cycle after BA transitions from high to low. The common ex-
Unlike the NMI input, the FIRO Input IS level sensitive and It pOint for all OS functions looks something like this:
4-366
USING THE MC6Im the S-blt and allows the user process to continue By supply-
Ing a source of periodic Interrupts, the as can regain control
When uSing a MC6800 processor external logic is required of the processor and reschedule running processes.
to determine when to sWitch maps. The MMU is controlled Operating system requests for pnvileged operations by
by ItS BA, BS inputs, the S-bit and the Operate Key. For ex- running tasks are ideally handled using the SWI instruction.
ample, deceding any references to the Interrupt vectors and ThiS causes a map sWitch to task zero (lACK IS asserted on
generating lACK as a result will work as long as each task SWII which then processes the request and eventually
references these locations only when the processor IS fetch- returns control to the requesting task. Note that SWI sets
Ing an Interrupt vector Another possibility IS to monitor the the I and F bits dunng execution of the instruction so that
processor R/W line For the MC6800, the only time seven when the as IS entered, the critical section of saving the
writes occur in a row IS dUring an Interrupt sequence. Thus user task pOinter and reloadmg the as stack pOinter can be
the external logic that generates BA and B S must walt until It safely executed. Note that SWI2 and SWI3 do not have this
sees the seven writes and then assert lACK for the next two property and therefore require special handling. To safely
cycles. use SWI2 or SWI3, the programmer must expliCitly mask
A MC6800 processor Interface to the MMU must also in- hardware interrupts.
clude logic to generate the Q bus signal.
ORCC #I+F DISABLE INTERRUPTS
SWI2/3 CALL OS
HARDWARE/PROGRAMMING CONSIDERATIONS
MANAGING NON-EXISTENT MEMORY ACCESSES
The following sections contain examples and suggestions Memory accesses to non-existent memory requires careful
on how to apply the MMU In a system
4-367
MC6829- MC68A29- MC68B29
end of the STD instruction, the processor will stack the stack push, the FIFO Interrupt would catch the Informallon
machine registers which causes two further page faults Since and the operating system would then allocate memory. If the
the stacking operation writes data to locations $7FF5-$8000 task never used thiS area, It would remain unallocated and
The FI FO must also catch these references since they con- thus be available for other uses Note that thiS approach pro-
tain the machine state at the time of the original Interrupt. Vides for dynamic memory expansion of growing data areas
When task zero gains control, the FI FO data must be cleared If the size of the static data areas IS known at load-time, then
before any attempt is made to reference the task's memory memory can be allocated to a task as needed. Heap manage-
map. If there are no available pages, the task may be made ment (such as for an editor buffer) can be handled by task
inactive until sufficient space eXists to allow the program to resident memory allocation routines which make operating
continue. system calls to obtain more heap space
The maximum number of bytes that may be written to The FIFO scheme does not Implement a demand paging
non-existent memory before task zero gains control IS 24 system It IS assumed that once a page has been assigned to
This occurs when the task pushes all of liS registers onto the a task the page remains assigned until the task ends execu-
stack when the stack POints to an unln,t,al,zed page Pushing tion or possibly gives It back (via a system call) to the
all registers reqUires 12 bytes. At the end of the instruction, operating system
an Interrupt Will be generated which again pushes the entire
machine state. Thus, the FIFO must be 24 bits Wide 116 ad-
dress + 8 data hnes) and 24 words deep DMAIVMA CIRCUIT
The primary benefit of thiS scheme IS to allow the MC6809
•
stack to grow dynamically. When a task starts to run, the The following CirCUit, Figure 8 , IS suggested to keep the
stack could be Initialized to $FFFF with no real memo I y at MC6829 deselected dUring dead bus cycles of DMA ThiS Cir-
that location When the task did ItS first subroutine call or CUit Will also work In a non-MMU system
RESET-------------------,
CLR
o
74LS74
BA-----.r--~D Of-------\
Here IS a list of assembler equates that are used In the follOWing examples.
4·368
MC6829-MC68A29-MC68829
Programming Examples
Example #1 -
Write a program to initialize all MMU Key Value Registers except MMUO.
CONTINUE INITIALIZATION
At this point, each MMU will have a unique key value. Note that the Key Value Register for MMUO has not yet been
written so that page $3FF IS stili on the physical address bus. The difference IS that now only one MMU IS driVing the
address bus.
Example #2 -
II
Write an Initialization program that sets up the pages of Task #0 so that an address $XXXX In Task #0 corresponds
to phYSical address $1 FXXXX
Example #3 -
Give task #9 phYSical page #88 and place It In the task's address space so that #9 refers to thiS page With addresses
$1000-$17FF. Write protect thiS page for thiS task. (The write protect bit IS defined as PA20 of the MMU.)
Example #4-
Write a subroutine that reads a byte from any task On entry, the A register contains the task number, and the X
register contains the address of that task to read Assume that the as
task has ItS third page free for thiS use. The
byte that IS read IS returned In A.
4-369
MC682-MC68A2geMC68829
Example #5 -
Write a subroutine that writes a byte to any task, On entry the A register contains the task number and the X
register contains the address of that task to read, The B register contains the byte to place In the task's memory,
Assume that the as
task has its third page free for this use,
Example #6 -
Write a subroutine to be given a task number and memory address that returns a pOinter to that byte of the named
task, On entry, the A register contains the task number and the X register contains the task address
• GET PAGE - POINT TO USER BYTE
.. Given a task number In A and a task address In X,
• return With X pOinting to that byte In task 0
.. This subroutine assumes that task 0 has a free
• page IFPAGEI that It uses to map a page of the
.. specified task Into task D's map
I GETPAGE PSHS
STA
TFR
ASRA
D, Y
ACCESS
X, D
SAVE SOME REGISTERS
SETUP WINDOW TO TASK
MOVE POINTER INTO ACCUMULATOR
FIND PHYSICAL PAGE #
ASRA
ANDA #%00111110 MASK ALL BUT PAGE #
LDY #MMU
LDY A, Y PICKUP PAGE
CLR ACCESS NOW TALK TO OS MAP
STY MMU+ FREE 'FREE' OS PAGE
TFR X, D NOW POINT TO OFFSET
ANDA #%111 MASK HIGH BITS OF ADDRESS
LDX #FPAGE POINT TO PAGE START
LEAX D,X ADD OFFSET
PULS D, Y, PC RESTORE AND RETURN
The above method of fetching bytes from other tasks IS appropriate where only a few bytes of memory are to be
transferred, When larger amounts of memory are to be moved, a more general subroutine can be written that
transfers up to 2K bytes (one page) before the MMU registers need to be changed,
4·370
MC683S
® MOTOROLA
(1.0 MHz)
MC68l3S MC68B3S
(1.5 MHz) (2.0 MHz)
Advance InforIllation
MOS
(HIGH-DENSITY, N-CHANNEL,
CRT CONTROLLER (CRTC) SILICON-GATE DEPLETION LOADI
The MC6835 IS a ROM based CRT Controller which Interfaces an MASK PROGRAMMED
MPU system to a raster scan CRT display. It IS Intended for use In MPU CRTC CONTROLLER
based controllers for CRT terminals In stand-alone or cluster configura- (CRTC)
tions The M C6835 supports two selectable mask programmed screen
formats uSing the program select Input (PROm.
The CRTC IS optimized for the hardware/software balance required
for maximum fleXibility All keyboard functions, reads, Writes, cursor
movements, scrolling, and editing are under processor control The
mask programmed registers of the CRTC are programmed to control
the Video format and timing
• Cost Effective ROM Based CRTC Which· Supports Two Screen
Formats
• Useful In Monochrome or Color CRT Applications
• Applications Include "Glass-Teletype," Smart, Programmable, Intel-
•
ligent CRT Terminals, Video Games, Information Displays
• Alphanumeric, Semlgraphlc, and Full GraphiC Capability
• Timing May Be Generated for Almost Any Alphanumeric Screen
Format, e g ,SOx 24, 72x 64, 132x 20
• Single + 5 Volt Supply
• M6800 Compatible Bus Interface
• TTL-Compatible Inputs and Outputs
• Start Address Register ProVides Hardware Scroll (By Page, Line, or
Character)
• Programmable Cursor Register Allows Control of Cursor Position
• Refresh (Screen) Memory May Be Multiplexed Between the CRTC FIGURE 1 - PIN ASSIGNMENTS
and the MPU Thus Removing the ReqUirements for line Buffers or
GND \(S
External DMA Devices
RESET HS
• Mask Programmable Interlace or Non-Interlace Scan Modes
• 14-Blt Refresh Address Allows Up to 16K of Refresh Memory PROG RAO
for Use In Character or Semlgraphlc Displays RAl
• 5-Blt Row Address Allows up to 32 Scan-Line Character Blocks MAl RA2
• By UtiliZing Both the Refresh Addresses and the Row Addresses, MA2 RA3
a 512K Address Space IS Available for Use In GraphiCS Systems
MA3 7 RA4
• Refresh Addresses are ProVided DUring Retrace, AllOWing the CRTC
to proVide Row Addresses to Refresh Dynamic RAMs MA4 8 DO
• Pin Compatible with the MC6845 The MC6845 May Be Used as a MA5 Dl
Prototype Part to Emulate the MC6835 MA6 D2
MA7 11 D3
MAS D4
MAXIMUM RATINGS
MAg D5
Rating Symbol Value Unit
Supply Voltage VCC· -03to +70 V MAlO D6
Input Voltage V In • -03to+70 V MAll D7
Operating Temperature Range MA12 16 CS
MC6835, MC68A35, MC68S35 TA o to + 70 °c
MC6835C, MC68A35C, MC68S35C -50 to +85 MA13 17 RS
4-371
MC6835
~--'-----------~------------------------------------~AB
L ____J--II---';:--I----------------"l~--. . DB Pnmary Bus
Cursor,
Display
Enable
Row Addresses
HS VS
•
THERMAL CHARACTERISTICS
Characteristic Symbol Value Rating
Thermal Resistance ThiS device contams circUitry to protect the in-
puts against damage due to high static voltages
PlastiC 100
8JA "C/W Of electnc fields, however, It IS adVised that nor-
Cerdlp 60
mal precautions be taken to avoid application of
Ceramic 50
any voltage higher than maximum rated voltages
to thiS hlgh~lmpedance ClfCUlt For proper opera-
tion It IS recommended that Vin and V out be con-
RECOMMENDED OPERATING CONDITIONS stramed to the range V SS! ~ V ln or Vout) S Vee
Characteristic Symbol Min Typ Max Unit Reliability of operation IS enhanced If unused in-
Supply Voltage Vec 475 50 525 V puts are tied to an appropriate logic voltage level
Input Low Voltage -03 - 08 V Ie g ,either VSS or VCe!
VIL
Input High Voltage VIH 20 - Vec V
POWER CONSIDERATIONS
4-372
MC6835
DC ELECTRICAL CHARACTERISTICS IVCC=5 0 Vdc ± 5% VSS=O TA=O to 70'C unless otherwise noted) IAeference Figures 3-5)
Characteristic Symbol Min Typ Max Unit
Input High Voltage VIH 2.0 - VCC V
Input Low Voltage VIL -03 - 0.8 V
Input Leakage Current lin - 0.1 2.5 ~A
Three-State IVCC-5.25 V) IV In -O.4 to 24 V) ITSI -10 - 10 ~A
Output High Voltage
II10ad = - 205 ~A) 00-07 VOH 2.4 3.0 - V
IILoad = -100 ~M Other Outputs 2.4 3.0 -
Output Low Voltage Ilload - 1 6 mAl VOL - 0.3 04 V
Internal Power DIssipation IMeasured at T A - TU Po - 600 750 mW
Input Capacitance 00-07 - - 125
C,n pF
All Others - - 10
Output Capacitance All Outputs Cout - - 10 pF
•
2 Pulse Width, E Low PWEL 430 9500 280 9500 210 9500 ns
3 Pulse Width, E High PWEH 450 9500 280 9500 220 9500 ns
4 Clock Transition Time tr,tf - 25 - 25 - 20 ns
9 Address Hold Time lAS) tAH 10 - 10 - 10 - ns
13 AS Setup Before E tAS 80 - 60 - 40 - ns
14 R/W and CS Setup Before E tcs 80 - 60 - 40 - ns
15 Hold Time for A/W and "C'S" tCH 10 - 10 - 10 - ns
18 Peripheral Aead Data Hold Time Provided tDDR 20 50" 20 50" 20 50" ns
21 Wnte Data Hold Time ReqUired tDHW 10 - 10 - 10 - ns
30 Peripheral Output Data Delay tDDR - 290 - 180 0 150 ns
31 Peripheral Input Data Setup tDSW 165 - 80 - 60 ns
*The data bus output buffers are no longer sourcmg or slnkmg current by tOHR max (high Impedance)
FIGURE 3 - MC6835 BUS TIMING
~----------431-------~~
RS
RiwC§
4·373
MC6835
50 V
•
C MMD6150
or EQu!v
PWCH
ClK
RAO-RA4
DE
HS
VS
CURSOR
NOTE Timing measurements are referenced to and from a low voltage of 0 8 volts and a high voltage of 2 0 volts unless otherwise noted
4·374
MC6835
The MC6835 CRT Controller generates the signals field) starts In the upper left hand corner, the second IOdd
necessary to Interface a digital system to a raster scan CRT field) In the upper center Both fields overlap as shown In
display In this type of display, an electron beam starts In the F,gure 7, thus Interlacing the two fIelds Into a Single frame.
upper left hand corner, moves qUickly across the screen and In order to dIsplay the characters on the CRT screen the
returns. This action IS called a hOrizontal scan After each frames must be continually repeated The data to be
hOrizontal scan the beam IS Incrementally moved down In the dIsplayed IS stored In the Refresh IScreenl memory by the
vertical direction until It has reached the bottom At thiS MPU controlling the data processing system. The data IS
pOint one frame has been displayed, as the beam has made usually Written In ASCII code, so It cannot be directly
many hOrizontal scans and one vertical scan dIsplayed as characters. A Character Generator ROM IS
Two types of raster scanning are used In CRTs, Interlace tYPIcally used to convert the ASCII codes Into the "dot" pat-
and non-Interlace, shown In Figures 6 and 7 Non-interlacing tern for every character
scanning consists of one field per frame The scan lines In The most common method of generating characters IS to
Figure 6 are shown as solId lines and the retrace patterns are create a matrix of "x" dots Icolumns) Wide and "y" dots
Indicated by the dotted lines Increasing the number of lrows) high Each character IS created by selectively fIlling In
frames per second Will decrease the flicker Ordinarily, eIther the dots As "x" and "y" get larger a more detaIled character
a 50 or 60 frame per second refresh rate IS used to minimize may be created Two common dot matrices are 5 x 7 and
beating between the frequency of the CRT hOrizontal 7 x 9 Many variatIons of these standards WIll allow Chinese,
OSCIllator and the power line frequency ThIS prevents the Japanese, or ArabiC letters Instead of English Since
•
displayed data from weaving or sWimming characters reqUIre some space between them, a character
Interlace scanning IS used In broadcast TV and on data block larger than the character IS typically used as shown In
monitors where high densIty or hIgh resolution data must be Figure 8. The figure also shows the corresponding timing
displayed. Two fields, or vertIcal scans are made down the and levels for a Video sIgnal that would generate the
screen for each Single pIcture or frame. The first field IEven characters
4-375
MC6835
One Character
Clock
~
4 6 8
Character
4
} Display
6
One Lme
14 Scan
}""'"~"
Lmes
10
12
14
4-376
MC6835
PIN DESCRIPTION graphiCS system both the Memory Addresses and the Row
Addresses would be used to scan the Refresh RAM. Both
PROCESSOR INTERFACE the Memory Addresses and the Row Addresses continue to
The CRTC Interfaces to a processor bus on the bIdIrec- run dUring vertical retrace thus allOWing the CRTC to provide
tional data bus (00-07) uSing CS-, RS, E, and R/W for con- the refresh addresses reqUired to refresh dynamiC RAMs.
trol signals.
Refresh Memory Addresses (MAO-MA13) - These 14 out-
Data Bus (00-07) - The bidirectIOnal data lines (00-07) puts are used to refreSh the CRT screen With pages of data
allow data transfers between the Internal CRTC register file located Within a 16K block of refresh memory These outputs
and the processor. Data bus output drivers are hlgh- are capable of driVing one standard TTL load and 30 pF
Impedance buffers which remain In the high-Impedance state
until the processor performs a CRTC read operation Row Addresses (RAO-RA4) - These five outputs from the
Internal Row Address counter are used to address the
Enable (E) - The Enable signal IS a high-Impedance Character Generator ROM. These outputs are capable of
TTl! MOS-compatlble Input which enables the data bus In- driVing one standard TTL load and 30 pF
put/ output buffers and clocks data to and from the CRTe.
ThiS signal IS usually derived from the processor clock The OTHER PINS
hlgh-to-Iow transition IS the active edge Cursor - ThiS TTL-compatible output Indicates a valid
Cursor address to external Video processing logiC It IS an
Chip Select (CS) - The CS line IS an active-low hlgh- active-high Signal
Impedance TTl!MOS-compatlble Input which selects the
•
CRTC to read or write to the Internal register file. ThiS signal Clock (ClK) - The ClK IS a TTl! MOS-compatlble Input
should only be active when there IS a valid stable address be- used to synchronize all CRT functions except for the pro-
Ing decoded from the processor cessor Interface An external dot counter IS used to derive
thiS Signal which IS usually the character rate In an
Register Select (RS) - The RS line IS a high-Impedance alphanumeric CRT The active transition IS hlgh-to-Iow.
TTl! MOS-compatlble Input which selects either the Ad-
dress Register (RS = "0") or one of the Data Registers Program Select (PROG) - ThiS TTL-compatible Input
(RS = "1") of the Internal register file when CS IS low allows selection of one of two sets of mask programmed
Video formats. Set zero IS selected when PROG IS low and
Read/Write (R/W) - The R/W line IS a high-Impedance set one IS selected when PROG IS high
TTl!MOS-compatlble Input which determines whether the
Internal register file gets written or read. A write IS defined as VCC, GND - These Inputs supply + 5 Vdc ± 5% to the
a low level. CRTe.
CRT CONTROL RESET - The RESET Input IS used to reset the CRTC.
The CRTC proVides hOrizontal sync (HS), vertical sync Functionality of RESET differs from that of other M6800
(VS), and display enable (DE) signals. parts liEID must remain low for at least one cycle of the
character clock (ClK) A low level on the RESET Input
NOTE - Care should be exercised when interfaCing to forces the CRTC Into the follOWing state·
CRT mOnitors as many mOnitors claiming to be "TTL com- a. All counters In the CRTC are cleared and the deVice
patible," have transistor Input CirCUitS which reqUire the stops the display operation.
CRTC or TTL deVices buffering signals from the CRTC/vldeo b All the outputs are driven low, except the MAO-MA 13
CirCUitS to exceed the maximum rated drive currents. outputs which are driven to the current value In the
Start Address Register.
Vertical Sync (VS) and Horizontal Sync (HS) - These
c. The control registers of the CRTC are not affected and
TTL-compatible outputs are active-high signals which drive
remain unchanged.
the mOnitor directly or are fed to the Video processing Cir-
cUitry to generate a composite Video signal. The VS signal d. The CRTC resumes the display operation Immediately
determines the vertical position of the displayed text while after the release of RESET.
the HS signal determines the hOrizontal position of the
displayed text.
CRTC DESCRIPTION
Display Enable (DE) - ThiS TTL-compatible output IS an
active-high signal which Indicates the CRTC is proViding ad- The CRTC consists of mask-programmable hOrizontal and
dressing In the active Display Area. vertical timing generators, software-programmable linear ad-
dress register, mask-programmable cursor logiC and control
REFRESH MEMORY/CHARACTER GENERATOR AD- circuitry for InterfaCing to a M6800 family microprocessor
DRESSING bus.
The CRTC provides Memory Addresses (MAO-MA13) to All CRTC timing IS derived from ClK, usually the output of
scan the Refresh RAM. Row Addresses (RAO-RA4) are also an external dot rate counter. CoinCidence (CO) Circuits con-
provided for use with character generator ROMs. In a tinuously compare counter contents to the contents of the
4-377
MC6835
CS RS
43210 ,
Address Register Register
Register Rle
Program
Unit
Read Write
7
Number of Bits
6 5 4 3 2 1 0
1 X X X X X X X - - - - '\ 1,\ '\'\ 1"- '\ 1\1"-
D D X X X X X AA Address Aeglster - No Yes '\ I" "-
AD HOrizontal Total Char No No
A1 Honzontal Displayed Char No No
A2 H Sync Position Char No No
Note 3 A3 Sync Width - No No V V V V H H H H
A4 Vertical Total Char Aow No No '\
A5 V Total Adjust Scan Line No No l"- I" "-
A6 Vertical Displayed Char Aow No No 1"-.
A7 V Sync POSition Char Aaw No No 1"-.
AS Interlace Mode and Skew Note 1 No No C C 0 0 I I
A9 Max Scan Line Address Scan Line No No
I"I" "P
Al0 Cursor Start Scan Line No No 1"-8 INote 21
All Cursor End Scan Line No No 1,\'\ '\
0 1 0 1 1 0 0 A12 Start Address IHI - No Yes 0 0
•
0 1 0 1 1 0 1 A13 Start Address III - No Yes
0 1 0 1 1 1 0 A14 Cursor IHI - No Yes 0 0
0 1 0 1 1 1 1 A15 CUrsor III - No Yes
NOTES
1 The Interlace Control IS shown In Table 2 while Skew Control IS shown In Table 3
2. Bit 5 of the Cursor Start Raster Register IS used to blink period control, and Bit 6 IS used to select blink or non-blink
3 AD-Rll are mask-programmable and are not accessible via the data bus
mask programmable register file, RO-R11 For hOrizontal tim- cursor as indicated by the register contents
Ing generation, comparisons result In The linear Address Generator IS driven by ClK and
1. HOrizontal sync pulse IHS) of a frequency, position locates the relative positions of characters In memory and
and Width determined by the register contents therr positions on the screen Fourteen outputs, MAO-MA 13,
2 HOrizontal Display signal of a frequency, position and are available for addreSSing up to four pages of 4K
duration determined by the register contents characters, eight pages of 2K characters, etc
Five additional wrrte-only registers define the Start Ad-
The hOrizontal counter produces H clock which drives the
dress and cursor position USing the Start Address Register,
Scan line Counter and Vertical Control The contents of the
hardware scrolling through 16K characters IS possible The
Raster Counter are continuously compared to the Max Scan
linear Address Generator repeats the same sequence of ad-
line Address Register A cOincidence resets the Raster
dresses for each scan line of a character row The Start Ad-
Counter and clocks the Vertical Counter.
dress Register and the Cursor Position Register are program-
Comparisons of Vertical Counter contents and Vertical
med by the processor through the data bus, DO-D7 and the
Registers result In
control signals - R/W, C$, RS, and E Refer to Figure 10
1. Vertical sync pulse IVS) of a frequency, position and
Width determined by the register contents.
2. Vertical Display signal of a frequency, POSition, and REGISTER FILE DESCRIPTION
duration determined by the register contents.
The Vertical Control logiC has other functions The MC6835 has 17 control registers of which 12 are mask
programmable The remaining five registers - Address
1. Generate row selects, RAO-RA4, from the Raster
register, Start Address register parr, and Cursor Position
Count for the corresponding Interlace or non-Interlace
register parr - are write-only registers programmed by the
modes
MPU These registers control hOrizontal timing, vertical tim-
2. Extend the number of scan lines In the vertical total by Ing, Interlace operation, row address operation and define
the amount programmed In the Vertical Total Adjust the cursor, cursor address, start address and light pen
Register. register The register addresses and sIZes are shown In
The cursor logiC determines the sIZe and blink rate of the Table 1.
4-378
MC6835
elK -I----.,.---t
DE
HS
H
HH-
•
~::::::=f::::=F::::~>[::~~:J~~::==::==::==~~tlr----lr-~CURSOR
RAO-RA4 MAO-MA13
4·379
MC6835
MASK PROGRAMMABLE REGISTERS RG-Rll decreased the display IS shifted to the right Any B-blt
The twelve mask programmable registers determine the number may be programmed as long as the sum of the con-
display format generated by the MC6835 The PROG Input IS tents of R1, R2, and the lower four bits of R3 are less than
used to select one of two sets of register values the contents of RO
Figure 11 shows the vIsible display area of a tYPical CRT
mOnitor giving the pOint of reference for hOrizontal registers Sync Width Register (R3) - This 8-blt register determines
as the left most displayed character position HOrizontal the Width of the vertical sync (VS) pulse and the hOrizontal
registers are programmed In character clock time Units with sync (HS) pulse Programming the upper four bits for 1-to-15
respect to the reference as shown In Figure 12 The pOint of Will select VS pulse Widths from 1-10-15 scan-line times Pro-
reference for the vertical registers IS the top character POSI- gramming the upper four bits as zeros Will select a VS pulse
tion displayed Vertical registers are programmed In Width of 16 scan line times The HS pulse Width may be pro-
character row times or scan line times as shown In Figure 13 grammed from 1-to-15 character clock periods thus allowing
compatibility with the HS pulse Width speCifications of many
Horizontal Total Register (RO) - This 8-blt register deter- different mOnitors If zeros are written Into the lower four
mines the hOrizontal sync (HS) frequency by defining the HS bits of this register, then no HS IS provided
period In character times It IS the total of the displayed
characters plus the non-displayed character times (retrace) Horizontal Timing Summary (Figure 12) - The difference
minus one between RO and R1 IS the hOrizontal blanking Interval This
Interval in the hOrizontal scan period allows the beam to
Horizontal Displayed Register (R1) - This 8-blt register return (retrace) to the left Side of the screen The retrace time
determines the number of displayed characters per line Any IS determined by the monitor's hOrizontal scan components
8-blt number may be programmed as long as the contents of Retrace time IS less than the hOrizontal blanking Interval A
A B C
"C Q)
> c:
~ ~
c:
;::: ~
+ aCo en
:; ~ E
~ >- E HOrizontal
~ a ~ Retrace
6 6 ::!! Penod
Display Penod
4-380
s::
i
FIGURE 12 - CRTC HORIZONTAL TIMING
ClK ~~~'V"L1"""LJI
1 I I I I I I I I I I ~·I I I ,-- I~ I j r- r
MAO-MA13'*
I
0
1
* * • I I
~
I I I
_.
I Nhd
I I
II
. "J
I
I
I
~ INhSP~lNhSpl
I _
I I
II ~
_~ "
,
I
I
I r-...
_~ I
I
I
I
I Nht
I
I
I
I
•
• s:
i
FIGURE 13 - CRTC VERTICAL TIMING
VSYNC
:
I 1 I I. I , I
I
•
!§!
2
1-:: '-+-!§!
~_ _ _ _ _ _ _ _ _ _ _ _ _ _- ;
1
IOdd Fleldl
I I ... , " '"
I , I I I I
Display
Enable
rLl-~~~ , __~~_____________~
.. Nht must be an odd number for both Interlace modes
""Initial MA IS determmed by R12/R13 IStart Address Register), which IS zero In thiS timing example
···Nsl must be an odd nu:-nber for Interlace Sync and Video Mode
NOTES
1 Refer to Figure 7 - The Odd Field IS offset y.. hOrizontal scan time
2 Timing values are described In Table 5
MC6835
0 0 1 0
- --0
0 2- 3 - -
8" -1
2- 8 -& -1
4-e --e- -3
0 0
-9-- ~ -2
0 0
-e
0 0 0
- e- -fl
0 0 3 0 0 6 0 0
40 --&- e- -3 --& -e- -7
0
0 0 0 0
0 :-8 e--e -8-
0 0
tt=4 0
--1
•
6 0 0 6
--9
0
5
4 --- --3
0 0 7-8 8 -6 - -5
--9- e- -7 --7
Even Odd Even Odd
Field Field Field Field
al Normal Sync bl Interlace Sync c) Interlace Sync and Video
Vertical Total Register (R41 and Vertical Total Adjust Table 4 desc"bFs operation of the Cursor and DE skew
Register (R5) - The frequency of VS IS determined by both bits Cursor skew IS controlled by bits 6 and 7 of R8 while DE
R4 and R5 The calculated number of character line times IS skew IS controlled by bits 4 and 5
usually an Integer plus a fraction to get exactly a 50 or 60 Hz In the normal sync mode Inon-Interlace) only one field IS
vertical refresh rate The Integer number of character line available as shown In Figures 6 and 14a Each scan line IS
times minus one IS programmed In the 7-blt Vertical Total refreshed at the VS frequency Ie g , 50 or 60 HzI
Register (R4) The fraction of character line times IS pro- Two Interlace modes are available as shown In Figures 7,
grammed In the 5-blt Vertical Total Adjust Register IR51 as a 14b, and 14c The frame time IS divided between even and
number of scan line times. odd alternating fields The hOrizontal and vertical timing rela-
tionship IVS delayed by 112 scan line time) results In the
Vertical Displayed Register (R6) - ThiS 7-blt register displacement of scan lines In the odd field With respect to the
specifies the number of displayed character rows on the CRT even field
screen, and IS programmed In character row times. Any In the Interlace Sync mode the same Information IS painted
number smaller than the contents of R4 may be programmed In both fields as shown In Figure 14b ThiS IS a useful mode
Into R6. for filling In a character to enhance readability
In the Interlace Sync and Video mode alternating lines of
Vertical Sync Position (R7) - ThiS 7-blt register controls the character are displayed In the even field and the odd
the position of vertical sync with respect to the reference It field. ThiS effectively doubles the number of characters that
IS programmed In character row times. The value programm- may be displayed on a CRT montlor of a g.ven bandwidth.
ed In the register IS one less than the number of computed Care must be taken when uSing either Interlace mode to
character line times When the programmed value of thiS aVOid an apparent flicker effect. ThiS flicker effect IS due to
register IS Increased, the display position of the CRT screen the doubling of the refresh period for all scan lines since each
IS shifted up. When the programmed value IS decreased the field IS displayed alternately. Flicker may be minimized With
display position IS shifted down. Any number equal to or less proper monitor des.gn le.g., longer persistence phosphors).
than the vertical total I R4) may be used In addition, there are restrictions on the programming of
the CRTC registers for Interlace operation:
Interlace Mode and Skew Register (RB) - ThiS 6-blt a. The HOrizontal Total Register value, RO, must be odd
register controls the Interlace modes and allows a program- Il.e., an even number of character times)
mable delay of zero to two character clock times for the DE b. For the Interlace Sync and Video mode only, the Ver-
(display enable) and Cursor outputs. Table 2 shows the in- tical Displayed Register IR6) must be even The pro-
terlace modes available to the user. These modes are grammed number, Nvd, must be Y, the actual number
selected using the two low order bits of thiS 6-blt register. reqUIred.
4-383
MC6835
TABLE 4 - CURSOR AND DE SKEW CONTROL tlon the cursor anywhere on the screen and allow the start
Value Skew address to be modified
00 No Character Skew The Address Register IS a five-bit wnte-only register used
as an "Indirect" or "pointer" register Its contents are the ~
01 One Character Skew
dress of one of the other 18 registers When both RS and CS
10 Two Character Skew
are low, the Address Register IS selected When CS IS low
11 Not Available and RS IS high, the register pOinted to by the Address
Register IS selected
Maximum Scan Line Address Register (R91 - This 5-blt
register determines the number of scan lines per character Start Address Register (R12-H, R13-LI - ThiS 14-blt
row Including the spacing thus controlling operation of the wnte-only register pair controls the first address output by
Row Address counter. The programmed value IS a maximum the CRTC after vertical blanking It consists of an 8-blt low
address and IS one less than the number of scan lines order (MAO-MAl) register and a 6-blt high order (MA8-
MA 13) register The start address register determines which
Cursor Start Register (Rl01 and Cursor End Register (Rll1 portion of the refresh RAM IS displayed on the CRT screen
- These registers allow a cursor of up to 32 scan lines In Hardware scrolling by character, line or page may be ac-
height to be placed on any scan line of the character block as complished by modifYing the contents of thiS register
shown In Figure 15 Rl0 IS a 7-blt register used to define the
start scan line and blink rate for the cursor Bits 5 and 6 of
the Cursor Start Address Register control the cursor opera- Cursor Register (Rl4-H. R15-LI - ThiS 14-blt wnte-only
tion as shown In Table 4 Non-display, display and two blink register pair IS programmed to position the cursor anywhere
•
modes (16 times or 32 times the field penod) are available In the refresh RAM area thus allOWing hardware paging and
R 11 IS a 5-blt register which defines the last scan line of the scrolling through memory Without loss of the anginal cursor
cursor position It conSists of an 8-blt low order (MAO-MA7) register
When an external blink feature on characters IS required, It and a 6-blt high order (MA8-MA 13) register
may be necessary to perform cursor blink externally so that
both blink rates are synchronIZed Note that an Invert/ non-
Invert cursor IS eaSily Implemented by programming the CRTC INITIALIZATION
CRTC for a blinking cursor and externally inverting the video Registers R12-R15 must be Initialized after the system IS
Signal with an exclusive-OR gate powered up The processor Will normally load the CRTC
leglster file from a firmware table Figure 16 shows an M6800
PROGRAMMABLE REGISTERS program which could be used to program the CRT Con-
The five programmable registers allow the MPU to POSI- troller
I ~+
--
On Off On
I I
I
~ Blink Penod=
I I 16 or 32 Times
Field Penod
Example of Cursor Display Mode
o-++-lr-l--+-++- o-+-+-1f-+H+ o
1-++H++-t- 1-+++-++-Hr- 1
2-++-+-++H- 2 -+-+-+-I-+--HI-- 2
3--+-+-t-++-t-t- 3-l-++-H-+-+- 3
4 -+++-1H-t-+- 4--+--+-+t-++-t- 4
5--+-+-t-++-t-t- 5--++-+-+-+-+-1- 5
6--+-+-t-++-t-t- 6-+-+-+-+-+-+-1- 6
7-++-H1-t-t-+- 7-+-++H-++- 7
J'~~~a*~
8--+-+-+-+-+-+-1- 8
16:~~~~~t3~
9
10
11-++-H1-t-t-+- l1-1-+++-HH- 11
4·384
MC6835
•
00004 ********************************************************
00005 * Assign CRTC address
00006 *
00007 9000 A CRT CAD EQU $9000 Address Register
00008 9001 A CRTCRG EQU CRTCAD+l Data Register
00009 ********************************************************
00010 * Initialization Program
00011 *
00012A 0000 ORG 0 a place to start
00013A 0000 C6 0C A LDAB $C initialize pointer
00014A 0002 CE 1020 A LDX 38RTTAB table pointer
00015A 0005 F7 9000 A CRTCI STAB CRTCAD load address register
00016A 0008 A6 00 A LDAA 0,X get register value from table
00017A 000A B7 9001 A STAA CRTCRG program register
00018A 0000 08 INX increment counter
00019A 000E 5C INCB
00020A 000F Dl 10 A CMPB $10 finished?
00021A 0011 26 F2 0005 BNE CRTCI no: take branch
00022A 0013 3F SWI yes: call monitor
00023 ********************************************************
00024 * CRTC register initialization table
00025 *
00026A 1020 ORG $1020 start of table
00027A 1020 0080 A CRTTAB FDB $0080 R12, R13 - Start Address
00028A 1022 0080 A FDB $0080 R14, R15 - Cursor Address
00029 END
TOTAL ERRORS 00000--00000
CRTCI 0005 CRT CAD 9000 CRTCRG 9001 CRT TAB 1020
4·385
• s:
~
~
m
7
8
Active Scan Lines (Line 2x Lme 4b)
Total Scan Lines (Line 6 - Line 5)
Lines
lines
R7 Vertical Sync Position (Line 2+ Line 10)
R8 Interlace 100 Normal, 01 interlace,
9 Total Rows Per Screen I Line 8 - Line 4b) _ _ Rows and _ _ Lines 03 interlace, and Video)
10 Vertical Sync Delay IChar Rows) Rows R9 Max Scan Line Add IL,ne 4b -11
11 Vertical Sync Width IScan Lines 11611 Lmes Rl0 Cursor Start
12 HOrIZontal Sync Delay (Character Times) Char Times R11 Cursor End
13 HOrizontal Sync Width (Character Times) Char Times R12. R13 Start Address IH and LI
14 HOrIZontal Scan Delay (Character Times) Char Times R14, R15 Cursor IH and U
15 Total Character Times (Line 1 + 12+ 13+ 14) Char Times
i
TABLE 6 - WORKSHEET FOR SOx 24 FORMAT
II
MC6835
Register Programmed
Register Name Value
Number Value
AO H Total Nht+ l Nht
Al H Displayed Nhd Nhd
A2 H Sync POSItIOn Nhsp Nhsp
A3 H Sync Width Nhsw Nhsw
A4 V Total Nvt+l Nvt
A5 V Scan Line Adjust Nad Nad
•
A6 V Displayed Nvd Nvd
R7 V Sync Position Nvsp Nvsp
R8 Interlace Mode
R9 Max Scan Line Address Nsl Nsl
R10 Cursor Start
Rll Cursor End
R12 Start Address (H) 0
R13 Start Address (Ll 0
R14 Cursor (H)
R15 Cursor (Ll
R16 Light Pen (H)
R17 Light Pen (Ll
4·388
s:
i
FIGURE 17 - CURSOR TIMING
R~R~, f f f
I I I I
MAO-MA13" ~ Nhd
T f f
I Nhd + 1 Nhd + 2
~I Nhd + , Nhd
• • ~.1 Nhd + ~
I Nhd + 1 INghd + 21
trtn Nhd
• •
I Nhd + 1 I Nhd + 2 I Nhd + 1
#
1 1 1 Nht I I I I 1 Nht I I I I Nht I
Character Row # I I : ; : : i : : : : I I : : I
.,. : 1 I: I I: I :
~ ~ I: : I~ I
~
Character,! : :
o I 2 Nht I Nht 0 I Nht
I I 1 1 I I
cursor!----1 ~ f--i~ ____
·TlmlnQ IS shown for non-Interlace and Interlace sync modes
Example shown has cursor programmed as
Cursor Register = Nhd + 2
Cursor Start = 1
Cursor End = 3
""The Initial MA IS determined by the contents of Start Address Register, R12/R13 Timing IS shown for R12/R13=O
II
• ~
ii;
u .5"
FIGURE 18 - REFRESH MEMORY ADDRESSING (MAO-MA13) STATE CHART
Npd Nh<j+ 1
• 2XNhd-1 2X~hd
• Nhd+ Nht
{N:
I
I I i I I
•
I I
Nhd Nhd+ 1 2XN~d 1 2XNhd )0
Nhd+ Nht
2
I 2XNhd
I
2XN nd+ 1
I
• 3XNhd-1
I
3X~hd
I
• 2Nhd+Nht
I
g>1 { Ns
.!Jl I I-
I
2XNhd 2XNh'd+ 1 • 3XNhd 1 3XNhd • 2Nhd'+ Nht i
13 !
~
>
.,..
(.)
1 1 J J 1 I
<0
o NVd- 1{ 0
I INvd-11 x Nhd
i
INvd-11 x Nhd+ 1
I
• Nvd xN hd+ 1
I
I
Nvd~ Nhd
I
• INvd-llxNhd+Nhtl
I I
•
I
~o
z
l'l ;'vt x Nhd Nvtx Nhd+ 1 IN vt + II x Nhd-1 IN vt + II x Nhd Nvt x Nhd + Nht
~
;; I I
a: Nvt{ 0 I I i I I
rn Ns Nvt" Nhd I IN vt + II x Nhd-1 INvt+ II x Nhd Nvt x Nhd + Nht
"ii;
;0
IN v + II~hd + Nht
>
I INvt + 1I x Nhd IN v,+ II ,x Nhd+ 1 INv,+21 x Nhd-l INvt + ~I x Nhd
Nvt+ 1{ 0 I
I
I i I I
Nad I IN vt + 11 x Nhd IN vt + II x Nd+ 1 IN v,+21 x Nhd-1 INvt+ 21 x Nhd INvt + 1lNhd+ Nht
I
NOTE 1 The Initial MA IS determined by the contents of start address register, R12/R13 Timing IS shown for R12/R13= 0 Only Non-
Interlace and Interlace Sync Modes are shown
MC6835
The value In each register of the MC6846 should be entered without any modifications. Motorola Will take care of translating Into the appropnate
format.
o All numbers are In decimal oAll numbers are In hex.
ROM ROM
Program Program
Zero Ona
(PROG=O) (PROG=I)
RO
RI
R2
R3
R4
R5
•
R6
R7
RS
RS
RIO
RII
ORDERING INFORMATION
BETTER PROGRAM
4-391
MC68A39
® MOTOROLA
MC68B39
(1.5 MHz)
(2.0 MHz)
Advance InforIDation
MOS
FLOATING-POINT ROM IN-CHANNEL, SILICON-GATE)
II
• Totally Position Independent
• Operates In any Contiguous BK Block of Memory
~
.
• Re-Entrant
--~ , '
• No Use of Absolute RAM
• All Memory References are made Relative to the Stack POinter 24 " .
• FleXible User Interface 1 I P SUFFIX
• Operands are Passed to the Package by One of Two Methods PLASTIC PACKAGE
1) Machine Registers are used as POinters to the Operands CASE 709
2) The Operands are Pushed onto the Hardware Stack
• The Latter Method Facilitates the use of the MC6839 In High-Level
Language Implementations
• Easy to Use Two/Three Address Architecture
• The User SpeCifies Addresses of Operands and Result and Need PIN ASSIGNMENT
Not be Concerned With any Internal Registers or Intermediate
Results
• A Complete Implementation of the Proposed IEEE Standard A7 Vee
Draft 6 0
A6 1 13 AS
• Includes All PreCIsions, Modes, and Operations Required or
Suggested by the Standard A5 2.' A9
• Single, Double, and Extended Formats 21 Al2
• Includes the Following Operations
Add 20
Subtract A2 AIO
Multiply
All
D,v,de
Remainder AO D7
Square Root DO D6
Integer Part
Dl D5
Absolute Value
Negate D2 D4
Predicate Compares 13 D3
Condition Code Compares VSS
Convert Integer- Floating POint
Convert Binary Floating POlnt- Decimal String
4·392
MC68A3ge MC68B39
AO 9 DO
Al Dl
10
A2 11 02
A3 13 03
BLOCK Address
A4 4 14 04
Dec.:>de
DIAGRAM A5 15 05
A6 16 06
A7 17 D7
A8 ?3
A9 22
Al0 19
A11 ,18
A12 21
E 20 Pin 24
Vee
VSS Pin 12
•
Storage Temperature Range Tstg -65to+150 'c maximum rated voltages to thiS high 1m
pedance Circuit Reliability of operation IS
enhanced If unused Inputs are tied to an ap-
CAPACITANCE
propriate logic voltage {e 9 , either V SS or
VCCI
Characteristic
Input Capacitance
Output Capacttance
DC CHARACTERISTICS
Characteristic Symbol Min Typ Max Unit
Input Current (V In ~ a to 55 V) lin -10 - 10 pA
Output High Voltage (IOH ~ - 220 pAl VOH 24 - - V
Output Low Voltage (IOL - 3 2 mAl VOL - - 04 V
Output Leakage Current IThree-State} IE-2 a V, Vout-O V to 5 5 VI ILO -10 - 10 pA
Supply Current - Active- (Minimum Cycle Rate) ICC - 25 40 mA
Supply Current - Standby (E ~ VIHI ISB - 7 10 rnA
4-393
MC68A3geMC68B39
50V
~------------------tELEL------------------~~
j4----------tELEH -------~~
ADDRESS. A
I
DATA OUTPUT. Q
VOH-
VOL-
III Z
1 VALID ----------H'Z----------
4·394
MC68A39- MC68B39
The MC6839 supports the three precIsions suggested by the IEEE Proposed Floating POint Standard. single, double, and extend-
ed. The values occupy 32,64, and BO bits 14, 8, and 10 bytes) respectively In the users memory The formats of the three precIsions
are descrdbed In the following paragraphs.
SINGLE FORMAT
All single precIsion numbers are represented In four bytes as
~--23 blts---lO~1
11 f--8--lOlO+'I...
1 s 1 exponent 1 slgnlflcand I
The exponent IS biased by + 127. That IS exponent of. 20 IS 127, 22 IS 129, and 2-2 IS 125 The slgnlflcand IS stored In sign
magnitude rather than twos complement form The equation for the single form representation IS
x= I -1)S x 2Iexp-127) x 11 slgnlflcand)
s = sign of the slgnlflcand
exp = biased exponent
signlficand = bit string of length 23 encoding the significant bits of the number that follow the binary pOint. Yielding a 24-blt signifi-
II
cant digit field for the number that always begins" 1___ "
Examples:
+1.0= 1.0x20=$3F BO 00 00
+30= 1.5x21=$40 40 00 00
-10= -1.0x20=$8F BO 00 00
DOUBLE FORMAT
All double precIsion numbers are represented by an 8-byte stnng as
Examples'
70= 175 =22= $40 1C 00 00 00 00 00 00
-300= -1 875 x 24 = $CO 3E 00 00 00 00 00 00
025= 1 0 x 22= $3F DO 00 00 00 00 00 00
EXTENDED FORMAT
Single- and double-formats should be used to represent the bulk of floating pOint IFP) numbers In the user's system Ie g ,
storage of arrays) Extended should only be used for Intermediate calculations such as occur In the evaluation of a complex expres-
sion In fact, extended may not be used at all by most users, but since It IS required Internally, It IS optIOnally provided Extended
numbers are represented In 10 bytes as
4·395
MC68A3geMC68B39
A notable difference between this format and single and double IS the 1.0 IS expliCitly present In the slgnlflcand and the exponent
contains no bias and IS in twos complement form. The equation for double extended is
x = ( -1)s x ;zexp x significand
where the significand contains the explicit 1 O.
Examples:
0.5= 1.0x2- 1= $7F FF 80 00 00 00 00 00 00 00
-1.0= -1.0x20 $80 00 80 00 00 00 00 00 00 00
384.0= 1.5x2B $00 08 CO 00 00 00 00 00 00 00
BCD STRINGS
A BCD string IS the input to the BCD-to-Floatlng-Polnt conversion operation and the output of the Floatlng-Polnt-to-BCD con-
version operation All BCD strings have the following format:
o 1 5 6 24 25
se 4 digit BCD exponent sf 19 digit BCD fraction p
se= sign of the exponent $00= plus, $OF = minus (one byte)
•
sf = sign of the fraction. $00= plus, $OF = minus. (one byte)
p = number of fraction digits to the right of the decimal POint (one byte)
All BCD digits are unpacked and nght lustlfled In each byte.
7 o
10000 0-9
The byte ordering of the fraction and exponent IS consistent With all Motorola processors In that the most-significant BCD digit IS
in the lowest memory address.
Examples:
2.0=2 Ox 100 (p=OI
Address Data
0000 00 (se= +1
0001 00 00 00 00 lexponent = 01
0005 00 (sf= +1
0006 00 00 00 00 00 Ifractlon = 21
oooB 00 00 00 00 00
0010 00 00 00 00 00
0015 00 00 00 02
0019 00 Ip=OI
or 2.0=20,000 x 1O- 4(p=0)
Address Data
0000 OF (se= -I
0001 00 00 00 04 I exponent = 41
0005 00 Isf= + 1
0006 00 00 00 00 00 I fraction = 200001
oooB 00 00 00 00 00
0010 00 00 00 00 02
0015 00 00 00 00
0019 00 Ip=OI
(The above might be the output of a Floatlng-Polnt-to-BCD With k = 5)
or 2.0=2.0x 100 (p= 101
Address Data
0000 00 Ise= +1
0001 00 00 00 00 I exponent = 01
0005 00 Isf= +1
0006 00 00 00 00 00 Ifractlon = 200000000001
OOOB 00 00 00 02 00
0010 00 00 00 00 00
0015 00 00 00 00
0019 OA Ip=101
4-396
MC68A39-MC68B39
INTEGERS ASCII
Two sizes of Integers are supported; short and double. Mnemonic Description
Short Integers are 16 bits long and double Integers are 32 bits FADD Add arg1 to arg2 and store the result
long. The byte ordering IS consistent with all Motorola pro- FSUB Subtract arg2 from arg 1 and store the result
cessors In that the most-significant bits are In the lowest ad- FMUL Multiply arg1 times arg2 and store the result
dress.
FDIV D,v,de arg1 by arg2 and store the result
SPECIAL VALUES FREM Take the remainder of arg1 diVided by arg2 and
store the result The remainder IS biased to lie In
No derivable floating POint format can represent the in-
the range - arg212 < remalnder< + arg2/2, In-
finite number of possible real numbers, so It IS very useful If
stead of the usual range of 0" remalnder< arg2
some special numbers are recognized by a floating pOint
ThiS bias makes the function more useful In the
package These numbers are + 0, - 0, + ,nfin,ty, - infini-
Implementation of trigonometric and other func-
ty, very small (almost zero) numbers, and In some cases un-
tions
normahzed numbers. Also, It IS convenient to have a sepclal
format which indicates that the contents of memory do not FCMP Compare arg1 With arg2 and set the condition
contain a vahd floating POint number ThiS "not a number" codes to the result of the compare Arg1 and arg2
might occur If a variable IS defined In a HLL and IS used can be of different precIsions
before It IS Inltlahzed With a value The most positive and FTCMP Compare arg1 With arg2 and set the condition
•
negatIVe exponents of each format are reserved to represent codes to the result of the compare In addition,
these special vaues trap If an unordered exception occurs regardless
The detailed deSCription of these special values IS given In of the state of the UNOR (unorderedl bit In the
a later section. trap enable byte of the fpcb
FPCMP A predicate compare, thiS means compare arg1
With arg2 and affirm or disaffirm the Input
predicate (e g., 'IS arg1 = arg2' or 'IS arg1 <arg2')
ARCHITECTURE FTPCMP A trapping predicate compare, same as the
predicate compare except trap on an unordered
All floating pOint operations are of the "two address" or exception regardless of the state of the UNOR
"three address" variety, all the user need supply are the ad- (unordered I bit In the trap enable byte of the fpcb
dresses of the operand(sl and the result The package looks FSQRT Returns the square root of arg2 In the result
for operands at the speCified locatlon(s) and dehvers the FINT Returns the Interger part of arg2 In the result The
result to the speCified destination For example, result IS stili a floating pOint number For example,
Arg1 + Arg2 Result the Integer part of 3 14159 IS 3 00000
< source> < source> < destination> FFIX5 Convert arg2 to a short (16-bltl binary Integer
Intel mediate results are never presented to the user, FFIXD Convert arg2 to a long (32-bltl binary Integer
therefore, there are no Internal "registers" to be concerned FFL T5 Convert a short binary Integer to a floating pOint
about, keeping the Interface as Simple as pOSSible The end result
result IS ease of use
FFLTD Convert a long binary Integer to a floating pOint
There IS a user defined floating pOint control block (fpcb)
result
that defines the mode of the package ThiS control block IS
much like the control blocks frequently used to define 1/0 or BINDEC Convert a binary floating pOint value to a BCD
operating system operations The fpcb IS discussed In detail declma string.
In a later section DECBIN Convert a BCD deCimal string to a binary floating
pOint result
FAB5 Return the absolute value of ar92 In the result
FNEG Return the negative of arg2 In the 'esult
SUPPORTED OPERATIONS FMOV Move (or convertl arg1- arg2 ThiS function IS
useful for changing precIsions (e g , Single to
The MC6839 supports the follOWing operations On any double I With full exception checking for pOSSible
particular call to the floating pOint ROM a 1-byte opcode overflow or underflow
which Immediately follows the LBSR instruction chooses the All routines, except FMOV and the compares, accept
deSired operation Below are short deSCriptions of the func- arguments of the same precIsion and generate a result With
tions Implemented In the MC6839 along With suggested the same precIsion For moves and compares the sizes of the
men manics A table containing the opcodes and calhng se- arguments are passed to the package In a parameter word
quences for these functions IS presented at the end of thiS Details of each operation can be found In the MC6839
data sheet Users Manual
4-397
MC68A3ge MC68B39
MODES OF OPERATION mahzed operand IS operated on such that ItS fraction remains
not normalIZed but ItS exponent IS no longer at ItS Original
In addition to supporting a wide range of precIsions and mlntmum value. By transforming denormallZed operands to
operations, the M C6839 supports all modes reqUired or sug- normalized, Internal form upon entering each operation, un-
gested by the IEEE Proposed Floating POint Standard. These normalIZed results are guaranteed not to occur
Include rounding modes, Infintty closure modes, and excep- Thus, when operating In thiS mode the user can be
tion handling modes. The various modes are selected by bits assured that no attempt Will be made to return an unnor-
In the floating POint control block (fpcbl that resides In user mallZed value to a Single or double destlnallOn A bit In the
memory. Thus, each user or task can have a unique set of control byte of the fpcb selects whether or not thiS mode IS
modes In effect for his calculations. The selection bits are In effect. ThiS mode IS forced whenever the round mode IS
defined In a later section on the fpcb either round toward plus or minus infinity UnnormallZed
numbers entenng an operation are not affected by thiS
ROUNDING MODES mode, only denormallzed ones are Unnormallzed and
Four rounding modes are suggested by the IEEE Proposed denormallzed operands are discussed In a later section
Floating POint Standard. They are
1. Round to nearest (RNI EXCEPTIONS
2. Round toward zero IRZI
3. Round toward plus Infinity IRP) One of the greatest strengths of the IEEE Proposed
4. Round toward minus Infinity IRN) Floating POint Standard IS the regular and conslstant handl-
Ing of exceptions. EXisting floating pOint Implementations
Round nearest will be used by most users because It pro-
are qUite vaned In the way they handle exceptions, so the
II
vides the most accurate answers for most calculations
Round towards zero Itruncate) IS useful when the MC6839 proposed IEEE standard has very carefully prescnbed how
exceptions must be handled and what constitutes an excep-
Implements real numbers In some high level languages that
tion Seven types of exceptions Will be recognIZed by the
require truncation lie., FORTRAN) Round towards plus
MC6839 Only the first 5 are required by the proposed IEEE
and minus infinity are used In Interval anthmellc
standard They are'
Normally a result IS rounded to the precIsion of ItS deSllna-
tlon. However, when the destination IS Extended, the user '1 Invalid Operation - a general exception that anses
can specify that the result slgntflcand be rounded to the when an operation has gone so wrong that the pro-
precIsion of the basic format - Single, double, or ex- gram cannot return any reasonable result or fit the ex-
tended - of hiS chOice, although the exponent range re- ception Into any of the other more speCifiC classes
mams extended 2 Underflow - arises when an operation generates a
result that IS too small to fit Into the deSired result
NO DOUBLE ROUNDING - The MC6839 IS Implemented preCISion
such that no result Will undergo more than one rounding er- 3 Overflow - anses when an operation generates a
ror. result that IS too large to fit Into the deSired result
preCIsion
INFINITY CLOSURE MODES 4 D,v,s,on by Zero - anses when diVISion by zero IS at-
The way In which Infinity IS handled In a floating POint tempted
package may limit the number of applications In which the 5 Inexact Result - anses when the result of an opera-
package can be used To solve th IS problem, the proposed tion was not exact and therefore was rounded to the
IEEE standard reqUires two types of Infinity closures A bit In deSired precIsion before being returned to the user
the control byte of the Floating POint Control Block Ifpcb)
6 Integer Overflow - anses when the binary Integer
Will select the type of closure that IS In effect at any time
result of a FIXSID) operation cannot fit Into 16(32)
bits
AFFINE CLOSURE - In affine closure
7 Companson of Unordered Values - anses when one
minus Inflnlty< (every finite number}< plus Infinity
of the arguments to a compare opecatlon IS a "NAN"
Thus, Inf,My takes part In the real number system tn the or an InflMy In the projective closure mode ISee the
same manner as any other signed quantity Infinity and Not a Number paragraphs for further ex-
planation of NANs and Infinity)
PROJECTIVE CLOSURE - In projective closure
For each exception the caller Will be given the option of
infinity = minus infinity = plus Infinity speCifYing whether the package should. 111 trap to a user
and all comparisons between Infinity and a floattng pOint supplied trap routine to process the exception, or (2) deliver
number InvolVing order relations other than equal (= ) or not a default result speCified by the proposed standard and pro-
equal I *) are Invalid operations In prOjective closure the real ceed with execution For most users the default result IS ade-
number system can be thought of as a Circle With zero at the quate and the user need not write any trap handlers
top and ,nf,n,ty at the bottom Regardless of whether a trap IS speCified or not, a status bit
Will be set In the status byte of the fpcb and Will remain set
NORMALIZE MODE until cleared by the caller's program. Selection of whether to
The purpose of the normalize mode IS to prevent un nor- trap or to continue Will be made by setting bits In the trap
mallZed results from being generated, which can otherWise enable byte of the fpcb For more details on the fpcb see the
happen Such an unnormallZed result arises when a den or- section on the Floating POint Control Block Ifpcb)
4·398
MC68A39-MC68839
USER INTERFACE
There are two types of calls to the floatmg pOint package. register calls and stack calls For register calls the user loads the
machine registers with pOinters laddresses) to the operandls) and to the result, the call to the package IS then performed For stack
calls the operandls) IS pushed on the stack and the call to the package IS performed With the result replacmg the operands on the
stack after completion The operand Is) must be pushed least-significant bytes first; thiS IS consistent With the other Motorola ar-
chitectures in that the most-significant byte reSides In the lowest address The two types of calls look like.
•
General form of a register call·
load registers
LBSR fpreg register call
FeB opcode
Example of a posItion-Independent call to the add routme
LEAU arg 1, pcr
LEA Y arg2, pcr
LEAX fpcbptr, pcr pOinter to fpcb
TFR x, d
LEAX result, pcr
LBSR fpreg
FeB fadd
General form of a stack call.
push arguments
LBSR fpstak stack call
FeB opcode
pull result
Details of the calling sequence for every type of operation can be found m the MC6839 Users Manual; a reference table of calling
sequences and opcodes can be found at the end of thiS data sheet
4·399
MC68A39-MC68B39
STACK REQUIREMENTS
When the MC6839 IS called by the user, the package reserves local storage on the hardware stack It then moves the Input
arguments from user memory to the local storage area and expands them Into a convenient Internal format. The operations use
these "Internal" numbers to arrive at an "Internal" result which IS then converted to the memory format of the result and returned
to the user For this reason, the user must Insure that adequate memory eXists on the hardware stack before calling the MC6839
The maximum stack sizes that any particular function Will ever find necessary are
register calls 150 bytes
stack calls 185 bytes
control byte 0
trap enable byte
status byte 2
secondary status byte 3
•
4
address of trap routine
5
The meaning of the various bit fields Within the fpcb are discussed In detail In the follOWing paragraphs
CONTROL BYTE - The control byte configures the floating pOint package for the caller's operation and IS written by the user
Various fields In the byte set the preCISion, round, infinity closure, and normalize modes
7 6 5 4 3 2 o
x NRM Roun~ Mode AlP
4·400
MC68A39. MC68B39
STATUS BYTE
7 6 5 4 3 2 o
x INX IOV UN DZ UNF OVF lOP
The bits In the status byte are set If any errors have occurred Each bit of the status byte IS a "sticky" bit In that It must be manual-
ly reset by the user The FP package writes bits tnto the status byte but never clears eXlsttng bits ThiS IS done so that a long calcula-
tion can be completed and the status need only be checked once at the end
Bit 0 Invalid opertlon (see secondary status)
Bit 1 Overflow
Bit 2 Underflow
Bit 3 D,v,s,on by zero
Bit 4 Unordered
Bit 5 Integer overflow
Bit 6 Inexact result
Bit 7 Undefined, reserved
7 6
INX
5
IOV
4
UNOR
3
DZ
2
UNF OVF
o
lOP
A "1" In any bit of the trap enable byte enables the FP package to trap If that error occurs The bit definitions are the same as for
the status byte Note that If a trapPing compare IS executed and the result IS unordered, then the unordered trap Will be taken
regardless of the state of the UNOR bit In the trap enable byte
•
SECONDARY STATUS (55)
7 6 5 4 o
x
The FP package Will wnte a status Into thiS byte any time a new lOP occurs As IS the case With the status bytes, It IS up to the
caller to reset the "lOP type" field
Blls 0-4 Invalid Operation Type Field
0; no lOP error
1 = square root of a negatIve number, Inflntty In projective mode, or a not normalized number
2; (+ Infinity) + (- Infinity) In affine mode
3; tned to convert NAN to binary Integer
4; In divIsion 010, ,nf,n,ty/,nf,n,ty or divisor IS not normalized and the dividend IS not zero and IS ftnlte
5; one of the Input arguments was a trapping NAN
6; unordered values compared via predicate other than ; or '*'
7; k out of range for BINDEC or p out of range for DECBIN
8; projective closure use of + / - ,nfin,ty
9; 0 x infinity
10; In REM arg2 IS zero or not normalized or arg1 IS Infinite
11; unused, reserved
12; unused, reserved
13; BINDEC Integer too big to convert
14; DECBIN cannot represent Input string
15; tned to MOV a Single denormallzed number to a double destination
16; tned to return an unnormallzed number to single or double (,nvalid result)
17; divIsion by zero With divide by zero trap disabled
4-401
MC68A39-MC68839
TRAP VECTOR - If any of the traps occur, the FP package Will jump indirectly through the trap addresS In the fpcb with an In-
dex in the A accumulator indicating the trap type:
0= Invalid Operation
1 = Overflow
2 = Underflow
3 =\ Divide by Zero
4= Unnormallzed
5 = Integer Overflow
6 = Inexact Result
If more than 1 enabled trap occurs, the MC6839 Will return the Index of the highest pnorty enabled error. Index = 0 = Invalid
operation IS the highest pnority, and, Index= 6 IS the lowest
The encoding of the special values are given below. Generally, when used as operands, the special values flow through an opera-
tion creating a predictable result. Note that as with normalized numbers the extended format differs slightly from the single- and
double-formats.
I ZERO
Zero IS represented by a number With both a zero exponent and a zero slgnlflcand The sign IS Significant and differentiates be-
tween plus or minus zero.
o o
INFINITY
The Infinities are represented by a number With the maximum exponent and a zero slgnlflcand The sign differentiates plus or
minus infinity
I S 11111 .. 11111 o
o non-zero
Note that zero may be conSidered a special case of denormallzed numbers where the number IS so small that the slgnlitcand has
been reduced to zero.
Examples:
Single:
1.0x2- 128 =0.25x 2- 126 =$00 20 00 00
Double.
1.0x2-1025=0.125x2-1022= $00 02 00 00 00 00 00 00
4-402
MC68A39-MC68B39
Operation address'
The 16 bits, Immediately to the nght of the t bit, contain the address of the Instruction Immediately follOWing the call to the FP
package of the operation that caused the NAN to be created If d (double NAN) IS also set, the address IS arbltranly one of the
addresses In the two or more offending NANs
•
SPECIAL VALUES (EXTENDED FORMAT)
ZERO
Zero IS represented by a number With the smallest unbiased exponent and a zero slgnlflcand
o
INFINITY
Infinity has the maximum unbiased exponent and a zero slgnlflcand
I s 1011111 o
DENORMALIZED NUMBERS
Denormahzed numbers have the smallest unbiased exponent and a non-zero slgnlflcand
The exponent of denormahzed extended and Internal numbers IS Interpreted as haVing the exponent value 1 greater than the
smallest unbiased exponent value Thus, a denormahzed number has the exponent - 16384, but has the value
(-l)Sx 2-16383xO.f
Example'
10x2-16387=0625x2- 16383=$40 00 08 00 00 00 00 00 00 00
NANs
NANs have the largest unbiased exponent and a non-zero slgnlflcand The operation addresses "t" and "d" are Implementation
features and are the same as for slngle- and double-formats
4-403
MC68A39·MC68B39
UNNORMALZIED NUMBERS
Unnormalized numbers occur only in extended or Internal format. Un normalized numbers have an ex~onent greater than the
minimum In the extended format h.e., they are not denormallzed or normal zero) but the expliCit leading bit IS a zero. If the slgnlfl-
cand is zero, this is an unnormalized zero. Even though unnormallzed numbers and denormalized numbers are handled similarly in
most cases, they should not be confused. Denormalized numbers are numbers that are very small - have minimum exponent -
and hence have lost some bits of significance. Unnormalized numbers are not necessarily small (the exponent may be large or small)
but the significand has lost some bits of significance, hence, the explicit bit and pOSSibly some of the bits to the right of the expliCit
bit are zero.
I s I > 100... 000 10. significand
Note that unnormallzed numbers cannot be represented - and hence cannot exist - for single- and double-formats. ·Unnor-
malized numbers can only be created when denormalized numbers In single- or double-format are represented In extended or inter-
nal formats.
Example:
.0625 x 22 (unnorm.) = $00 02 OS 00 00 00 00 00 00 00
I FAEM
FSQAT
FINT
FFIXS
$OB
$12
$14
$16
LBSA FPAEO
FCB <opcode>
Y - Addr of Argument
D- Addr. of FPCB
X - Addr of Aesult
LBSA FPAEG
FCB <opcode>
Pull Aesult
Push Argument
Push Addr of FRCB
LBSA FPSTAK
FCB <opcode>
FFIXD $18 FCB <opcode> Pull Aesult
FAB $IE
FNEG $20
FFLTS $24
FFLTD $26
FCMP $8A U-Addr of Argument #1 Push Argument #1
FTCMP $CC Y-Addr of Argument #2 Push Argument #2
FPCMP $8E D-Addr of FPCB Push Parameter Word
FTPCMP $00 X - Parameter Word Push Addr of FPCB
LBSA FPAEG LBSA FPSTAK
FCB < opcode> FCB <opcode>
Pull Result (If predicate compare)
NOTE Result returned In the CC register For NOTE Result returned In the CC register for
predicate compares the Z-Blt IS set If predicate regular compares For predicate compares a one
ISaffirmed cleared If disaffirmed byte result IS returned on the top of the stack
The result IS zero If affirmed and - 1I$FFI If
disaffirmed
FMOV $9A U - PreCIsion Parameter Word Push Argument
Y - Addr of Argument Push PrecIsion Parameter Word
D-Addr of FPCB Push Addr of FPCB
X - Addr of Aesult LBSA FPSTAK
LBSA FPAEG FCB < opcode >
FCB < opcode> Pull Result
BINDEC $IC U - k 1# of digits In resultl Push Argument
Y - Addr of Argument Push k
D-Addr of FPCB Push Addr of FPCB
X - Addr of DeCimal Result LBSA FPSTAK
LBSR FPAEG FCB <opcode>
FCB < opcode > Pull BCD Stnng
DECBIN $22 U - Addr of BCD Input Stnng Push Addr of BCD Input Stnng
D-Addr of FPCB Push Addr of FPCB
X - Addr of Binary Aesult LBSA FPSTAK
LBSA FPAEG FCB < opcode >
FC B < opcode > Pull Binary Aesult
1All arguments are pushed on the stack least-significant bytes first so that the high-order byte IS always pushed last and reSides In the
lowest address
Entry POints to the MC6839 are defined as follows
FPAEG = ADM start + $30
FPST AK = ADM start + $3F
4·404
MC68A39-MC68B39
•
BINDEC 35,000-48,000 67,000-85,000 -
(time depends on # slgnlflcand
digits requested)
4·405
MC6840
(1.0 MHz)
® MOTOROLA MC68A40
MC68B40
(1.5 MHz)
12.0 MHzl
~
width modulation as well as system Interrupts
• Operates from a Single 5 Volt Power Supply
• Fully TTL Compatible LSUFFIX
, ' .' CERAMIC PACKAGE
• Single System Clock ReqUired (Enablel I II J, ' CASE 719
• Selectable Prescaler on Timer 3 Capable of 4 MHz for the MC6840,
6 MHz for the MC68A40 and 8 MHz for the MC68B40
~
• Programmable Interrupts (lRQI Output to MPU
• Readable Down Counter Indicates Counts to Go Until Time-Out
•
• Selectable Gating for Frequency or Pulse-Width Comparison PSUFFIX
PLASTIC PACKAGE
• RESET Input CASE 710
• Three Asynchronous External Clock and GatelTrigger Inputs
~
Internally Synchronized
• Three Maskable Outputs
~" SSUFFIX
' . CEROIP PACKAGE
, CASE 733
MAXIMUM RATINGS
Rating Symbol Value Unit
Supply Voltage VCC -03to +70 V
FIGURE 1 - PIN ASSIGNMENT
Input Voltage V ,n -03to+70 V
Operating Temperature Range - T L to T h
MC6840, MC68A40, MC68840
TA
o to + 70 'C VSS
M C6840C, M C68A40C -40 to +85 C1
Storage Temperature Range Tstq -55 to + 150 'c G2 01
02 G1
THERMAL CHARACTERISTICS C2 DO
Characteristic Symbol Value Unit
G3 D1
Thermal ReSistance
Cerdlp 65 03 D2
8JA 'c/W
PlastiC 115 C3 D3
Ceramic 50
RESET D4
IRO D5
RSO D6
ThiS deVice contains CirCUitry to protect the Inputs agamst damage due to high
RSl D7
static voltages or electriC fields, however, It IS adVised that normal precautions
be taken to avoid application of any voltage higher than maximum rated voltages RS2
to thiS high-Impedance CirCUit Reliability of operatIOn IS enhanced If unused in-
R/W CSl
puts are tied to an appropriate logiC voltage level (e 9 , eIther VSS or Vee)
VCC csa
4·406
MC6840-MC68A40-MC68B40
I
M
g~
< ..
o •
ua:
_1
RESET G3 C3 03 G2 C2 02 err C1 01
POWER CONSIOERATIONS
4-407
MC6840-MC68A4OeMC68B40
DC ELECTRICAL CHARACTERISTICS (VCC=50 Vdc ±5% VSS=O TA=TL to TH unless otherwise notedl
Characteristic Symbol Min Typ Max Unit
Input High Voltage VIH VSS+ 20 - VCC V
Input Low Voltage VIL VSS 03 VSS+08 V
Input Leakage Current (V,n=O to 5 25 VI lin - 10 25 pA
Three-State (011 Statel Input Current (V,n = 05 to 24 VI 00-07 ITS I - 20 10 pA
Output High Voltage
II Load = -205pAI 00-07 VOH VSS + 2 4 - - V
II Load = - 200 pAl Other Outputs VSS + 2 4 - -
Output Low Voltage
II Load = 16 mAl 00-07 VOL - - VSS+04 V
(ILoad = 32 mAl 01-03, IRQ - - VSS+04
Output Leakage Current (Off Statel (VOH = 24 VI iRll ILOH - 10 10 pA
Internal Power DIssipation IMeasured at TA- TLI PINT - 470 700 mW
Input Capacitance
IV,n=O, T A =25'C, 1= 1 a MHzI 00-07 Crn - - 125 pF
All Others - - 75
Output Capacitance -
IV ,n oo O,TA=25'G,f=10MHzl IRQ Cout - - 50 pF
01 02 03 - - 10
Characteristic
tr,tf
PWL
Min
-
MC6840
10·
-
MC68A40
Min
0666·
-
MC68B40
Min
-
Max
-
Unit
pS
ns
C, G and RESET
Input Pulse Width High (Figure 51
PWH teyeE + tsu + thd - teyeE + tsu + thd -
teyeE + tsu + thd - ns
IAsynchronous Inputl C, ~
Input Setup Time (Figure 6)
ISynchronous Inputl tsu 200 - 120 - 75 - ns
C, G and RESET
Input Hold Time IFlgure 61
l§~chronous Input) thd 50 - 50 - 50 - ns
C, G and RESET
Input Synchronization Time (Figure 9)
t sync 250 - 200 - 175 - ns
C3 (- 8 Prescaler Mode Onlyl
Input Pulse Width
PWL, PWH 120 - 80 - 60 - ns
C3 1-8 Prescaler Mode Onlyl
Output Delay, 01-03 (Figure 71
IVOH=2 4 V, Load BI TTL teo - 700 - 460 - 340 ns
IVOH = 24 V, Load 01 MOS tern - 450 - 450 - 340 ns
(VOH =07 VOO, Load 01 CMOS temos - 20 - 135 - 10 pS
Interrupt Release Time tlR - 12 - 09 - o7 ps
4-408
MC6840- MC68A40-MC68B40
2 Pulse Width, E Low PWEL 430 9500 280 9500 210 9500 ns
3 Pulse Width, E High PWEH 450 9500 280 9500 220 9500 ns
4 Clock R158 and Fall Time tr,tf - 25 - 25 20 ns
9 Address Hold Time tAH 10 - 10 - 10 - ns
13 Address Setup Time Before E tAS 80 - 80 - 40 - ns
14 Chip Select Setup Time Before E tcs 80 - 60 - 40 - ns
15 Chip Select Hold Tln)e tCH 10 - 10 - 10 - ns
18 Read Data Hold Time lJl..HR 20 50> 20 50> 20 50> ns
21 Wnte Data Hold Time tDHW 10 - 10 - 10 - ns
30 Peripheral Output Data Delay Time tDDR - 290 - 180 - 150 ns
31 Peripheral Input Data Setup Time tDSW 165 80 60 ns
"The data bus output buffers are no longer sourCing or sinking current by tOHR max (High Impedance)
•
E
~----------~3'-----------~
R/VV,Addr~s--~~~~~~~~~--------'7~~-----rt---------------------------------~~~~
(Non-Muxedl _____t~~~~~~~~--------~~~----_t1_----------------------------------1_~~~~
cs----+-~------------------~
FIGURE 4 - INPUT PULSE WIDTH LOW FIGURE 5 - INPUT PULSE WIDTH HIGH
C1-C3
G1-63 C1-C3
RESET
G1-G3
NOTES
1 Not all signals are BlJpllCable to every part
2 Voltage levels shown are V L:S 0 4 V, VH ~ 2 4 V, unless otherwise specified
3 Measurement pOints shown are 0 8 V and 2 0 V, unless otherwise specified
4-409
MC~MC~A~MC~B~
E-4 IL \
t~. ~':~----
C'iT3, IT-'G3.
RESET >t
01-03
----
~
•
FIGURE 9- C3 INPUT SVNCHRONIZATION TIME (+ B PRESCALER MODE ONL V)
Enable \!"'______.!
. . Ic,.--------:.I __--'I
t I
t t Transitions Processed Durmg N + 1 TX
Transitions Processed Dunng N
MMD6150
Test POint 0--.-.--11+--+
RL == 1.25 k
MMD6150
~ 3 k
or Equlv or Equlv
Testpo'nt~
MMD 7000
or EqUiv
40 pF 11.7 k
MM070DO
or Equlv 100 pF I
Load D
(01,02,03)
(CMOS Load)
(MOS)
NOTE Timing measurements are referenced to and from a low voltage of 0 8 volts and a high voltage of 2 0 volts, unless otherwise noted
4·410
MC~MC~A~MC~B~
DEVICE OPERATION
The MC6840 IS part of the M6800 microprocessor family "open drain" output (no load deVice on the chip) which per-
and IS fully bus compatible With M6800 systems. The three mits other Similar Interrupt request hnes to be tied together In
timers In the MC6840 operate Independently and In several a Wire-OR configuration
distinct modes to fit a wide variety of measurement and syn- The IRQ hne IS activated If, and only If, the Composite In-
thesIs apphcatlons terrupt Flag (Bit 7 of the Internal Status Register) IS asserted
The MC6840 IS an Integrated set of three distinct The conditions under which the '"i'RQ line IS activated are
counter/timers (Figure 1) It consIsts of three 16-blt data discussed In conjunction With the Status Register
latches, three 16-blt counters (clocked Independently), and
the comparison and enable circuitry necessary to Implement RESET - A low level at thiS Input IS clocked Into the PTM
various measurement and synthesis functions. (n addition, It by the E (Enable) Input Two Enable pulses are reqUired to
contains Interrupt drivers to alert the processor that a par- synchrOnize and process the signal The PTM then
ticular function has been completed recognizes the active "low" or Inactive "high" on the third
In a typical apphcatlOn, a timer Will be loaded by first stor- Enable pulse. If the RESET signal IS asynchronous, an addi-
Ing two bytes of data Into an associated Counter Latch. ThiS tional Enable period IS required If setup times are not met
data IS then transferred Into the counter via a Counter In- The RESET Input must be stable High/Low for the minimum
Itiahzatlon cycle. If the counter IS enabled, the counter time stated In the AC Operating Characteristics
decrements on each subsequent clock period which may be Recognition of a low level at thiS Input by the PTM causes
an external clock, or Enable (E) until one of several predeter- the follOWing action to 'Occur
mined conditions causes It to halt or recycle The timers are a All counter latches are preset to their maximum count
thus programmable, cychc In nature, controllable by external values
Inputs or the MPU program, and acceSSible by the MPU at b All Control Register bits are cleared With the exception
•
any time of CR10 Ilnternal reset bill which IS set
c All counters are preset to the contents of the latches
BUS INTERFACE
d All counter outputs are reset and all counter clocks are
The Programmable Timer Module IPTM) Interfaces to the
disabled
M6800 Bus With an 6-blt bidirectIOnal data bus, two Chip
Select hnes, a Read/Write hne, a clock (Enable) hne, and In- e All Status Register bits (Interrupt flags) are cleared
terrupt Request hne, an external Reset hne, and three
Register select hnes VMA should be utlhzed In conjunction REGISTER SELECT LINES (RSO, RS1, RS2) - These In-
With an MPU address hne Into a Chip Select of the PTM puts are used In conjunction With the R/W hne to select the
when uSing the MC6800/6B02/6808. Internal registers, counters and latches as shown In Table 1
4-411
TABLE 1 - REGISTER SELECTION
Register
Select Inputs Operations
RS2 RS1 RSO R/W=O RIW= 1
0 0 0
CR20 = a Write Control Register #3 No Operation
--------------------------
CR20 = 1 Write Control Register #1
a a 1 Wnte Control Register #2 Read Status Register
a 1 a Write MSB Buffer Register Read Timer #1 Counter
a 1 1 Write Timer #1 Latches Read LSB Buffer Register
1 a 0 Write MSB Buffer Register Read Timer #2 Counter
1 a 1 Write Timer #2 Latches Read LSB Buffer Register
1 1 a Wnte MSB Buffer Register Read TImer #3 Counter
1 1 1 Wnte Timer #3 Latches Read LSB Buffer Register
CR10 - The least-significant bit of Control Register #1 IS The least-slgnlfcant bit of Control Register #3 is used as a
used as an Internal Reset bit. When this bit IS a logic zero, all selector for a - 8 prescaler which IS available With Timer #3
timers are allowed to operate In the modes prescribed by the only The prescaler, If selected, IS effectively placed between
remaining bits of the control registers Writing a "one" Into the clock Input circuitry and the Input to Counter #3. It can
CR10 causes all counters to be preset with the contents of therefore be used With either the Internal clock (Enablel or an
the corresponding counter latches, all counter clocks to be external clock source
II
disabled, and the timer outputs and Interrupt flags (Status
Register) to be reset Counter Latches and Control Registers
are undisturbed by an Internal Reset and may be written Into CR30 - The functions depicted In the foregOing diSCUS-
,regardless of the state of CR10 sions are tabulated In Table 2 for ease of reference
. \ 1;"'j~"" 1,,00, " Cooo", M,", '"" '00"'"'' CooO", "eo "." " J
Control Register X I 7 6 I I I I
5 4 3 21 1 I aI x ~ 1, 2 or 3
CRX2
0
Timer #X Counting Mode Control /~
TX configured for normal (16-bltl counting mode
1 TX configured for dual 8~blt counting mode
CR 10 Internal Reset Bit CR20 Control Register Address Bit CR30 Timer #3 Clock Control
a All timers allowed to operate 0 CR#3 may be written 0 T3 Clock IS not prescaled
1 All timers held In preset state 1 CR#l may be written 1 T3 Clock IS presealed by ~ 8
X~1 X 2 X~3
4·412
MC6840· MC68A40. MC68840
Control Register Bits CR10, CR20, and CR30 are unique m An mterrupt flag IS cleared by a Timer Reset condition,
that each selects a different function The remammg bits 11 Ie, External RESET=O or Internal Reset Bit ICR10)=1 It
through 7) of each Control Register select common func- will also be cleared by a Read Timer Counter Command pro-
tions, with a particular Control Register affecting only Its cor- vided that the Status Register has previously been read while
respondmg timer the mterrupt flag was set ThiS condition on the Read Status
Register-Read Timer Counter IRS-RT) sequence IS deSigned
CRX1 - Bit 1 of Control Register #1 I CR 11) selects to prevent missing Interrupts which might occur after the
whether an Internal or external clock source IS to be used status register IS read, but prior to readmg the Timer
with Timer #1 Similarly, CR21 selects the clock source for Counter
Timer #2, and CR31 performs this function for Timer #3 The An Individual Interrupt Flag IS also cleared by a Write
function of each bit of Control Register "X" can therefore be Timer Latches IW) command or a Counter Initialization ICII
defined as shown In the remalnmg section of Table 2 sequence, provided that W or CI affects the Timer cor-
respondmg to the md,vldual Interrupt Flag
CRX2 - Control Register Bit 2 selects whether the binary
mformatlon contamed m the Counter Latches land subse- COUNTER LATCH INITIALIZATION
quently loaded Into the counter! IS to be treated as a smgle Each of the three ,ndependent timers consists of a 16-blt
16-blt word or two 8-blt bytes In the smgle 16-blt Counter addressable counter and a 16-blt addressable latch The
Mode ICRX2=0) the counter will decrement to zero after counters are preset to the binary numbers stored In the ,atch-
N + 1 enabled IG = 01 clock periods, where N IS defined as the es Counter InitialIZation results In the transfer of the latch
16-blt number In the Counter Latches With CRX2 = 1, a contents to the counter See notes In Table 4 regardmg the
similar Time Out will occur after IL+ 1I·IM + 1) enabled binary number N, L, or M placed mto the Latches and their
clock periods, where Land M, respectively, refer to the LSB relationship to the output waveforms and counter Tlme-
and MSB bytes m the Counter Latches Outs
•
Since the PTM data bus IS 8-blts wide and the counters are
CRX3-CRX7 - Control Register Bits 3, 4, and 5 are ex- 16-blts wide, a temporary register IMSB Buffer Register) IS
plamed m detail In the Timer Operating Mode section Bit 6 IS provided ThiS "write only" register IS for the Most-
an Interrupt mask bit which will be explained more fully In Significant Byte of the deSired latch data Three addresses
conjunction with the Status Register, and bit 7 IS used to are provided for the MSB Buffer Register las mdlcated In
enable the corresponding Timer Output A summary of the Table 11, but they all lead to the same Buffer Data from the
control register programm.ng modes IS shown m Table 3 MSB Buffer Will automatically be transferred Into the Most-
Significant Byte of Timer #X when a Write Timer #X Latches
Command IS performed So It can be seen that the MC6840
STATUS REGISTER/INTERRUPT FLAGS has been deSigned to allow transfer of two bytes of data Into
The MC6840 has an mternal Read-Only Status Register the counter latches provided that the MSB IS transferred
which contams four Interrupt Flags IT he remBlnlng four bits first The storage order must be observed to ensure proper
of the register are not used, and defaults to zeros when be- latch operation
Ing read) Bits 0, 1, and 2 are assigned to Timers 1, 2, and 3, In many applications, the source of the data Will be an
respectively, as Individual flag bits, while Bit 71s a Composite M6800 Family MPU It should be noted that the 15-blt store
Interrupt Flag ThiS flag bit will be asserted If any of the m- operations of the M6800 family microprocessors ISTS and
dlvldual flag bits IS set while Bit 6 of the corresponding Con- STXI transfer data m the order reqUired by the PTM A Store
trol Register IS at a logiC one The condltlOriS for asserting Index Register Instruction, for example, results In the MSB
the composite Interrupt Flag bit can therefore be expressed of the X register being transferred to the selected address,
as then the LSB of the X register bemg written Into the next
INT = 11·CR 16+ 12·CR26+ 13·CR36 higher location Thus, either the mdex register or stack
pOinter may be transferred directly Into a selected counter
where INT = Composite Interrupt Flag IBlt 7) latch With a single mstructlon
11 = Timer #1 Interrupt Flag IBlt 01 A logiC zero at the RESET Input also Initializes the counter
12= Timer #2 Interrupt Flag IBlt 11 latches In thiS case, all latches Will assume a maximum
13= Timer #3 Interrupt Flag IBlt 2) count of 65,53510 It IS Important to note that an Internal
4-413
MC6840- MC68A40-MC68B40
Reset (Sit zero of Control Register 1 Set) has no effect on CLOCK INPUT C3 (- 8 PRESCALER MODE) - External
the counter latches. clock Input C3 represents a speCial case when Timer #3 IS
programmed to utilize ItS optional - 8 prescaler mode
COUNTER INITIALIZATION The dlvlde-by-8 prescaler contains an asynchronous ripple
Counter Initialization IS defined as the transfer of data from counter, thus, Input setup (tsul and hold times (thd) do not
the latches to the counter with subsequent clearing of the In- apply As long as minimum Input pulse Widths are maintain-
dividual Interrupt Flag associated With the counter. Counter ed, the counter Will recognize and process all Input clock
Initialization always occurs when a reset condition (0) transitions However, In order to guarantee that a clock
(RESET=O or CR10=1) IS recognized. It can also occur- transition IS processed dUring the current E cycle, a certain
depending on Timer Mode - With a Wnle Timer Latches
amo~t of synchronization time (tsync) IS reqUired between
command or recognition of a negative transition of the Gate
the C3 transition and the failing edge of Enable (see Figure
input.
9) If the synchrOnization time requirement IS not met, It IS
Counter recycling or re-Inltlallzatlon occurs when a
pOSSible that the C3 transition Will not be processed until the
negative transition of the clock Input IS recognized after the
counter has reached an all-zero state In thiS case, data IS follOWing E cycle
transferred from the Latches to the Counter The maximum Input frequency and allowable duty cycles
for the - 8 prescaler mode are speCified under the AC
ASYNCHRONOUS INPUT/OUTPUT LINES Operallng Characteristics Internally, the -8 prescaler out-
Each of the three timers Within the PTM has external clock put IS treated In the same manner as the preViously discussed
and gate Inputs as well as a counter output line The Inputs clock Inputs
are high-Impedance, TTL-compatible lines and ouputs are
capable of driving two standard TTL loads GATE INPUTS (G1, G2, G3) - Input pins G1, G2, and G3
accept asynchronous TTL-compatible Signals which are used
CLOCK INPUTS (C1, C2, and C3) - Input pins C1, C2, as triggers or clock gating functions to Timers 1, 2, and 3,
II
and C3 will accept asynchronous TTL voltage level Signals to respectively The gating Inputs are clocked Into the PTM by
decrement Timers 1, 2, and 3, respectively The high and low the E (enable) clock In the same manner as the preViously
levels of the external clocks must each be stable for at least discussed clock Inputs That IS, a Gate transition IS recogniz-
one system clock period plus the sum of the setup and hold ed by the PTM on the fourth Enable pulse (prOVided setup
times for the clock Inputs The asynchronous clock rate can and hold time requirements are met), and the high or low
vary from dc to the limit Imposed by the Enable Clock Setup,
levels of the Gate Input must be stable for at least one system
and Hold times
clock penod plus the sum of setup and hold times All
The external clock Inputs are clocked In by Enable pulses
Three Enable periods are used to synchronize and process references to G transition In thiS document relate to Internal
the external clock The fourth Enable pulse decrements the recognition of the Input transition
Internal counter ThiS does not affect the Input frequency, It The Gate Inputs of all timers directly affect the Internal
merely creates a delay between a clock Input transition and 16-bIt counter The operation of G3 IS therefore Independent
Internal recognition of that transition by the PTM All of the - 8 prescaler selection
references to C Inputs In thiS document relate to Internal
recognition of the Input tranSItion Note that a clock high or TIMER OUTPUTS (01, 02, 03) - Timer outputs 01,02,
low level which does not meet setup and hold time speCifica- and 03 are capable of driVing up to two TTL loads and pro-
tions may reqUire an additIOnal Enable pulse for recognitIOn duce a defined output waveform for either Continuous or
When obserVing recurring events, a lack of synchronization Single-Shot Timer modes Output waveform definition IS ac-
will result In "Jitter" being observed on the output 01 the complished by selecting either Single 16-blt or Dual 8-blt
PTM when uSing asynchronous clocks and gate Input operating modes The Single 16-blt mode Will produce a
Signals There are two types of Jitter "System Jitter" IS the square-wave output In the continuous mode and a Single
result of the Input Signals being out of synchronization With pulse In the Single-shot mode The Oual 8-bIt mode Will pro-
Enable, permitting Signals With marginal setup and hold time duce a variable duty cycle pulse In both the continuous and
to be recognized by either the bit time nearest the Input tran- Single-shot timer modes One bit of each Control Register
sition or the subsequent bit time (CRX7) IS used to enable the corresponding output If thiS bit
"Input Jitter" can be as great as the time between Input IS cleared, the output Will remain low (VOL) regardless of the
Signal negative gOing transitions plus the system jitter, If the operating mode If It IS cleared while the output IS high the
first transition IS recognized dUring one system cycle, and output will go low dUring the first enable cycle follOWing a
not recognized the next cycle, 01 vice versa See Figure 11 wnle to the Control Register
The Continuous and Single-Shot Timer Modes are the
FIGURE 11 - INPUT JITTER only ones for which output response IS defined In thiS data
sheet Refer to the Programmable Timer Fundamentals and
Applications manual for a diSCUSSion of the output Signals In
other modes Signals appear at the outputs (unless
CRX7 = 0) dunng Frequency and Pulse Width comparison
modes, but the actual waveform IS not predictable In tYPical
Here
~ r- System applications
I-~J- BIt Time
~~___ Jitter
Output
4-414
MC6840- MC68A40- MC68B40
TIMER OPERATING MODES that the timer output IS enabled ICRX7; 1), either a square
The MC6840 has been designed to operate effectively In a wave or a variable duty cycle waveform will be generated at
wide variety of applications This IS accomplished by uSing the Timer Output, OX The type of output IS selected via
three bits of each control register ICRX3, CRX4, and CRX5) Control Register Bit 2
to define different operating modes of the Timers These Either a Timer Reset ICR10; 1 or External Reset; 0) con-
modes are divided Into WAVE SYNTHESIS and WAVE dition or Internal recognition of a negative tranSition of the
MEASUREMENT modes, and are outlined In Table 4 Gate Input results In Counter Initialization A Wrtle Timer
latches command can be selected as a Counter Initialization
TABLE 4 - OPERATING MODES Signal by clearing CRX4
Control Register
The counter IS enabled by an absence of a Timer Reset
Timer Operating Mode condition and a logiC zero at the Gate Input In the 16-blt
CRX3 CRX4 CRX5
mode, the counter will decrement on the flfst clock cycle
0 0 Continuous
Synthesizer dUring or after the counter Initialization cycle. It continues to
0 t Single-Shot decrement on each clock Signal so long as G remains low and
1 0 Frequency Comparison no reset condition eXists A Counter Time Out (the flfst clock
Measurement
1 1 Pulse Width Comparison after all counter bits; 0) results In the Individual Interrupt
Flag being set and relnltlallzatlon of the counter
-Defmes Additional Timer Function Selection
In the DualS-bit mode ICRX2; 1) [refer to the example In
Figure 12 and Tables 5 and 61 the M S B decrements once for
One of the WAVE SYNTHESIS modes IS the Continuous every full countdown of the LSB + 1 When the LSB; 0, the
Operating mode, which IS useful for cyclic wave generation MSB IS unchanged, on the next clock pulse the LSB IS reset
Either symmetrical or variable duty-cycle waves can be to the count In the LSB Latches, and the MSB IS
generated In this mode The other wave syntheSIS mode, the decremented by 1 lone) The output, If enabled, remains low
Single-Shot mode, IS Similar In use to the Continuous dUring and after Initialization and Will remain low until the
operating mode, however, a Single pulse IS generated, With a
programmable preset width
The WAVE MEASUREMENT modes Include the Frequen-
cy Comparison and Pulse Width Comparison modes which
are used to measure cycliC and singular pulse widths, respec-
tively
counter MSB IS all zeroes The output Will go high at the
beginning of the next clock pulse The output remains high
until both the LSB and MSB of the counter are all zeroes At
the beginning of the next clock pulse the defined Time Out
ITO) Will occur and the output Will go low In the Dual S-blt
mode the period of the output of the example In Figure 12
II
In addition to the four timer modes In Table 4, the remain- would span 20 clock pulses as opposed to 1546 clock pulses
Ing control register bit IS used to modify counter Inltlallzatton uSing the normal 16-blt mode
and enabling or Interrupt conditions A speCial time-out condition eXists for the dual S-blt mode
ICRX2; 1) If L;O In thiS case, the counter Will revert 10 a
mode Similar to the Single 16-blt mode, except Time Out oc-
WAVE SYNTHESIS MODES
curs after M + 1* clock pulses The output. If enabled, goes
CONTINUOUS OPERATING MODE (TABLE 5) - The low dUring the Counter Initialization cycle and reverse, state
continuous mode will syntheSize a continuous wave With a at each Time Out The counter remains cyclical liS re-
period proportional to the preset number In the particular Initialized at each Time Out) and the IndiVidual Interrupt Flag
timer latches Any of the timers In the PTM may be program- IS set when Time Out occurs If M; L; 0, the Internal
med to operate In a continuous mode by writing zeroes Into counters do not change, but the output toggles at a rate of
bits 3 and 5 of the corresponding control register Assuming Y, the clock frequency
- r-(N+1HT1T(N+l1(T1T(N+l)(T)1
0 0 Gl+W+R
- I I I I-VOH
VOL
0 1 GI+R I I
to TO TO TO
1 0
-
GI+W+R
r--( L +1 j(M +1) (Tl----t--( L +1) (M +1) (TI-----1
~-VOH
4-415
MC684()e MC68A4Oe MC68B40
Counter Output
----.,
,I , __- - - - - - - MIL + 1) + 1 - - - - - - - - - t - - L
.1-------4--------'--------'~ I
Algebraic ExpreSSIon
03(04 + 1) + 1 =
16 Enable.
!.
I
I
====1====- 04 V
2 4 V
I
Enable
(System cp2)
I
1.'--1 + L - _
- _... o o-- 1 + J.'. L~
5 Enable 5 Enable I
Pulses Pulses Pulses I
I ~1+L
: I I I 5 Enable I
I I I I Puis.. I
•
II
I I
li~ I II
H•
~ ~ f7.j
Algebraic Expression
(M + 1)(L + 1) "" Period
(04 + 1)(03 + 1) = 20 Enable or
M(L + 1) + 1 = Low portion of period
External Clock Pulses
L = Pulse width
·Preset LSB and MSB to Respective Latches on the negative transItion of the Enable
.. "Preset LSB to LSB Latches and Decrement MSB by one on the negative tranSition of the Enable
The diSCUSSion of the Continuous Mode has assumed that the counter results In the setting of an Individual Interrupt
the application reqUires an output signal It should be noted Flag and re-Inltlallzatlon of the counter
that the Timer operates In the same manner with the output The second major difference between the Single-Shot and
disabled (CRX7=01 A Read Timer Counter command IS Continuous modes IS that the Internal counter enable IS .10t
valid regardless of the state of CRX7 dependent on the Gate Input level reamlnlng In the low state
for the SIngle-Shot mode
SINGLE-SHOT TIMER MODE - ThiS mode IS Identical to Another special condition IS Introduced In the Single-Shot
the Continuous Mode with three exceptions The first of mode If L= M =0 (Dual 8-b,t) or N =0 (Single 16-bltl, the
these IS obVIOUS from the name - the output returns to a output goes low on the first clock received dUring or after
low level after the Initial Time Out and remains low until Counter InitializatIOn The output remains low until the
another Counter Initialization cycle occurs Operating Mode IS changed or nonzero data IS written Into
As indicated In Table 6, the Internal counting mechanism the Counter Latches Time Outs continue to occur at the end
remains cyclical In the Single-Shot Mode Each Time Out of of each clock period
-
0 0 GI+W+R [j:::(N+111T1~IN+1I1Tll
I---(NIITI
I~ I
0 1 GI+R to TO TO
1 0 r(L+1I(M+1I(TI~(L+1I(M+11ITll
GI+W+R ---j (LI(TI
1 1
-
GI+R
to
n TO TO
4·416
The three differences between Single-Shot and Conlinous generation until a new Counter Initialization cycle has been
Timer Mode can be summanzed as attnbutes of the Slngle- completed When thiS Internal bit IS set, a negative transition
Shot mode of the Gate Input starts a new Counter Initialization cycle
1. Output IS enabled for only one pulse until It IS relnillallz- (The condition of 131 ;r.TO IS satisfied, since a Time Out
ed has occurred and no individual Interrupt has been
2. Counter Enable IS Independent of Gate generated)
Any of the timers Within the PTM may be programmed to
3 L = M = 0 or N = 0 disables output
compare the penod of a pulse (giVing the frequency after
ASide from these differences, the two modes are Identical calculations) at the Gate Input With the time pe'lod re-
quested for Counter Time Out A negative transition of the
WAVE MEASUREMENT MODES Gate Input enables the cdJunter and starts a Counter In-
TIME INTERVAL MODES - The Time Interval Modes are Itialization cycle - provided that other conditions, as noted
the Frequency (penod) Measurement and Pulse Width Com- In Table 8, are satisfied The counter decrements on each
panson Modes, and are provided for those applicatIOns clock signal recognized dunng or after Counter Initialization
which require more flexibility of Interrupt generation and until an Interrupt IS generated, a Wnte Timer Latches com-
Counter Initialization Individual Interrupt Flags are set In mand IS Issued, or a Timer Reset condition occurs It can be
these modes as a function of both Counter Time Out and seen from Table 8 that an Interrupt condition Will be
transitions of the Gate Input Counter Initialization IS also af- generated If CRX5= 0 and the period of the pulse (Single
fected by Interrupt Flag status pulse or measured separately repetitive pulses) at the Gate
A timer's output IS normally not used In a Wave Measure- Input IS less than the Counter Time Out penod If CRX5 = 1,
ment mode, but It IS defined If the output IS enabled, It will an Interrupt IS generated If the reverse IS true
operate as follows Dunng the period between relnltlallzatlon Assume now With CRX5= 1 that a Counter Initialization
of the timer and the first Time Out, the output Will be a has occurred and that the Gate Input has returned low prior
logical zero If the first Time Out IS completed (regardless of
ItS method of generation), the output Will go high If further
TO's occur, the output Will change state at each completion
of a Time-Out
The counter does operate In either Single 16-blt or Dual
8-blt modes as programmed by CRX2 Other features of the
to Counter Time Out Since there IS no IndiVidual Interrupt
Flag generated, thiS automatically starts a new Counter In-
Itialization Cycle The process Will continue With frequency
comparison being performed on each Gate Input cycle until
the mode IS changed, or a cycle IS determined to be above
the predetermined limit
II
Wave Measurement Modes are outlined In Table 7
Pulse Width Comparison Mode (CRX3= 1, CRX4= 1)
Frequency Comparison Or Period Measurement Mode ThiS mode IS Similar to the Frequency Comparison Mode ex-
(CRX3= 1, CRX4= 0) - The Frequency Companson Mode cept for a POSitive, rather than negative, transition of the
With CRX5= liS straightforward If Time Out occurs prior to Gate Input termlntes the count With CRX5= 0, an IndiVidual
the first negative transition of the Gate Input after a Counter Interrupt Flag will be generated If the zero level pulse applied
Initialization cycle, and IndiVidual Interrupt Flag IS set The to the Gate Input IS less than the time period required for
counter IS disabled, and a Counter Initialization cycle cannot Counter Time Out With CRX5= 1, the Interrupt IS genereted
begin until the Interrupt flag IS cleared and a negative transI- when the reverse conditIOn IS true
tIOn on G IS detected As can be seen In Table 8, a positive tranSition of the Gate
If CRX5 = 0, as shown In Tables 7 and 8, an Interrupt IS Input disables the counter With CRX5= 0, It IS therefore
generated If Gate Input returns low prior to a Time Out If a pOSSible to directly obtain the Width of any pulse causing an
Counter Time Out occurs first, the counter IS recycled and Interrupt Similar data for other Time Interval Modes and
continues to decr'ement A bit IS set Within the timer on the conditions can be obtained, If two sections of the PTM are
Initial Time Out which precludes further Individual Interrupt dedicated to the purpose
CRX3 ~ 1
CRX4 CRX5 Application Condition for Setting IndiVidual Interrupt Flag
0 0 Frequency Comparison Interrupt Generated If Gate Input Penod (l/FI IS less
than Counter Time Out (TO)
0 1 Frequency Comparison Interrupt Generated If Gate Input Penod (l/F) IS greater
than Counter Time Out (TO)
1 0 Pulse Width Comparison Interrupt Generated If Gate Input "Down Time" IS less
than Counter Time Out (TO)
1 1 Pulse Width ComparISon Interrupt Generated If Gate Input "Down Time" IS greater
than Counter TIme Out (TO)
4-417
MC6840- MC68A4()e MC68B40
ie}
•
• All time Intervals shown above assume the Gate (G) and Clock signals are sycnhronlzed to the system clock
(E) with the specIfied setup and hold time requirements
4-418
® MOTOROLA MC6843
20
!oj vee
MC6844 36
FIGURE 2 - PIN ASSIGNMENT
"'0
TxRO
J-!.- RO Floppy Disk
6;~~:n ( 21
25
TxAck
oCK
CLK Drive
~
BO Read TRZ
r- t-
('~ ~!l ~ I ~
(' VfOC Recover Read Data
DO
01 32
~
01 RO
02 .t:!!!~ ~ 02
ROT
Oa..
~ III 03 ~(/)dl ~ 03
'" 39
V
D6
t-"',il j--1L
07
~!£ ~
05
D6
07
i
(j
::;:
HOR
STP
B
15
Head Direction
Slep
WGT 6
HLO
16
Head Load RESET 7
iRci 37
IRQ LCT
10
Low Current Track HDR 8
CLK 12 3
eLK FIR
RESE' 7 File Inoperable Reset DCK 9 Dl
RESET
R/W 22 4
R/W FI File Inoperable
.2 23
E 5 lCT 10 D2
VMA WPT Wnte Protect
AO 19 11 IDX II D3
RSO lOX Index
AI lB
RSI 40 ClK 12 D4
A2 17 TRl Track Zero
RS2
A3 ,.-L. ~ CS VSS ROY
13
Ready RDY 13 D5
A4
AS VFOC 14
'l_J2
AS
STP 15
.!!"
A7
AS
A9 ~ HlD 16
~~
Ala RS2 17
All ·Optlonal Three-State Buffers
AI2 MC68EIl for Inverted Data RSI 18
AI3 MC6889 for Non-Inverted Data
AI4 RSO 1&
AI5
'--- VCC 20
4·419
MC6843
MAXIMUM RATING
POWER CONSIDERATIONS
•
PD"PINT+ PPORT
PINT-ICCxVCC, Watts - Chip Internal Power
PPORT- Port Power DiSSipation, Watts - User Determined
For most applications PPORT<C PINT and can be neglected. PPORT may become significant If the device IS configured to
drive Darlington bases or Sink LED loads.
An approximate relationship between PD and TJ Ilf PPORT IS neglected) IS'
PD=K+ITJ+273°C) 12)
Solving equations 1 and 2 for K gives:
K= PD-ITA + 273°C) +9JA-PD2 (3)
Where K IS a constant pertaining to the particular part. K can be determined from equation 3 by measuring PD lat equilibrium)
for a known T A. USing thiS value of K the values of PD and TJ can be obtained by solVing equations (1) and (2) Iteratively for any
value of TA
Load A Load B
IDO-D7i 111m onlyi
VCC VCC
Test
POint
MMD6150
or Equlv
AL=2.49k
Test
POint
~"'"''
C A MMD7000
or Equlv
I 100PF
4·420
MC6843
DC ELECTRICAL CHARACTERISTICS IVCC =5 0 Vdc ±5%, VSS =0, TA=O to 70'C unless otherwise notedl
•
Output Capacitance IV,n = 0 V, f = 1 0 MHz, TA = 25'C) All Outputs Cout - - 10 pF
Clock Pulse Width, low IClK) PWCl 400 - - ns
Clock Pulse Width, High IClK) PWCH 400 - - ns
Master Clock Penod IClK) tMC 10 - - P.s
Data Clock Pulse Width, low lOCK) PWDl 13 195 - P.s
Data Clock Pulse Width, High lOCK) PWDH 13 195 - P.s
Data Clock Penod lOCK) tDC 25 40 - p'S
Read Data to Data Clock Delay Time 1 tRDD1 055 10 - P.s
Read Data to Data Clock Delay Time 2 tRDD2 0.55 1.0 - p'S
Read Data Pulse Width, High tRDH - 10 - p'S
Read Data Pulse Width, low tRDl - 10 - P.s
Index Pulse Width, High PWIDX 10 - - P.s
Transfer Request Release Time tTR - - 450 ns
Interrupt Request Release Time tlR 12 P.s
Bus Direction Delay Time tDBD - 330 ns
Wnte Data Pulse Width, High Ifc= 1 0 MHz) PWWD - 10 - p's
Write Data Cycle Time Ifc - 1 0 MHz) tcycWD 20 p's
Step Pulse Width, High Ifc-1 0 MHz) PWSTP - 32 p's
Step Cycle Time" Ifc= 1 0 MHz) tcycSTP 10 - 15 ms
Write Gate to Write Data Delay ISSW, SWD, MSW) tGD1 07 10 13 p's
Wnte Gate Hold Time tGH 0 - 0.3 p's
Write Gate to Write Data Delay IFFW) tGD2 02 20 p's
ClK to iRQ Delay tlROC - - 12 p's
ClK TO ISR0-3 Delay tlSRD - - 07 P.s
Index Pulse to STRB Bit 3 Delay tlROI - - 18 "'S
Index Pulse to 1RIT Delay tSTRB3 - - 10 P.s
Data Clock to Transfer Request Delay tDTx 400 - 700 ns
Signal Rise and Fall Times tr,tf - - 25 ns
4·421
MC6843
ldent.
Number Charactariatlc Symbol Min Max Unit
1 Cycle Time tCYC 10 10 ,.s
2 Pulse Width, E low PWEl 430 9500 ns
3 Pulse Width, E High PWEH 460 9500 ns
4 Clock Rise and Fall Time tr,tf 25 ns
9 Non·Muxed Address Hold Time tAH 10 ns
13 Address Setup Time Before E tAS BO - ns
14 Chip-Select Setup Time Before E tcs BO - ns
15 Chip-Select Hold Time tCSH 10 - ns
18 Peripheral Read Data Hold Time Provided tDHR 20 100 ns
21 Wnte Data Hold Time tDHW 10 ns
30 Peripheral Output Data Delay Time tDDR 290 ns
31 Peripheral Input Data Setup Time tDSW 165 ns
• E
R/VV,Address--~ti~~~?V~V'------~~~~--lHr-----------------------------ti~~O'
~--------~3~--------~
(Non-Muxed) ____~~~-L~~~~--------~~~----~r_--------------------------------ti~~~
cs----~~------------------~
Notes
1 Voltage levels shown are VlSO 4 V, VH:.:2 4 V, unless otherwise speCified
2 Measurement POints shown are 0 8 V and 2 0 V, unless otherwise speCified
ClK
Note. Timing measurements are referenced to and from a low voltage of 0 8 volts and
a high voltage of 2 0 volts, unless otherwise noted
4-422
MC6843
•
FIGURE 7 - INDEX TIMING FIGURE 8 - ilm RELEASE TIME
'M"'~""7_1
Interrupt Request
r
FIGURE 9 - DATA BUS DIRECTION TIMING
Enable~
rtDBD-j,--__-
Bus Dlfectlon t
FIGURE 10 - WRITE DATA TIMING
Write Data
Note Timing measurements are referenced to and from a low voltage of 0.8 volts and a high voltage of 2.0 volts, unless otherwise noted.
4-423
MC6843
J
FIGURE 11 - STEP TIMING (PROGRAMMABLE) FIGURE 12 - TxRQ RELEASE TIMING
~~W
Enable
Step I
~ tcycSTP
-(
----j r
ACknOWledge~~
Transfer ~ tTR
Transfer
Request --------X'-_____
FIGURE 13 - OELAY TIME FROM DATA CLOCK TO TRANSFER REQUEST (tDTx)
Read Data 1\ I
C D C D
•
Transfer
Request
I
I
FIGURE 14 - WRITE DATA versus WRITE GATE TIMING
a - SSW, SWD and MSW commands ISlngle Sector Write, Single Sector Write with Deleted Address Mark, and Multiple Sector Write!
WGT----1
I C D C D C
I
WDT _ _ -;.I__~
I
r--tGDl
b - FFW Command (Free Format Write)
WGT~ L
I C D C --ll--tGH
WDT _ _-i-l_ _~
I
"---___ --I1..I1-
I I
--..-.I l--tG D2
Note Timing measurements are referenced to and from a low voltage of a 8 volts and a high voltage of 20 volts, unless otherwise noted
4-424
MC6843
Index
Status
Register
B3
Interrupt Status
Register
a
Interrupt ---------------1
Request
•
Note Timing measurements are referenced to and from a low voltage of unless otherwise noted
STP
Instruction
Decoder
and
TxRQ
Sequence
Controller
TxAK
DO LCT
D1
D2
D3
FIR
D4
HDR
D5
HLD
D6
WGT
D7
VFOC
FI
CS IDX
RSO TRZ
RS1 WPT
RS2 RDY
R/W
WDT
BD
RESei-- DCK
VCC-
VSS- RDT
4-425
MC6843
•
The Internal timing and control signals which sequence
Data Input Register (DIR) - The data words read from the
the FDC are derived from the macro instructions by the con-
disk are stored In the 8-blt DIR until read by the bus inter-
trol section.
face.
Interrupt Status Register (lSR) - The four bits of the IS R VSS: Input
represent the four conditions that can cause an Interrupt to
Power Supply Ground
occur,
BUS PINS
Set-Up Register (SUR) - Variable Seek and Settling
times are programmed by the SUR Four bits are used to
Reset Input The RESET Input IS used to Initialize the
program the track-to-track seek time and four bits are used
FDC. When RESET becomes Low, the state of the outputs IS
to program the head settling time for the floppy disk drive
defined by the table below
used With the FDC
Output Stat. of Output Output Stat. of Output
Status Register A (STRA) - The eight bits of STRA are
FIR Low HLD Low
used to Indicate the state of the floppy disk Irlterface
WGT Low TxRQ Low
HDR Low IRQ High
Sector Address Register (SAR) - SAR contains the 5-blt STP Low WDT Low
sector address associated With the current data transfer.
Registers which are affected by RESET are shown In Tab!e 7
Status Register B (STRB) - The eight prror flags of STR B
are used to Signify error conditions detected by the FDC or Interrupt Request (IRQ) Output - The IRO line IS an open-
generated by the floppy disk drive. drain output that becomes a low level when the FDC re-
quests an Interrupt Interrupt' requests are controlled by the
General Count Register (GCR) - The seven bits of GCR Interrupt enables In CMR (Command Register) With the func-
contain the destination track address when a SEK (seek) tion causing the Interrupt shown In ISR (Interrupt Status
macro command IS being executed. If a multi-sector Read or Register)
Write macro command IS being executed, GCR contains the
number of sectors to be read or Wnlten Data Bus O-Data Bus 7 (00-07) Bidirectional - The eight
bidirectional data lines allow the transfer of data between the
CRC Control Register (CCR) - The two bits of the CCR FDC and the controlling system. The output buffers are
are used to enable the CRC and shift the CRC for the Free- three-state drivers that are enabled when the FDC IS transfer-
Format Commands. ring data to the data bus
4·426
MC6843
Enable (E) Input - The E Input to the FDC causes data TABLE 2 - REGISTER SELECTION
transfers to occur between the FDC and the system controll- FOR DMA TRANSFERS
Ing the FDC (MC6800 MPU, DMA Controller, etc J. E must
be a logiC '1' (high level) for any transfer to be enabled on Register
TxAK RSO-RS2 CS R/Vii Selected
DO-D7 The E Input IS normally connected to system <1>2
1 X X 1 DOR
1 X X 0 DIR
Chip-Select (CS) Input - The CS Input, In conjunction
with the E Input, IS used to enable data transfers on DO-D7 E
ThiS mode of operation IS normally used for DMA (Direct
must be a high level and Cs must be a low level to enable the
Memory Access) transfer With the FDC _
transfer The TxAK Input being a high level (logiC 'I') per-
When TxAK IS a low level the registers are selected by CS,
forms a function similar to Cs being a low level
R/Vii and RSO-RS2 as shown In Table 1.
Read/Write (R/W) Input - The R/W Input IS Issued by
Bus Direction (BO) Output - The BD output IS proVided
the system controlling the FDC (MC6800 MPU, DMA Con-
to control bidirectional buffers on the data bus (DO-D7I as
troller, etc) to signify If a read or wnte operation IS to be per-
shown In Figure 1 Its polanty IS shown by Table 3
formed on the FDC When TxAK IS a low level, R/Vii IS used
In conjunction with CS and RSO-RS2 to determine which TABLE 3 - BUS DIRECTION IBD) STATES
register IS accessed by the bus as shown In Table 1 When
TxAK IS a high level, R/W IS used to select either the DDR or TxAK CS BD
DIR to the data bus (see descnptlon of TxAK Input) 1 X R/W
0 1 0
•
Register Select O-Register Select 2 (RSO-RS2) Input 0 0 R/W
RSO-RS2, In conjunction with the R/W Input, are used to
select one of the user accessible registers In the FDC as IOperatlon of BD. as defined by thiS chart, allows the FDC to func-
shown In Table 1 tIOn With the DMA Controller MC6844)
4-427
MC6843
•
dicate the Index hole IS under the Index sensor The Index In-
put IS used to count the number of disk revolutions while
searching for the address 10 field (see description of STRB Clock Data Clock Data
bit 3)
f= Frequency of the elK Input To Insure
Ready (ROY) Input - The ready input IS received from the IBM3740 compatibility the clock frequency
disk drive and can be read as bit 2 of STRA (Status Register must be 1 MHz
A) A high level (logic '1') ,nd,cates the drive IS ready and
allows the FOC to operate the drive
Variable-Frequency Oscillator Control NFOCI Output -
Write Protect (WPT) Input - WPT IS an Input Indicating VFOC IS used as a sync signal dUring system dlagnost'cs
when the media IS Wnte Protected. A high level dunng an Waveforms are shown In Figure 19
FOC write operation results In a Wnte Error (STRB bit 6) but
the FOC continues to perform the write function The state FORMAT
of the WPT Input can be read by examining bit 4 of the The format used by the MC6843, shown In Figure 20, IS
Status Register A (STRAI. compatible with the soft sector format of the IBM 3740.
FIGURE 19 - VARIABLE FREQUENCY OSCILLATOR CONTROL WAVEFORM
(Relation Between WGT and VFOC)
SSW,SWD,MSW Commands
~6 Bytes Data Field
ID Field Data Field 10 Field
WGT! I I L I I
I I 148 Bytesl I I I I
I I ~ 1--54 Byt.s--i I I I
I I r-----,' I ~i__l.~-_9-B-y-te-s--_--__,1I
VFOC~ LJ U U L.J
10 BYtes----! r-- --1 t---10 Bytes
SSR, RCR, MeR Commands
T'ack _ _
_ -!f""IL..__. . . L_ _ _ _....., - - - ,...._ _ ---'J
I I 6 I I I I I II
"0" I t4-Bytesj --..j ~6 Bytes 1 Byte--, ~ -..., r--' Byte
WGT _ _ ~I~-'-__~I----r----------------------~I--------_r---'~I----------
I i I
I 1 Byte--j ~ I __: '--6 Bytesj
Ir-_ _ _ _-. I I I
VFOC--1
--I
LJ1-- 10 Bytes 26 Bytes--!
L-Jr-- LJ
4·428
MC6843
Index~r:'----_
L-
_ _ _ _~I~I-------------------IfIL--
Gap 1
Preamble (Post Index)
Track 46 Bytes 32 Bytes
'--I~'--'secto"lsectoc2Isecto'31111
Format
Index
I ,
Sector 24 Sector 25 Sector 26
'__ I Gap 4
Address Mark 274 Bytes
Data'" Fe (Pre Index
Clock"" 07 Gap)
ID
Address
Mark Gap 2 Gap 3
Data == FE (10 Gap) (Data Gap)
Clock'" C7 17 Bytes 33 Bytes
I-I~ '---'-,,-1
Sector
Format
•
Address 10 F laid
'--------v~----
Data
_____ CRC Next 10
Address Mark 2 Bytes Address Mark
6 Bytes 128 Bytes
1 ~ Track Address Data = Fa or £-8
2--00 Byte Clock = C7
3-Sector Address
4-0QByte
5-CRC
6-CRC
MACRO COMMAND SET SUR has explfed, the Settling Time Complete flag IS set IISR
The macro command set shown In Table 4 IS discussed In bit 11, Busy (STRA-7) IS reset, and CTAR and GCR are
the following paragraphs cleared The head remains In contact with the disk A com-
mand such as RCR IRead CRC) may be Issued following a
Seek Track Zero (S TZ) STZ If the head must be released
The STZ command causes the R/W head to be released
Seek (SEKI
from the surface of the disk IHLD IS reset) and positioned
above track 00. The FDC Issues step pulses on the STP out- The SEK command IS used to position the R/W head over
put until the TRZ Input becomes a high level or until 83 the track on which a Read/Write operation IS to be perforrT'-
ed. The contents of the GCR are taken as the destination ad-
pulses have been sent to the drive When the TRZ Input
dress and the contents of the CT AR IS the source address,
becomes high, the step pulses are inhibited on the STP out-
therefore, the number of pulses INl on the STP output are
put but the FDC remains busy until all 83 have been
given by.
generated Internally
If the TRZ Input remains low (logic '0') after all 83 pulses N = IICT AR) - IGCRll
have been genelated, the Seek Error flag (STRB bit 4),s set. HDR IS a '" for IGCRl>ICTAR) otherWise It IS a '0'
After all 83 pulses have been generated, the head IS loaded When a SEK command IS Issued, Busy IS set, the head IS
(HLD becomes a "'1 After the settling time speCified In the raised from the diSk, HDR IS set, and N number of pulses ap-
4-429
MC6843
number of pulses appear on the STP output After the last Single-Sector Write with Delete-Data Mark I SWD)
step pulse IS used, the head IS placed In contact with the The operatl(:nal flow of SIND IS exactly like that of SSW
disk. Once the head settling time has expired, the Settling For SWD, the data pattern of the Data-Address Mark
Time complete flag IISR bit 11 IS set, Busy IS reset, and the becomes F8 Instead of F8 The clock pattern remainS C7
contents of the GCR are transferred to the CT AR
Multi-Sector Commands (MSR/MSW)
SINGLE-SECTOR READ/WRITE COMMANDS MSR IS used for sequential reading of two or more sec-
The single-sector Read/Write commands ISSR, RCR, tors If S sectors are to be read, S1 must be written Into the
SSW, and SWDI are used to Read/Write data from a Single GCR before the command IS Issued
128 byte sector on the disk As shown In Figure 21 these The baSIC operation for the MSR and MSW IS the same as
types of Instructions can be divided Into two sections The that for the SSR and SSW repsectlvely. The baSIC operation
first section, which IS common to all Instructions, is the ad- begins With an address search operation, which IS followed
dress search operation, while the second section IS unique to by a Single-sector read or write operation ThiS completes
the requirements of each Instruction. the operation on the first sector The SAR IS Incremented,
the GCR IS decremented, and If no overflow IS detected from
FIGURE 21 - BASIC SINGLE SECTOR the GCR II e, GCR becomes negative) the sequence IS
COMMAND FLOW CHART
repeated until S number of sectors are read or written
The completion of an MSR or MSW IS like that of an SSR
•
or SSW command. First MCC IS set, after the settling time
has expired, Busy IS reset, and the head IS released.
If a delete-data mark IS detected dUring an MSR com-
mand, STRA bit 1 (Delete-Data Mark Detected) remains set
throughout the commands operation
When a multi-sector instruction IS Issued, the sum of the
SAR and GCR must be less than 27 If SAR + GCR > 26, an
address error (STRB bit 3 set) Will occur after the contents of
SAR becomes greater than 26
4-430
MC6843
4-431
MC6843
4-432
MC6843
Set Data
Transfer Request
(STRA Bit OJ
(Set Simultaneously
with Status
Sense Request)
Wrttethe
Data
Address Mark
(Clock = C7.
Data'" FB)
•
Transfer Contents
of DOR to DOSA
& S8t Data
Transfer Request
(STAA Bit 0)
4-433
MC6843
This operation continues until a zero pattern IS stored In data transfer mode and Interrupt conditions are loaded Into
the CMR, terminattng the FFR command. As In the case of bits 4 through 7
the FFW command, MCC is not set and the head remains In
contact with the disk. Bit O-Bit 3: Macro Command
The first data that enters the DISR IS not necessartly the The Macro Command to be executed by the FDC IS Wrtt-
first bit of a data word Stnce the head may be lowered at any ten to bits 0-3
place on the disk To prevent the FDC from rematntng un-
synchronized to the data, the FFR command Will syn- Bit 4: Free-Format Write Flag (FWF)
chronize to either an 10 address mark (FE) or a Data-Address If a Free-Format Wrtte command IS Issued, the state of bit
Mark (FB or F81. 4 of the CM R determtnes what clock source Will be used
The FWF is defined ,n the FFW (Free-Format Wrttel com-
REGISTER DEFINITIONS mand explanation
DATA OUTPUT REGISTER (DOR)
Bit 5: DMA Flag
Hex address 0, wnte only
If bit 5 IS a '1' the FDC IS In the DMA mode Bit 5 being a
'1' tnhlblts setting of Status Sense Request IISR bit 21
thereby preventing ItS associated Interrupt A logiC '1' DMA
flag also enables the TxRQ output allowtng It to request
DMA transfers when the Data Transfer Request fl~g (STRA
When one of the four wnte macro commands (SSW,
bit 01 IS set
SWD, MSW, and FFW) IS executed, the Information con-
II
A logiC '0' DMA flag tnd,cates the program controlled 1/0
tained In the DOR IS loaded Into the DOSR, and IS shifted out (PC I/O) mode IS to be used
on the WDT line uSing a double frequency (FM) format
Bit 6: ISR3 Mask
DATA INPUT REGISTER (DIRI
CMR bit 6(ISR3 Maskl,s used to control the operation of
Hex address 0, read only ISR bit 3. A logiC '1' In CMR bit 6 tnhlblts ISR bit 3 from be-
tng set when STRB becomes non-zero If CMR bit 6 (ISR3
Mask) IS a '0' the ISR bit 3 Will be set If any btl In STRB
becomes set. The setting of ISR bit 3 Will cause an tnterrupt
If CMR bit 7 IS a '0'.
One of the three read macro commands (SSR, MSR, FFR)
executed, Will cause the tnformatlon on the RDT Input to be Bit 7: Function Interrupt Mask
clocked Into the DISR When eight clock pulses have oc- When CM R bit 7 IS a logiC '1' all Interrupts are Inhibited ex-
curred, the eight bits of tnformatlon In the DISR are transfer- cept Status Sense Request IISR bit 21 which can only be In-
red to the DIR where It can be read by the bus Interface hibited by the DMA flag (CMR bit 51. A logiC '0' tn CMR bit 7
3nables Interrupts from ISRO (Macro Command Completel
CURRENT TRACK ADDRESS (CTAR)
and ISRl (Settling Time Complete), and If the ISR3 Mask IS
Hex address 1, read/wnte '0', from ISR3
TABLE 5
The commands that control the FDC are loaded tnto the X" No effect
lower four bits of the CMR Informattan that controls the M == 81ts that are used as masks
4-434
MC6843
INTERRUPT STATUS REGISTER (lSR) to stop bounCing before any operations are performed The
Hex address 2, read only delay IS programmed by bits 0-3 and IS speCified by the equa-
tion
I I I
Bit 7 Bit 6 Bit 5 Bit 4 Blt3 Bit 2 Bit 1 Bit 0 Delay; 4096 _B
Status' Settling' Macro" f
Not Used
STRB' Sense TIme Com- B; Number contained In bits 0-3 of SUR
IRead as '0'1
Request Complete mand f; Frequency of elK Input
• Cleared by RESET For IBM 3740 compatibility f; 1 MHz and the timing range
Bit 0: Macro Command Complate Is4 096 ms for a '0001' to 6144 ms for a '1111'. A '0000' code
prevents Settling Time complete from being set and the FDC
When an SSR, RCR, SSW, SWD, MSR or MSW Macro
must be Reset
Command has completed execution, bit 0 bcomes set (logic
'1'1 If the function Interrupts are enabled (bit 7 of CMR IS a
Bit 4-Blt 7: Track-to-Track Seek Time
logic '0'1, the conclusion of a Macro command's execution
will cause an Interrupt The frequency of STP IS determined by bit 4-blt 7 of SUR
as shown below If the track-to-track seek time IS 0 the
Bit 1: Settling Time Com plate period of STP IS 64lf
Settling time complete IS set on SEK and STZ commands
to Indicate the head has been loaded and the 8ettllng time A= Number speCified In bits 4-7 of SUR
f = Frequency of clock Input
specified In SUR has expired Since MCC IS not set for the
SEK or STZ command, settling time complete can be used
•
as an Interrupt to Signify the SEK or STZ command has
finiShed. Settling Time Complete IS not set for any of the -------A
11oo... _10_,2_4 -------1....-11
RIW commands.
--l I-- 3,2
Bit 2: StatuI Senn Request
For an SSR, SSW, SWD, MSR, or MSW Command,
Jl_ _ _ _---IrL
Status Sense Request indicates that the specified address ID
field has been detected and verified by a CRC check. This IS A = Number specified In bits 4-7 of SUR,
used as an early indication that data transfers will occur after f .. Frequency of clock Input.
18 more byte times. For MSR and MSW commands, it IS set
for each sector. For IBM compatible operation, f IS 1 MHz. ThiS results In
In the PC 1/0 mode, an Interrupt occurs when Status an STP pulse width of 321's and an STP interval of 1.024 Ins
Sense Request becomes a logic '1' regardless of the state of for 0001 in bits 7-4 to 15.36 ms for 1111.
the CMR interrupt mask. In the DMA mode, (DMA flag of
CMR is setl Status Sense Request IS unchanged and does STATUS REGISTER A (STRA)
not generate an Interrupt when the address ID field has been Hex address 3, read only
verified.
Bit 7 Bit 6 Bit 5 Bit 4 Blt3 Bit 2 Bit 1 BII 0
Bit 3: STRB
Delete' Data·
STRB IS an 'OR' of all of the bits of Status Register Band Track' Write
Track Drive Data
IS disabled by the STRB Interrupt mask In the CMR (CMR bit Busy' Index Not Pro- Transfer
Zero Ready Mark
6) The equation' Equal tect Request
Detected
STRB; CMR6-(STRB + STRB1 + STRB2+
'Cleared by RESET
STRB3+ STRB4+ STRB5+ STRB6+ STRB71
describes the operation of Bit 3 of the ISR
ISRO, ISR1, and ISR2 are cleared when the Interrupt Bit 0: Data Transfer Request
Status Register IS read, but ISR3 IS cleared only after Status For a write operation (SSW, SWD, MSW, FFW) the
Register B has been read. transfer request bit Indicates that the DOR IS ready to accept
the next data word to be written on the disk. If data is not
SET-UP REGISTER (SUR) written into the DOR before the last data bit In the DOSR IS
Hex address 3, write only shifted out to the WDT line, the data transfer error bit (bit 0
of STRB) will be set. After a write command has been
Issued, the first transfer request occurs simultaneously with
the Status Sense Request. For a write operation, transfer re-
quest IS reset after the DOR has been written from the data
The SUR IS not affected by a reset operation; therefore, bus.
once It IS initialized, the Information remains until power IS DUring a read operation (SSR, MSR, FFRI the transfer re-
removed from the FDC quest bit Signifies data from the DIS R has been transferred
to the DIR. The DIR must be read before the DISR is full
Bit 0- Bit 3: Head Settling Time agam or the data transfer error bit (bit 0 of STRB) Will be set
The head settling time IS used to generate a delay after the For read operations, transfer request IS reset by a read of the
head IS placed In contact With the disk. ThiS allows the head DIR
4-435
MC6843
Before a data transfer macro command (SSW, SWD, Bit 3: Sector Address Undetected
SSR, RCR, MSW, MSRI,s Issued, the address of the sector The sector address bit can be set on two conditions, not
on which the operation IS to be performed must be written fmdlng the sector address and a CRC error on an address ID
Into the SAR The address In the sector address byte of an field.
Address ID field of the disk IS compared With the contents of If the disk makes three revolutions dUring an address
the SAR. Dunng an MSWor MSR command, the SAR IS In- search operation and the sector address speCified In the sec-
cremented after each sector IS read or wntten When execu- tor address register IS not found m any of the address ID
tion IS complete, the SAR contains the address of the last fle'ds, a sector address undetected condition IS mdlcated
sector on which an operation was performed plus one At A CRC error that occurs on an address ID field Will set bit 3
the completion of an STZ or SEK command, SAR IS cleared also. Table 6 shows how bits 1 and 3 are related
4·436
MC6843
II
continues until Shift CRC leCR bit 1) IS set
Bit 5: File Inoperable For an FFR command, CRC Enable IS set by software and
CRC generation takes effect on the next data read from DIR
The state of the File Inoperable Input appears In bit 5 If
The calculation continues for all data bytes read from DIR
the File Inoperable Input is a '1', a pulse of Width l/f (where
until CRC Enable IS reset The bytes read prevIous to reset-
f = Frequency of the clock Input) IS Issued on the FIR output
ting CRC Enable are conSidered the CRC Information bytes
when STRB IS read. FilS not latched but the Input IS gat~d to
and the CRC check IS made agamst them.
the bus when STRB IS read.
Bit 1: Shift CRC
Bit 6: Write Error
Bit 1 IS valid only tor the FFW command After setting, It
If the WPT Input becomes a high leveillogic '1') dUring the
takes effect on the next transfer of data from DOR to DOSR
execution of a write command the write error bit IS set.
(see Figure 26), Setting Shift CRC terminates the CRC
calculation and causes the CRC calculated on all the data
Bit 7: Hard Error
written Into DOR up to the setting of bit 1, to be shifted out
If the Ready input becomes a '0' during the operation of a the WDT output The CRC calculation Will not Include any
command (Busy IS set), a hard error indication will result data written to DOR after Shift CRC IS set
The GCR contains the destinatIOn track address for the When a read or write macro command (SSW, SWD,
R/W head on an SEK Macro Command. The contents of the SSR, RCR, MSW, MSR) IS Issued, the address of the track
GCR are transferred to the CT AR at the end of the SEK on which the operation IS to be performed must be written
Command. For multi-sector read or write operations IMSR, Into the LTAR The address In the track address byte of an
MSW), the GCR contains the number of sectors to be read Address ID field of the disk IS compared With the contents of
minus one DUring the MSR or MSW execution the GCR IS the LTAR The contents of LTAR are not affected by the ex-
decremented after each sector IS read or written. ecution of any of the commands
4-437
Read Data Read Data
•
FIGURE 25 - CCR CONTROL REGISTER TIMING FOR AN FFR COMMAND (READ)
Read Data Read Data CRC
3:
~
CRC' Read Data
Read Data Enable Byte 1 from Byte 2 from Byte n-1 from Byte n from E'lable Byte n+1
Byte 0 from Set DIR DIR DIR DIR Reset from DIA
DIR (CCRO=lI (Data 1) (Data 2) (Data n-1) (Data nJ ICCRO=O) (Data n+1)
DCK (Data
Clock Input)
Load Signal
from OISR
to DIR
DTR
CAG Enable
(CCRO)
CRC
valid
OISR Data 2
DIR Data 1 Data n+1
ShIft
Clock
Load signal
from DOR
to DaSA
STRAO
IDTR)
CCRO
(CRC Enable) ~
7s~7f:CRC) \\ 111-1-------t---'
CRG valid _ _ _ _ _ _~----'
DOR
DOSR
T
Data 0
T T21r--_-_--_··_--L
Data 1
l _________
Data .L_ _~~~_ _ _.L_ __=..::..:::_.:.:..._.:.:..._ _ C::::.:
WDT
Output II ----. - I ,--'_.
The CRG Calculation Includes Data Byte 1 through Data Byte n-1
MC6843
I Hex
Reuister.1 Address
R/W
Mode
Data Bits
Bit 7
Function
B.t6
ISR3
B.t 5
OMA
81t4 B.t 3
.I B.t2
. B.t 1
. Bit 0
.
CMR 2 WO Interrupt Interrupt FWF Macro Command
Flag
Mask Mask
•
Status it Settling .. Macro II-
STRA RO
Bit 7
Busy
. Bit 6 Bit 5
Track ..
B.t4
Write
B.t 3
Track
Bit 2
Onve
B.t 1
Delete ..
81tO
D8t8
1 ranster
3 Index Not 08t8 Mark
Protect Zero Ready
Equal Detected Requelt
STRB 4 RO
B.t 7
Hard
. Bit 6
Write
. Bit 5
File
B.t4
Seek
. B.t3
Sector
Address
it
Bit 2
Data
Mark
. Bit 1
CRC
. BitO
Data
.
Error Error Inoperable Error Error Transfer
Undetected Undetected
MACRO COMMANDS
Hex Code Instruction Hex Code Instruction
2 STZ A FFR
3 SEK B FFW
4 SSR C MSR
5 SSW 0 MSW
6 RCR
7 SWD
4-439
MC6843
TABLE 8
Table 8 IS a list of all error flags showing what conditions will cause the error,
the instructions for which they are valid, and what conditions reset them.
I
During a STZ command, the TKZ Input remams low Reading of STRB
after 83 pulses have been Issued on the STP output
FI STRB5 File Inoperable Input IS high Readmg STR B causes the SSW, SWD, MSW,
FIR output to go High This FFW
should reset the F I Input
Wrl'~e Error STRB6 The WPT Input IS high, and a write opecatlOn Reading of STRB with SSW, SWD, MSW,
IS executed either WGT or WPT reset, FFW
Hard Error STRB7 DUring the executl01 of command (Busy IS 1) the Reading of STRB All commands
ROY Input becomes low.
4-440
MC6844
® MOTOROLA
(1.0 MHz)
MC68A44
MC68844
(1.5 MHz)
(2.0 MHz)
~ SSUFFIX
The mode of transfer for each channel can be programmed as one of
two Single-byte transfer modes or a burst transfer mode.
TYPical MC6844 applications are a Floppy Disk Controller IFDCI and
•
, " , CERDIP PACKAGE
an Advanced Data Link Controller IADLC) DMA Interface I ' CASE 734
MC6844 features Include
~~"'''"
• Four DMA Channels, Each HaVing a 16-Blt Address Register and
a 16-Blt Byte Count Register
• 2 M Byte/Sec MaXimum Data Transfer Rate
• Selection of Fixed or Rotating PriOrity Service Control 1.. : (PLASTIC)
Vss E
CS/Tx AKB 39 RffiT
R/VII 38 OGRNT
FIGURE I - M6800 MICROCOMPUTER FAMtL Y AD 37 ORal
BLOCK DIAGRAM
Al OR02
I M,e.oproeassor I A2
A3
Tx AKA
lXS'!'B
A4 TRQ/OENO
~
Read Only
Memory
Random
I A5
A6
Tx ROO
Tx ROI
A7 Tx R02
~ I
Access
fvlemory AB 12 Tx R03
A9 13 00
Peripheral
H Controller
J AID
All
14
15
01
02
,I
H MC6844
D.-rect
Memory Access
A12
A13
16
17
03
04
A14 18 05
Address Data A15 19 06
Bus Bus
Vee 20 07
4-441
• 3:
R/W
FIGURE 2 -
AO-A4
BLOCK DIAGRAM OF DMAC
A5-A15 DO-D7 i
3:
Address Address ~
b-rt 'r
Data Bus
r+
Bus
Control
Bus
Bulter
Bus
Buffer
Buffer
J ~•
~
IAQ/
3:
f-+- ROtDEND
r--- ~
Control
~
CSIT
~ f- ....
Aeglster
L t
.t.
MPX Select Address Latco
.... ,.-
_0
Addreso Byte Count
increment/ Decrementer Decrementer
~
n 3
~
I-- Address
#0 H
I L Register _____
#0 H .1 _____
L
DAQ1 - ;'-H---:-- -"L--- 116x41 #1 H I L
DGANT
DRQ2
DRQ
Control
------t--------
#2 H I L
------"-------
I
--'"
r
-----+-----
r-_.!2_H__ ~ +__ __
r-- #3 H L
Channel
Control
#3 H L
--PCA 151
-----
ICR 151
-----
-DCA
Control
Register Pnorlty
Control
~
I+-
t:: ~
Tx AK f.-.-
~ Encoder~ Tx AKA
Tx STB
~'---
--
141
fJ
RESET
Vec
VSS ITx AKBI
~
~----------
MC6844-MC68A44- MC68B44
MAXIMUM RATINGS
Rating Symbol Value Unit This device contains Circuitry to protect the
Inputs against damage due to high statiC
Supply Voltage VCC· -03to +70 V
voltages or electnc fields, however, It IS ad-
Input Voltage Y,n -03to +70 V vised that normal precautions be taken to
Operating Temperature Range lL to TH aVOId application of any voltage higher than
MC6844, MC68A44, MC68B44 TA o to + 70 'c maximum rated voltages to thiS hlgh-
MC6844C, M C68A44C -40 to +85 Impedance Circuit Reliability of operation IS
Storage Temperature Range Tstg -55to +150 'c enhanced If unused Inputs are tied to an ap-
propriate logic voltage level (e 9 , either V S S
or VCCI
THERMAL CHARACTERISTICS
Characteristic Symbol Value Unit
Thermal Resistance
PlastiC 100
6JA 'C/W
Ceramic 50
Cerdlp 60
POWER CONSIDERATIONS
•
The average chip-Junction temperature, T J, In 'C can be obtained from
TJ=TA+(POoOJA) (1)
Where,
T A = Ambient Temperature, 'C
OJA'" Package Thermal ReSistance, Junctlon-to-Amblent. °C/W
PD= PINT+ PPORT
PINT= ICC x VCe. Watts - Chip Internal Power
PPORT = Port Power DISSipation, Watts - User Determined
For most applicatIOns PPORT<C PINT and can be neglected PPORT may become significant If the deVice IS configured to
drive Oarllngton bases or Sink LED loads
An approximate relationship between PD and T J (,f PPORT IS neglected) IS
Po = K - (T J + 273°C) (2)
Solving equations 1 and 2 for K gives
K = PDon A + 273°CI+OJAoP 0 2 (3)
Where K IS a constant pertaining to the particular part K can be determined from equation 3 by measuring PD (at eqUilibrium)
for a known T A USing thiS value of K the values of Po and T J can be obtained by solving equations (1) and (2) IteratIVely for any
value of T A
4·443
MC6844·MC68A44·MC68B44
R/VV,Addre$----rt~~~~~~~~--------~~~~--_l~------------------------------------tl~7\~
(Non-Muxed)
cs
Note 7 __--1'-+-/
Wnte Data
Non-Muxed _---1+_~
NOTES
1 Voltage levels shown are VLSO 4 V, VH2:2 4 V, unless otherwise specified
2 Measurement POints shown are 0 8 V and 2 0 V, unless otherwIse specified
4·444
MC6844- MC68A44-MC68B44
----MPU - _ _ _~
.. I Dead I-- DMA--i Dead !--MPU--
Stretched
E
(MPU) ___ -'
,r--\\. __ ...Jt--\ ~ ________________________ ...J
,,-\\
E
(DMAC)
Tx RQ
DRQ1
DGRNT
Tx STB
•
Tx AKA
AO-A4. RiVii'
IInput)
IRQ/DEND
___ ______ ~----_--J
T
IRO DEND
OJ CS Open Collector Input
CD Tx AK B Output
4·445
MC6844- MC68A44- MC68B44
Tx RO
DR02
• DGRNT
Tx STB
Tx AKA
CS/Tx AKB W
AO-A15, R/W
IOutput)
AO-A4, R/W
!Input}
\
----------=---------------i-J ,
IRO tDED2~ ~ tDEDl t--
OJ CS Open Collector Input DEND lAO
4·446
3:
I
3:
Tx AQ
~to
DRQ2
:t
DGRNT
Tx STB
J:>.
.io. Tx AKA
J:>.
......
Cs/Tx AK8
AO-A15, R/W
(Output}
II
MC6844-MC68A44-MC68B44
Tx RO Hold Time
E RIsing Edge tTOHl 20 - 10 - 10 - ns
E Failing Edge tTOH2 20 - 10 - 10 -
•
E RISing Edge tTKDl - 400 - 310 - 250 ns
DG RNT RISing Edge !TKn? - 190 - 160 - 145
IRO/DEND Delay Time
E Failing Edge tDEDl - 300 - 250 - 230 ns
DGRNT RISing Edge tDED2 - 190 - 160 - 145
Tx STS Output Delay Time tTD - 270 - 180 - 150 ns
Tx STS Output Hold Time lTH - 20 - 20 - 20 ns
50 V r --------------,
I Vee I
25 k
01
: ~IIC"
02 I I
e A 03
I TxAKB r
04 I I
I Vm = DC Ampere
Meter
I
Test Pm C = pF R -kn I
I Enable Vss
00-07 130 11 7
I cs Input
AO-A15, R/W 90 165
I' - _ _ _ _ _ _ _ _ _ _ _ _ -1
CS/Tx AKB 50 24
Others 30 24
4-448
MC6844. MC68A44.MC68B44
•
Each channel can be initialized for one of three transfer are Intended to be used In applications requiring the MPU to
modes Mode 1, Mode 2, or Mode 3. Two read-only status regain control of the bus after each byte transfer Timing In-
bits In the channel control register indicate when the channel formation for modes 1 and 2 IS presented In Figures 4 and 5
IS busy transferring a block of data and when the DMA Mode 3 IS a block transfer mode In which the DMAC re-
transfer of a block of data IS complete tains control of the bus until the last byte of the DMA data
The pnonty control register, the Interrupt control register, block has been transferred Ibyte control register 0), If
and the data chain registers must also be Initialized DGRNT remains asserted dUring the entire block transfer In
The pnonty control register enables/ disables each channel mode 3, byte transfers are pOSSible at the DMAC clock fre-
and determines whether channel service requests are servIc- quency by asserting Tx RO each cycle ThiS mode offers the
ed In a fixed or a rotating pnonty The Interrupt control highest DMA transfer rate Mode 3 timing IS presented In
register controls assertion of IRO Interrupt by each channel Figure 6
at the end of a data block transfer and sets a flag when IR0 IS A flowchart of DMAC operation In each mode IS presented
asserted The data chain register controls selection of two or In Figure 9
four channel operation, selection of data chaining operation,
and the channel to be updated In the data chaining mode FUNCTIONAL PIN DESCRIPTIONS
When data chaining IS enabled, the contents of the chan-
nel3 address and byte count registers are stored Into the cor- VCC AND VSS
responding registers of the channel selected for chaining VCC and VSS prOVide power to the DMAC The power
after the channel data block transfer IS completed This supply should prOVide +5 V ±5% to VCC VSS should be
feature allows for repetitively reading or wntlng a block of tied to ground Total power diSSipatIOn will not exceed Po
memory mililwatts
4·449
MC6844· MC68A44.MC68B44
Walt for Tx RQ
Input
Checked E . - r -
• Walt for
Tx RO
Input
CheckedE"t-
DMA Transfer
IAO-A15, Riw, Tx ST8,
Tx AKA/8 Output
Burst
Mode
4-450
MC6844· MC68A44. MC68B44
•
DATA DO-D7 T x STS IS asserted dUring each DMA transfer cycle and
These bidirectional TTL-compatible lines are used for data can be used as a transfer acknowledge for peripheral con-
transfer between the MPU and the DMAC These lines re- trollers and as a system VMA Tx STS IS a TTL-compatible
main In the high-Impedance state except when the MPU output
reads DMAC registers,
TRANSFER ACKNOWLEDGE A (Tx AKA)
INTERRUPT REQUEST/DMA END (lRO/DEND) Transfer Acknowledge A IS asserted dUring DMA opera-
tion and can be used With Tx AKB to Identify the DMA chan-
Interrupt Request/ DMA End IS a TTL-compatible, tlme-
nel being serviced, as shown In Table 1
multiplexed, active low output used to Interrupt the MPU
and Signal a peripheral controller when a DMAC data bl0ck
CHIP SELECT/TRANSFER ACKNOWLEDGE B
transfer has ended DEND IS asserted dUring the transfer of
(<:S/Tx AKB)
the last data byte of a block transfer for one E clock cycle
(see Figures 4, 5, and 6), IRQ IS asserted after the last byte ThiS bidirectional Pin serves two functions DUring MPU
transfer of a block transfer If enabled by setting the proper operation It IS a chip-select Input which when asserted allows
DEND IRQ enable bit In~e Interrupt control register (see MPU access to the DMAC registers DUring DMA transfers
Table 2) Once asserted, IRQ IS negated by reading the chan- thiS pin IS for Tx AKB output, used With Tx AKA to Identify
nel control register of the channel asserting the Interrupt the DMA channel being serviced (see Table 1)
4-451
MC6844· MC68A44. MC68B44
Register
Address High
Channel
0
Address
I Hex)
0
bytes to be transferred by a channel before the channel
begins DMA The byte count register IS decremented at the
beginning of a DMA cycle
Address Low 0 1
CHANNEL CONTROL REGISTERS
Byte Count High 0 2 A channel control register associated With each channel IS
used to control the channel mode of operation, the state of
Byte Count Low 0 3
the R/W line dUring DMA, and whether the channel address
Address High 1 4
register Will Increment or decrement after each DMA cycle
Address Low 1 5 The channel control registers contain two read-only status
Byte Count High 1 6 flags which report the status of the channel The channel
Byte Count Low 1 7 control register bits are defined as follows
Address High 2 8 Bit 0 R/W Read/Write The direction of DMA transfer IS
Address Low 2 9 determined by the state of thiS bit When thiS
Byte Count High 2 A bit IS a "1", R/W Will be asserted high by the
B'/Ie Count Low 2 B
DMAC dUring DMA, and memory Will be read
by the peripheral controller When thiS bit IS a
Address High 3 C
"0", R/W Will be asserted low by the DMAC
Address Low 3 D dUring DMA and data transfer Will be from the
Byte Count High 3 E peripheral controller to memory
Byte Count Low 3 F Bit 1 MCB Mode Control B ThiS bit IS used to select the
channel DMA mode When thiS bit IS a "1",
mode 3 operation IS selected When thiS bit IS
address bus dUring the next DMA cycle of the channel After clear, either mode 1 or mode 2 operation IS
each DMA byte transfer, the address register Will Increment selected according to the state of channel con-
or decrement according to the state of bit 3 of the ap- trol register bit 2 Table 4 shows the DMA
propriate channel control register The starting address of a mode options.
DMA data block should be stored In the address register of a
channel to be used before beginning DMA operation With
TABLE 4 - DMA MODE SELECT
the channel
MCA MCB DMA Transfer Mode
0 0 Mode 2
BYTE COUNT REGISTERS 0 1 Mode 3
Each channel has a 16-blt byte count register which stores 1 0 Mode 1
the number of DMA cycles remaining In a channel DMA 1 1 Undefined
block. ThiS register should be loaded With the number of
MC6844-MC68A44-MC68844
Bit 2 MCA Mode Control A. This bit IS used with MCB to INTERRUPT CONTROL REGISTER
select the channel DMA mode. When MCB IS The Interrupt control register allows the user to selectIVely
set, this bit must be clear and mode 3 opera- enable each channel IRQ Interrupt When enabled, an IRQ IS
tion IS selected Setting both MCA and MCB generated when a DMA block transfer IS complete The in-
to a "1" places the DMAC Into an undefined terrupt control register also has a flag to indicate that the
mode of operation With MCB clear, setting DMAC IRQ IS asserted Interrupt control register bits are
M CA to a "1" places the channel Into mode 1 defined as follows·
and clearing MCA places the channel Into Bits 0-3 DIEO-3 DEND IRQ Enable These bits enable in-
mode 2 (see Table 21. diVidual channel IRQ Interrupts when set to
Bit 3 Address Up/ Down Bit 3 controls address "1", and mask these Interrupts when
register Increment/decrement dUring DMA If cleared The register bit number IS the same
this bit IS set to a "1", the address register in- as the channel number controlled by the
crements with each DMA cycle, If It IS clear, bit. An IRQ IS asserted only when a DMA
the address register decrements with each block transfer IS completed
DMA cycle Bits 4-6 Not used
Bits 4-5 Not used Bit 7 DEND IRQ Flag ThiS read-only bit IS set to
Bit 6 Busy/Ready Flag The Busy/Ready flag IS a "1" when the DMAC IRQ IS asserted, in-
read-only status bit that ,nd,cates a DMA block dicating the end of a channel block transfer
transfer IS In progress In the channel. After In-
•
IDEND assertion) With Interrupt enabled
ItialiZing the channel for a block transfer (ad- ThiS flag IS cleared and IRQ IS negated by a
dress register, byte count register, etc ), thiS read of the channel control register of the
flag sets when T x RQ IS recognized and clears channel causing the IRQ Interrupt.
dUring the last block byte transfer
Bit 7 DEND DMA End Flag IDEND) The DEND flag IS used DATA CHAIN REGISTER
to indicate when a DMA transfer IS complete. Repetitive reading or writing of a block of memory can
ThiS flag IS set dUring the transfer of the last best be performed uSing the data chain function ThiS func-
byte of a DMA block and IS cleared by reading tion transfers the contents of the channel 3 address and byte
the channel control register ThiS flag will count registers Into the respective registers of the channel
generate an IRQ Interrupt If enabled In the In- selected for data chaining These contents are transferred
terrupt control register dUring the E cycle follOWing the transfer of the last byte of a
block by the selected channel The data chain register IS
PRIORITY CONTROL REGISTER defined as follows·
The Prlonty Control Register IS used to IndiVidually enable Bit 0 DCE Data Chain Enable Data chaining IS en-
each DMA channel and to select the channel service priority abled when thiS bit IS set to a "1" When
scheme, With bits defined as follows thiS bit IS clear, data chaining IS disabled
Bits 0-3 REO-3 Request Enable 0-3 Each DMA channel IS In- Bit 1-2 DCA/ B Data Chain Select A, B The state of these
diVidually enabled by setting the appropriate two bits determine which channel Will be
RE bit (R EO for channel 0 etc) In the PriOrity updated when data chaining IS enabled, as
control register A clear channel RE bit 10- listed In Table 5
hlblts recognition of Tx RQ for the channel Two/Four Channel Select The DMAC Will
Bits 4-6 Not used operate With either two channels or four
Bit 7 Rotate Control One of two channel service channels, depending on the state of thiS
Priority schemes can be selected by bit 7 bit When thiS bit IS set to a "1", the four-
When thiS bit IS "0", the fixed Priority of ser- channel mode IS selected, and all four chan-
vIcing IS selected In which channel 0 has nels are selectable When thiS bit IS clear,
highest PriOrity, channel 1 has the next the two-channel mode IS selected and only
highest PriOrity, channel 2 the next highest channels 0 and 1 are selectable
PriOrity, and channel 3 the last Priority When Bits 4-7 Not used
thiS bit IS set to a "1", the rotating PriOrity of
servIcing IS selected. Rotating priority IS In-
TABLE 5 - CHANNEL SELECT
Itially the same as fixed PriOrity, In that the
lower numbered channels Initially have the DCB Bit 2 DCA Bit 1 Channel #
higher pmoltles However, once a channel IS 0 0 0
serviced In the rotating PriOrity mode, that 0 1 1
channel IS given last Priority of servIcing In 1 0 2
thiS scheme the channel last serviced gets 1 1 Undefined
the last priority
4-453
MC6844· MC68A44.MC68844
•
drive contention
DGRNT DEND 0
DGRNT
DEND 0 DEND 1
>>---~----- Tx AK a
~~r----"TxAKO
TxAKA NC ~~~---~TxAKl
TxAKA
CS/Tx AKB
DGANT
IRO/OEND
TxSTBr-------;---,
TxAKAr------;--; ~>--~--+---+---+---TxAKO
)c~--~~--r---r--TxAKl
CS/Tx AKB r--.---;--;A 1 ~ _ _ _ _ _ _ _ ___ ~ ~r-_TxAK2
Collectorl
cs
4-454
MC6844-MC68A44-MC68B44
MC68000 BUS ARBITRATION INTERFACE DUring mode 2 or 3 DMA operation, the clock generator
Figure 11 shows an MC6844/ MC68000 Interface for has no control over DMA Grant To prevent DMA operation
DMAC mode 2 or mode 3 operation. The MC68000 Advanc- In mode 1 dunng a memory refresh cycle, system E
ed Information Data Sheet should be consulted for complete must be gated With refresh grant DGRNT must be the
understanding of the circuit ORed output of bus available IBA) and DMA grant from
The MC6844 must be Initialized for transfer mode, byte the clock generator In order to support all 3 DMA modes of
count, DMA starting address, etc. operation
Initially DGRNT IS low, BGACK output IS high, and Tx DUring the DMA cycle, a system VMA Signal must be
STB IS high. The MC6844 responds to a Tx RQ by asserting generated by the DMAC ThiS IS done by ORlng Tx STB and
DRQH Assertion of Tx RQ also asserts MC68000 BR For the MPU VMA line
DMA transfer, two conditIOns must be met· 1) DMAC DRQH
must be asserted and 2) all bus masters must relinqUish the MC6844/MC6809 BUS ARBITRATION INTERFACE
system bus Once DRQH IS asserted It remains asserted low An MC6844/MC6809 Interface IS presented In Figure 13
until DMA byte transfer In the halt-steal mode or until the last ThiS CIrCUit ensures that MC6809 DMA/BREQ IS asserted
byte of a DMA memory block IS being transferred In the halt- only dUring Q high, an MC6809 requirement The CIrCUit Will
burst mode A relinqUishing of the bus by all bus masters IS also generate a system VMA Ivalld memory address), often
Indicated by negated BGACK, AS, and DTACK after the referred to as DMA VMA
M C68000 asserts BG In response to a bus request The MC6809 does not generate a VMA output since the
When both conditions are met, the NAND flip-flop IS set only Invalid address asserted by the MPU IS $FFFF With R/W
by assertion of LSl38 03, asserting DGRNT and BGACK asserted high Therefore, an MC6809 system does not nor-
•
The DMAC then performs a byte transfer In the halt-steal mally need a VMA CIrCUit When uSing the MC6844 for DMA
mode or a block of byte transfers In the halt-burst mode In an MC6809 system, however, a VMA CIrCUit IS reqUired
The NAND flip-flop IS cleared on the rising edge of Tx STB Since the address lines are floating dunng dead cycles bet-
after asserting dUring each DMA cycle In the halt-steal ween the MPU and DMA modes DeVices on the bus must
mode, and dUring the last DMA cycle of a DMA block In the be deselected dUring thiS time
halt-burst mode Isee MC6844 timing diagrams) Initially, In the MPU mode, DRQ1/2 IS negated Ihlgh
Note that BR to the MC68000 IS negated when BGACK IS level), and the Q output of U3 IS high The output of the ex-
asserted, satisfYing an MC68000 reqUIrement clUSive OR gate U4 IS therefore a low, Inhibiting clocking of
U3 by forCing the output of U5 to remain a low. When
MC6800 BUS ARBITRATION INTERFACE DRQ1/2,s asserted low, the output of U4 changes to a high
A tYPical system deSign, uSing the MC6800/MC6844, IS If the MC6809 Q output IS high at thiS time, the output of U5
shown In Figure 12 A clock generator/driver IS used which changes to a high, clocking U3 If the MC6809 Q output IS
Will stretch the MPU clock dUring DMA operation While low at thiS time, the output of U5 Will be driven high on the
generating a non-stretched clock for system memory PriOri- next rising edge of Q, clocking U3 When U3 IS clocked, the
ty logiC IS used to give highest Priority to refresh request, Q output of U3 changes to a low asserting MC6809
since memory refresh and DMA transfers must not occur DMA/BREQ. The output of U4 at thiS time IS a low, since
dunng the same E cycles both of the U4 Inputs are low
MC68000
BG~-r---I
AS~-r---I MC6844
DT ACK 1--1---1
BGACK f--<...-+---l
1-----1--\-~------~DGRNT
5V
BGACK
(Open Collector
Bufferl
4-455
MC6844-MC68A44-MC68844
System
Signals
Address Bus ~ A
Data Bus
R/W
MC6800
VMA
-p- DMAC
Signals
Tx STB
r-~
IRO
HALT DR02
BA
) DGRNT
TSC
L:
<l>lJ t E
• -
MEM ClK
Clock ---
Ref RO
-
Generator/
Driver
DMA/Ref Req
DMA GNT
DMA RO
Priority
-
.. DR01
Logic
BS
System VMA
BA DGRNT
UI
System E
ClK
CLR System RESET
RESET RESI'T
DMAtBREO
DROl/2
o
MC6809 MC6844
After the DMA transfer, DROl/2 IS negated by the high, Indicating that the address on the system address bus
MC6844, forcing the output of U4 to a high Once again, U3 IS invalid dUring this dead cycle between MPU and DMA
will be clocked only when the MC6809 0 output IS high modes. On the next failing edge of E, Ul IS clocked high
VMA IS generated by Ul and U2 Initially, In the MPU forcing the output of U2 low dUring this DMA cycle When
mode, Ul IS clear, With a low 0 output The BA (bus BA IS negated after DMA, the output of U2 IS forced high un-
avallablel output of the MC6809 IS also a low Therefore, the til the next failing edge of E, Indicating Invalid address dUring
output of U2 (VMAI IS low (VMA asserted I When the this dead cycle
MC6809 asserts BA for DMA, the output of U2 becomes
4·456
MC6845 MC6845*1
®
(1.0 MHz) (1.0 MHz)
MC68A45 MC68A45*1
MOTOROL.A (1.5 MHz) (1.5 MHz)
MC68B45 MC68B45*1
(2.0 MHz) (2.0 MHz)
• Single + 5 V Supply
~''"''''
• M6800 Compatible Bus Interface
• TTL-Compatible Inputs and Outputs
.' I, " c '. l I. CERDIP PACKAGE
• Start Address Register Provides Hardware Scroll (by Page, Line, or
•
I I I ' I ,l C CASE 734
Character) I I'
~
• Programmable Cursor Register Allows Control of Cursor Format
and Blink Rate
• Light Pen Register " """, P SUFFIX
• Refresh (Screen) Memory May be Multiplexed Between the CRTC - , : - - -' PLASTIC PACKAGE
CASE 711
and the MPU Thus Removing the Requirements for Line Buffers or
External DM A Devices
'* - Package SuffiX
• Programmable Interlace or Non-Interlace Scan Modes
• 14-Blt Refresh Address Allows Up to 16K of Refresh Memory for
FIGURE 1 - PIN ASSIGNMENTS
Use In Character or Semi-GraphiC Displays
• 5-Blt Row Address Allows Up to 32 Scan-Line Character Blocks GNO VS
• By Utilizing Both the Refresh Addresses and the Row Addresses, RESET HS
a 512K Address Space IS Available for Use In GraphiCS Systems
RAO
• Refresh Addresses are ProVided DUring Retrace, AllOWing the CRTC
to Provide Row Addresses to Refresh Dynamic RAMs RAl
• Programmable Skew for Cursor and Display Enable IDE) MAl RA2
• Pin Compatible with the MC6B35 MA2 RA3
MA3 RA4
MAXIMUM RATINGS
Rating Symbol Value Umt MA4 00
Supply Voltage VCC' -03 to + 70 V MA5 01
Input Voltage Vm * -03 to + 70 V MA6 10 02
Operating Temperature Range Tl to TH MA7 11 03
M C6845, M C68A45, M C68845 TA o to 70 'c
MC6845C, MC68A45C, MC68845C -40 to +85 MAS 12 04
Storage Temperature Range TstQ - 55 to + 150 'c MA9 13 05
MAlO 14 06
THERMAL CHARACTERISTICS
Characteristic Symbol Value Rating MAll 15 07
Thermal Resistance MAI2 16 CS
PlastiC Package 100
8JA 'C/W MA13 17 RS
Cerdlp Package 50
Ceramic Package 50 OE 18
-ThiS device contains circuitry to protect the Inputs against damage due to high CURSOR 19 R/Vii
static voltages or electnc fields, however, It IS adVised that normal precautions 20 ClK
VCC
be taken to aVOid applicatIon of any voltage higher than maximum rated voltages
to thiS hlgh~lmpedance Circuit For proper operation It IS recommended that Vin
and V out be constrained to the range VSssIV ,n or VoutlsVCC
4-457
MC6846-MC6845* 1-MC68A45-MC68A45 * 1-MC68845-MC68845* 1
~~~---------'---------------------------------+AB
Cursor,
Display
Enable
Row Addresses
•
4
HS VS
POWER CONSIDERATIONS
4·458
MC6845-MC6845* 1-MC68A45-MC68A45* 1-MC68B45-MC68B45* 1
DC ELECTRICAL CHARACTERISTICS IVcc -- 50 Vdc ± 10% VSS -- 0 T A -- 0 to 70'C unless otherlwse noted see Figures 3 51
Characteristic Symbol Min Typ Max Unit
Input High Voltage VIH 20 - VCC V
Input Low Voltage VIL -03 - 08 V
Input Leakage Current lin - 01 25 ~A
Three-State IV CC - 5 25 VI IV In - 0 4 to 2 4 VI ITSI -10 - 10 ~A
Output High Voltage
IILoad= - 205~AI 00-07 VDH 24 30 - V
IILoad= -l00~AI Other Outputs 24 30 -
Output Low Voltage II Load - 1 6 mAl VOL - 03 04 V
Internal Power DISSipation (Measured at TA-GoC) PINT - 600 750 mW
Input Capacitance 00-07 - - 125
C,n pF
All Others - - 10
Output Capacitance All Outputs Cout - - 10 pF
2 Pulse Width. E Low PWEL 430 9500 280 9500 210 9500 ns
3 Pulse Width. E High PWEH 450 9500 280 9500 220 9500 ns
•
4 Clock Rise and Fall Time tr.tf - 25 - 25 - 20 ns
9 Address Hold Time IRSI tAH 10 10 - 10 - ns
13 RS Setup Time Before E tAS 80 - 80 - 40 - ns
14 R/W and ~ Setup Time Before E tcs 80 - 80 - 40 - ns
15 R/W and ~ Hold Time tCH 10 - 10 - 10 - ns
18 Read Data Hold Time tDHR 20 50" 20 50" 20 50" ns
21 Write Data Hold Time tDHW 10 - 10 - 10 - ns
30 Peripheral Output Data Delay Time tDDR - 290 - 180 0 150 ns
31 Peripheral Input Data Setup Time tDSW 165 - 80 - 80 - ns
The data bus output buffers are no longer sourcing or sinking current by tOHR max (high Impedance)
FIGURE 3 - MC6845 BUS TIMING
~-------<D----~~
RS
R/W. cs
NOTES
1 Voltage levels shown are VLSO 4 V. VH,,2 4 V. unless otherwise specified
2 Measurement POints shown are 0 8 V and 2 0 V, unless otherwise specified
4-459
*
MC6845·MC6845 1·MC68A45.MC68A45 1.MC68845.MC68845 1 * *
50 V
C MM06150
or EqUlv
DE
HS
VS
CURSOR
NOTE Timing measurements are referenced to and from a low voltage of 0 8 volts and a high voltage of 2 0 volts unless otherwise noted
4·460
FIGURE 6 - CRTC-CLK, MAO-MA13, AND LPSTB TIMING
1 + - - - -1/fc - - - - - + I
CLK
MAO-MA13
LPSTB
tLPD2 l tLPDl
PWLPH
NOTE Timing measurements are referenced to and from a low voltage of 08 volts and a high voltage of 2 0 volts, unless otherWise noted
•
CRTC TIMING CHARACTERISTICS (Reference Figures 5 and 61
Characteristic Symbol Min Max Unit
M,nimum Clock Pulse Width, Low PWCL 160 - ns
Minimum Clock Pulse Width, High PWCH 200 - ns
Clock Frequency fe - 25 MHz
Rise and Fall Time for Clock Input t er , tcf - 20 ns
Memory Address Delay Time tMAD - 160 ns
Raster Address Delay Time tRAD - 160 ns
Display Timing Delay Time tDTO - 300 ns
HOrizontal Sync Delay Time tHSD - 300 ns
Vertical Sync Delay Time tVSD - 300 ns
Cursor Display Timing Delay Time tCDD - 300 ns
Light Pen Strobe Minimum Pulse Width PWLPH 100 - nS
Light Pen Strobe Disable Time tLPDl - 120 ns
tLPD2 - 0 ns
NOTE The light pen strobe must fall to low level before VS pulse rises
4·461
MC6846eMC6846* 1eMC68A46e MC68A46* 1eMC68B46e MC68B46 * 1
•
field I starts In the upper left hand corner; the second (odd number of approaches are pOSSible for solVing contentions
field) In the upper center. Both fields overlap as shown In for the refresh memory.
Figure B, thus InterlaCing the two fields Into a Single frame. 1 Processor always gets Priority (Generally, "hash" oc-
In order to display the characters on the CRT screen the curs as MPU and CRTC clocks are not synchrOnized.)
frames must be continually repeated. The data to be 2 Processor gets PriOrity access anytime, but can be
displayed IS stored In the refresh (screen) memory by the synchronized by an Interrupt to perform accesses only
M PU controlling the data processing system. The data IS dunng honzontal and vertical retrace times
usually wntten In ASCII code, so It cannot be directly
displayed as characters. A character generator ROM IS 3 Synchronize the processor with memory walt cycles
tYPically used to convert the ASCII codes Into the "dot" pat- (states)
tern for every character. 4 Synchronize the processor to the character rate as
The most common method of generating characters IS to shown In Figure 10 The M6800 processor family
create a matrix of dots "x" dots (columns) Wide and "y" dots works very well In thiS configuration as constant cycle
(rowsl high Each character IS created by selectively filling In lengths are present ThiS method proVides no
the dots As "x" and "y" get larger a more detailed character overhead for the processor as there IS never a conten-
may be created. Two common dot matrices are 5 x 7 and tion for a memory access. All accesses are
7 x 9 Many variations of these standards Will allow Chinese, transparent.
Japanese, or ArabiC letters Instead of English. Since The present version of the CRTC IS being upgraded to Im-
characters require some space between them, a character prove functionality. ThiS data sheet contains the information
block larger than the character IS typically used, as shown In deSCribing both the MC6845 (present CRTC) and the
Figure 9. The figure also shows the corresponding timing MC6845-tr1 (upgraded CRTC) Complete compatibility be-
and levels for a Video Signal that would generate the tween both versions IS maintained by programming aTI
characters. register bits, which are undefined/unused, In the MC6845
Refemng to Figure 2, the CRT controller generates the with zero's
refresh addresses (MAO-MA13I, row addresses (RA()"RA4),
4-462
FIGURE 8 - RASTER SCAN SYSTEM (INTERLACE)
FIGURE 9 -
~
2 4
CHARACTER DISPLAY ON THE SCREEN AND VIDEO SIGNAL
One Character
Clock
6 8
•
Character
4
} Display
6
One Lme
14 Scan
},,,.,-
Lines 8
10
12
14
4-463
FIGURE 10 - TRANSPARENT REFRESH MEMORY TABLE 1 - CRTC OPERATING MODE
CONFIGURATION TIMING USING M6800 FAMILY MPU
RESET LPSTB Operating Mode
0 0 Reset
0 1 Test Mode
1 0 Normal Mode
1 1 Normal Mode
PIN DESCRIPTION
II
PROCESSOR INTERFACE Vertical Sync (VS) and Horizontal Sync (HSI - These
The CRTC Interfaces to a processor bus on the bidirec- TTL-compatible outputs are active high signals which drive
tIOnal data bus 1D0-071 USIJ1g CS, RS, E, and R/W for con- the monitor directly or are fed to the Video processing Cir-
trol signals cUitry to generate a composite Video signal The VS signal
determines the vertical position of the displayed text while
Data Bus (00-071 - The bidirectional data lines 100-071 the H S signal determines the hOrizontal posItIOn of the
dllow data transfers between the Internal CRTC register file displayed text
and the processor Data bus output drivers are hlgh-
Impedance state until the processor performs a CRTC read Display Enable (DE) - ThiS TTL-compatible output IS an
operation active high signal which ,nd,cates the CRTC IS proViding ad-
dreSSing In the active display arpa
Enable (E) - The Enable signal IS a high-Impedance
TTL! MOS compatible Input which enables the data bus In- REFRESH MEMORY ICHARACTER GENERATOR
put/output buffers and clocks data to and from the CRTC ADDRESSING
ThiS signal IS usually derived from the processor clock The The CRTC proVides memory addresses IMAO-MA 131 to
hlgh-to-Iow transition IS the active edge scan the refresh RAM Row addresses IRAO-RA4) are also
proVided for use With character generator ROMs In a
Chip Select (CS) - The CS line IS B high-Impedance graphiCS system, both the memory addresses and the row
TTL/MOS compatible Input which selec!s the CRTC, when addresses would be used to scan the refresh RAM Both the
low, to read or write to the Internal register file ThiS signal memory addresses and the row addresses continue to run
should only be active when there IS a valid stable address be- dUring vertical retrace thus allOWing the CRTC to proVide the
Ing decoded from the processor refresh addresses reqUired to refresh dynamiC RAMs
Register Select (RS) - The RS line IS a high-Impedance Refresh Memory Addresses (MAO-MA 13) - These 14 out-
TTL!MOS compatible Input which selects either the address puts are used to refresh the CRT screen With pages of data
register IRS = "0") or one of the data register IRS = "1") or located Within a 16K block of refresh memory These outputs
the Internal register file are capable of driVing one standard TTL load and 30 pF
Read/Write (R/W) - The R/W line IS a high-Impedance Row Addresses (RAO-RA4) - These five outputs from the
TTL/MOS compatible Input which determines whether the Internal row address counter are used to address the
Internal register file gets written or read A write IS defined as character generator ROM These outputs are capable of driV-
a low level Ing one standard TTL load and 30 pF
CRT CONTROL
The CRTC provides hOrizontal sync IHS), vertical sync OTHER PINS
IVS), and display enable IDE) signals Cursor - ThiS TTL-compatible output ,nd,cates a valid
cursor address to external Video processing logiC It IS an ac-
NOTE tive high signal
Care should be exercised when interfaCing to CRT
monitors, as many monitors claiming to be "TTL com- Clock (ClK) - The ClK IS a TTL/MOS-compatlble Input
patible" have transistor Input CirCUitS which reqUire used to synchronize all CRT functions except for the pro-
the CRTC or TTL deVices buffering signals from the cessor Interface An external dot counter IS used to derive
CRTClvideo CIrCUitS to exceed the maximum-rated thiS signal which IS usually the character rate In an
drive currents alphanumeric CRT The active transition IS hlgh-to-Iow
4-464
Light Pen Strobe (LPSTB) - A low-to-hlgh transition on lei The control registers of the CRTC are not affected and
this high-Impedance TTUMOS-compatlble Input latches the remain unchanged
current Refresh Address In the light pen register The latch~ Functionality of RESET differs from that of other M6800
Ing of the refresh address IS Internally synchronized to the parts In the following functions
character clock IClK) la) The RESET Input and the lPSTB Input are encoded as
shown In Table 1
Vee. VSS These Inputs supply + 5 Vdc ± 5% to the
Ib) After RESET has gone low and IlPSTB~"O"), MAO-
CRTC.
MA 13 and RAO~RA4 Will be driven Iowan the failing
edge of ClK RESET must remain low for at least one
RESET - The RESET Input IS used to reset the CRTC A
cycle of the character clock IClK)
low level on the RESET Input forces the CRTC Into the
following state lei The CRTC resumes the display operation Immediately
after the release of RESET DE IS not active until after
la) All counters In the CRTC are cleared and the deVice
the first VS pulse occurs
stops the display operation
Ib) All the outputs are driven low
CRTC DESCRIPTION
(Figure 11 CRTC Block Diagram)
The CRTC consists of programmable hOrizontal and ver- register The contents of the light pen register are subse-
tical timing generators, programmable linear address quently read by the processor
•
register, programmable cursor logiC, light pen capture Internal CRTC registers are programmed by the processor
register, and control circuitry for Interface to a processor through the data bus, 00-07, and the control Signals -
bus Riw, CS, RS, and E
All CRTC timing IS derived from ClK, usually the output of
an external dot rate counter COinCidence I CO) CIrCUitS con-
tinuously compare counter contents to the contents of the
programmable register file, RO-R17 For hOrizontal timing REGISTER FILE DESCRIPTIONS
generation, compansons result In 1) hOrizontal sync pulse
IHSI of a frequency, POSition, and Width determined by the The nineteen registers of the CRTC may be accessed
registers, 2) hOrizontal display Signal of a frequency, position, through the data bus Only two memory locations are re-
and duration determined by the registers qUired as one location IS used as a pOinter to address one of
The hOrizontal counter produces H ciock which drives the the remaining eighteen registers These eighteen registers
scan line counter and vertical contlol The contents of the control hOrIZontal timing, vertical timing, Interlace operation,
Raster Counter are continuously compared to the maximum row address operation, and define the cursor, cursor ad-
scan line address register A COinCidence resets the raster dress, start address, and light pen register The register ad-
counter and ciocks the vertical counter dresses and sizes are shown In Table 2
Comparisons of vertical counter contents and vertical
registers result In 1) vertical sync pulse IVSI of a frequency, ADDRESS REGISTER
Width and position determined by the registers, 2) vertical The address register IS a 5-blt write-only register used as
display of a frequency and position determined by the an "lndlrect"or "pointer" register It contains the address of
registers one of the other eighteen registers When both RS and CS
The vertical control logiC has other functions are low, the address register IS selected When CS IS low and
1 Generate row selects, RAO-RA4, from the raster count RS IS high, the register pOinted to by the address register IS
for the corresponding Interlace or non-Interlace selected
modes
TIMING REGISTERS RO-RS
2 Extend the number of scan lines ,n the vertical total by Figure 12 shows the VISible display area of a typical CRT
the amount programmed In the vertical total adjust
mOnitor giving the pOint of reference for hOrizontal registers
register
as the left most displayed character position HOrizontal
The linear address generator IS driven by ClK and locates registers are programmed In character clock time Units With
the relative positions of characters In memory With their POSI- lespect to the reference as shown In Fll)ure 13 The pOint of
tions on the screen Fourteen lines, MAO~MA 13, are reference for the vertical registers IS the top character POSI-
available for addreSSing up to four pages of 4K characters, 8 tion displayed Vertical registers are programmed In
pages of 2K characters, etc. USing the start ~ddress register, scan line times With respect to the reference as shown In
hardware scrolling through 16K characters IS pOSSible The Figure 14
linear address generator repeates the same sequence of ad-
dresses for each scan line of a character row Horizontal Total Register (RO) - ThiS 8-blt wnte~only
The cursor logiC determines the cursor location, Size, and register determines the hOrizontal sync IHSI frequency by
blink rate on the screen All are programmable defining the H S period In character times It IS the total of the
The light pen strobe gOing high causes the current con- displayed characters plus the non-displayed character times
tents of the address counter to be latched In the light pen I retrace I min us one
4·465
*
MC6845·MC6845 1·MC68A45. MC68A45 1.MC68B45.MC68B45 1 * *
cLK-r------<r-t
DE
HS
Q~--------~-+4--~~~HS
• H
HH
~:::::::f::::~::::~>(:J~~:Jf-----------~+----+-~CURSDR
t+-------+- LPSTB
4·466
TABLE 2 - CRTC INTERNAL REGISTER ASSIGNMENT
(Features of the MC6840-1 have 1 subscriptl
cs RS
4
Address Register
3 2 1 0 ,
Register
Register File
Program
Unit
Read Write
7 6 5
Number of Bits
4 3 2 1 0
X X X X X X - - - - ""-... ........... ""-... ""-...
1
0
0
0
1
X
0
X
0
X
0
X
X
0
X
0
AR
RO
Address Register
HOrizontal Total
-
Char
No
No
Yes
Yes
...........
~ '-.., "'" ."'-
...........
"'"
0 1 0 0 0 0 1 R1 Honzontal Displayed Char No Yes
0 1 0 0 0 1 0 R2 H Sync Position Char No Yes
0 1 0 0 0 1 1 R3 Sync Width - No Yes V1 V1 V1 VI H H H H
0 1 0 0 1 0 0 R4 Vertical Total Char Row No Yes ~
0 1 0 0 1 0 1 R5 V Total Adlust Scan Line No Yes ~ 1'-.., 1'-..,
0 1 0 0 1 1 0 R6 Vertical Displayed Char Row No Yes ~
0 1 0 0 1 1 1 R7 V Sync Position Char Row No Yes ~
'" '"
0 1 0 1 0 0 0 RS Interlace Mode and Skew Note 1 No Yes C1 C1 D1 Dl I I
0 1 0 1 0 0 1 R9 Max Scan Une Address Scan Lme No Yes ~ '-.., '-..,
0 1 0 1 0 1 0 RIO Cursor Start Scan Line No Yes ~ B P (Note 21
0 1 0 1 0 1 1 Rl1 Cursor End Scan Line No Yes f"-.... '-.., ~
0 1 0 1 1 0 0 R12 Start Address (HI - Yes Yes 0 0
•
0 1 0 1 1 0 1 R13 Start Address (Ll - Yes Yes
0 1 0 1 1 1 0 R14 Cursor (HI - Yes Yes 0 0
0 1 0 1 1 1 1 R15 Cursor (Ll - Yes Yes
0 1 1 0 0 0 0 R16 Light Pen (H I - Yes No 0 0
0 1 1 0 0 0 1 R17 Light Pen III - Yes No
NOTES
1 The skew control IS shown In Table 3 and Interlace IS shown In Table 4
2. Bit 5 of the Cursor Start Raster Register IS used for blink penod control, and Bit 6 IS used to select blink or non-bhnk
A B C
;=
+
i
U
~
(/)
'> E
z ~ ::I
- ro ~
~ ~ (0
u 0 ~
Display Penod
4·467
MC6846-MC6845* 1-MC68A45-MC68A45 * 1-MC68B45-MC68B45* 1
Horizontal Displayed Register (R1) - This 8-bIt write-only value programmed In the register IS one less than the number
register determines the number of displayed characters per of computed character-line times. When the programmed
line. Any 8-bIt number may be programmed as long as the value of thiS register IS Increased, the display position of the
contents of RO are greater than the contents of R1 CRT screen IS shifted up. When the programmed value IS
decreased the display position IS shifted down Any number
Horizontal Sync Position Register (R2) - This 8-bIt wrlte- equal to or less than the vertical total (R4) may be used
only register controls the HS position. The hOrizontal sync
posItIOn defines the hOrizontal sync delay (Front Porch I and Interlace Mode and Skew Register (RS) - The MC6845
the hOrizontal scan delay (Back Porch) When the program- only allows control of the Interlace modes as programmed by
med value of this register IS Increased, the display on the the low order two bits of thiS write-only register The
CRT screen IS shifted to the left. When the programmed MC6845-1 controls the Interlace modes and allows a pro-
value IS decreased the display IS shifted to the right Any grammable delay of zero-to-two character clock times for the
8-blt number may be programmed as long as the sum of the DE (display enable) and cursor outputs Table 3 deSCribes
contents of R1, R2, and R3 are less than the contents of RO operation of the cursor and DE skew bits Cursor skew IS
controlled by bits 6 and -7 of R8 while DE skew IS controlled
Sync Width Register (R3) - This 8-blt write-only register by bits 4 and 5. Table 4 shows the Interlace modes available
determines the width of the vertical sync (VS) pulse and the to the user These modes are selected uSing the two low
hOrizontal sync (HS) pulse for the MCB845* 1 CRTC The order bits of thiS 6-blt write-only register
vertical sync pulse width IS fixed at 16 scan-line times for the In the normal sync mode (non-Interlace) only one field IS
MCB845 and the upper four bits of thiS register are treated as available as shown In Figures 7 and 15a Each scan line IS
"don't cares." refreshed at the VS frequency (e g , 50 or 60 Hz).
The MCB845* 1 allows control of the VS pulse width for Two Interlace modes are available as shown In Figures 8,
•
1-to-16 scan-line times. Programming the upper four bits for 15b, and 15c The frame time IS diVided between even and
1-to-15 will select pulse widths from 1-to-15 scan-line times odd alternating fields The hOrizontal and vertical timing rela-
Programming the upper four bits as zeros will select a VS tIOnship (VS delayed by % scan line time) results In the
pulse width of 16 scan-line times, allOWing compatibility With displacement of scan lines In the odd field With respect to the
the MCB845. even field
For both the MCB845 and the MCB845* 1, the HS pulse In the Interlace sync mode the same Information IS painted
width may be programmed from 1-to-15 character clock In both fields as shown In Figure 15b. ThiS IS a useful mode
periods thus allOWing compatibility With the HS pulse width for filling In a character to enhance readability
speCifications of many different monitors If zero IS written In the Interlace sync and Video mode, shown In Figure 15c,
Into thiS register then no H S IS prOVided alternating lines of the character are displayed In the even
field and the odd field. ThiS elfectlVely doubles the given
Horizontal TIming Summary (Figure 13) - The difference bandWidth of the CRT mOnitor
between RO and R1 IS the hOrizontal blanking Interval ThiS Care must be taken when uSing either Interlace mode to
Interval In the hOrizontal scan period allows the beam to aVOid an apparent flicker effect ThiS flicker effect IS due to
return (retrace) to the left Side of the screen The retrace time the doubling of the refresh time for all scan lines Since each
IS determllled by the monitor's hOrizontal scan components field IS displayed alternately and may be minimized With pro-
Retrace time IS less than the hOrizontal blanking Interval A per mOnitor deSign (e g , longer persistence phosphors)
good rule of thumb IS to make the hOrizontal blanking about In addition, there are restrictions on the programming of
20% of the total hOrizontal scanning period for a CRT In In- the CRTC registers for Interlace operation
expensive TV receivers, the beam overscans the display
screen so that aging of parts does not result In underscan- For the MCB845
nlng. Because of thiS, the retrace time should be about y, a. The hOrizontal total register value, RO, must be
the hOrizontal scanning period The horizontal sync delay, odd (I.e, an even number of character times).
HS pulse Width, and hOrizontal scan delay are typically pro- b For Interlace sync and Video mode only, the
grammed With a 1'2 2 ratio maximum scan-line address, R9, must be odd
lie, an even number of scan lines},
Vertical Total Register (R4) and Vertical Total Adjust c For Interlace sync and Video mode only, the ver-
Register (RS) - The frequency of VS IS determined by both tical displayed register I R6) must be even The
R4 and R5 The calculated number of character line times IS progra-mmed number Nvd, must be % the ac-
usually an Integer plus a fraction to get exactly a 50 or 60 Hz tual number reqUired The even numbered scan
vertical refresh rate The Integer number of character line Iones are displayed In the even field and the odd
times minus one IS programmed In the 7-blt write-only ver- numbered scan lines are displayed In the odd
tical total register (R41 The fractIOn of character line times IS field
programmed In the 5-blt write-only vertical total adjust d For Interlace sync and Video mode only, the cur-
register (R5) as a number of scan-line times sor start register (R 10) and cursor end register
(R 11) must both be even or both odd depending
Vertical Displayed Register (RS) - ThiS 7-bIt write-only on which field the cursor IS to be displayed In
register speCifies the number of displayed character rows on 2 For the MCB845* l'
the CRT screen, and IS programmed In character row times a The hOrizontal total register value, RO, must be
Any number smaller than the contents of R4 may be pro- odd II e , an even number of character times)
grammed Into R6. b For the Interlace sync and Video mode only, the
vertical displayed register (R6) must be even.
Vertical Sync Position (R7) - ThiS 7-bIt write-only register The programmed number, Nvd, must be % the
controls the posItion of vertical sync With respect to the actual number requrred
reference It IS programmed In character row times The
4-468
~
i....,..
Value Skew
00 No Character Skew
01 One Character Skew
10 Two Character Skew
-11-Not Available •
~
Honzontal TotailROi
r•~~------------------------------------tsl~INht+llxtc--------------------------------------------------:~I
I
~
~
Honzontal Display IA11Nhdxtc .,.. Honzontal Aetrace
,..~....
.;,.
en
CD
•
~
~
~
~
-TImIng IS shown for first displayed scan row only See Chart In Figure 16 for other rows The initial MA IS determined by the contents of Start ~
,..~
Address Aeglster, A12/A13 Timing IS shown for A121R13~O
Note 1 Timing values are descnbed In Table 8
....
II
• 3:
~
3:
FIGURE 14 - CRTC VERTICAL TIMING
Character
lit Nht*i
1
~
I
Nht*1
~,
(Nvd- 11 x N~d+ I
1
Nht , I
I~
1
1
, IlL
~~I
I I
-
I_ 3:
Row I I I 0 ~ I
I Nvd 1 Nvsp '" 1, Nvsp ' Nvt Nvt + 1 81
I jOOI(-l63xtsl~
~
.
~ I I I Vertical
~ ~ I I I ~~ ~~~
.....
o
(Non-Interlacel
I
I I \I
~erllcal syn~
, Vertical Sync
Pulse (R313 ,
VSYNC I i i PoslllOn !A71 .. I .. .....
(Even Fleldl
VSYNC
(Odd Fleldl
Display
-Enable
I ,
I I I I
I"'"
I
I
iii"", I "
I I
~~~~~--~,~--~~----------~
.. I , ,
....
..
!§!1t1
2
,v-,J----.I. . .------------------i
r-....:=--.L.J"---... •
~.!§!2
.,....-.,....:~....._--------------;
...
,•
3:
81
3:
·Nht must be an odd number for both Interlace modes
"Inlllal MA IS determined by R12/R13 (Start Address Reglsterl, which IS zero In this timing example 81
"""Nsl must be an odd number for Interlace Sync and Video Mode
NOTES
1 Refer to Figure 8 - The Odd Field IS offset 10 honzontal scan time
2 Timing values are descnbed In Table 8
3 Vertical Sync Pulse Width may be programmed from 1 to 16 scan hne times for the MC6845* 1
.
&
.....
MC6845e MC6845 * 1-MC68A45e MC68A45 * 1-MC68B45eMC68B45* 1
-2
:=1&- 0 0 0 - =:
4
3 0 0
-- -- - -3
4 0 0 0 0 0
--1
0 0
•
---- -5 -- - - ---3
6 0 0 6
-6
4--------------
- - - --5
0 0 7-~-------_E~
- -e~ -e-7 6----------------
------/
Even Odd Even Odd
Field Field Field Field
la) Normal Sync Ib) Interlace Sync Ic) Interlace Sync and Video
Maximum Scan Line Address Register (R91 - ThiS 5-blt the CRTC after vertical blanking It consists of an 8-blt low
write-only r'lglster determines the number of scan lines per order (MAO-MA7I reglstpr and a 6-blt high order (MA8-
character row Including the spacing, thus, controlling opera- MA 13) register The start address register determines which
tion of the row address counter The programmed value IS a portion of the refresh RAM IS displayed on the CRT screen
maximum address and IS one less than the number of scan Hardware scrolling by character, line, or page may be ac-
lines complished by modifYing the contents of thiS register
CURSOR CONTROL
Light Pen Register (R16-H, R17-LI - ThiS 14-bIt read-only
Cursor Start Register (R101 and Cursor End Reigster
register pair captures the refresh address output by the
(R11 I - These registers allow a cursor of up to 32 scan lines
CRTC on the positive edge of a pulse Input to the LPSTB
In height to be placed on any scan line of the character block
Pin It consists of an 8-blt low order IMAO-MA7I register and
as shown In Figure 16 Rl0 IS a 7-bIt write-only register used
a 6-blt high order (MAB-MA13) register Since the light pen
to define the start scan line and the cursor blink rate Bits 5
pulse IS asynchronous With respect to refresh address timing
and 6 of the cursor start address register control the cursor
an Internal synchronizer IS deSigned Into the CRTC Due to
operation as shown In Table 5 Non-display, display, and two
delays (Figure 3),n thiS CirCUit, the value of R16 and R17 Will
blink modes (16 times or 32 times the field period) are
need to be corrected In software Figure 17 shows an inter-
available Rll IS a 5-blt write-only register which defines the
rupt driven approach although a polling routine could be us-
last scan line of the cursor
ed
When an external blink feature on characters IS reqUired, It
may be necessary to perform cursor blink externally so that
both blink rates are synchronl7ed Note that an Invertl non- CRTC INITIALIZATION
Invert cursor IS eaSily Implemented by programming the Registers RO-R 15 must be initialized after the system IS
CRTC for a blinking cursor and externally Inverting the Video powered up The processor Will normally load the CRTC
Signal with an exclUSive-OR gate register file from a firmware table The worksheet of Table 6
IS extremely useful In computing proper register values for
Cursor Register (R14-H, R15-LI - ThiS 14-blt read/Write the CRTC Table 7 shows the worksheet filled out for an
register pair IS programmed to posItion the cursor anywhere BO x 24 configuration uSing a 7 x 9 character generator and
In the refresh RAM area, thus, allOWing hardware paging and Figure 18 shows an M6800 program which could be used to
scrolling through memory Without loss of the Original cursor program the CRT controller The programmed values allow
posItion It consists of an 8-blt low order (MAO MA7) register use of either an MC6845 or MC6845* 1 CRTC
and a 6-blt high order (MA8-MA 13) register The CRTC registers Will have an Initial value at power up
When uSing a direct dnve monitor (sans honzontal
OTHER REGISTERS OSCillator) these initial values may result In out-of-tolerance
Start Address Register (R12-H, R13-LI - ThiS 14-blt operation CRTC programming should be done Immediately
write-only register pair controls the first address output by after power up espeCially In thiS type of system
4-471
MC6845- MC6845 * 1-MC68A45-MC68A45 * 1-MC68B45-MC68B45 * 1
I I I .+
o-+-+-I-+-+-H-
- I
I
I
I
I
Off On
: . - Blink Penod =
16 or 32 Times
Field Period
O-+-+-H-+-+-+- 0-+++-+4-+-+-
l-+-+-I-+-+-H- 1-+-+-H-+-+-+-
2-++-1-1-+-++
3 -+-+-I-+-+-H-
4-+-+-I-+-+-H-
5 -+-+-I-+-+-H-
6-+-+-I-+-+-H-
7-+-+-+-I1-+-+-+-
8:-+-+-+-+-+-+-+-
2-+-H-+-H-I-
3-+-+-f-++-I-+-
4--1-+++4-+--4-
5 -+-+-H--+-+-+-
6-+-+-H--+-+-+-
7-+-+-H--+-+-+-
8-+-+-H--+-+-+-
1111
6 ++~-+-+-4-
7--1-+4-+-I-+--4-
8-+++-1-+++-
16:i~~e1~t
9 -+++-I-+++-
19:!~~~!t 10 -+-+-+-II-+++-
11-+-++-I-+++- 11-++H--+-+-+- 11 -+-+-+-II-+++-
Cursor Start Adr = 9 Cursor- Start Adr = 9 Cursor Start Adr = 1
•
Cursor End Adr = 9 Cursor End Adr = 10 Curs?r End Adr = 5
MPU CR1C
Light Pen
4-472
MC6845- MC6845* 1- MC68A45- MC68A45 * 1- MC68B45- MC68B45 * 1
•
00016A 0007 A6 00 A LDM O,X get register value from table
00017A 0009 B7 9001 A STM CRI'CRG pro<Jram register
OOOlBA OOOC 08 INX increment counters
00019A 0000 5C INCB
00020A OOOE ClIO A CMPB $10 finished?
00021A 0010 26 F2 0004 FlNE CRrCl no: take branch
00022A 0012 3F SWI yes: call monitor
00023 **************************************************
00024 * Cl<'I'C register initialization table
00025 *
00026A 1020 ORG $1020 start of table
00027A 1020 65 A CRITAB FCB $65,$50 RO, Rl - H total & H displayed
A 1021 50 11.
00028A 1022 56 A FCB $56,$09 H2, R3 - IlS pas. & HS vli(lth
A 1023 09 A
00029.\ 1024 18 A FCB $18,$OA R4, R5 - V total & V total a(lj.
A 1025 OA A
00030A 1026 Hl A FCB $18,$18 R6, R7 - V "isplaye(l $ VS pas.
A 1027 18 A
0003111. 1028 00 A FCB SOO,$OFl H8, R9 - Interlace & Max scan line
A 1029 DB A
00032A 102A 00 A FCB $OO,$OB RlO,Rll - Cursor start & end
A 102B OB A
00033A 102C 0080 A FOB $0080 Rl2,Rl3 - Start Mdress
00034A 102E 0080 A FDB S0080 H14,Rl5 - Cursor Address
00035 END
TerEAL ERroRS 00000-00000
4-473
II
I
3:
CRTC Registers
i.....
Displayed Characters per Row Char Decimal Hex 3:
•
3
2 Displayed Character Rows per Screen
Character Matrix a Columns
Rows
Columns
RO Honzontal Total ILine 15-1)
i
~•
R1 Honzontal Displayed ILlne 1)
Rows Rows
R2 Honzontal Sync Posilion (Line 1 + Line 12)
4 Character Block a Columns Columns
R3 Honzontal Sync Width ILlne 13)
bRows Rows
R4 Vertical TotallLlne 9-1)
3:
5
6
Frame Refresh Rate
HOrizontal Oscillator Frequency
Hz
Hz
R5 Vertical Adlust ILine 9 Lines)
i
.~....•
~ R6 Verllcal Displayed ,I Line 2)
.;:.. 7 AClIVe Scan Lines ILlne 2 x Lme 4b) Lines
R7 Vertical Sync Posilion ILlne 2+ Line 101
....... 8 Total Scan Lines (Line 6- Line 5) Lines
~ R8 Interlace (00 Normal, 01 Interlace,
9 Total Rows Per Screen ILlne 8- Line 4b) _ _ Rows and _ _ Lmes 03 Interlace, and Video)
10 Vertical Sync Delay IChar Rows) Rows R9 Max Scan Line Add ILine 4b -1)
11 Vertical Sync Width (Scan Lines 116)) 16 Lines R10 Cursor Start
3:
12 Honzontal Sync Delay ICharacter Times) Char Times Rll Cu,"or End
i
~
13 Honzontal Sync Width (Character Times) Char Times R12, R13 Start Address IH and U
14 Honzontal Scan Delay ICharacter Times) Char Times R14, R15 Cursor (H and U
15 Total Character Times (Line 1 + 12+ 13+ 14) Char Times
16 Character Rate (Line 6x 15) Hz
3:
17 Dot Clock Rate (Line 4a x 16) Hz
i
.....
&
3:
~
3:
Decimal Hex 3:
•
I
2 Displayed Character Rows per Screen 24 Rows
101 65
3 Character Matnx a Columns Columns
AO HOrizontal Total (Line 15 minus 1) ---
Rl HOrizontal Displayed (Line 1) 80 -----2Q
Rows 9 Rows
R2 HOrizontal Sync Position ILlne 1 + Lme 121 86 __56
4 Character Block a Columns 9 Columns
9 __9
_ _1_1_ _ R3 Honzontal Sync Width I Line' 31
Rows Rows
R4 Vertical Total (Line 9 mmus 11 24 _ _1_8
3:
!.
Frame Refresh Rate 60 Hz
~OJ
R10 Cursor Slart 0 0
---
12 HOrizontal Sync Delay (Character Times) 6 Char Times
11 __B
Rll Cursor End
13 Honzonlal Sync Wldlh (Character Times) 9 Char Times
128 00
R12, R13 Start Address IH and LI ---
~
14 HOrizontal Scan Delay (Character Times) Char Times
t02
- - 80
-
15 Total Character Times (Line 1+12+13+14) Char Times
128
16 Character Rate (Line 6 times 15) 18972 M MHz
R14, R15 Cursor IH and LI 00
--- 3:
~OJ
80
17 Dot Clock Rate (Line 4a times 16) 17075 M MHz
..
~
.....
II
MC6845·MC6845 * l·MC68A45.MC68A45 * 1.MC68B45.MC68B45 * 1
TIMING CHART OF THE CRT INTERFACE SIGNALS IS qUite simple as the refresh addresses continually run
Timing charts of CRT Interface signals are Illustrated In Note that the LPSTB Input may be used to support addi-
this section with the aid of programmed example of the tional system functions other than a light pen A dlgltal-to-
CRTC When values listed In Table 8 are programmed Into analog converter IDACI and comparator could be configured
CRTC control registers, the deVice provides the outputs as to use the refresh addresses as a reference to a DAC com-
shown In the timing diagrams (Figures 13, 14, 19, and 201 posed of a resistive adder network connected to a com-
The screen format of thiS exmaple IS shown In Figure 12 parator The output of the comparator would generate the
which III ustrates the relation between refresh memory ad- LPSTB Input SignifYing a match between the refresh address
dress (MAO-MA131, raster address (RAO-RA41, and the POSI- analog level and the unknown voltage
tion on the screen In thiS example, the start address IS The light pen strobe Input could also be used as a
assumed to be "0" character strobe to allow the CRTC refresh addresses to
decode a keyboard matnx Llebounclng would need to be
done In software
ADDITIONAL CRTC APPLICATIONS Both the VS and HS outputs may be used as a ,eal-tlme
The foremost system function which may be performed by clock Once programmed, the CRTC Will provide a stable
the CRTC controller IS the refreshing of dynamiC RAM ThiS reference frequency
•
Programmed
Reg. # Register Name Value
Value
RO H Total Nht+ I Nht
Rl H Displayed Nhd Nhd
R2 H Sync Position Nhsp Nhsp
R3 H Sync Width Nhsw Nhsw
R4 V Tota! Nvt + I Nvt
R5 V Scan Line Adjust Nadl Nadl
R6 V Displayed Nvd Nvd
R7 V Sync POSition N vsp N vsp
R8 Interlace Mode
R9 Max Scan Line Address Nsl Nsl
RIO Cursor Start I
Rll Cursor End 3
Rl2 Start Address (Hl a
Rl3 Start Address III a
Rl4 Cursor IHI a
. Rl5 Cursor III 2
Rl6 Light Pen I H I
Rl7 Light Pen {U
4·476
3:
i
3:
i*
....&
!
RAO-RA4' ~ f , f
I I I I
MAO-MA13'"
I Nhd
, f
INhd+1Nhd+21
I I
~ I Nhd+ I
I Nht I I
• ~I Nhd+ ~ Nhd •I Nhd+1INhd+2i'
• Nhd •INhd+lINghd+21
I I I Nht I I
w
I
ctn
I
*
I Nhd+ I
Nht I 3:
I : : : : I : : :I : : jl I
~
Character Row # j I :
I I I
I I I I I I I I I I
~
~ Character # I
II..
;.:;: I I
I
I I"..~ I I I
I ~ I
....... I Nht 0 I Nht 0 I Nht
.......
Cursor
I
r---1
I I
t---l
I I I
f-----i. ._____ *3:•
....&
("')
·Tlmlng IS shown for non-Interlace and Interlace sync modes ~
Example shown has cursor programmed as CD
~
Cursor Register:::: Nhd + 2
CUTsor Start:::: 1
Cursor End = 3
""The initial MA IS determined by the contents of Start Address RegIster, R12/R13 Timing IS shown for R12/R13=O 3:
Note 1 Timing values are described In Table 8
~CD
8;
*
....&
II
• s::
~ ..§'"
FIGURE 20 - REFRESH MEMORY ADORESSING IMAO-MA13) STAGE CHART
I 0 1, Jo Nhd- 1 ,
Nhd Jo Nht
o{ N: I
I
I
0
I
I Jo Nh~
I
1
I
Nhd •
I
I
I
Nht ......
• s::•
{N~
Nrd Nhq+ 1 2XN~d-l 2X~hd ~ Nhd+ Nht
I
I I I I I
•
I I
Nhd Nhd+ 1 Jo 2XNhd 1 2XNhd Nhd+ Nht
•
Is::
I 2XNhd 2XNhd+ l'
, 1 3XNhd
I
3XNhd
, ~ 2Nhd+ Nht
~ O I I I
I I I
~
c5
"iii
2{NS I
2XNhd 2XNhd+ 1 • 3XNhd 1 3XNhd ~ 2Nhd'+Nht
~
Iii
>
~
~
"""
00
1 1 1 1 1
NVd- 1{ °
I INvd-llxNhd
i
INvd-1) x Nhd+ 1
,i
• Nvdx Nhd+ 1
I
I
Nvd x Nhd
I
I • INvd -1 IxNhd+Nht
I *......•
Ns I INvd ;1 x Nhd INvd llxNhd+l
• Nvd x Nhd 1 Nvd x Nhd ~ INvd
I
llxNhd+Nht s::
NVd{ 0
I Nvd x Nhd
I
Nvd x Nhd+ 1
, • INvd+ II x Nhd-1
I ,
INvd+ II x Nhd
I
~ Nvd x N 1d + Nht
~aJ
I I I
>- NsI Nvd x Nhd Nvdx Nhd+ 1 ~ INvd+ II x Nhd-1 IN vt + II x Nhd • Nvd + Nhd + Nht
~
~'"
~o s::
z
1l
W
~ Nvt x Nhd
I
Nvtx Nhd+ 1
I
INvt + 11 x Nhd-1
i
INvt + II
, x Nhd Nvt x Nhd + Nht
I I
~
~
0: Nvt{ 0 I I I
"iii
Ns Nvt xNhd I IN vt + 1) x Nhd-1 IN vt + 11 x Nhd Nvt x Nhd + Nht '
i"
>
N vt + l { 0
Nad I
I INvt+ 1) x Nhd
I
I
IN vt + 11 x Nhd
INvt + 11: Nhd+ 1
I
IN vt + 11 x Nd+ 1
INvt+2IxNhd-l
i
IN vt +21 x Nhd-1
INvt+~1 x Nhd
I
INvt+ 21 x Nhd
IN v + llNhd+ Nht I
I
I
INvt + 1INhd + Nht
,
I
*......
-i
NOTE 1 The Initial MA IS determined by the contents of start address register, R12/R13 Timing IS shown for RI2/NI3=O Only Non-
Interlace and Interlace Sync Modes are shown
*
MC6845e MC6846 1e MC68A46eMC68A45* 1eMC68B46eMC68B45* 1
OROERING INFORMATION
--=rTTJ j
MC68A45CP1
~=~a~:~grated CIfCUlt
Blanks= 10 MHz _
A=15MHz
B=20MHz
Device Designation
In M6800 Family
Temperature Range
Blank = 0°_ + 70°C
Replaces { C= _40°_ +B5°C
"*" for Package' _ _ _ _ _ _ _ _ _ _ _---'
MC6846*l P=Plastlc
S=Cerdlp
L=Ceramlc
Enhanced Version of CRTC _ _ _ _ _ _..J
BETTER PROGRAM
II
suffix letters to part number
4-479
MC6846
® MOTOROLA
MC68A46
(1.0 MHz)
(1.5 MHz)
MOS
ROM - 1/0 - TIMER
(N-CHANNEL, SILICON-GATE,
The MC6846 combination chip provides the means, In conlunctlon DEPLETION LOAD)
with the MC68Q2, to develop a basIc 2-chlp microcomputer system. The
MC6846 consists of 2048 bytes of mask-programmable ROM, an 8-blt ROM-I/O- TIMER
bidirectIOnal data port with control lines, and a 16-blt programmable
timer-counter.
ThiS device IS capable of interfaCing with the MC6802 (baSIC MC6800,
clock, and 128 bytes of RAM) as well as the entire M6800 family If
desired. No external logic IS reqUired to Interface with most peripheral . LSUFFIX
devices. CERAMIC PACKAGE
.••• ' - CASE 715
• 2048 8-Blt Bytes of Mask-Programmable ROM
• 8-Blt BidirectIOnal Data Port for Parallel Interface plus Two Control
~'"
Lines
• Programmable Interval Timer-Counter Functions SSUFFIX
• Programmable I/O Peripheral Data, Control, and Direction Registers , ,." • , CERDIP PACKAGE
, CASE 734
• Compat!ble with the Complete M6800 Microcomputer Product
• ~ .,,-
Famllv
• TTL-Compatible Data and Peripheral Lines
• Single 5-Volt Power Supply • ).' P SUFFIX
, ' -•' • PLASTIC PACKAGE
CASE 711
VSS A8
A7 A9
A6 Al0
DO
D1 A5 RESET
D2
D3 A4 IRQ
D4
D5 eso 6 ep2
D6
D7 R/IN epl
DO 8 AO
D1 Al
02 10 A2
D3 11 A3
D4 12 Vee
D5 13 P7
D6 14 P6
D7 15 P5
eSI 16 P4
PPO
PP1 C'fG 17 P3
PP2
2048 PP3 eTC 18 P2
Byte PP4
ROM CTa 19 Pl
PP5
PP6 E 20 PO
PP7
• Mask Programmable
4-480
MC6846- MC68A46
MAXIMUM RATINGS
Rating Symbol Value Unit
This deVice contains circuitry to protect the
Supply Voltage Vcc -03to+70 V Inputs against damage due to high static
Input Voltage V ,n -03to+70 V voltages or electnc fields, however, It IS ad-
Operating Temperature Range TA TL to TH 'C vised that normal precautions be taken to
M C6846, M C68A46 o
to + 70 avoid application of any voltage higher than
M C6846C, M C68A46C -40 to +85 maximum rated voltages to this hlgh-
Storage Temperature Range T 5tg -55to +150 °c Impedance Circuit Reliability of operation IS
enhanced If unused Inputs are tied to an ap-
propnate logiC voltage level (e 9 , either V SS
THERMAL CHARACTERISTICS
or VCC)
Characteristic Symbol Value Unit
Thermal Resistance
Ceramic 50
8JA 'C/W
Plastic 100
Cerdlp 60
POWER CONSIDERATIONS
II
T A-Ambient Temperature, °c
8jA- Package Thermal ReSistance, junctlon-to-Amblent, °C/W
PO-PINT+ PPORT
PINT-ICC x VCC, Watts - Chip Internal Power
PPORT-Port Power Oissipatlon, Watts - User Oetermlned
For most applications PPORT<C PINT and can be neglected PPORT may become Significant If the deVice IS configured to
drive Oarllngton bases or sink LEO loads
An approximate relationship between Po and T j Ilf PPORT IS neglected) IS
PO=K-ITj+273°C) (2)
SolVing equatIOns 1 and 2 for K gives
K = PO.IT A + 273°C) + 8jA·P 0 2 (3)
Where K IS a constant pertaining to the particular part K can be determined from equation 3 by measuring Po lat eqUilibrium)
for a known T A. USing this value of K the values of Po and T j can be obtained by solVing equations (1) and (2) Iteratively for any
value of T A
Load A Load B
1D0-07, CTO, CP2, PPO-PP7) IIRQ Only)
VCC VCC
3 kO
Test POint
Test POint
MM06150
C or Equlv
MM07000 100 pF
I
or Equlv
4·481
MC6846·MC68A46
•
Output Low Current (Sinking)
(VOL=04VI 00-07 10L 16 - - mA
Other Outputs 32 - -
4·482
MC6846·MC68A46
NOTES
II
1 Voltage levels shown are VLSO 4 V. VH",2 4 V. unless otherwise specified
2 Measurement POints shown are a 8 V and 2 0 V unless otherwIse specified
~-------<D--------~
R/VV.Address-----r~~~JC~~~~~7\7\.~~aF----_rt_--------------------------·------t_rt~~
INon·Muxedl
4-483
MC6846-MC68A46
FIGURE 5 - PERIPHERAL PORT LATCH FIGURE 6 - PERIPHERAL DATA AND CP2 DELAY
SETUP AND HOLD TIME (Control Mode PCR5= 1, PCR4=0, PCR3= 1)
r--
PPO-PP7
tpsu
> C tpDH
Enable \
tpDW~
r-- lCP2 -
~
PPO-PP7
CP1
'} X
~lDC-- I-- lRS1-
r-
CP2'
I
·CP2 goes low as the result of positive transition of the second E pulse
I Enable
[\ PPO-PP7
?j
r
tlRi ftPDSU
Fa Enable \
FIGURE 9 - CP2 DELAY TIME FIGURE 10 - INPUT PULSE WIDTHS
(PCR5= 1, PCR4=0, PCR3=0)
Enable
tPr, tpi
CPl ---4----------~ CTC or
CTG
CP2~
~jr-~
FIGURE 11 - INPUT SETUP AND HOLD TIMES' FIGURE 12 - OUTPUT DELAY
Enable It / \
;;~=4 ~'K-- t
Enable
---1
CTO ____________t_C_TO
___
NOTE Timing measurements are referenced to and from a low voltage of 0 8 volts and a high voltag€ of 20 volts unless otherWise noted
4-484
MC6846- MC68A46
MC6846 IRQ
MR
VMA
CSO VMA
Clock
RE
R/W R/W
MC6802
Parallel 1/6 MPU
00-07
EXtal
0
•
AO-A15 AO-A15 Xtal
Figure 13 IS a block diagram of a typical cost-effeCtive microcomputer The MPU IS the center of the microcomputer system and IS shown In a
minimum system Interfacing with a ROM combination chip It IS not Intended that this system be limited to this function but that It be expand-
able with other parts In the M6800 Microcomputer Family
GENERAL DESCRIPTION
The MC6846 combination chip may be partitioned Into The timer/counter control register allows control of the In-
three functional operating sections read-only memory, terrupt enable, output enable, selection of an Internal or ex-
timer-counter functions, and a parallel 1/0 port ternal clock source, a dlvlde-by-8 prescaler, and operating
mode. Input pin CTC (counter-timer clock) Will accept an
REA~-ONLY MEMORY (ROM) asynchronous clock pulse to decrement the Internal register
The mask-programmable ROM section IS Similar to other for the counter-timer. If the dlvlde-by-8 prescaler IS used, the
ROM products of the M6800 family The ROM IS organized maximum clock rate can be foUl times the master clock fre-
In a 2048 by 8-blt array to provide read-only storage for a quency Gate Input (CTG) accepts an asynchronous TTL-
minimum microcomputer system. Two mask-programmable compatible signal which may be used as a trigger or gating
chip selects are available for user definition function to the counter-timer. A counter-timer output (CTO)
Address Inputs AO-A 10 allow any of the 2048 bytes of IS also available and IS under software control being depen-
ROM to be uniquely addressed. Bidirectional data lines dent on the timer control register, the gate Input, and the
1000D7) allow the transfer of data between the MPU and the clock source
MC6846
PARALLEL I/O PORT
TIMER-COUNTER FUNCilONS The parallel bidirectional 1/0 port has functional opera-
Under software control this 16-blt binary counter may be tional characteristics Similar to the B port on the MC6821
programmed to count events, measure frequencies, time In- PIA. ThiS Includes eight bidirectional data lines and two
tervals, or Similar tasks. Internal registers associated with the handshake control Signals The control and operation of
I/O functions may be selected with AD, A1, and A2. It may these lines are completely software programmable.
also be used for square wave generation, single pulses of The Interrupt Input (CP1) Will set the Interrupt flag CSRl
controlled duration, and gated signals. Interrupts may be of the composite status register The peripheral control
generated from a number of conditions selectable by soft- (CP2) may be programmed to act as an Interrupt Input (set
ware programming CSR2) or as a peripheral control output
4·485
MC6846e MC68A46
SIGNAL DESCRIPTION
•
I/O timer of the MC6846. They are mask programmed to be INTERRUPT INPUT (CP1)
active high or active low as chosen by the user. Peripheral Input line CPl IS an Input-only that sets the In-
terrupt Flags of the Composite Status register The actIVe
ADDRESS INPUTS (AO-A10) transition for thiS Signal IS programmed by the peripheral
The Address Inputs allow any of the 2048 bytes of ROM to control register for the .parallel port CPl may also act as a
be uniquely selected when the Circuit IS operating In the strobe for the peripheral data register when It IS used as an
ROM mode. In the I/O-Timer mode, address Inputs AO, Al, Input latch Details for programming CPl are In the section
and A2 select the proper I/O Register, while A3 through on the parallel peripheral port
Al0 (together with CSO and CSll can be used as additional
qualifiers In the I/O Select Circuitry. ISee the section on 1/0- PERIPHERAL CONTROL (CP2)
Timer Select for additional details I Peripheral Control line CP2 may be programmed to act as
an Interrupt Input or Peripheral Control output As an Input,
RESET thiS line has high Impedance and IS compatible With standard
The active low state of the RESET Input IS used to Inltlahze TTL voltage levels As an output, It IS also TTL compatible
all register bits In the I/O section of the deVice to their proper and may be used as a source of 1 mA at 1 5 V to directly
values ISee the section on InitialIZation for reset conditions drive the base of a Darlington transistor SWitch ThiS line IS
for timer and peripheral registers I programmed by the Peripheral Control Register
4·486
MC6846- MC68A46
of the input transition. Note that a clock transition which GATE INPUTS (CTGI
does not meet setup and hold time specifications may re- The Input pin CTG accepts an asynchronous TTL-
quire an additional E pulse for recognition. compatible signal which IS used as a tngger or a clock gating
When observing recurring events, a lack of synchroniza- function to the Timer The gating Input IS clocked Into the
tion will result In either "System Jitter" or "Input litter" being MC6846 by the E signal In the same manner as the previously
observed on the output of the M C6846 when uSing an asyn- discussed clock Inputs. That IS, CTG transition IS recognized
chronous clock and gate Input signal. "System Jitter" IS the on the fourth Enable pulse (provided setup and hold time re-
result of the Input signals being out of synchrOnization with qUirements are metl, and the high or low levels of the CTG
E permitting signals with marginal setup and hold time to be Input must be stable for at least one system clock penod plus
recognized by 8ilher the bit time nearest the Input transition the sum of setup and hold times. All references to CTG tran-
or subsequent bit time. "Input jitter" can be as great as the sition In thiS document relate to Internal recognition of the
time between the negative gOing transitions of the Input Input transition
signal plus the system Jitter If the first transition IS recognized The CTG Input of the timer directly affects the Internal
dunng one system cycle, and not recognized the next cycle 16-blt counter The operation of CTG IS therefore indepen-
or vice-versa. Refer to Figure 14. dent of the dlvlde-by-8 prescaler selection
Input Output
•
E
CTC Input
Jitter
Recog
Input I
Either ~ Or Here
Here
4-487
MC6846-MC68A46
CSI
I '"' I/O-TIMER
SELECT
cso
I ""-
Ala
A9 0-----0
r "
AS 0-----0
I
A7 0----0
--
AS
Ir
~
I
--
A5
A4
A3
ROM SELECT
The active levels of csa and CS1 for ROM and I/O select must be used for ROM or I/O select csa and CS1 are mask
are a user programmable option Either csa or CS 1 may be programmed simultaneously With the ROM pattern The
programmed active high or active low, but different codes ROM Select Circuitry IS shown In Figure 16
CSI
ROM
Select
cso 0---,-----\
4·488
MC6846- MC68A46
TIMER OPERATION
The Timer may be programmed to operate In modes values It IS Important to note that an Internal reset (bit zero
which fit a wide variety of applications. The device IS fully of the Timer/Control Register Set) has no effect on the
bus compatible with the M6800 system, and IS accessed by counter latches
Load and Store operations from the MPU.
In a typical application, the timer will be loaded by storing
COUNTER INITIALIZATION
two bytes of data Into the counter latch ThiS data IS then
transferred Into the counter dUring a Counter InitialIZation Counter Initialization IS defined as the transfer of data
cycle. If enabled, the counter decrements on each subse- from the latches to the counter With attendant clearing of
quent clock cycle (which may be E or an external clock) until the IndiVidual Interrupt Flag associated With the counter
one of several predetermined conditions causes It to halt or Counter Initialization always occurs when a reset condition
recycle Thus, the timer IS programmable, cyclic In nature, (external RESET="O" or TCRO="l") 15 recognized It can
controllable by external Inputs or MPU program, and ac- also occur (dependent on The Timer Mode) With a Write
cessible to the MPU at any time. Timer Latches command or recognition of a negative transI-
tion of the Gate Input
COUNTER LATCH INITIALIZATION Counter recycling or relnltlallzatlon occurs when a clock
Input 15 recognized after the counter has reached an all-zero
The Timer consists of a 16-blt addressable counter and
state. In thiS case, data IS transferred from the Latches to the
two 8-blt addressable latches The function of the latches IS
Counter, but the Interrupt Flag IS unaffected
to store a binary eqUivalent of the deSIred count value minus
one Counter Initialization results In the transfer of the latch
TIMER CONTROL REGISTER
•
contents of the counter It should be noted that data transfer
to the counters IS always accomplished via the latches The Timer Control Register (see Table 2) In the MC6846 IS
Thus, the counter latches may be accurately described as a used to modify timer operation to SUit a variety of applica-
16-blt "counter Inltllization data" storage register tions The Timer Control Register has a unique address
In some modes of operation, the Initialization of the lat- space (AO="l", Al ="0", A2="1") and therefore may be
ches will cause Simultaneous counter initialization (, e , Im- written Into at any time The least Significant bit of the Con-
mediate transfer of the new latch data Into the counters) It trol Register IS used as an Internal reset bit. When thiS bit IS a
IS, therefore, necessary to Insure that all16 bits of the latch- logiC zero, all timers are allowed to operate In the modes
es are updated Simultaneously Since the MC6846 data bus prescribed by the remaining bits of the lImer control register
IS 8 bits wide, a temporary register (MSB Buffer Register) IS Writing "one" Into Timer Control Register BO (TCRO)
proVided for the Most Significant Byte of the deslr"d latch causes the counter to be preset With the contents of the
data. ThiS IS a "write-only" register selected via address lines counter latches, all counter clocks are disabled, and the
AO, A 1, and A2 Data IS transferred directly from the data timer output and Interrupt flag (Status Register) are reset
bus to the MSB Buffer when the chip IS selected, R/W IS The Counter Latch and Timer/Control Register are un-
low, and the timer MSB register IS selected (AO= "0", disturbed by an Internal Reset and may be written Into
Al=A2="1") regardless of the state of TCRO
The lower 8 bits of the counter latch can also be referred
to as a "write-only" register Data Bus Information will be Timer Control Register Bit 1 (TCR1) IS used to select the
transferred directly to the LSB of a counter latch when the clock source When TCR 1 = "0", the external clock Input
chip 15 selected, R/W IS low and the Timer LS8 Register IS CTC IS selected, and when TCRl = "1", the timer uses E
selected (AO=Al=A2="1") Data from the MSB Buffer Timer Control Register Bit 2 (TCR2) enables the dlvlde-
will automatically be transferred Into the Most Significant by-8 prescaler (TCR2= "1") In thiS mode, the clock fre-
Byte of the counter latches Simultaneously with the transfer quency IS diVided by eight before being applied to the
of the Data Bus information to the Least Significant Byte of counter When TCR2= "0" the system clock IS applied
the Counter Latch For brevity, the conditions for thiS opera- directly to the counter
tion will be referred to henceforth as a "Write Timer Latches
TCR3, 4, 5 select the Timer Operating Mode, and are
Command"
discussed In the next section
The MC6846 has been designed to allow transfer of two
bytes of data Into the counter latches from any source, pro- Timer Control Register Bit 6 (TCR6) IS used to mask or
vided the MSB IS transferred first In many applications, the enable the Timer Interrupt Request When TCR6 = "0", the
source of data will be an M6800 MPU It should therefore be Interrupt Flag IS masked from the timer When TCR6="1",
noted that the 16-blt store operations of the M6800 family the Interrupt Flag IS enabled Into Bit 7 of the Composite
microprocessors (STS and STX) transfer data In the order Status Register (Composite IRQ Bit), which appears on the
required by the MC6846 A Store Index Register instruction, IRQ output pin
for example, results In the MSB of the X register being Timer Control Register Bit 7 (TCR7) has a special function
transferred to the selected address, then the LS B of the X when the timer IS In the Cascaded Single Shot mode. (ThiS
register being written Into the next higher location. Thus, function IS explained In detail In the section deSCribing the
either the Index register or stack pOinter may be transferred mode) In all other modes, TCR7 merely acts as an output
directly Into a selected counter latch With a Single Instruc- enable bit If TCR7= "0", the Counter Timer Output (CTO)
tion IS forced low Writing a logiC one Into TCR7 enables CTO
A logic zero at the RESET Input also Initializes the counter For more Information on ItS operation, see the speCifiC mode
latches All latches Will assume maximum count (65,535) deSCription
4-489
MC6846·MC68A46
CONTROL
REGISTER
BIT STATE BIT OEFINITION STATE DEFINITION
TCRO
,
0 Internal Reset Timer Enabled
Timer In Preset State
TCR'
,
0 Clock Source Timer uses External Clock (eTC)
Timer uses System Clock (EI
TCR2
,
0 ..!.. 8 Prescaler
Enabler
Clock
Clock
IS
IS
not Prescaled
prescaled by
.. 8 Counter
TCR3 X
TCR4 X Operating Mode See Table 3
TCRS X Selection
TCR6
,
0 Timer Interrupt
Enable
IRQ Masked from Timer
IRQ Enabled from Timer
TCR7 0 Timer Output Enable Counter Output (CTO) Set LOW
I
1 Counte~ Output Enabled
TIMER OPERATING MODES (TCR7 = "1"1, a square wave Will be generated at the Timer
The MC6846 has been designed to operate effectively In a Output CTO (see Table 4l.
wide variety of applications. This IS accomplished by uSing Either a Timer Reset (TCRO= "1" or External
three bits of the control register (TCR3, TCR4, and TCR51 to RESET = "0"1 condition or Internal recognition of a negative
define different operating modes of the Timer, outlined In tranSition of the CTG Input results In Counter Initialization. A
Table 3. Write Timer Latches command can be selected as a Counter
Initialization Signal by clearing TCR4
The diSCUSSion of the Continuous Mode has assumed the
CONTINUOUS OPERATING MODE (TCR3=O, TCR5=O) application requires an output Signal It should be noted the
The timer may be programmed to operate In a continuous Timer operates In the sarne manner with the output disabled
counting mode by wrltmg zeros Into bits 3 and 5 of the timer (TCR7 = "0") A Read Timer Counter command IS valid
control register Assummg that the timer output IS enabled regardless of the state of TCR7
TCR3 TCR4 TCRS Timer Operating Mode Counter Initialization I nterrupt Flag Set
0 0 0 Continuous CTG.f+W+R T.O.
CTG.j. + R T.O.
0
,
0 I Cascaded Single Shot
CTG.j. + R T.O.
0
0 I ,
0 Continuous
Normal Single Shot CTG.j. + R T.O.
I 0 0 Frequency Comparison CTG.j. • I • (W + T 0.1 + R CTG.f Before T.O.
I
,
0 1 CTGi· 1+ R
CTG.j.· 1+ R
T.O Before CTG.f
CTGt Before T.O.
,
I
, 0
I
Pulse Width Comparison
T.O. Before CTGt
4-490
MC6846-MC68A46
CONTINUOUS MODE
(TCR3 = 0, TCR7 = I, TCR5 =01
CONTROL INITIALIZATION/OUTPUT WAVEFORMS
REGISTER
•
NORMAL SINGLE-SHOT TIMER MODE
(TCR3=O, TCR4=l, TCR5=1)
This mode is Identical to the Continuous Mode with two the setting of an IndiVidual Flag and re-Inltlallzatlon of the
exceptions. The first of these IS obvIous from the name - counter.
the output returns to a low-level after the Initial Time Out The second major difference between the Single-Shot
and remains low until another Counter Initialization cycle oc- and Continuous modes IS that the Internal counter enable IS
curs The output waveform ICTO) IS shown In Figure 17 not dependent on the CTG Input level remaining In the low
The Internal counting mechanism remains cyclical In the state for the Single-Shot mode ASide from these dif-
Single-Shot Mode Each Time Out of the counter results In ferences, the two modes are Identical
to
f--- 1 -Ii------ N -J
4-~1 I~___ +_ _ _ _+
--+
CTO
I- IN+1)
'1-
IN+lI
·1· IN+1)
_I .. IN~
to TO TO TO TO
I
J
TRC7 = Output i I
After Timeout
I I
I I l' 0 I 1'1 I
IB) Cascaded Single-Shot Mode Output Waveform
1 =Wnte a "1" Into TCR-7
"Point at which an Interrupt may occur 0= Wnte a "0" Into TCR-7
NOTE All time Intervals shown above assume the Gate ICTG) and Clock (GTC) Signals are synchronized to E with the speCified setup and hold
time requirements
4·491
MC6846e MC68A46
TCRl= 1
TCR4 TCRS APPLICATION CONDITION FOR SETTING INDIVIDUAL INTERRUPT FLAG
0 0 Frequency Interrupt Generated If CTG Input Period (l/F)
Comparison is Less Than Counter Time Out (T.O,)
0 1 Frequency Interrupt Generated if CTG Input Period (l/F)
Comparison IS Greater Than Counter Time Out (T.OJ
1 0 Pulse Width Interrupt Generated If eTG Input "Down Time"
Comparison is less Than Counter Time Out (T.OJ
1 1 Pulse Width Interrupt Generated If CTG Input "Down Time"
Comparison IS Greater Than Counter Time Out (T.O.)
TIME INTERVAL MODES (TCR3 = 1) timer cycle before the output IS to change state), and 3) clear
The Time Interval Modes are provided for applications re- the Interrupt flag by reading the combination status register
qUlnng more flexibility of Interrupt generation and Counter followed by Read Timer MSB It IS also pOSSible, If deSired,
Initialization The Interrupt Flag IS set m these modes as a to change the length of the timer cycle by relnltlallzlng the
function of both Counter Time Out and translstlons of the timer latches. ThiS allows more fleXibility for obtaining
CTG input. Counter Initialization IS also affected by Interrupt deSired times
•
Flag status The output Signal IS not defmed In any of these
modes. Other features of the Time Interval Modes are out- FREQUENCY COMPARISON MODE
lined In Table 5. (TCR3; 1, TCR4; 0)
The timer Within the. MC6846 may be programmed to
CASCADED SINGlE·SHOT MODE compare the penod of a pulse (giVing the frequency after
(TCR3=O, TCR4=O, TCR5= 1) calculations) at the CTG Input With the time penod reqUired
ThiS mode IS Identical to the Single-shot mode with two for Counter Time Out A negative translstlon of the CTG in-
exceptions First. the output waveform does not return to a put enables the counter and starts a Counter Initialization cy-
low level and remain low after timeout Instead, the output cle - prOVided that other conditions, as noted In Table 6,
levels remains at ItS initialized level until It IS re-programmed are satisfied The counter decrements on each clock Signal
and changed by timeout The output level may be changed recognized dunng or after Couter Initialization until an Inter-
at any timeout or may have any number of tlmeouts between rupt IS generated, a Wnte Timer Latches command IS Issued,
changes. or a Timer Reset condition occurs It can be seen from
The second difference IS the method used to change the Table 6 that an Interrupt condition Will be generated If
output level Timer Control Register Bit 7 (TCR7) has a TCR5 = "0" and the penod of the pulse (Single pulse or
special function In thiS mode. The timer output (CTO) IS measured separately repetatlve pulses) at the CTG Input IS
equal to TCRl clocked by timeout At every timeout, the less than the Counter Time Out penod If TCR5= "1", an In-
contents of TCR7 IS clocked to and held at the CTO output terrupt IS generated If the reverse IS true
Thus, output pulses of length greater than one timer cycle Assume now With TCR5; "1" that a Counter Initialization
can be generated by cascading timer cycles and counting has occurred and that the CTG Input has returned low pnor
tlmeouts With a software program (See Figure 17 I to Counter Time Out Since there IS no IndiVidual Interrupt
An Interrupt IS generated at each timeout To cascade Flag generated, thiS automatically starts a new Counter In-
timer cycles, the MPU would need an Interrupt routine to 1) Itialization Cycle The process Will continue With frequency
count each timeout and determine when to change TCR7, 2) companson being performed on each CTG Input cycle until
wnte Into TCR7 the state corresponding to the next deSired the mode IS changed, or a cycle IS determined to be above
state of the output waveform (only necessary dunng the last the predetermined limit
4·492
MC6846- MC68A46
CRX3 = 1, CRX4 = 1
Control Reg Counter Counter Enable Counter Enable Interrupt Flag
BIt 5 (CRX51 Inltlahzatlon Flop-Flop Set (CEI Flop-Flop Res.t (CEI Set !II
I
pOSSible to directly obtain the Width of any pulse causing an The Composite Interrupt Flag (CSR7) IS clear only If all
Interrupt. enabled IndiVidual Interrupt Flags are clear The conditions
for cleanng CSRI and CSR2 are detailed In a later section
The Timer Interrupt Flag (CSRO) IS cleared under the follow-
Ing conditions
1) Timer Reset - Internal Reset Bit (TCRO) = "I" or Exter-
DIFFERENCES BETWEEN THE MC6840 AND THE nal RESET = "a'"
MC6846 TIMERS 2) Any Counter Initialization conditIOn
1) Control registers 1 and 3 are bUried (access through 3) A Wnte Timer Latches cornmand If Time Interval
control register 2 only) In the MC6840 timer In the MC6846, modes ITCR3= "I") are being used
all registers are directly accessable. 4) A Read Timer Counter command, prOVided thiS IS
2) The MC6840 has a dual 8-blt continuous mode for preceded by a Read Composite Status Register while CS RO
generating non-symmetrical waveforms The MC6846, in- IS set ThiS latter condition prevents missing an Interrupt Re-
stead, has a cascaded one shot mode which can accomplish quest generated after reading the Status Register and pnor
the same function, but also allows the user to generate to reading the counter
waveforms longer than one timeout The remaining bits of the Composite Status Register
3) Because of the different modes, there IS a difference In (CS R3-CS R6) are unused They return a logiC zero when
the control registers between the MC6840 and the MC6846 read
4·493
MC6846·MC68A46
1/0 OPERATION
•
41 Interrupt Flags are cleared In the MC6820/6821 by Command. 1 Any Input bit Will reflect the state of the
reading data from the Penpheral Data Register. M C6846 In- associated Input line If the Input latch function IS deselected.
terrupt Flags are cleared by either reading or writing to the If the Control Reglster,ls programmed to proVide Input lat-
Peripheral Data Register - provided that this sequence IS ching, the Input bit Will retain the state at the time CP1 was
followed al Flag Set, b) Read Composite Status Register, cl actIVated until the Peripheral Data Register IS read by the
Read/Wnte Peripheral Data Register IS followed MPU.
5) Bit 6 of the MC6846 Peripheral Control Register IS not
used. Bit 7 (PCR7) IS an Internal Reset Bit not available on PERIPHERAL CONTROL REGISTER
the MC6820/6821. ThiS 8-blt register IS used to control the reset function as
61 The Peripheral Data lines (and C(?2) of the MC6846 well as for selection of optional functions of the two
feature Internal current limiting which allows them to directly peripheral control lines (CP1 and CP2). The Peripheral Con-
drive the base of Darlington NPN transistors. trol Register functions are outlined In Table 8.
PCR7
I PCR6
I PCRS
I PCR4 PCR3
I PCR2
I PCRI
I PCRD
J
I
0= CP2 Is INPUT
I
CP2 DIRECTION CONTROL
I
l 1
CPI INT. ENABLE
0= CPI INT MASKED
l
I = CP2 Is OUTPUT I = CPt INT. ENABLED
l
CPI INPUT LATCH CONTROL
I = RESET CONDITION (CLEARS PER IPH 0= INPUT DATA NOT LATCHED
DATA & DATA DIRECTION REG + CSRI & CSR2) 1 = INPUT OATA LATCHED ON ACTIVE CPI
I II
0 I INPUT/OUTPUT ACKNOWLEDGE
CP2 INT. ENABLE PROGRAMMABLE OUTPUT
CP2 ACTIVE EDGE SELECT
0= NEGATIVE (~) EDGE 0= CP2 INT. MASKED I OOR I (CP2 REFLECTS DATA
I = POSITIVE (t) EDGE I = CP2 INT ENABLED WRITTEN INTO PCR3)
4·494
MC6846e MC68A46
PERIPHERAL PORT RESET (PCR7) that use of the Input latch function (which can be deselected
Bit 7 of the Peripheral Control Register (PCR7) may be us- by wntlng a zero into PCR2) has no effect on output data. It
ed to initialize the peripheral section of the MC6846. When also does not affect Interrupt function of CPl.
this bit is set high, the peripheral data register, the peripheral
CONTROL OF CP2 PERIPHERAL CONTROL LINE
data direction register, and the interrupt flags associated
with the peripheral port (CSRl and CSR2) are all cleared. CP2 may be used as an input by wnting a zero Into PCR5
Other bits In the penpheral control register are not affected In thiS configuration, CP2 becomes a dual of CPl In repard
by PCR7. to generation of Interrupts. An active transition (as selected
PCR7 is set by either a logic zero at the ExternalliESET In- by PCR4) causes Bit Two of the Composite Status Register
put or under program control by wntlng a "one" Into the to be set. PCR3 IS then used to select whether the CP2 tran-
location. In any case, PCR7 may be cleared only by wntlng a SItion IS to cause CSR7 to be set - and thereby cause IRO to
"zero" Into the location while RESET IS high The bit must go low. CP2 has no effect on the Input latch function of the
be cleared to activate the port. MC6846.
Wntlng a one Into PCR5 causes CP2 to function as an out-
CONTROL OF CPl PERIPHERAL CONTROL LINE put PCR4 then determines whether CP2 IS to be used In a
CPl may be used as an Interrupt request to the MC6846, handshake or programmable output mode With
PCR4= "1", CP2 Will merely reflect the data wntten Into
•
as a strobe to allow latching of Input data, or both In any
case, the Input can be programmed to be activated by either PCR3 Since thiS can readily be changed under program
a positive or negative transition of the signal. These ootlons control, thiS mode allows CP2 to be a programmable output
are selected via Control Register Bits PCRO, PCR1, and line In much the same manner as those lines selected as out-
PCR2. puts by the Data Direction Register
The handshaking mode (PCR5= "1", PCR4= "0") allows
Control Register Bit 0 (PCRO) IS used to enable the inter- CP2 to perform one of two functions as selected by PCR3
rupt transfer circuitry of the MC6846 Regardless of the state With PCR3= "1", CP2 Will go low on the first positive E tran-
of PCRO, an active transition of CPl causes the Composite sition. ThiS Input/Output Acknowledge signal IS released
Status Register Bit One (CSR1) to be set If PCRO= "1", thiS (returns high) on the next positive transition of E
Interrupt Will be reflected In the Composite Interrupt Flag
(CSR7), and thus at the IRO output. CSRl IS cleared by a In the Interrupt Acknowledge mode (PCR5="1",
PCR4= PCR3= "0"), CP2 IS set when CSRl IS set by an ac-
Penpheral Port Reset condition or by either reading or
wntlng to the penpheral data register after the Composite tive transition of CPl It IS released Igoes low) on the first
positive transition of E after CSRl has been cleared via an
Status Register was last read. ThiS precludes Inadvertent
MPU Read or Write to the Penpheral Data Register (Note
cleanng of Interrupt flags generated between the time the
that the preViously descnbed conditions for cleanng CSRl
Status Register IS read and the manipulation of penpheral
stili apply.)
data
Control Register Bit One (PCR1) IS used to select the edge
which activates CPl. When PCRl = "0", CPl IS active on RESET SEQUENCE
negative transitions (hlgh-to-Iow) Low-to-hlgh transitions A tYPical reset sequence for the MC6846 Will Include In-
are sensed by CPl when PCRl = "1" Itialization of both the Penpheral Control and Data Direction
In addition to ItS use as an Interrupt Input, CPl can be us- Registers of the parallel port. It IS necessary to set up the
ed as a stroDe to capture Input data In an Internal latch ThiS Peripheral Control Register first, Since PCR7 ~ "0" IS a con-
option IS selected by wntlng a "one" Into Penpheral Control dition for writing data Into the Data Direction Register (A
Register Bit Two (PCR2). In operation, the data at the pins logiC zero at the external RESET Input automatically sets
designated by the Data Direction Register as Inputs Will be PCR7 )
captured by an active transition of CPl. An MPU Read of the
Penpheral Data Register Will result In the captured data be- SUMMARY
Ing transferred to the MPU - and It also releases the latch to The M C6846 has several optional modes of operation
allow capture of new data Note that successive active tran- which allow It to be used In a variety of applications The
SIStlonS With no Read Penpheral Data Command between follOWing tables are proVided for reference In selecting these
does not update the Input latch. Also, It should be noted modes
4·495
MC68460MC68A46
A2 Al AO REGISTER SELECTED
0 0 0 Combination Status Register
0 0 1 Peripheral Control Register
0 1 0 Data Direction Register
0 1 1 Peripheral Data Register
1 0 0 Combmation Status Register
1 0 1 Timer Control Register
1 1 0 Timer MSB Register
1 1 1 Timer LSB Register
X X X ROM Address
I
CP2 INTERRUPT FLAG I
0= NO ENABLED INTERRUPT FLAG SET 0" NO INT REQ 0= NO INT REQ.
1 = ONE OR MORE ENABLED INTERRUPT FLAGS SET.' 1 = INT REQUESTED 1 = INT REQUESTED
TCR7
I TCR6
I TCR5
I TCR4
I TCR3
I TCR2
I TCRI
I TCRO
I
I L I I I
INTERRUPT ENABLE
0= IRQ MASKED
L I INTERNAL RESET
0= TIMER ENABLED
1 = IRQ ENABLED 1 = RESET STATE
CLOCK SOURCE
TIMER OUTPUT ENABLE
0= EXTERNAL CLOCK (CTC)
0= OUTPUT DISABLED (LOW)
1 = OUTPUT ENAB LED I 1 = INTERNAL CLOCK (<1>2)
-- ---------------
FOR CASCADED SINGLE-SHOT 78 PRESCALE ENABLE
0= OUTPUT GOES LOW AT TIME OUT
I
0= CLOCK NOT PRESCALED
1 = OUTPUT GOES HIGH AT TIME OUT 1 = CLOCK PRESCALED H- 8)
TCR3 TCR4 TCR5 TIMER OPERATING MODE COUNTER INITIALIZATION INTERRUPT FLAG SET
0 0 0 CONTINUOUS CTG,[ +W + R T.O.
0 0 1 CASCADED SINGLE SHOT CTG,[ + R T.O
0 1 0 CONTINUOUS CTG,[ + R T.O.
0 1 1 NORMAL SINGLE SHOT CTG,[ + R T.O.
1 0 0 FREQUENCY COMPARISON CTG,[ -I- (W+T.O) +R CTG,[ BEFORE T.O
1 0 1 CTG,[ - 1+ R TO. BEFORE CTG'[-
1 1 0 PULSE WIDTH COMPARISON CTG,[ - 1+ R CTGt BEFORE T.O.
1 1 1 T.O. BEFORE CTGt
4-496
MC6846- MC68A46
PCR7
I PCR6
I PCRS
I PCR4 PCR3
I PCR2
I PCRl
I PCRO
I
I I
CP2 DIRECTION CONTROL
0= CP2 Is INPUT
I CPl INT. ENABLE
0= CPl INT. MASKED
I 1 = CP2 Is OUTPUT 1 = CPl INT. ENABLED
l
CPl INPUT LATCH CONTROL
1 = RESET CONDITION (CLEARS PERIPH
0= INPUT DATA NOT LATCHED
DATA & DATA DIRECTION REG + CSRl & CSR21 1 = INPUT DATA LATCHED ON ACTIVE CPl
I PCR4
I PCR3
I 0 0 INTERRUPT ACKNOWLEDGE
•
0 1 INPUT/OUTPUT ACKNOWLEDGE
CUSTOM PROGRAMMING*
By the programming of a single photomask for the After the EPROM(s) are marked, they should be placed In
MC6846, the customer may specify the content of the conductive IC camers and securely packed Do not use
memory and the method of enabling the outputs styrofoam
Information on the general options of the MC6846 should
be submitted on an Organizational Data form such as that
shown In Figure 19. FIGURE A-1
Information for custom memory content may be sent to
Motorola In one of two forms (shown In order of
preferencel'
1. EPROMs
2 MOOS Diskette
The specification should be formatted and packaged, as
xxx
indicated In the appropflate paragraph below, and mailed
prepaid and Insured With a cover letter to
Motorola Inc
MPU Marketing L2787
3501 Ed Bluestein Blvd
Austin, Texas 78721
A copy of the cover letter should also be mailed separately
xsoo XCOO
EPROMs xx = Customer 10
MCM2708 and MCM2716 type EPROMs, programmed
With the custom program (positive logic notation for address
and data), may be submitted for pattern generation The
MC2708s must be clearly marked to indicate which PROM MOOS DISKETTE
corresponds to which address space ($X800-$XFFF) See The start/end location should be wfltten on the label,
Figure A-l for recommended marking procedure EXORcisor format
4-497
FIGURE 19 - FORMAT FOR PROGRAMMING GENERAL OPTIONS
ORGANIZATIONAL DATA
MC6846 COMBINATION ROM-I/O-TIMER
Customer:
I
Enable Options: (ROM ENABLE MUST DIFFER FROM I/O TIMER)
CHECK ONE COLUMN ONLY
o o I/O·TIMER SELECT 1;> 2.0V.
CSO 00 00 1
A6
0 X
A10
A9
X
X
1
X
X
1
X
X
X
x x=
0" O.8V.
4·498
MC6847
@ MOTOROLA Non-Interlace
MC6847Y
Interlace
MOS
MC6847 I MC6847Y VIDEO DISPLAY GENERATOR (VDGl IN-CHANNEL, SILICON-GATE)
The video display generator IVDG) provides a means of Interfacing VIDEO DISPLAY
the M6800 microprocessor family lor similar products) to a standard col-
or or black and white NTSC televIsion receiver. Applications of the VDG GENERATOR
Include video games, process control displays, home computers,
education, commUniCations, and graphics applications
The VDG reads data from memory and produces a video signal which
will allow the generation of alphanumenc or graphic displays The
generated video signal may be modulated to either channel 3 or 4 by
uSing the compatible MC1372 (TV chroma and video modulator!' This
modulated signal IS sUitable for reception by a standard unmodified
televIsion receiver A typical TV game IS shown In Figure 1
• Compatible with the M6800 Family, the M68000 Family, and Other
Microprocessor Families
•
• The Alphanumenc Modes Display 32 Characters Per Line by 16 Lines
USing Either the Internal ROM or an External Character Generator
~"""
• Alphanumenc and Semlgraphlc Modes May Be Mixed on a Char-
acter-by-Character BaSIS
I '( _S SUFFIX
• Alphanumenc Modes Support Selectable Inverse on a Character- ( , ' ' .' i CERDIP PACKAGE
by-Character BaSIS , CASE 734
4·499
MC6847-MC6847Y
FIGURE 1 - BLOCK DIAGRAM OF A TV GAME USING THE VDG AND THE MC6B09E MPU
4X Color
Burst Freq
143B MHz
RF Sign .,
rlD~ to TV
L
t3
SO-S2 Synchronous ClK ClK
E E Address M
MC6883
11
MC6809E C
Multiplexer DAO DAO 1
MPU
Q Q 3
AO-A15 ZO-Z7 WE ~ RAS R'S HS </>B ~ 7
16 8
t f
I
1-
</>A ~
MC6847 Y ~RF
Video
2
jJ
Dynamic Display ~
00-07 RAM l Generator
8 Array A
IMCM4027,
MCM4116, MCM6633
r---<r- T
C ~ 00-07
H
AO-A15 or MCM6665)
-
•
r--
B
U
F
F Mode
E
~ 5
AO-A15
r--
l
Game
-
Paddles
00-07
CS
A
T
C
MC6646 ~ H
i...-
ROM
1/0 Timer
CS
2
ELECTRICAL SPECIFICATIONS
ABSOLUTE MAXIMUM RATINGS
Characteristics Symbol Value Unit ThiS deVice contains circuitry to protect the in-
puts against damage due to high static voltages
Supply Voltage VCC 03to +70 V
or electnc fields, however. It IS adVised that nor-
Input Voltage Any Pin V,n -03to +70 V mal precautions be taken to avoid application of
Operating Temperature TA a to + 70 ·C any voltage higher than maximum rated voltages
Storage Temperature Tstg 65 to + 150 ·C to thiS high Impedance circUit Reliability of
operation IS enhanced If unused Inputs are tied to
an appropriate logiC voltage Ie g , either VSS or
THERMAL CHARACTERISTICS VCC)
4-500
MC6847-MC6847Y
DC (STATIC) CHARACTERISTICS IVCC =5 0 V ±5%, VSS =00 V, T A =O°C to 70°C unless otherwise noted I
Characteristic Symbol Min Typ Max Unit
Input High Voltage :
ClK VIH Vss + 24 ~
VCC V
Other Inputs VSS + 2 0 ~
Vec
Input low Voltage
ClK Vil Vss ~O 3 ~
Vss + 04 V
Other Inputs VSS - 03 - VSS + 0 S
Input leakage Current, Force 5 25 V on Pin Under Test,
VCC=55 V ClK, GMO·GM2, INV, INT/EXT, MS, VSS, lin ~ ~
25 ~A
DDO-DD7, A/S, A/G
Three·State 10ff Statel Input Current DAO·DA 12
10l - ~
± 10 ~A
Force 2 4 V and 04 V on Pin Under Test
Output High Voltage ICload = 30 pF, Iload = ~ 100 ~A RP, HS, FS VOH 24 - ~
V
OutputHlghVoltageICload~55pF, Iload~ -l00~AI DAO·DA12 VOH 24 - ~
V
Output low Voltage ICload~3O pF, Iload~ 1 6 mAl RP, HS, FS VOL - ~
VSS + 04 V
Output low Voltage ICload = 55 pF, Iload = 1 6 mAl DAO·DA12 VOL - - VSS + 0 4 V
Output High Current ISourclng) All Outputs I Except
10H ~ 100 - - ~A
(VOH=24V) </>A, </>B, Y, and CHS)
Output low Current (Sinking) All Outputs I Except
10l 16 - - rnA
IVOl=O 4 V) </>A, </>B, Y, and CHB)
•
Input Capacitance (V in 0, TA 25°C, f 10MHz) All Inputs Cin 75 pF
Internal Power DISSipatIOn IMeasured at T A ~ 0 to 70°C) PINT 600 mW
Chroma </>A Voltage IFlgure 3) VIH 1S 20 22
ICload=20 pF, Rload= 100 kill VR 134 15 166 V
INote 11 VOL OS 10 12
Chroma </>B Voltage IFlgure 3) VIH 1S 20 22
ICload=20 pF, Rl oa d=l00 kill VR 134 15 i 66
V
INote 11 VOL o SO 10 12
VS urst 1 07 125 143
luminance Y Voltage IFlgure 3)
ICload = 20 pF, Rload = 100 kill
(Voltage Synchronization) Vs 09 10 11
IVoltage Blank) VSlank 063 077 09
V
IVoltage Blackl VSlack 058 072 o S3
IVoltage White low) VWl 051 065 075
IVoltage White Medluml VWM 040 054 065
IVoltage White Hlghl INote 11 VWH 027 042 053
Chroma Bias Voltage ICload=20 pF, Rload= 100 kill VR 027 VCC 03 VCC 033 VCC V
ReSistor % of VSS Tracking IAnalog Outputs linearity Errorl RT ~
10 30 %
NOTE 1 The speCified minimum and maximum number reflect performance of the VDG of the speCified temperature range OverlapPing vol-
tage levels Will not occur Refer to Figure 2
4-501
MC6847-MC6847Y
POWER CONSIDERATIONS
+5V VS ync
--L
VBlack
--L
NOTE The chrommance output cham IS Similar In design to the luminance chain
4-502
MC6847e MC6847Y
-
AC (DYNAMIC) CHARACTERISTICS IVCC-5 0 V ±5% TA --O·C to 70·C) Iload ClfCUlt 01 Figure 3)
Characteristic Symbol Min Max Unit Figure
ClK IFrequency 13579545 Color Burst Frequency) I 3579635 35B7566 MHz 4
ClK Duty Cycle ClKdc 45 55 % 4
Clock Rise Time tClKr - 50 ns 4
Clock Fall Time tClKI - 50 ns 4
Clock Pulse Width PWClK 120 160 ns 4
Honzontal Display Address Delay from Counter DAD-DA3 tHDAD - 490 ns 4,5,6
DA4 tHDA4D - 550 ns 5,6
Honzontal Display Address Hold Time tHDAH 0 - 4,5,6
ns
tHDA4H 0 -
Display Data Setup Time CSS,INV, A/S, iJilT'/EXT, DDD-DD7 tDDS 70 - ns 4,5,6
Display Data Hold Time CSS,INV, A/S'\flT/EXT, DDD-DD7 tDDH 140 - ns 4,5,6
Honzontal Sync 1m) Delay Fall tDHSI - 550
ns 7
Rise tDHSr - 740
Row Preset IRP) Delay Fall tDRPI - 660
7
ns
Rise tDRDr 540
Vertical Display Address Delay Irom Counter DA5-DA12 WOAD - 60 "s 7
Vertical Display Address Hold Time tVDAH - 220 ns 7
Field Sync II'S) Delay Fall tDFSI - 520
ns 8
•
Rise tDFSr 600
Memory Select low to Display Address High-Impedance tDMST - 80 ns S
Memory Select High to Display Address Valid tDMSV - 400 ns S
Chroma Rise and Fall Times
Iq,A Rise Time) trCq,A - 100
trq,A - 100
Iq,A Fall Time) tICq,A - 100
tlq,A - 100 ns 12
Iq,B Rise Time) trCt/>B - 100
trq,B - 100
Iq,B Fall Time) tlCt/>B - 100
tlq,B - 100
Color Burst Rise Time on q,B Output tCBr - 100 ns 12
Color Burst Fall Time on q,B Output tCBI 100 ns 12
Chroma Phase Delay I Measured with Respect to "Y" Output)
q,A tVA -50 140 ns 11
q,B tYB -50 140
Lummance Rise Time try - 100 ns 12
luminance Fall Time tlv - 100 ns 12
Honzontal Sync Rise Time on Y Output tHr - 100 ns 12
HOrizontal Sync Fall Time on Y Output tHI 100 ns 12
Honzontal Blanking Rise Time on Y Output tHBr - 100 ns 12
Honzontal Blanking Fall Time on Y Output tHBI - 100 ns 12
Front Porch DuaratlOn Time 17 x 11fl tFP 18 2.4 ,.s 12
Back Porch Duration Time 117 5x 111) tBP 45 51 ,.s 12
Left Border DuratIOn Time 129 5 x 11fl tlB 75 83 "s 12
Right Border Duration Time 128 x 11fl tRB 75 83 ,.s 12
Color Burst DuratIOn Time 110 5 x 111) tCB 27 3,2 ,.s 12
r
POint
0
24 k 100 k
MMD7000
30PF
or EqUiv
':' ':'
4-503
MC6847e MC6847Y
tClKf--!~~_-
NOTES
1 The VDG may power-up uSing either the riSing or failing edge of the clock (dotted Ime)
2 Transitions of DA4-DA 12 occur outside the display area DAO~DA3 access the 16 bytes of data displayed dUring each scan line In the dls~
II play area
long cycle timing applies to CG1, RG1, RG2, and RG3 modes (see Table 31 A/G IS high, AS, INT IEXT, and INV Input levels do not affect
the VDG In long cycle modes
Usable RAM access time for the long cycle may be calculated USlflg the following equation
tRACl ~ S.l/l max - tHDAD max - tDDS max - tClK
If address and data buffers are used, the access time must be adjusted accordingly
All timing IS measured to and from a low voltage of 0 8 volts and a high voltage of 20 volts unless otherwise specified
tClKr
ClK
DAO-DA3
DA4
DDO-DDl
CSS, A/G,
INT/EXl
NOTES
The VOG may power-up uSing either the rising or falling edge of the clock as shown In Figure 4
Transitions of DA5-0A 12 occur outside the display area DAO-OA4 access the 32 bytes of data displayed during each scan line In the dis-
play area
3 Short cycle timing applies to the four alphanumenc modes, two semlgraphlc modes, and to the CG2, CG3, CG6, RG6 modes (see Table 3)
For the four graphic modes, A/G IS high and the A/S, INTI EXT, and INV Input levels do not affect the VDG
4 Usable RAM access time for the short cycle may be calculated uSing the follOWing equation
tRACS ~ 4.1/1 max - tHDA4D max - tDDS max - tClKr
If address and data buffers are used, the access time must be ad lusted accordingly
All timing IS measured to and from a low voltage of 0 8 volts and a high voltage of 20 volts unless otherWise specified
4-504
s:
(")
~•
s:
(")
FIGURE 6 - HORIZONTAL ADDRESS AND VALID DATA SETUP AND HOLD TIMING
~-<
(Timing Relationships Shown From Beginning of Line)
DA4 ,II ~. Valid Address =:~X:==.:__ Valid Address :::x-:.:.=-:_ Valid Address
I..'nu.\o( (CHARS !I _I
ZZ(III(//j/Ilj//I///J//JI/Tf//iIlI//llj//]I///jllllffilJ'c~ ~ . ~. ~'''c ~ 'PIC
00000' VJ/J/1l/1711/1/II/IJ//IIT!IIi//L '£d':-D':;-~/f)lllIlJl7lll/l/lfJ/O€!!i§!;Wjj./mJ/II/flI/IJ///IIIIIj/I(/IJJ€'~~~~
C55 lNV A/S INTlm
DOD-DO?
•
• s::
(')
~•
s::
(')
~-<
~
c:n
o
en
NOTES
1 All timing IS measured to and from a low vol.age of 0 8 volts and a high voltage of 2 0 volts unless otherwise specified
2 HS pulse width may be determmed by IWHS = 16 5.1Jf~ tDHSF+ tOHSr
3 HS to RP may be determined by tHSRP = 3 5.1/1- tOHSr + tORP!
4 RP pulse width may be determined by IWRP = 3 5.1/1 - tORPt + tORPr
5 DA5-DA12 will change during the Inactive portion of the display
6 tPHS=2275.1!1
7 100T= '/,I
MC6847- MC6847Y
ClK
•
. .- - - - - - - - t P F S - - - - - - - - - + !
Note 2
NOTES
1 tWFS=32.tPHST= 32.(277 5.1ff)
2 tPFS=262.tPHST=262.1227 5·1/f) for MC6847
tpFS = 262 5.tPHST=262 5.1227 5·1ff) for MC6847Y
MS
Note 1
tDMSV
tDMST
NOTES
1 MS IS asserted asynchronously with respect to ClK
4-507
MC6847 e MC6847Y
1 TFP
tWHS
J..
I - Left Border
tBP - - - -
IHST
Note 4 - - - - - - - - - - - - - - - . !
-------tAVB
Note 3
tlBlOlOt--------tAV
------ ..I
RIght Border I
-----1
~I<I(tRB1
Y ~:~Note~:lanc
~ ,",", ~~Ho~~~-l
WM ----" I r-----,I~_I-'""-__1 I
WH
End of
1---1, 1--__1 l-
, If A,iG ~O
Honzontal i'\/GoCSS
I I I
---t r
Stijfvnc tHC;IGOCSS
Note 1
tCB
I
I
I
I'
,
II
A/G+A/GoCSS I
VSurst A/G °
VOL
CSS I
II (Burst removed
I
IS
I I
for
i'\IG 0CSSoGMOI I I
I I
A/G + A/GoCSS
,
I
,Yellow, Blue
Red
~B~U~ff_~
II Magenta Orange
l::J
A/GoCSS ""_ _L...::G",re""e::.:.n.......,
NOTES
1 tHCD=35.1/f
2 tAV=128.1/f
3 tAVB= 185 5.1/f
4 Refer to Figure 7
5 tHBNK = 42·1 If
tYA_
f-
</>A
--
</>B
-tYB
4·508
MC6847-MC6847Y
tLB---l
Vsync
VSlank
y
VBlack
VWL
VWM
VWH
II
tCBr
<l>B ------...,':':'0:0:%'1
VBurst 90%
VOL
tCBf
tf<l>A
trC<I>A
tfC<I>A trC<I>A
VR
<l>A
4·509
MC6847-MC6847Y
"0
Q;
u: <1>
.c
" ~'" "
Jl
Active Display Area 192 H Lines
g)
c
g)
c .2 Ei:
.:; .:; <1> 0
z
~ .,. OJ!"Q;
N
N
w
<1>
c
E .:;
g) N
<0
C N
.:;
:s;
N
<0
Failing Edge of FS N
•
IStart of Vertical Blankl
~
Bottom Border 26 H Lines
-- I - -I-
tAV
tAVS
tHST
- - - - 2 5 6 Dots ------JooI
DISPLAY AREA
149,152 dots, all under VDG
control In all modes Each
one of up to 8 colors when on
depending on mode l
·One on each non-Interlaced line, for Interlace, the lines of the odd
field are copied Into the even field thus doubling the number of dis-
played dots
4-510
MC6847-MC6847Y
VIDEO DISPLAY GENERATOR DESCRIPTION change dunng the active display area. A4 changes dunng the
actIVe display area m the alphanumencs, semlgraphics, CG2,
The MC6847/MC6847Y video display generators provide a CG3, CG6, and RG6 modes. A&-A12 cfl not togglewlthm the
simple mterface for display of digital Information on a color active display area but mstead, npple through the address
monitor or standard color/black and white televIsion dunng border and blankmg time.
receiver.
TelevIsion transmissions in North and South Amenca and DATA INPUTS (DOG-DD7)
Japan conform to the National TelevIsion System Commit- Eight TTL compatible data lines are used to Input data
tee INTSCI standards ThiS system IS based on a field repeti- from RAM to be processed by the VDG The data IS then In-
tIOn rate of 60 fields per second. There are 525 Interlaced terpreted and transformed mto luminance IY) and chroma
lines per frame or one-half thiS number per field. outputs Iq,A and q,B)
The MC6847 scans one field of 262 lines 60 times per sec-
ond. The MC6847 non-Interlace VDG IS recommended for POWER INPUTS - VCC reqUIres +5 volts ±5%. VSS
use In systems lie., TV games and personal computers) reqUires zero volts and IS normally ground. The tolerance and
where absolute NTSC compatibility IS not reqUired If NTSC current requirements of the VDG are specified In the Elec-
compatibility IS reqUired, perhaps for caption overlays on tncal Charactenstlcs.
broad-case signals, then the MC6847Y mterlace VDG IS
recommended. VIDEO OUTPUTS (q,A, q,B, Y, CHB) - These four analog
outputs are used to transfer luminance and color Information
NOTE to a standard NTSC color teleVISion receiver, either via the
A system with the MC6847 VDG and the MC1372 MC1372 RF modulator or via dnvers directly Into Y, q,A, q,B
Video modulator forms a transmitter, transmlttmg at teleVISion Video Inputs Isee Figures 10, 11, and 121.
61 2 MHz Ichannel3) or 6725 MHz Ichannel4) depen-
•
ding on component values chosen ThiS bemg a Class I Luminance (V) - ThiS SIX level analog output contams
TV deVice, care must be taken to meet FCC re- composite sync, blankmg and four levels of Video luminance.
qUirements Part 15, Subpart H However, If the com-
posite Video output from the MC1372 were to dnve the q,A - ThiS three level analog output IS used m combma-
teleVISion directly, Section 15.7 of the FCC specifica- tlon with q,B and Y outputs to speCify one of eight colors.
tIOn must be adhered to.
q,B - ThiS four level output IS used In combination with
q,A and Y outputs to speCify one of eight colors Additional-
SIGNAL DESCRIPTION Iy, one analog level IS used to specify the time of the color
bu rst reference Signal
DISPLAV ADDRESS OUTPUT LINES (DAG-DA12)
Thirteen address Imes are used by the VDG to scan the
display memory as shown m Figures 4-7 The starting ad- Chroma Bias (CHB) - ThiS pin IS an analog output and
dress of the display memory IS located at the upper left cor- proVides a DC reference corresponding to the quiescent
ner of the display screen. As the teleVISion sweeps from the value of q,A and </>B. CHB IS used to guarantee good thermal
left to nght and top to bottom, the VDG Increments the trackmg and minimize the vanatlOn between the MC1372end
RAM display address. The tlmmg for two accesses starting MC6847. ThiS pm, when pulled low, resets certain registers
at the begmnlng of the line IS shown In Figure 6 These lines wlthm the chip. In a user's system, thiS pm should not nor-
are TTL compatible and may be forced Into a hlgh- mally be used as an mput It IS used mamly to enhance test
Impedance state whenever MS Ipln 12) goes low AO-A3 capabilities wlthm the factory
+5V
+5V
01,02-2N3646
Contributed by Ted Hanwlck, Honeywell, Inc
4·511
MC6847- MC6847Y
CLOCK (ClK) - The VDG clock Input (ClK) requires a ROW PRESET (RP) - If deSired, an external character
3 579545 M Hz (standard color burst) TV crystal frequency generator ROM may be used with the VDG However, an ex-
square wave The duty cycle of this clock must be between ternal four bit counter must be added to supply row ad-
45 and 55% Since It controls the width of alternate dots on dresses The counter IS clocked by the HS signal and IS
the televIsion screen The MC1372 RF modulator may be cleared by the RP signal. RP pulses occur In all alphanumeric
used to supply the 3 579545 MHz clock and has provIsions and semlgraphlcs modes; no pulses are output In. the full
for a duty cycle adjustment. The VDG will power-up uSing graphiC modes. RP occurs after the first valid 12 lines
either the rising or falling edge of the clock. The dotted line Therefore, use an FS clocked preloadable counter such as a
on the ClK signal In Figure 4 Indicates thiS characteristic of 74lS161 as shown In Figures 7, 14, and 23
latching In data on either clock edge
MODE CONTROL LINES INPUT (A/G, A/S, m/EXT,
SYNCHRONIZING OUTPUTS (i'S, AS, AP) GMO, GM1, GM2, CSS, INV)
Three TTL compatible outputs provide CirCUitS, exterior to Eight TTL compatible Inputs are used to control the
the VDG, with timing references to the following Internal operating mode of the VDG A/S INT/EXT, CSS, and INV
VDG states' may be changed on a character-by-character baSIS The CSS
Pin IS used to select between two pOSSible alphanumeric col-
+5V
3 5 6
+5V
PO P1 P2 P3
16
VCC
MR
CEP
9 10
From PE 74LS161 CET
MC6847
2 GND
CP~
00 01 02 03
11
\ )
v
Row Address
(Zero Through Eleven I
4-512
MC6847-MC6847Y
A/G A/S iFlf/EXT INV GM2 GMI GMO Alphal Graphic Mode Select , of Colors
0 0 0 0 X X X Internal Alphanumerics
0 0 0 1 X X X Internal Alphanumerics Inverted
2
0 0 1 0 X X X External Alphanumerics
0 0 1 1 X X X External Alphanumerics Inverted
0 1 0 X X X X Semlgraphlcs 4 (SG4) 8
0 1 1 X X X X Semlgraphlcs 6 ISG6) 8
1 X X X 0 0 0 64x64 Color Graphics One ICG1) 4
1 X X X 0 0 1 128x64 Resolution Graphics One IRG1) 2
1 X X X 0 1 0 128 x 64 Color Graphics Two ICG2) 4
1 X X X 0 1 1 128x96 Resolution Graphics Two IRG2) 2
1 X X X 1 0 0 128 x 96 Color Graphic. Three ICG3) 4
1 X X X 1 0 1 128x 192 Resolution Graphics Three IRG3) 2
1 X X X 1 1 0 128 x 192 Color Graphics S'x ICG6) 4
1 X X X 1 1 1 256 x 192 Resolution Graphics S'x IRG6) 2
shift of one full 3 58 MHz cycle One of the differences be- of every honzontal blanking penod ThiS color burst IS sup-
tween these access times, In the short access time frame, IS pressed dunng vertical sync and equaliZing Intervals Color
a shift of one full 358 MHz cycle from the corresponding burst IS also suppressed In the most dense two color graphiC
normal long access time frame, as shown In Figure 6 The modes ThiS leads to some Interesting rainbow effects on the
•
modes uSing short access times read memory tWice as often display which IS frequency and pattern dependent. The ver-
as the long access modes tical timing for the VDG IS given In Figure 18 Vertical retrace
IS Initiated by the luminance Signal being brought to the
blanking level The vertical blanking penod beginS With three
OPERATION OF THE VDG lines of equaliZing pulses followed by three lines of serrated
vertical sync pulses followed by three more lines of equaliz-
A slmphfled block diagram of the VDG IS shown In Figure Ing pulses The remaining vertical blanking penod contains
17a and a detailed block diagram IS shown In Figure 17b the normal honzontal sync pulses The equaliZing and serra-
The externally generated 3 58 MHz color burst clock dnves tion pulses are at half line frequency Notice the difference In
the VDG Refernng to Figures 11 and 12, note that the spacing between the last honzontal sync pulse and the first
honzontal screen span from blanking to blanking IS 193 1 equaliZing pulse In even and odd fields. It IS the half line dif-
clock penods ( '" 53 95 ,..sl The display Window IS offset from ference between fields that produces the Interlaced picture In
the left-hand edge by 283 penods and lasts for 128 penods a frame. Vertical timing between fields for the non-Interlaced
(35 75,...1 Of the 242 hnes on the vertical screen from blank- VDG, on the other hand, IS Identical The equaliZing and ser-
Ing to blanking, 192 hnes are used for the display The ration pulses are, however, at the honzontal frequency
display Window IS offset from the top by 25 lines Under the The 358M Hz color frequency IS also used to clock the
constraint of the master clock, the smallest display element Video shift register load counter ThiS counter and the Video
pOSSible for the VDG IS half penod of the 358 MHz clock shift clock inhibit circUitry denve the dot-clock for the output
Wide by one scan line high All other display elements are of the Video shift registers and the load Signals for the Video
multiples of thiS baSIC SIZe shift registers' Input latches The vertical and honzontal ad-
dress counters generate the addresses for the external
DISPLAY MEMORY ADDRESS DRIVERS display memory
The address dnvers normally dnve the Video refresh ad-
dress Into the display memory so characters may be INTERNAL CHARACTER GENERATOR ROM
displayed on the CRT When the memory select pin IMSI IS Since many uses of the VDG Will Involve the display of
pulled low by an external decoder, the dnver outputs go to a alphanumenc data, a character-generator ROM IS Included
high-Impedance state so external three-state dnvers may on the chip ThiS ROM Will generate 64 standard 5 x 7 dot
SWitch the M PU produced address onto the display memory matnx characters from standard 6-blt ASCII Input A stan-
address bus, the MPU may directly manipulate data In the dard character set IS Included In the MC6847 although the
display memory ROM IS custom programmable
4-513
MC6847-MC6847Y
+5 OV
VDD VSS
VDG
Refresh
RAM
13
512 Bytes to
6K Bytes
Timing
CC
and
Control
8
A/S
•
A/G
GM2
GMI
GMO
CSS
6,7 or B
Character
Generator
ROM
H--'y....O LumInance
Parallel To
Senal Shift Register,
Video Chroma Encoder
4-514
~
(")
~-<
A/G
! i !
Row Counter
A/S I (-121 i
I I I
Jm'1
EXT
~
...
(J'I
! Vertical +Immg ~
GMl lmear Shift Register Counter
I l S RC I I
I I 1 I
!Horlzontal Timing!
I l.S R ~ I ~1 ~2
Vee 1 03 MHz
:Ei~~:,1 II I:~II :~
+5V Non-Interlaced
Voo
Vss VOG
':" 358MHz
elK
II
MC6847- MC6857Y
3 tpHS --+I-
3 tpHS ~ 3 tPHS .-J
i+--------19tPHS .,
"Y"
~ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tF or (1/tvFNI)---
~------tvBNK--N-ot-e-3---~~ Note 4
• Y
</>B
~ G/AoCSS
~
G/AOJ;!
G/A+ G/A+
G/AoCSS
..
_!!l
G/AoCSS
~AOCSS
~ 1£ §
~
§ ; ~
~
~ ~
VIH GtA+G/AoCSS
</>A VR --~~cr=---~"</>WA"~I---~nrICI~~~=========
0
FS
VOL
-, I.
G/PioCSS
twFS .1
~I------------~\~-------------
·Note. No Row Preset Occurs Here
RP
NOTES 1[ J I of 31 468 kHz clocks ·tHBNK could actually be considered as part of the border -
(1/31.468 kHzl=31.n83,.s especlallv for purposes of writing to the screen The same holds
Non-Parentheses = I of 358M Hz Clocks true for the upper border.
1/3.58 MHz=279.366 ns
Time marks 466 and 0 are the same pOints In time
4-516
MC6847 e MC6847Y
~I
I
I
I
I
:::;1
I
II
-----+----------~:~~~~~n~~~----~---~
:::::::::i=::::::::::::::::~::::::::::=G~/A~+~G~/~(j~OC~S~S~~::~____
G/ AoCSS "<pA"
r-______ ~(]
I
------lU~~~====~tR;P====~.~~r----------------------------------
~~tHSRP Note 2 ~~tWRP
First Row Preset to Occur
Comes After the FIrst ActIVe
Row of Characters
4·517
MC6847- MC6847Y
•
TABLE 2 - SUMMARY OF MODES
Major Mode 1 - Alpha Modes
[tjJT
(Internal)
+D~
T 12
TH:"
Alphanumerics 512xa
00
0
0
0
T 2
... ~
0 0
0 0 12
(External) 0
0
0
0
0
0 0
4·518
MC6847-MC6847Y
[W",m",
Semlgraphlc 6 512x8
~"'m,"' 4
•
Major Mode 2 - Graphics Modes
·Graphlcs mode turns on or off each element. The color may be one of two.
4-519
MC6847- MC6857Y
G S
VDG Pins
EXT/lNT GM2 GMl GMO CSS INV Character Cob
Green
Col••
Background
Black
...... OllPleyMode
32 Characters
Black Black per row
Green
Orange Black 16 Characters
Black Orange Black
l, C2 Cl CO Color
0 X X Black
64 Display elements
0 0 G...n
per row
0 I Yellow
0 Blue Black
32 Display elements
Rod
Buff
1 Cyan
II
0 Magenta
1 1 Orange
l, Cl CO Color
0 X Black
0 Green
64 Display elements
0 Yellow
per row
1 Blue Black
R.d
48 Display elements
Black
Buff
Cyan
Magenta
1 Orange
Cl CO I 1,..0 or
0 0 Green
0 Yellow Green 64 Display elements
Blue per row
R.d
Buff Buff 64 Display elements
Cyan
Magenta
Orange
l, Color 128 Display elements
0 Black Green per row
1 G... n
0 Black 64 Display elements
Buff Buff
128 Display elements
Same color as Greer per row
Color GraphICs
a..
64 Display elements
Buff
128 Display elements
Same color as Green per row
Resolution
GraphiCS One 96 Display elements
Buff
128 Display elements ,
S8me color 8S Green per row
Color GraphiCS
On.
96 Display elements
Buff mrows
128 Display elements
Same color as Green per row
Resolution
Graphics One
192 DISpl8Y elements
Buff In rows
4-520
MC6847 e MC6847Y
TV Scr••n
VDG Dat8 Bua Comments
C55 or INV}
extra ASCII Code
IntemalAlphanumerlCS
.t !.::.: I I I I II I II
graphiC symbol sets with up 10 256 different 8 x 12 dot "characters"
1" ~:::
may be displayed
One Row of
Custom Characters
~
The SEMIGRAPHICS FOUR mode uses an Internal "course graphics"
'f6 ~~
generator In which a rectangle (eight dots by twelve dots) IS diVided
Into four equal parts The luminance of each part IS determined by a
L3 L2
t---
corresponding bit on the VDG data bus The color of Illuminated parts
IS determined by three bits
6 Ll La \000
i -'-- Element
• L5
4
144H44~
L3 L,
• L1 LO
l4
} 0o,
Element
Ic, ICo IL51"1 L31 L,I L11 Lol
The SEMIGRAPHIC SIX mode IS Similar to the SEMIGRAPHIC FOUR
mode with the follOWing differences The eight dot by twelve dot rec-
tangle IS diVided Into SIX equal parts Color IS determined by the two
remaining bits
Ic, ICo Ic, ICo IC11 Co Ic, Icol The COLOR GRAPHICS TWO mode uses a maximum of 2048 bytes
of display RAM In which one pair of bits speCifies one picture element
-+j'h I I I , i 3072 bytes of display RAM In which one bit speCifies one picture ele-
L7 'C:t ment
Ic, I Co IC11 Co IC11 Co IC11 Co I display RAM In which one pair 01 bits speCifies one picture element
4-521
MC6857· MC6847Y
1 2 3 _4 5 _6 7
MD4= INV= D4
MD7= AS= D7
illuminated BaCkground,
Dark Character
8 _ 9 _ A _B _C _ 0 _ E _ F
88ro~~ 000
ra.
..81 0_ ABC 0 E F G H I J K l M N 0
§~~8§
HiiUH
1__ paR STU V W x Y Z I
•
the color of the Illuminated elements. The most Significant THE 128 x 96 RESOLUTION GRAPHICS TWO IRG2)
bit IS unused Figure 21 shows the color and pattern selec- MODE - The 128 x 96 graphiCS mode generates a display
tions. In Semlgraphlcs 6 the 8 x 12 dot character block IS matnx 128 elements Wide by 96 elements high Each element
diVided Into SIX pixels, each four half-clocks by four scan may be either ON or OFF However, the entire display may
lines. The SIX low-order bits of each byte of incoming data be one of two colors selected by uSing the color set select
select one of 64 pOSSible Illumination patterns while the ess pin A 1 5k x 8 display memory IS reqUired The display RAM
Input and the high-order data bits 1006-0071 determine the IS accessed 16 times per honzontal line Each pixel equals
color of the Illuminated elements two half-clocks by two scan lines
The display window In malar mode 2 Ifull graphiCS) has a
less ngorous format than In major mode 1 The display THE 128 x 96 COLOR GRAPHICS THREE ICG3) MODE -
elements vary from one scan line to three scan lines In The 128 x 96 color graphiCS mode generates a display 128
height. The length of the display element IS either eight or elements Wide by 96 elements high Each element may be
sixteen half-penods wide Each display element IS diVided in- one of four colors A 3k x 8 display memory IS reqUired The
to four or eight pixels. The former corresponds to a full color display RAM IS accessed 32 times per honzontal line Each
mode while the latter a restncted color mode, like the pixel equals two half-clocks by two scan lines
semlgraphlcs modes, represents IlIumlnaliOn data When It IS
high the pixel IS Illuminated with the color chosen by the col- THE 128 x 192 RESOLUTION GRAPHICS THREE IRG3)
or set select leSSI pin. When It IS low the pixel IS black In MODE - The 128 x 192 graphiCS mode generates a display
the full color modes, pairs of data bits choose one of four matnx 128 elements Wide by 192 elements high Each ele-
colors In one of two color sets defined by the ess pin ment may be either ON or OFF, but the ON element may be
Oependlng on the state of the ess Pin, the area outSide the one of two colors selected With the color set select pin A
display window IS either green or buff The display formats 3k x 8 display memory IS reqUired. The display RAM IS ac-
and color selection for thiS major mode are summanzed In cessed 16 times per honzontal line Each pixel equals two
Figure 19. half-clocks by one scan line
THE 64x64 COLOR GRAPHICS ONE (CG1) MODE - THE 128x 192 COLOR GRAPHICS SIX ICG6) MODE -
The 64 x 64 color graphiCS mode generates a display matnx The 128x 192 color graphiCS mode generates a display 128
of 64 elements Wide by 64 elements high. Each element may elements Wide by 192 elements high Each element may be
be one of four colors. A lk x 8 display memory IS reqUired one of four colors. A 6k x 8 display memory IS reqUired The
The display RAM IS accessed 16 times per honzontal line. display RAM IS accessed 32 times per honzontal Ime Each
Each pixel equals four half-clocks by three scan lines pixel equals two half-clocks by one scan line
THE 128 x 64 RESOLUTION GRAPHICS ONE (RG1) THE 256 x 192 RESOLUTION GRAPHICS SIX (RG6)
MODE - The 128x 64 graphiCS mode generates a matnx MODE - The 256 x 193 graphiCS mode generates a display
128 elements Wide by 64 elements high. Each element may 256 elements Wide by 192 elements high. Each element may
be either ON or OFF. However, the entire display may be one be either ON or OFF, but the ON element may be one of two
of two colors, selected by uSing the color set select pin. A colors selected With the color set select prn A 6k x 8 display
lkx8 display memory IS reqUired. The display RAM IS ac- memory IS reqUired. The display RAM IS accessed 32 times
cessed 16 times per honzontal line Each pixel equals two per hOrizontal line. Each pixel equals one half-clock by one
half-clocks by three scan lines. scan Irne.
4-522
MC6847-MC6857Y
05 04
I CSS I I D7 I Os I 05 I 04 I D3 I 02 I 01 I DO I 03 O2
1-
f..-- Chroma I... Luma
Semigraphics 6
--I 01 Do 4L
•
1 0 0 1 0 0 1 Yellow
1 0 1 0 0 1 0 Blue
1 0 1 1 0 1 1 Red
1 1 0 0 1 0 0 Buff
1 1 0 1 1 0 1 Cyan
1 1 1 0 1 1 0 Magenta
1 1 1 1 1 1 1 Orange
LI_D7'---_D...:6:..LI...:D5::....._D_4:....L..I_D.::.3_D...:2:..LI_D..;.1_ _
D::JOIColor Graphic ~--L--4-I~T/-2}-~~--~~lr ~--'--2-n~/2-}-.J.L......-'~T
,......{ - - - - - - C h r o m a - - - - - - J . o t l
..t..
I~~~~;~~~~hIC I I I I I I I I I
I 2L CG3
I D7 I D6 I D5 I ID4 D3 I D2 I I
D1 DO -;:RG1
'---'---2-n'-/21-.j-'----l\+T
I'" Luma --I 2 IT 12} ---l j.-lr
..:1..
I 2L RG2 r=:r:=r:::::::r:::::::J1 *G6
~~~~2~IT-/2~}~~~~lr 21T/21~ ~
4-523
MC6847e MC6847Y
TYPICAL SYSTEM IMPLEMENTATION rows The presence of row preset In major mode 1 serves as
The block diagram In Figure 23 shows how the VDG IS a flag for the beginning of a new element row DetectIOn of
related to other functional blocks In a typical system thiS Signal can Initiate a major mode SWitch from 1 to 2
(non-6883l. A negative row preset signal (Rl') generated by Display memory size IS a function of the display denSity
the VDG initializes the row scan counter for the external QUite often a graphiC display contains shapes that are several
character generator once every twelve scan lines, while the times larger than that of the display elements In the VDG
negative hOrizontal sync (~) acts as clock to thiS counter. ThiS IS particularly true of certain Video games Much of the
The negative field sync (rs) generates an Interrupt to the display consists of a fixed background The vertical size of a
MPU, signifying that the display memory can be updated display element can be doubled or quadrupled by Simply Ig-
without Interference with the VDG display function ThiS nOring the lowest order or the first two low order vertical ad-
signal must not be confused with the system vertical sync dresses, respectively, from the VDG. Reduction of address
signal. Field sync IS activated by the end of the vertical lines naturally leads to reduction In memory size Another
display window and deactIVated by the trailing edge of ver- method of memory reduction IS to store objects or object
tical sync. ThiS gives the MPU a total of thirty-two scan lines fragments In ROM and store their display addresses In the
or 2.03 ms to update the display memory. The MPU RAM portion of display memory Here, the larger the object
acknowledges the interrupt request from the VDG by bring- fragment, the greater the memory saving
Ing the negative memory select Input (MS) to the VDG low ASSOCIATED DEVICES
This puts the address bus output from the VDG Into hlgh-
Impedance state, thus relinquishing bus control to the MPU. MC6883 - SYNCHRONOUS ADDRESS MULTIPLEXER
The timing relationship of hOrizontal sync, row preset, and (SAM)
field sync are shown In Figures 7, 8, and 13. ThiS deVice, a linear bipolar companion to the MC6800 or
The display memory IS an element-· by-element map of the MC6809E (external clock Inputs), IS primarily a VDG
display window on the screen The VDG addresses the transparent-access controller. It allows the microprocessor
II display memory storage locations in succession and to load and store to VDG display memory ("screen RAM")
translates their contents Into luminance and chromlnance Without waiting for a blank screen Interval Figure 1 shows a
levels. The frequency of address update IS dependent on the tYPical system uSing the SAM and the MC6809E The in-
length of the display element. Recall that display elements In herent Interleaved direct memory accesses IIDMA) which
major mode 1 are four periods and major mode 2 are either occur, continuously keep the VDG updated With the proper
four or eight periods of the master clock. Data from the data (,ndependently of mode), as well as keeping the
display memory IS latched on every address transition. dynamiC memory (used as system memory With the M C6833)
Hence, the data for the first display element must be stable refreshed ThiS IS done through a IDMA process as well, dur-
four or eight periods before the hOrizontal display Window Ing the time the VDG does not need display data Ihorlzontal
depending on the display mode selected. ThiS timing reqUire- and vertical sync times)
ment IS Illustrated In Figure 6. In addition to being a transparent memory access and
Examination of Figures 21 and 22 reveal that all display dynamiC memory controller, the SAM also functions as an
elements Within major mode 1 are similar while those Within external clock generator for the MC6800/6809E (slight addi-
major mode 2 are largely diSSimilar Therefore, mode SWitch- tional circuitry IS reqUired for the MC6800).
Ing between alphanumeric modes and semlgraphlc modes
can be carned out freely Care must be taken, however, MC1372/1373 CHROMA/RF MODULATOR
when performing mode SWitching In major mode 2. The only The MC1372 IS a chromlnance phase-shift modulator With
compatible modes are between CG1 and RG1, and between bUilt In RF up-converter. The part may be used Without the
CG6 and RG6 Minor mode SWitching Within the same major RF modulator for chroma only, or the RF OSCillator may be
mode In a given element row can be achieved as long as It IS defeated and composite chromlnance and luminance can be
between compatible modes. It should be qUite apparent that obtained.
major mode SWitching on an element-by-element baSIS IS Im- The MC1373 IS an RF modulator only (Similar to the sec-
practical. It can be achieved, however, at the expense of ond half of the MC1372) and can be used to up-modulate
added component count The element formats in the VDG separate luma and chroma Signals at the receiver for high
lend themselves to major mode SWitching between element quality Video reception
4·524
I,
I
MC6847· MC6847Y
Game
Paddles
Dr-f,,------~~t_------------~------------------------~~----_.
Ar-~176~~'~2----~~----------------r-~
Addr
M68XX
Decoder
MPU Latch
iROb-----------------------------,
eLK
Display
i'S Mode Me Memory
eLK Control
ToTV Set
12
R~ y
II
MC6847
MC1372
B~Y VDC
eHB
0
RF
Tank INT/EXT
External
~ ______
I-~'-;------------,l_l ~ow ~:~:~~:~~
~ ROM
0
Char Add
4·525
MC6857· MC6847Y
2716 EPROM (supplied by the customer! from the data file disk with a felt-tip pen The floppies are not to be returned by
used to create the custom mask to aid In the venf,catlon pro- Motorola as they are used for archival storage The minimum
cess M DOS system files must be on the disk as well as the ab-
ROM VERIFICATION UNITS solute binary object file (filename LO type of fllel An object
Ten MC6847s containing the customer's ROM pattern will file made from a memory dump uSing the ROLLOUT com-
be sent for program venf,cat,on These units will have been mand IS also admissable Consider submitting a source
made uSing the custom mask but are for the purpose of listing as well as the following files filename LX (EXOR-
ROM venf,cat,on only For expediency they are usually un- ciser'" loadable formatl and filename SA (ASCII Source
marked, packaged In ceramiC, and tested only at room Codel These files will of course be kept confidential and are
temperature and 5 volts These RVUs are Included In the used 11 to speed up the process In house If any problems
mask charge and are not production parts anse, and 21 to speed up our customer to factory Interface If
a user finds any software errors and needs assistance qUickly
FLEXIBLE DISKS from the factory representatives
The disk media submitted must be slllgie-sided, slngle- MDOS IS Motorola's Disk Operating System available on
denSity, 8-lnch, MDOS compatible flOPPies The customer development systems such as EXORcisers, or EXORsets,
must wnte the biliary file name and company name on the etc
•
FIGURE A-2
Address ________________________________________________________________________________________
City ___________________________________________________________________________________________
Pattern Media
2708 PROM
2716 PROM
MOOS Disk
INote 21 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Signature
Title __________________________________________________
4-526
MC6RSO
® MOTOROLA
11_0 MHz)
MC68ASO
11.5 MHz)
MCG8BSO
12.0 MHz)
•
• Optional Even and Odd Panty PLASTIC PACKAGE
CASE 700
• Panty, Overrun and Framing Error Checking
• Programmable Control Register
• Oplional ~ 1, -16, and - 64 Clock Modes
~
-
• Up to 1 0 Mbps Transmission
- -- l SUFFIX
• False Start Bit Deletion
• Penpheral/ Modem Control Functions
II CERAMIC PACKAGE
\ I CASE 716
• Double Buffered
• One- or Two-Stop Bit Operation
PIN ASSIGNMENT
MC6850 ASYNCHRONOUS COMMUNICATIONS INTERFACE ADAPTER
BLOCK DIAGRAM
VSS eTS
Rx Data i5Co
Ax ClK DQ
Data
Tx elK D1
TransmIt
Data Bus Bus
Data RTS D2
Buffers
Tx Data D3
iiiQ D4
Receive
Data eso D5
eS2 D6
eSl D7
Address
Selection
Control RS
and
and
Control
Interrupt Perlpherall Vee 13 A/iN
Modem
Control
4-527
MC6850-MC68A50-MC68850
MAXIMUM RATINGS
Characteristics Symbol Value Unit This device contains circuitry to protect the
Supply Voltage Vce - 03 to + 70 V Inputs against damage due to high static
Input Voltage Y,n - 03 to + 70 V voltages or electnc fields, however, It IS ad-
Operating Temperature Range
vised that normdl precautions be taken to
TL to TH
MC6850, MC68A50, MC68B50 aVOid application of dny voltage higher than
TA 0 to 70 'c
MC6850C, MC68A50C, MC68B50C -40 to +85 maximum rated voltages to this hlgh-
Impedance CirCUit Reliability of operation IS
Storage Temperature Range Tstg 55 to +150 "C enhanced If unused Inputs are tied to an ap-
pr0prlate logic voltage level (e 9 , either VSS
THERMAL CHARACTERISTICS or VCCI
Characteristic Symbol Value UOit
Thermal Resistance
Plastic 120
Ceramic °JA 60 "c/W
Cerdlp 65
POWER CONSIDERATIONS
•
Where
TA=Amblent Temperature, °C
8JA= Package Thermal Resistance, JunctlOn-to-Amblent, °C/W
PD= PINT+ PPORT
PINT=ICCxVCc. Watts - Chip Internal Power
PPORT= Port Power DIssipatIOn, Watts - User Deterrnlned
For most applications PPORT<C PINT and can be neglected PPORT may become Significant If the device IS configured to
drive Darlington bases or sink LED loads.
An approximate relationship between PD and T J Ilf PPORT IS neglected I IS
PD= K- IT J+ 273°CI {21
Solving equations 1 and 2 for K gives.
K = PDolT A + 273°CI + 8JA o PD 2 131
Where K IS a constant pertaining to the particular part K can be determined from equation 3 by measuring PD lat equillbrluml
for a known T A- USing thiS value of K the values of PD and T J can be obtained by solving equations 111 and 121 IteratIVely for any
value of T A
4·528
MC6850-MC68A50-MC68B50
F)GURE 1 - CLOCK PULSE W)DTH, LOW-STATE FIGURE 2 - CLOCK PULSE WIDTH, HIGH-STATE
Tx elk
I
Tx elk
0" Rx elk
Rx elk
"o.=1'----~
Tx elk
r-- tROS-----:--
Tx Data -------.X+J=------
'Too
Rx Clock ¥ "-
Enable
Rxel\(
RTS
Ax Data
IRQ
Note Timing measurements are referenced to and from a low voltage of 0.8 volts and a high voltage of 20 volts, unless otherwise noted
4-529
MC6850e MC68A50e MC68B50
I r-~--------------~~f~r--------(3~------~
R/VV,Address--~-+~~ri~~~~~------~~~~----~t-----------------------------~-+~~~
(NonMMuxed) ____~~~~~~~~~-------L~~~----~~--------------------------------~~~~~
Read Data
Non-Muxed
-----+--.....D---------------~~~~~~~~~~--------------~~:::::~=---~~--t1--~~
MPU Read Data Non-Muxed
C R
or ~4UIV
MMD7000
or Equ IV
Test POint
-t 3 kll
50V
I'00PF
C = 130 pF for DO 07 R =: 11.7 kH for 00-07
RTS
..: 30 pF for and Tx Data = 24 kn for RTSand Tx Data
4·530
FIGURE 9 - EXPANDED BLOCK DIAGRAM
Read/Wnte 13
ChlpSelectO 8 Transmit
Chip Select 1 10 Data 6 Transmit Data
Chip Select 2 9 Register
Register Select 11
b=~=~~~~;2----- 24 Clear-to-Send
DO 22
5tatus
0121 Register
0418
0517
5 Request-to-Send
0616
0715 Control
Register
I
Vcc= Pin 12 Receive Receive
Data Shift 2 Receive Date
VSS=Pln1 Register Register
4-531
double buffering). The second character Will be automatical- turned off and the MPU wntes Into a selected register.
ly transferred Into the Shift Register when the first character Therefore, the Read/Write signal IS used to select read-only
transmission IS completed. This sequence continues until all or wnte-only regIsters WIthin the ACIA.
the characters have been transmitted.
Chip Select (CSO, CS1, CS2) - These three hlgh-
RECEIVE Impedance TTL-compatible input lines are used to address
Data IS received from a peripheral by means of the Receive the ACIA The ACIA is selected when CSO and CS 1 are hIgh
Data Input A dlvlde-by-one clock ratio IS provided for an ex- and CS2 IS low. Transfers of data to and from the ACIA are
ternally synchronized clock (to ItS data) while the dlvide- then performed under the control of the Enable SIgnal,
by-16 and 64 ratios are provided for Internal synchronIZation Read/Write, and RegIster Select
Bit synchronization In the dlvlde-by-16 and 64 modes IS in-
Itiated by the detection of 8 or 32 low samples on the reCillve Register Select (RS) - The RegIster Select line IS a hlgh-
line In the dlvlde-by-16 and 64 modes respectively False start Impedance Input that IS TTL compatible. A high level IS used
bit deletion capability Insures that a full half bit of a start bit to select the Transmit/ ReceIve Data RegIsters and a low
has been received before the Internal clock IS synchronIZed level the Control/ Status Registers. The Read/Write signal
to the bit time As a character IS being received, parity (odd line IS used 10 conjunction WIth Register Select to select the
or even) Will be checked and the error IndicaliOn will be read-only or write-only register In each register pair.
available In the Status Register along With framing error,
overrun error, and Receive Data RegIster full. In a tYPIcal Interrupt Request (IRQ) - Interrupt Request is a TTL-
receiving sequence, the Status Register IS read to determine compatible, open-drain (no Internal pullup), active low out-
If a character has been received from a peripheral. If the put that is used to Interrupt the MPU The IRQ output re-
ReceIver Data Register IS full, the character IS placed on the mains low as long as the cause of the Interrupt IS present and
8-blt ACIA bus when a Read Data command IS received from the appropriate Interrupt enable WIthin the ACIA IS set The
II
the MPU. When parity has been selected for a 7-bit word (7 IRQ status bit, when high, Indicates the iRO output IS In the
bits plus parity), the receIver striPS the parity bIt (07 = 0) so active state.
that data alone is transferred to the MPU. ThiS feature Interrupts result from condItIons In both the transmitter
reduces MPU programming. The Status Register can con- and receIver sections of the ACIA The transmitter sectIOn
linue to be read to determine when another character IS causes an Interrupt when the Transmitter Interrupt Enabled
available In the ReceIve Data RegIster The receIver IS also condition IS selected (CR5eCR6), and the Transmit Data
double buffered so that a character can be read from the Register Empty (TDRE) status bIt IS high. The TORE status
data regIster as another character IS being receIved In the bIt Indicates the current status of the TransmItter Data
shIft register The above sequence continues until all RegIster except when inhibIted by Clear-ta-Send (CTS) be-
characters have been received. Ing hIgh or the ACIA beIng maIntained In the Reset condi-
tlon. The Interrupt IS cleared by wrlling data Into the
Transmit Data Register. The Interrupt IS masked by dIsabling
the Transmitter Interrupt via CR5 or CRB or by the loss of
INPUT/OUTPUT FUNCTIONS CTS whIch InhIbits the TORE status bit The Receiver sec-
tion causes an Interrupt when the ReceIver Interrupt Enable
ACIA INTERFACE SIGNALS FOR MPU IS set and the Receive Data RegIster Full (RDRF) status bIt IS
The ACIA Interfaces to the M6800 M PU With an 8-blt hIgh, an Overrun has occ"rred, or Data Carner Detect (DCD)
bidirectional data bus, three chip select lines, a regIster select has gone hIgh An Interrupt resultIng from the RDRF status
line, an Interrupt request line, read/Write line, and enable bIt can be cleared by reading data or resetting the ACIA. In-
line These SIgnals permit the MPU to have complete control terrupts caused by Overrun or loss of OCD are cleared by
over the ACIA. readIng the status regIster after the error conditIon has oc-
curred and then reading the Receive Data Register or reset-
ACIA Bidirectional Data (00-07) - The bIdirectional data ting the ACIA The receIver Interrupt IS masked by resetling
lines (DO-D7l allow for data transfer between the ACIA and the Receiver Interrupt Enable.
the MPU. The data bus output drivers are three-state deVices
that remain In the hIgh-Impedance (off) state except when CLOCK INPUTS
the MPU performs an ACIA read operatIon. Separate hIgh-Impedance TTL-compatible Inputs are pro-
Vided for clocking of transmItted and receIved data Clock
ACIA Enable (E) - The Enable Signal, E, IS a hlgh- frequencIes of 1, 16, or 64 times the data rate may be
Impedance TTL-compatIble Input that enables the bus In- selected.
put! output data buffers and clocks data to and from the
ACIA. ThIS Signal WIll normally be a derivatIve of the MC6800 Transmit Clock (Tx ClK) - The Transmit Clock Input IS
<1>2 Clock or MC6809 E clock. used for the clocking of transmItted data. The transmItter In-
Itiates data on the negative transItIon of the clock.
Read/Write (R/W) - The Read/Wnte line IS a hlgh-
Impedance Input that is TTL compatIble and IS used to con- Receive Clock (Rx ClK) - The Receive Clock Input IS
trol the directIon of data flow through the ACIA's Input/ out- used for synchronization of receIved data. (In the -1 mode,
put data bus Interface. When Read/Write is hIgh (MPU Read the clock and data must be synchronized externally) The
cycle), ACIA output drivers are turned on and a selected receiver samples the data on the POSItive tranSItion of the
regIster is read When It IS low, the ACIA output drivers are clock
4-532
MC6850-MC68A50-MC68B50
Transmit Data (Tx Data) - The Transmit Data output line TRANSMIT DATA REGISTER (TOR)
transfers senal data to a modem or other penpheral. Data IS wntten In the Transmit Data Register dunng the
negative transition of the enable (E) when the ACIA has been
PERIPHERAL/MODEM CONTROL addressed with RS high and R/W low. Wntlng data Into the
The ACIA Includes several functions that permit limited register causes the Transmit Data Register Empty bit In the
control of a penpheral or modem. The functions Included are Status Register to go low. Data can then be transmitted If
Clear-to-Send, Request-to-Send and Data Carner Detect the transmitter IS Idling and no character IS being transmit-
ted, then the transfer will take place within l-blt time of the
Clear-to-Send (CTS) This high-Impedance TTl- trailing edge of the Wnte command If a character IS being
compatible Input provides automatic control of the transmit- transmitted, the new data character will commence as soon
ting end of a commUnications link via the modem Clear-to- as the prevIous character IS complete The transfer of data
Send active low output by inhibiting the Transmit Data causes the Transmit Data Register Empty (TORE) bit to in-
Register Empty (TORE) status M. dicate empty
II
enables the MPU to control a penpheral or modem via the Data IS automatically transferred to the empty Receive
data bus. The RTS output corresponds to the state of the Data Register (RDR) from the receiver desenalizer (a shift
Control Register bits CR5 and CR6 When CR6 = 0 or both register) upon receiving a complete character ThiS event
CR5 and CR6 = 1, the RTS output IS low (the active state) causes the Receive Data Register Full bit (RDRF) In the
This output can also be used for Data Terminal Ready (DTR) status buffer to go high (full). Data may then be read
through the bus by addreSSing the ACIA and selecting the
Data Carrier Detect (DCD) - ThiS high-Impedance TTl- Receive Data Register with RS and R/W high when the
compatible Input provides automatic control, such as In the ACIA IS enabled. The non-destructive read cycle causes the
receiving end of a commUnications link by means of a RDRF bit to be cleared to empty although the data IS re-
modem Data Carner Detect output. The DCD Input Inhibits tained In the RDR. The status IS maintained by RDRF as to
and initializes the receiver section of the ACIA when high A whether or not the data IS current. When the Receive Data
low-to-hlgh transition of the Data Carner Detect Initiates an Register IS full, the automatic transfer of data from the
Interrupt to the MPU to indicate the occurrence of a loss of Receiver Shift Register to the Data Register IS inhibited and
carner when the Receive Interrupt Enable bit IS set The the RDR contents remain valid With ItS current status stored
Rx ClK must be running for proper DCD operation In the Status Register
Buffer Address
4·533
CONTROL REGISTER STATUS REGISTER
The ACIA Control Register consists of eight bits of wnte- Information on the status of the ACIA is available to the
only buffer that are selected when RS and R/W are low. This MPU by reading the ACIA Status Register ThiS read-only
register controls the function of the receiver, transmitter, in- register IS selected when RS IS low and R/W IS high. Infor-
terrupt enables, and the Request-to-Send peri- mation stored In thiS register Indicates the status of the
pheral/ modem control output. Transmit Data Register, the Receive Data Register and error
logiC, and the penpheral/modem status Inputs of the ACIA.
Counter Divide Select Bits (CRO and CR1) - The Counter
D,v,de Select Bits (CRO and CRll determine the divide ratios Receive Data Register Full (RDRF), Bit 0 - Receive Data
utilized In both the transmitter and receiver sections of the Register Full indicates that received data has been trans-
ACIA. Additionally, these bits are used to prOVide a master ferred to the Receive Data Register RDRF IS cleared after an
reset for the ACIA which clears the Status Register (except MPU read of the Receive Data Register or by a master reset.
for external conditions on CTS and DCD) and Initializes both The cleared or empty state indicates that the contents of the
the receiver and transmitter. Master reset does not affect Receive Data Register are not current. Data Carner Detect
other Control Register bits Note that after power-on or a being high also causes RDRF to indicate empty
power fali'! restart, these bits must be set hijlh to reset the
ACIA. After resetting, the clock diVide ratio may be selected. Transmit Data Register Empty (TORE), Bit 1 - The
These counter select bits provide for the following clock Transmit Data Register Empty bit being set high ,nd,cates
divide ratios: that the Transmit Data Register contents have been trans-
ferred and that new data may be entered The low state In-
CRI CRO Function dicates that the register IS full and that transmission of a new
a a +1 character has not begun since the last write data command
a 1 +16
I 1
1
a
1
+64
Master Reset
, a,, 1
a
8 ~its +' Stop Bit
B Bits + Even parity + 1 Stop Bit
Clear-to-Send (ffi), Bit 3 - The Clear-to-Send bit In-
dicates the state of the Clear-to-Send Input from a modem.
1 1 B Ejlts+ Odd Parny+ 1 Stop Bit A low ffi indicates that there is a Clear-to-Send from the
modem. In the high state, the Transmit Data Register Empty
Word length, Parity Select, and Stop Bit changes are not
bit IS Inhibited and the Clear-to-Send status bit Will be high
buffered and therefore become effective immediately.
Master reset does not affect the Clear-to-Send status bit.
Trensmitter Control Bits (CR6 and CRe) - Two Transmit-
Framing Error (FE), Bit 4 - Framing error indicates that
ter Control bits provide for the control of the interrupt from
the received character IS Improperly framed by a start and a
the Transmit Data Register Empty condition, the Request-to-
stop bit and is detected by the absence of the first stop bit.
Send (m) output, and the transmission of a Break level
ThiS error indicates a synchrOnization error, faulty transmis-
(space). The following encoding format is used:
sion, or a break condition. The framing error flag IS set or
reset dUring the receive data transfer time. Therefore, thiS er-
CRS CR6 Function
ror Indicator is present throughout the time that the
a
a ,
a ~=Iow, Transmitting Interrupt Disabled.
RTS= low, Transmitting Interrupt Enabled.
associated character IS available.
1
1 ,
a ~ = high, Transmitting Interrupt Disabled
RTS = low, Transmits a Break level on the Receiver Overrun (OVRN), Bit 6 - Overrun IS an error flag
that indicates that one or more characters In the data stream
Transmit Data Output Transmitting Inter-
rupt Disabled, were lost. That IS, a character or a number of characters
were received but not read from the Receive Data Register
Receive Intarrupt Enable Bit (CR7) - The follOWing inter- (RDR) pnor to subsequent characters being received. The
rupts Will be enabled by a high level in bit position 7 of the overrun condition begins at the midpOint of the last bit of the
Control Register (CR7): Receive Data Register Full, Overrun, second character received in succession without a read of
or a low-to-hlgh transition on the Data Carrier Detect (DCD) the RDR haVing occurred. The Overrun does not occur In the
signal line. Status Register until the valid character pnor to Overrun has
4·534
M~MamA~MC~BOO
been read. The RDRF bit remains set until the Overrun IS character IS In the RDR. If no panty IS selected, then both the
reset. Character synchronization IS maintained during the transmitter panty generator output and the receiver partly
Overrun condition. The Overrun Indication IS reset after the check results are inhibited.
reading of data from the Receive Data Register or by a
Master Reset. Interrupt Request (lRQI, Bit 7 - The IRQ bit indicates the
state of the TRQ output. Any interrupt c.:lndltlon with Its ap-
Parity Error (PEl, Bit 6 - The panty error flag indicates plicable enable will be Indicated in this status bit. Anytime
that the number of highs (ones) in the character does not the iRQ output is low the 'iRObit will be high to Indicate the
agree with the preselected odd or even parity. Odd panty is Interrupt or service request status. IRQ is cleared by a read
defined to be when the total number of ones IS odd. The operation to the Receive Data Register or a write operation
parity error indication Will be present as long as the data to the T r&nsmit Data Register.
4-535
MC6852
®
(1.0 MHzl
MOTOROLA MC68AS2
(1.5 MHzl
MC68BS2
(2.0 MHz)
~J
transmitted and received by the synchronous data Interface with syn-
chronization, fill character Insertion/deletion, and error checking The
functional configuration of the SSDA IS programmed via the data bus 24 P SUFFIX
dunng system initialization. Programmable control registers proVide . PLASTIC PACKAGE
control for vanable word lengths, transmit control, receive control, syn- CASE 709
chronization control, and Interrupt control Status, timing and control
lines proVide penpheral or modem control.
TYPical applications Include floppy disk controllers, cassette or car-
tndge tape controllers, data communications terminals, and numencal
control systems.
I
• Programmable Interrupts from Transmitter, Receiver, and Error
Detection LogiC
• Character Synchronization on One- or Two-Sync Codes
• External Synchronization Available for Parallel-Senal Operation
• Programmable Sync Code Register
~~'
• Up to 1.5 MHz TransmiSSion
• Penpheral/ Modem Control Functions
• Three Bytes of FIFO Buffenng on Both Transmit and Receive
• 7-,8-, or 9-Blt Transmission
S SUFFIX
• Optional Even and Odd Panty . CERDIP PACKAGE
• Panty, Overrun, and Underflow Status CASE 623
PIN ASSIGNMENT
Addressl Control
and Interrupt VSS CTS
Rx Data DCD
Peripheral! Rx CLK DO
Modem Tx CLK D1
Control
SM/DTR D2
Tx Data D3
ReceIve
Data
Data iRO D4
Bus TUF D5
1/0 Transmit
RESET D6
Data
CS D7
RS
VCC R/W
4-536
MC6852- MC68A52- MC68B52
MAXIMUM RATINGS
Rating Symbol Value Unit
Supply Voltage Vcc -03to+70 V
Input Voltage Vin 03to +70 V This device contains circuitry to protect the in-
Operating Temperature Range h toTH puts agamst damage due to high static voitages
MC6852, MC68A52, MC68B52 o to + 70 or electnc fields, however, It IS advsled that nor-
MC6852C, MC68A52C TA -40 to +85 °c mal precautions be taken to avoid application of
any voltage higher than maximum-rated voltages
Storage Temperature Range Tstg -55 to +150 °c to this high-Impedance CirCUit Reliability of
operation IS enhanced If unused Inputs are tled to
THERMAL CHARACTERISTICS an appropriate logic voltage level Ie g , either
VSS or VCC)
Characteristic Symbol Value Unit
Thermal Resistance
Plastic Package 120
Ceramic Package 8JA °C/W
60
Cerdlp Package 65
POWER CONSIDERATIONS
•
T J=TA+ (POoOJA) (1)
Where
TAEAmblent Temperature, °C
0JA. Package Thermal Resistance, Junctlon-to-Amblent, °C/W
PO-PINT+ PPORT
PINT"" ICC x VCC, Watts - Chip Internal Power
PPORTE Port Power DIssipatIOn, Watts - User Determined
For most applicatIOns PPORT<C PINT and can be neglected PPORT may become Significant If the device Ie configured to
drive Darlington bases or Sink LED loads
An approximate relatIOnship between Po and T J (,f PPORT IS neglected) IS
PO= K- IT J + 273°C) (2)
SolVing equations 1 and 2 for K gives'
K= POo(TA+273°C) +OJAo P0 2 (3)
Where K 15 a constant pertaining to the particular part K can be determined from equation 3 by measuring Po (at eqUilibrium)
for a known T A USing thiS value of K the values of Po and T J can be obtained by solVing equatIOns (1) and (2) Iteratively for any
value of TA.
DC ELECTRICAL CHARACTERISTICS IVcC-5 - 0 Vdc ±6% vSs-O - TA=TL to TH unless otherwise noted)
Charactaristic Symbol Min Typ Max Unit
Input High Voltage VIH VS$+20 - - V
Input Low Voltage VIL - - VSS+O 8 V
Input Leakage Current Tx CLK, Rx CLK, Rx Data, Enable,
IV,n=Oto 5 25 V) REm, RS, R/Vii, CS, i5Cl'i, CTS lin - 10 25 "A
Three-State 10ff-State) Input Current 00-07
IV,n=O 4 to 2 4 V, VCC=5 25 V) liZ - 20 10 "A
Output High Voltage
II Load = - 205 "A, Enable Pulse Width < 25,,5) 00-07 VOH VSS+25 - - V
II Load = -100"A, Enable Pulse W,dth< 25 ,,5) TX Data, i'i'm, TUF VSS+24 - -
Output Low Voltage IILoad-1 6 mA, Enable Pulse Wldth<25"s) VOL - - VSS+04 V
Output Leakage Current lOll-State) IVOH =24 V) IRO 10Z - 1.0 10 "A
Internal Power DISSipatIOn IMeasured at TA = h) PINT - 300 525 mW
Input CapaCitance
IV,n=O, TA=25°C,f=1 OMHz) 00-07 C,n - - 125 pF
All Other Inputs - - 75
Output Capacitance Tx Data, SM/l5i1\, TUF 10
IV,n=O, TA=25°C,f=1 OMHz) IRO Cout - - 50
pF
4·537
MC6852-MC68A52-MC68B52
Tx ClK
or
FIGURE 2 - CLOCK PULSE WIDTH, HIGH-STATE
Tx ClK
or
Rx ClK Rx ClK
FIGURE 3 - RECEIVE DATA SETUP AND HOLD TIMES AND SYNC MATCH DELAY TIME
Dn-1 On DO
Rx ClK
Rx Data
>....>..>""""">....>..>"1''-----'
=: 1 Rx elK Period
Note Timing measurements are referef"lced to and from a low voltage of 0 8 volts and a high voltage of 2 0 volts, unless otherWise noted
4-538
MC6852-MC68A52-MC68B52
FIGURE 4 - TRANSMIT DATA OUTPUT DELAY AND FIGURE 5 - DATA TERMINAL READY AND INTERRUPT
TRANSMITIER UNDERFLOW DELAY TIME REQUEST RELEASE TIMES
Tx ClK
Enable
tTDD
Tx Data
tTUF
TUF-------------------J
IRQ
CTS
FIGURE 6 -
)--
ClEAR-TO-SEND SETUP TIME FIGURE 7 -
Rx ClK
DATA CARRIER DETECT SETUP TIME
1"--_---'1.-_ _-1 1 •
Tx ClK
Notes
Must occur before OCD goes low.
First data bit placed In Rx shift register
last data bit of byte placed In Rx shift register
Tx Data
Rx data byte transferred from shift register to Rx FIFO
e Clock edge required for generation ofiR'Ei by RDA status
Note Refer to Figure 3 for the Rx data setup and hold times
Note Timing measurements are referenced to and from a low voltage of 08 volts and a high voltage of 2 a volts, unless otherWise noted
load A Load B
100-07, DTR, Tx Data, TUF) IIRQ Only)
50V 50V
RL=25kO ~ 3 kO
4-539
MC6852· MC68A52. MC68B52
"The data bus output buffers are no longer sourCing or smkmg current by tOHRmax (High Impedance)
• ~-----------r3\-----------~
R/W,Address--~-t~~~~~~CT--------\7~~-----rt---------------------------------tl~7V~
INon-Muxedl _____+~~~~~~~~----~~~~---_+~----------------------~~~~~
Notes
1. Voltage levels shown are VLsO 4 V, VH",2 4 V, unless otherwise specified
2 Measurement POints shown are 0.8 V and 2 0 V, unless otherwise specified
4·540
s::
s::
(")
Chip Select 10-----.
I
Address
L 0 9,e U r-- ~
OJ
Reg ..ter Select 11 ~ f----,
{'r Transmitter ~
L #3
Transmit
Fr Underflow
24 Clear to Send
•
Control
DO 22 -.-i
~ y ~+=+=~==~::====1-
~ '" 23 Data Came,
Detect
J:>. Dl 2 1 _, Interrupt
I rterrupt
0, l Logic
Request
J:>. D2 20~
......
D3 19- Data
Bus
D4 18_ Buffers
~
D5 17_
D6 16_
D7 15_
RESET
rF~~;-;---"'o-~==::::t--~---- Receive
./'-.l~~1:-======-J----'-..L--l 2 Data
L.'-
f'"TTii-:=====:;-.......Jr-,--,----i 3 Receive
Clock
Sync
Match!
V cc =Pln12 Data Termmal
V SS =Pln1 Ready
II
MC6852-MC68A52-MC68B52
•
the transmitted word. An external control line IClear-to- however, care must be taken to properly program the control
Sendl is provided to Inhibit the transmitter without clearing registers - Table 1 Will have Its bit positions reversed I
the FIFO. When the Shift Register becomes empty, and data IS not
Senal data IS accumulated In the receiver based on the available for transfer from the Transmit Data FIFO, an
synchronization mode selected. In the external sync mode, "underflow" occurs, and a character IS Inserted Into the
used for parallel-senal operation, the receiver IS synchronized transmitter data stream to maintain character synchroniza-
by the DCD iData Carner Detectl Input IFlgure 91 and tion The character transmitted on underflow Will be either a
transfers succeSSive bytes of data to the Input of the "Mark" lall "1's"l or the contents of the Sync Code
Receiver FIFO. The slngle-sync-character mode requires that Register, depending upon the state of the 'Transmlt Sync
a match occur between the Sync Code Register and one In- Code on Underflow control bit The underflow condition IS
coming character before data transfer to the FIFO begins. ,nd,cated by a pulse 1=1 Tx ClK high penodl on the
The two-sync-character mode requires that two sync codes Underflow output Iwhen In Tx Sync on underflow model
be received In sequence to establish synchronization. Subse- The Underflow output occurs cOincident with the transfer of
quent to synchronization In any mode, data is accumulated the last half of the last bit preceding the underflow character
In the shift register, and panty IS oPtionally checked An In- The Underflow status bit IS set until cleared by means of the
dication of panty error IS carned through the Receiver FI FO Clear Underflow control bit ThiS output may be used In flop-
with each character to the last empty location. Availability of py disk systems to synchronize wnte operations and for ap-
a word at the FIFO output IS indicated by the RDA status bit pending CRCC
In the Status Register, as IS a panty error IPEI Transmission IS Initiated by cleanng the Transmitter Reset
The SSDA and ItS Internal registers are selected by RS, bit In Control Register 1 When the Transmitter Reset bit IS
CS, Read/Wnte IR/VVI and Enable centrol lines. To con- cleared, the first full positive half-cycle of the Transmit Clock
figure the SSDA, Control Registers are selected and the ap- will Initiate the transmit cycle, with the transmission of data
propriate bits set. The Status Register IS addressable for or underflow characters beginning on the negative edge of
reading status. _ the Transmit Clock pulse which started the cycle. If the
Other I/O lines, in addition to Clear-to-Send ICTSI and Transmit Data FIFO was not loaded, an underflow character
Data Carrier Detect (DeDI, Include SM/DTR ISync Will be transmitted Isee~re 41.
Match/Data Terminal Readyl and Transmitter Underflow The Clear-to-Send ICTSI Input prOVides for automatic
ITUFI. The transmitter and receiver each have ,nd,v,dual control of the transmltt~ means of external system hard-
clock inputs allowing simultaneous operation under separate ware; e.g., the modem CTS output .E.':.£.vldes the control In a
clock control. Signals to the microprocessor are the Data data communications system The CTS Input resets and In-
Bus and Interrupt Request IIRQI. hibits the transmitter section when high, but does not reset
the Transmit Data FIFO. The TDRA status bit IS Inhibited by
INITIALIZATION CTS being high In either the one-sync character or two-sync
During a power-on sequence, the SSDA is reset via the character mode of operation. In the external sync mode,
RESET input and internally latched in a reset condition to TDRA IS unaffected by m In order to prOVide Transmit
prevent erroneous output transitions. The Receiver Shift Data FIFO status for preload~ and operating the transmit-
Register is set to all "1's". The Sync Code Register, Control ter under the control of the CTS Input. When the Transmit-
Register 2, and Control Register 3 should be programmed ter Reset bit ITx Rslls set, the Transmit Data FIFO IS cleared
prior to the programmed release of the Transmitter and/or and the TDRA status bit is cleared. After one E clock has oc-
Receiver Reset bits; these bits in Control Register 1 should curred, the Transmit Data FIFO becomes available for new
be cleared after the RESET line has gone high. data with TDRA inhibited.
4·542
MC6852-MC68A52-MC68B52
RECEIVER OPERATION register locations are full Data being available In the Receive
Data and a presynchronlzed clock are provided to the Data FIFO causes an Interrupt request If the Receiver Inter-
SSDA receiver section by means of the Receive Data (Rx rupt Enable (RIEl bit IS set. The MPU Will then read the
Datal and Receive Clock (Rx CLKI,nputs. The data IS a con- SSDA Status Register which Will Indicate that data IS
tinuous stream of binary data bits without means for Identi- available for the MPU read from the Receive Data FIFO
fYing character boundanes within the stream It IS, therefore, register The IRO and RDA status bits are reset by a read
necessary to achieve character synchronization for the data from the FIFO. If more than one character has been received
at the beginning of the data block Once synchronization IS and IS resident In the Receive Data FI FO, subsequent E
achieved, It IS assumed to be retained for all successive clocks Will cause the FIFO to update and the RDA and IRO
characters within the block. status bits Will agam be set The read data operation for the
Data commUnications systems utilize the detection of sync 2-byte transfer mode reqUires an intervening E clock be-
codes dunng the Initial portion of the preamble to establish tween reads to allow the FIFO data to shift Optional panty IS
character synchronization. ThiS requires the detection of a automatically checked as data IS received, and the panty
single code or two successive sync codes Floppy disk and status condition IS maintained With each character until the
cartndge tape Units require sixteen bits of defined preamble data IS read from the Receive Data FIFO Panty errors Will
and cassettes require eight bits of preamble to establish the cause an Interrupt request If the Error Interrupt Enable (EIE)
reference for the start of record All three are functionally has been set The panty bit IS not transferred to the data bus
eqUivalent to the detection of sync codes Systems which do but must be checked In the Status Register NOTE In the
not ullllze code detection techniques require custom logic 2-byte transfer mode, panty should be checked pnor to
external to the SSDA for character synchronization and use reading the second byte, since a FIFO read clears the error
of the parallel-to-senal (external sync! mode (Note The bit
Receiver Shift Register IS set to ones when reset I Other status bits which pertain to the receiver section are
II
Receiver Overrun and .Data Carner Detect ('i:5EC5) The Over-
run status bit IS automatically set when a transfer of a
SYNCRHONIZATION
character to the Receive Data FIFO occurs and the first
The SSDA provides three operating modes With respect to register of the Receive Data FI FO IS. full Overrun causes an
character synchronization one-sync-character mode, two- Interrupt If Error Interrupt Enable (EIEI has been set The
sync-character mode, and external sync mode The external transfer of the overrunning character Into the FIFO causes
sync mode reqUires synchronization and contlol of the the prevIous character In the FIFO Input register location to
receiving section through the Data Carner Detect (Delil In- be lost The Overrun status bit IS cleared by reading the
put (see Figure 71 ThiS external synchronlzallon could con- Status Register (when the overrun condition IS present!.
SiSt of direct line control from the transmitting end of the followed by a Receive data FIFO Register read Overrun can-
senal data link or from external logic designed to detect the not occur and be cleared Without provldmg an opportunity to
start of the message block The one-sync-character mode detect ItS occurrence via the Status Register
searches on a blt-by-blt basIs until a match IS achieved be- A positive transition on the DCD Input causes an Interrupt
tween the data In the Shift Register and the Sync Code If the EI E control bit has been set The Interrupt caused by
Register The match indicates character synchronization IS DCD IS cleared by reading the Status Register when the Li'CD
complete and Will be retained for the message block In the status bit IS high, followed by a Receive data FIFO read The
two-sync-character mode, the receiver searches for the first 5CD status bit Will subsequently follow the state of the DCD
sync code match on a blt-by-blt basIs and then looks for a se- Input when It goes low
cond successIVe sync code character pnor to establishing
character synchronization If the second sync code character
IS not received, the blt-by-blt search for the first sync code IS
resumed INPUT/OUTPUT FUNCITONS
Sync codes received pnor to the completion of syn-
chrOnization (one or two characterl are not transferred to the SSDA INTERFACE SIGNALS FOR MPU
Receive Data FIFO Redundant sync codes dunng the The SSDA Interfaces to the MC6800 MPU With an 8-blt bi-
preamble or sync codes which occur as "fill characters" can directional data bus, a chip-select line, a register-select line,
automatically be stnpped from the data, when the Stnp an Interrupt-request line, read/wnte line, an enable line, and
Sync control bit IS set, to minimize system loading The a reset line These Signals, In conjunction With the MC6800
character synchronization Will be retained until cleared by VMA output, permit the MPU to have complete control over
means of the Clear Sync bit, which also Inh,b,ts synchroniza- the SSDA
tion search when set
SSDA Bi-Directional Data (DO-D7) - Tne bl-directlOnal
RECEIVING DATA data lines (00-071 allow for data transfer between the SSDA
Once synchronization has been achieved, subsequent and the MPU The data bus output dnvers are three-state
characters are automatically transferred Into the Receive deVices that remain In the high-Impedance (off) state except
Data FIFO and clocked through the FIFO to the last empty when the MPU performs an SSDA read operation
location by E pulses (MPU System </>2) The Receiver Data
Available status bit (RDAllndlcates when data IS available to SSDA Enable (E) - The Enable Signal, E, IS a hlgh-
be read from the last FIFO location (#3) when In the l-byte Impedance TTL-compatible Input that enables the bus In-
transfer mode. The 2-byte transfer mode causes the RDA put/output data buffers, clocks data to and from the SSDA,
status bit to Indicate data IS available when the last two FI FO and moves data through the FIFO Registers
4·543
MC6852-MC68A52-MC68B52
I
to Insure that ItS occurrence Will be acknowledged by the
level selects the Control 1 and Status Registers (see Table 1) system. The stored CTS Information and ItS associated IRQ
Ilf enabled) are cleared by wntlng a "1" In the Clear CT~
Interrupt Request (iRQ) - Interrupt Request IS a TTL In Control Register 3 or In the Transmitter Reset bit The CTS
compatible, open-drain Ina Internal pullup), active low out- status bit subsequently follows the CTS Input when It goes
put that IS used to Interrupt the MPU The Interrupt Request low
remains low until cleared by the M PU The CTS Input provides character timing for transmitter
data when In the external sync mode Transmission IS In-
RESET Input - The RESET Input provides a means of Itiated on the negatIVe transition of the first full positive clock
resetting the SSDA from an external source In the low pulse of the transmitter clock (Tx ClK) after the release of
state. the RESET Input causes the follOWing CTS Isee Figure 6)
1 Receiver Reset (Rx Rs) and Transmitter Reset ITx Rs)
bits are set causing both the receiver and transmitter Data Carrier Detect (DCD) - The DCD Input proVides a
sections to be held In a reset condition real-time Inhblt to the receiver section Ithe Rx FIFO IS not
2 Penpheral Control bits PCl and PC2 are reset to zero, disturbed!. A positive DCD transition resets and Inhlbts the
causing the SM/DTI! output to be high receiver section except for the Receive FIFO and the RDRA
3 The Error Irterrupt Enable IEIE) bit IS reset status bit and ItS associated IRQ
4 An Internal synchrol1lzatlon mode IS selected The positive transition ofl5Ci') IS stored Within the SSDA
5. The Transmitter Data Register Available ITDRA) to Insure that ItS OCCurrence Will be acknowledged by the
status bit IS cleared and inhibited system The stored DCD Information and ItS associated iRIT
6 The Receiver Shift Register IS set to l's Ilf enabled) are cleared by reading the Status Register and
When RESET returns high Ithe inactive state), the then the Receiver FIFO, or by wntlng a "1" Into the Receiver
transmitter and receiver sections Will remain In the reset state Reset bit The DCD status bit subsequently follows the l5'ELi
until the Receiver Reset and Transmitter Reset bits are Input when It goes low. The DCD Input proVides character
cleared via the data bus under software control The control synchrol1lzatlon timing for the receiver dunng the external
Register bits affected by REID (Rx Rs, Tx Rs, PC1, PC2, sync mode of operation The receiver will be initialized and
EIE, and E/I Sync) cannot be changed when RESET IS low data Will be sampled on the positive transition of the first full
Receive Clock cycle after release of OeD Isee Figure 71
CLOCK INPUTS
Separate high-Impedance TTL-compatible Inputs are pro- Sync Match/Data Terminal Ready (SM/DTR) - The
Vided for clocking of transmitted and received data. SM/DTR output proVides four functions Isee Table 1)
depending on the state of the PCl and PC2 control bits
Transmit Clock (Tx ClK) - The Transmit Clock Input IS When the Sync Match' mode IS selected (PC = "1" ,
used for the clocking of transmitted data The transmitter PC2= "0"), the output proVides a one-blt-wlde pulse when a
shifts data on the negative transition of the clock sync code is detected. ThiS pulse occurs for each sync code
match even If the receiver has already attained synchrol1lza-
Receive Clock (Rx ClK) - The Receive Clock Input IS us- lion The SM output IS Inhibited when PC2= "1" The DTR
ed for clocking In received data The clock and data must be mode (PCl = "0") provides an output level corresponding to
synchrol1lzed externally The receiver samples the data on the complement of PC2 (DTR="O" when PC2="1") (See
the posItive transition of the clock. Table 1.)
4-544
MC6852-MC68A52-MC68B52
Control Address
Register Content
Register In uts Control
RS RIW AC2 AC1 Bit 7 BIt 6 BIt 5 BIt 4 BIt 3 BIt 2 Bit 1 BIt 0
Status lSI 0 1 X X Interrupt Rpcelver Receiver Transmitter Clear-to- Datd Calner Tlansmltter Receiver
Request Panty Overrun Undelflow Send Detect Ddta Ddla
IiRQI Error (Rx. Dvro ITUFI ICTSI IDCOI Reglstel Available
IPEI Avaddble IROAI
ITORAI
Control 1 0 0 X X Address Addtess Receiver TtdnSmlttel Cleat SttiP Sync Transmitter Receiver
ICli Control 2 Control 1 Interrupt Intet rupt Sym. Chal<Jclels Reset Reset
IAC21 IACli Enable Enable IStrop Syncl ITx Rsl IRx Rsl
IRIEI ITIEI
Receive 1 1 X X 07 06 05 04 03 02 01 DO
Data FIFO
Control 2 1 0 0 0 Error Transmit Word Word WOld l-Byte/2-Byte Peripheral Penphetal
IC21 Interrupt Sync Code Length Length Length Ttanstel Control 2 Conttoll
Enable on Select 3 Select 2 Select 1 11-Byte/2 By tel IPC21 IPCll
IEIEI Underflow IWS31 IWS21 IWSll
ITx Svncl
Control 3 1 0 0 1 Not Used Not Used Not Used Not Used Clear Cled' CTS One~Sync~ Externall
IC31 TranMTlItter Slatus Characterl Internal
Underflow ICled< CTSI Two-Sync Sync Mode
•
Status Character Control
ICTUFI Mode Control IE/I Syncl
(1 Syncl
2 Syncl
Sync Code 1 0 1 0 07 D6 05 04 03 02 01 DO
Transmit 1 0 1 1 07 06 05 04 03 02 01 DO
Data FIFO
x~ Don t care
STATUS REGISTER CONTROL REGISTER 2
IRQ Bit 7 The I RQ flag
cleared when the source of the IRQ IS
IS EIE Bit 7 When ",", enahles the PE, Rx Ovrn,
cle•.lred The so urce IS determined by the enables 10 the TUF, CTS, and DCD mterrupt flags
Control Reglste rs TIE, RIE, EIE IS BIts 6 th,ough 71
B11S6-0 indicate the SSO A status at a pomt In time, and can be Tx Sync Bit 6 When ",", allows .:oync code contpnt
reset as follows to he tran~ferred on underflow, dnd
PE Bit 6 Read Rx Data FIFO,ora"1"lntoRx Rs (el BltO) enables the TUF Status bit and out~
Rx Ovrn Bit 5 Read Sta tus and then Rx Data FIFO, or a "'" Into put. When "0". an all mark character
15 transmitted on underflow
Rx Rs IC 1 Bit 01
81t4 A"l"m to CTUF IC3 BIt 31 or Into Tx Rs ICI BIt 11 WS3, 2, 1 Bits 5-3 Word Length Select
TUF
CTS Blt3 A"1"1n to Clear "CiS" (C3 Bit 2) or a "1" into Tx As
Bit 5 Blf4 Bit 3
IC1 Blt11 Word Length
WS3 WS2 WSI
DCIJ Bit 2 Read Sta tus and then R)( Data FIFO or a "1" IOta
Rx Rs IC 1 BIt 01 0 0 0 6 Bits" Even Parity
TDRA Bit 1 Wllte Int o Tx Data FIFO 0 0 1 6 Bits + Odd Parity
ROA BIt 0 Read Rx Data FIFO_ 0 1 0 7 Bits
0 1 1 8 BllS
CONTROL REGISTER 1
1 0 0 7 Bits" Even Panty
AC2, ACI Bits 7, 6 Used to access other registers, as shown above 1 0 1 7 Bits t Odd Panty
RIE Bit 5 When '" ", enables Interrupt on RDA (S Bit 0) 1 1 0 8 Bits t Even Parity
TIE BIt 4 When "1 ", enables Interrupt on TDRA (S Bit 1) 1 1 1 8 Bits + Odd P.mty
Clear Sync Bit 3 When '" ", clears receiver character synchronization
StriP Sync Bit 2 When "1 , striPS all sync codes from the received l-Byte/2-Byte Bit 2 When ",". enables the TDRA and
data stream RDA bits to Indicate when a l-byte
Tx Rs Bit 1 When '" " , resets and Inhibits the transmitter section transfer can occur. when "0". Ihe
Rx Rs Bit 0 When "1 " . resets and tnhlblts the receiver section TORA and RDA hits Indicate when
a 2-byte transfer can occur
CONTROL REGISTER 3 PC2, PCl Bits 1-~0 SM/1TI"R Output Control
CTUF BIt 3 When "1 " ,clears TUF (S Bit 4), and IRQ If enabled
Bit 1 Bit 0
Clear CTS Bit 2 When "1 ", clears CTS IS BIt 31, and IRQ If enabled SM/l5'FR Output at Pm 5
PC2 PCl
, Sync/2 Sync Bit 1 When "1 , selects the one-sync-character mode, when
"O",selects the two-sync-character mode 0 0 1
Ell Sync Btt a When "1 , selects the external sync mode. when "0", 0 1 Pulse .s-1- 1 Bit Wide on SM
s~lects th e Internal sy nc mode 1 0 0
1 1 SM Inhibited, a
NOTE When the SSDA IS used In applications requlrlOg the MSB of data to
be received and transmitted first, the data bus Inputs to the SSDA may be
reversed (00 to 07, etc) Caution must be used when thiS IS done since the
bit positions In this table will be reversed, and the parity should not be selected.
4-545
MC6852-MC68A52-MC68B52
Transmitter Underflow (TUF) - The Underflow output In- Transmitter Interrupt Enable (TIE), Cl Bit 4 - TIE enables
dicates the occurrence of a transfer of a "fill character" to both the Interrupt Request output (iRTIl and Interrupt Re-
the Transmitter Shift Register when the last location (#3) In quest status bit to indicate a transmitter service request
the Transmit Data FIFO IS emtpy The Underflow output When TIE IS set and the TDRA status bit IS high, the IRQ out-
pulse IS approximately one Tx ClK high penod wide and oc- put Will go low (the active state) and the iRQ status bit Will
curs dunng the last half of the last bit of the character go high
preceding the "Underflow" (see Figure 41. The Underflow
output pulse does not occur when the Tx Sync bit IS In the Receiver Interrupt Enable (RIE), Cl Bit 5 - RIE enables
reset state both the Interrupt Request output ((RQ) and the (nterrupt
Request stacus bit to indicate a receiver service request.
SSDA REGISTERS When RIE IS set and the RDA status bit IS high, the T'RL! out-
Seven registers In the SSDA can be accessed by means of put Will go low (the active state) and the IRQ status bit Will
the data bus. The registers are defined as read-only or wnte- go high
only according to the direction of Information flow The
Register Select Input (RS) selects two registers In each state, Address Control 1 (AC1) and Address Control 2 (AC2), Cl
one being read-only and the other wnte-only. The Bits 6 and 7 - ACI and AC2 select one of the write-only
Read/Wnte Input (R/W) defines which of the two selected registers - Control 2, Control 3, Sync Code, or Tx Data
registers will actually be accessed. Four registers (two read- FIFO - as shown In Table 1, when RS = "1" and
only and two wnte-only) can be accessed via the bus at any R/W="O"
particular time These registers and the reqUired addressing
are defined In Table 1. CONTROL REGISTER 2 (C2)
Control Register 2 IS an 8-blt wnte-only register which can
•
CONTROL REGISTER 1 (Cl) be programmed from the data bus when the Address Control
Control Register 1 IS an 8-blt wnte-only register that can be bits In Control Register 1 (ACI and AC2) are reset, RS = "1"
directly addressed from the data bus Control Register 1 IS and R/W="O"
accessed when RS = "0" and R/W="(J'.
Peripheral Control (PC1) and Peripheral Control 2 (PC2),
Receiver Reset (Rx Rs), Cl Bit 0 - The Receiver Reset C2 Bits 0 and 1 - Two control bitS, PCl and PC2, determine
control bit provides both a reset and inhibit function to the the operating charactenstlcs of the Sync Match/ DTR out-
receiver section When Rx Rs IS set, It clears the receiver put PC1, when high, selects the Sync Match mode PC2
control logic, sync logic, error logic, Rx Data FIFO Control, proVides the Inhibit/enable control for the SM/DTR output
Panty Error status bit, and DCD Interrupt The Receiver Shift In the Sync Match mode A one-blt-wlde pulse IS generated
Register IS set to ones. The Rx Rs bit must be cleared after at the output when PC2 IS "0", and a match occurs between
the occurrence of a low level on RESET In order to enable the contents of the Sync Code Register and the Incoming
the receiver section of the SSDA. data even If sync IS inhibited (Clear Sync blt= ''1'') The
Sync Match pulse IS referenced to the negative edge of Rx -
Transmitter Reset (Tx Rs), Cl Bit 1 - The Transmitter ClK pulse causing the match (see Figure 3)
Reset control bit proVides both reset and inhibit to the The Data Terminal Ready (DTR) mode IS selected when
transmitter section When Tx Rs IS set, It clears the transmit- PClis low When PC2="I" the SM/DTR output="O" and
ter control section, Transmitter Shift Register, Tx Data FIFO vice versa The operation of PC2 and PCl IS summanzed In
Control (the Tx Data FIFO can be reloaded after one E clock Table 1
pulse), the Transmitter Underflow status bit, and the CTS In-
terrupt, and Inhibits the TDRA status bit (In the one-sync- l-Byte/2-Byte Transfer (1-Byte/2-Byte), C2, Bit 2 -
character and two-sync-character modes) The T x Rs bit When 1-Byte/2-Byte IS set, the TDRA and RDA status bits
must be cleared after the occurrence of a low level on RESE'i" Will Indicate the avallabltlly of their respective data FIFO
In order to enable the transmitter section of the SSDA If the registers for a Single-byte data transfer Alternately, If
Tx FIFO IS not preloaded, It must be loaded Immediately after l-Byte/2-Byte IS reset, the TDRA and RDA status bits In-
the Tx Rs release to prevent a transmitter underflow condi- dicate when two bytes of data can be moved Without a se-
tlon. cond status read An intervening Enable pulse must occur
between data transfers
Strip Synchronization Characters (Strip Sync), Cl Bit 2 -
If the Stnp Sync bit IS set, the SSDA Will automatically stnp Word length Selects (WS1, WS2, WS3), C2 Bits 3, 4,5
all received characters which match the contents of the Sync - Word length Select bits WS1, WS2, and WS3 select
Code Register The characters used for synchrOnization (one word lengths of 7, 8, or 9 bits Including panty as shown In
or two characters of sync) are always stnpped 'from the Table 1
received data stream
Transmit Sync Code on Underflow (Tx Sync), C2 Bit 6 -
Clear Synchronization (Clear Sync), Cl Bit 3 - The Clear When Tx Sync IS set, the transmitter Will automatically send
Sync control bit proVides the capability of drOPPing receiver a sync character when data IS not available for transmission
character synchronization and inhibiting resynchronlzatlon If Tx Sync IS reset, the transmitter Will transmit a Mark
The Clear Sync bit IS set to clear and inhibit receiver syn- character (including the panty bit position) on underflow
chrOnization In all modes and IS reset to zero to enable resyn- When the underflow IS detected, a pulse approximately one
chronlzatlon Tx ClK high penod Wide Will occur on the underflow output
4·546
MC6852·MC68A52-MC68B52
If the Tx Sync bit IS set Internal panty generation IS Inh!blted state of the CTS Input The Clear CTS control bit does not
dunng underflow except for sync code fill character affect the CTS Input nor ItS inhibit of the transmitter section
transmission In a-bit plus panty word lengths The Clear CTS command bit IS self-cleanng, and wntlng a
"0" Into thiS bit 1° a nonfunctional operation
Error Interrupt Enable (EIE), C2 Bit 7 - When EIE IS set,
the IRO status bit Will go high and the IRO output Will go low Clear Transmit Underflow Status (CTUF), C3 Bit 3 -
If When a "'" IS written Into the CTUF status bit, the CTUF bit
A receiver overrun occurs The Interrupt IS cleared by and ItS associated Interrupt are reset The CTUF command
reading the Status Register and reading the Rx Data bit IS self-cleanng and writing a "0" Into thiS bit IS a nonfunc-
FIFO tional operation
2 DCD Input has gone to a "'" The Interrupt IS cleared
by reading the Status Register and reading the Rx
SYNC CODE REGISTER
Data FIFO
3 A parity elror eXists for the character In the last loca- The Sync Code Register IS an a-bit register for stonng the
tIOn 1#3) of the Hx Data FIFO The Interrupt IS cleared programmable sync code reqUired for received data character
by reading the Rx Data FIFO synchrOnization In the one-sync-character and two-sync-
4. The CTS Input has gone to a "'" The Interrupt IS character modes The Sync Code Register also prOVides for
cleared by writing a "'" In the Clear CTS bit, C3 bit 2, stnpplng the sync/fill characters from the received data la
or by a Tx Reset programmable option) as well as automatic insertion of fill
5 The transmitter has underflowed (In the Tx Sync on characters In the transmitted data stream The Sync Code
Underflow mode) The Interrupt IS cleared by wntlng a Register IS not utilized for receiver character synchronization
"'" Into the Clear Underflow, C3 bit 3, or Tx Reset In the external sync mode, however, It prOVides storage of
receiver match and transmit fill characters.
II
When EIE IS a "0", the IRO status bit and the IRO output
The Sync Code Register can be loaded when AC2 and
are disabled for the above error conditIOns A low level on
AC' are a "'" and "0", respectively, and R/W'="O" and
the RESET Input resets EIE to "0"
RS="'"
The Sync Code Register may be changed after the detec-
CONTROL REGISTER 3 (C3)
tion of a match With the received data Ithe first sync code
Control Register 3 IS a 4-blt wnte-only register which can haVing been detected) to synchrOnize With a double-word
be programmed from the data bus whe RS= "'" and sync pattern. IThis sync code change must occur pnor to the
R/W="O" and Address Control bit AC'="'" and completion of the second character.) The sync match ISM)
AC2="0" output can be used to Interrupt the M PU system to indicate
that the first eight bits have matched The service routine
External/Internal Sync Mode Conrol (Ell Sync), C3, Bit 0 would then change the sync match register to the second
- When the Ell Sync Mode bit IS high, the SSDA IS In the half of the pattern Alternately, the one-sync-character mode
external sync mode and the receiver synchrOnization logiC IS can be used for sync codes for '6 or more bits by uSing soft-
disabled SynchrOnization can be achieved by means of the ware to check the second and subsequent bytes after
t5cri Input or by starting Rx ClK at the midpOint of data bit 0 reading them from the FIFO
of a cahracter with DCl) low Both the transmitter and The detection of the sync code can be programmed to ap-
receiver sections operate as parallel - senal converters In pear on the Sync Match/1JTIi output by writing a "'" In PC,
the External Sync mode The Clear Sync bit In Control IC2 bit 01 and a "0" In PC2 IC2 bit') The Sync Match out-
Register' acts as a receiver sync Inhibit when high to pro- put Will go high for one bit time beginning at the character in-
Vide a bus controllable inhibit The Sync Code Register can terface between the sync code and the next character Isee
serve as a transmitter fill character register and a receiver Figure 3)
match register In thiS mode A "low" on the RESET Input
resets the Ell Sync Mode bit plaCing the '>SDA In the inter-
nal sync mode PARITY FOR SYNC CHARACTER
4-547
MC6852-MC68A52-MC68852
After SynchronizatIon Is Established Unused data bits for short word lengths Will be handled as
When 'stnp sync' bit IS selected, the sync characters (fill "don't cares." The parity bit IS not transferred over the data
characters) are stripped and panty IS not checked for the bus Since the SSDA generates panty at transmission.
stnpped sync (fill) characters. When "stnp sync" bit IS not When an Underflow occurs, the Underflow character Will
selected (low), the sync character IS assumed to be normal be either the contents of the Sync Code Register or an all
data and It IS transferred mto FI FO after partly checking "l's" character The underflow Will be stored In the Status
(When non-parity format IS selected panty IS not checked ) Register until cleared and Will appear on the Underflow out-
WSO-WS2 put as a pulse approxlmatley one Tx ClK high penod Wide
Strip Sync (Data Format)
(C1, Bit 2) (C2, Bits 3-5) STATUS REGISTER (S)
No transfer of sync code The Status Register IS an 8-blt read-only register which
1 X
No panty Check of sync code proVides the real-tIme status of the SSDA and the associated
·Transfer data and sync codes senal data channel. Reading the Status Register IS a non-
0 With Panty
Panty check destructive process The method. of cleanng status bits
"Transfer data and sync codes depends upon the function each bit represents and IS
0 Without Pa"ly
NO-'1.ar& check discussed for each bit In the register.
·Subsequent to synchronization
Receiver Data Available (RDA), S Bit 0 - The Receiver
It IS necessary to consider panty m the selected sync Data Available status bit indicates when receiver data can be
character In the followmg cases Data Format IS (6+ panty), read from the Rx Data FIFO The receiver data being present
(7 + panty), stnp sync IS not selected (low), and when syr,c In the last register (#3) of the FIFO causes RDA to be high for
code IS used as a fill character after synchrontzatlon
•
the l-byte trarisfer mode The RDA bit being high indicates
The transmitter sends a sync character without panty, but' that the last two registers (#2 and #3) are full when m the
the receiver checks the panty as If It IS normal data 2-byte transfer mode The second character can be read
Therefore, the sync character should be chosen to match the Without a second status read (to determine that the
panty check selected for the receiver In this speCial case. See character IS available). An E pulse must occur between reads
the followmg section for unused bit assignment m short- of the Rx Data FIFO to allow the FIFO to shift. Status must
word length be read on a word-by-word basIs If receiver data error check-
ing IS Important. The RDA status bit IS reset automatically
RECEIVE DATA FIRST-IN FIRST-OUT REGISTER (Rx Data when data IS not available
FIFO)
The Receive Data FI FO Register consists of three 8-btl Transmitter Data Register Available (TDRA), S Bit 1 -
registers which are used for buffer storage of received data. The TDRA status bit Indicates that data can be loaded into
Each 8-blt register has an Internal status bit which montlors the Tx Data FIFO Register The first register (#1) of the Tx
ItS full or empty condition Data IS always transferred from a Data IFFO being empty Will be Indicated by a high level In the
full register to an adjacent empty register. The transfer from TDRA status bit In the l-byte transfer mode The first two
register to register occurs on E pulses The RDA status bit registers (#1 and #2) must be empty for TDRA to be high
Will be high when data IS available In the last location of the wh'Jn m the 2-byte transfer mode The Tx Data FI FO can be
Rx Data FIFO loaded With two bytes wltnout an Interventng status read,
In an Overrun condition, the overrunntng character Will be however, one E pulse must occur between loads TDRA IS
transferred Into the full first stage of the FIFO register and inhibited by the Tx Reset or RESET When Tx Reset IS set,
Will cause the loss of that data character Successive over- the Tx Data FIFO IS cleared and then released on the next E
runs continue to overwnte the first register of the FI FO This clock pulse The Tx Data FIFO can then be loaded With up to
destruction of data IS Indicated by means of the Overrun three characters of data, even though TDRA IS Inhibited
status bit The Overrun bit Will be set when the overrun oc- ThiS feature allows preloadmg data prior to the release of Tx
curs and remains set ~nlll the Status ReglstE" IS read, follow- Reset A high level on the m Input Inhibits the TDRA
ed by a read of the Rx Data FI FO. status bit m either sync mode of operation (one-sync-
Unused data bits for short word lengths (Including the character or two-sync-character) CTS does not affect
panty bit) Will appear as "O's" on the data bus when the Rx TDRA In the external sync mode ThiS enables the SSDA to
Data FIFO IS read operate under the control of the rnInput With TDRA In-
dlcatmg the status of the Tx Data FIFO The CTS Input does
TRANSMIT DATA FIRST-IN FIRST-OUT REGISTER (Tx not clear the Tx Data FIFO m any operating mode
Data FIFO)
The Transmit Data FI FO Register consists of thee 8-blt Data Carrier Detect (DCD), S Bit 2 - A POSitive tranSlllOn
registers which are used for buffer storage of data to be on t'1e DCD Input IS stored m the SSDA unttl cleared by
transmitted Each 8-blt register has an Internal status bit reaelng both Status and Rx Data FIFO A "1" written Into Rx
which monttors ItS full or empty condition. Data IS always Rs also clears the stored DCD status The DCD status bit,
transferred from a full register to an adjacent empty register when set, mdlcates that the i'5ClJ Input has gone high The
The transfer IS clocked by E pulses readmg of Status followed by reading of the Receive Data
The TDRA status bit Will be high If the Tx Data FIFO IS FIFO allows Bit 2 of subsequent Status reads to Indicate the
available for data state of the DCD mput until the next posillve transition
4-548
MC6852-MC68A52-MC68B52
Clear-to-Send (CTS), S Bit 3 - A positive tranSItIOn on resulting In data loss The Rx Ovrn status bit IS set when
the CTS Input IS stored In the SSDA until cleared by writing overrun occurs The Rx Ovrn status bit IS cleared by reading
a "'" Into the Clear CTS control bit or the Tx Rs bit. The Status followed by reading the Rx Data FIFO or by setting
CTS status bit, when set, Indicates that the CTS Input has the Rx Rs control bit
gone high. The Clear CTS command (a "'" Into C3 Bit 2)
allows Bit 3 of subsequent Status reads to ,nd,cate the state Receiver Parity Error (PE), S Bit 6 - The panty error
of the m Input until the next positive transition status bit Indicates that panty for the character In the last
register of the Rx Data FIFO did not agree With selected pan-
Transmitter Underflow (TUF), S Bit 4 - When data IS not ty The panty error IS cleared when the character to which It
available for the transmitter, an underflow occurs and IS so pertains IS read from the Rx Data FI FO or when Rx Rs oc-
indicated In the Status Register (In the Tx Sync on underflow curs The OeD Input does not clear the Panty Error or Rx
mode) The underflow status bit IS cleared by wntlng a"'" Data FIFO status bits
Into the Clear Underflow (CTUF) control bit or the Tx Rs bit
TUF Indicates that a sync character will be transmitted as the Interrupt Request (jim.), S Bit 7 - The Interrupt Request
next character A TU F IS indicated on the output only when status bit indicates when the IRQ output IS In the active state
the contents of the Sync Code Register IS to be transferred (IRQ output= "0"), The IRQ status bit IS subject to the same
(transmit sync code on underflow= ",") Interrupt enables (RIE, TIE, and EIE) as the iRa output The
'J'fITI status Olt Simplifies status InqUines for polling systems
Receiver Overrun (Rx Ovrn), S Bit 5 - Overrun Indicates by prOViding Single bit Indication of service requests
data has been received when the Rx Data FIFO IS full,
4-549
MC6854
®
(1.0 MHz)
MOTOROLA MC68A54
(1.5 MHz)
M~t"r'
ADVANCED DATA-LINK CONTROLLER (ADLC)
~
~~UUU" ,,.:,~",~~,
• Loop Mode Operation
•
• Loop 8ack Self-Test Mode
• NRZ/NRZI Modes
• Quad Data 8uffers for Each Rx and Tx
CASEll0
• Prioritized Status Register (Optionall
~
• MODEM/DMA/Loop Interface
MAXIMUM RATINGS
Rating Symbol Value Un~
PIN DESCRIPTION
Supply Voltage VCC -0.3 to + 7.0 V
Input Voltage V,n 0.3 to + 70 V
Operating Temperature Aange VSS
ITL to TH)
MC6854, MC68A54, MC68B54 TA Oto 70 ·C 5Ci5
MC6854C, MC68A54C -40 to 85
AxD ITiC/iSili
Storage Temperature Aange Tstg -65 to +150 ·C
AxC
TxC TDSA
THERMAL CHRACTERISTICS
TxO ADSA
Characteriatic Symbol Value Unit
Thermal Aeslstance IAQ 00
PlastiC 115 AESET 01
8JA ·C/W
Ceramic 60
Cerdlp 65 C!l 02
ASO 03
AS1 04
ThiS device contains circuitry to protect the Inputs against damage due to high 05
static voltages or electnc fields, however, It IS adVised that normal precautions
06
be taken to aVOid application of any voltage higher than maximum rated voltages
to thiS high-Impedance Circuit Reliability of operation IS enhanced If unused In- VCC 07
puts are tied to an appropriate logic voltage level Ie g , either VSS or VCC)
4-550
MC6854.MC68A54. MC68B54
Control Control
oco
RxC
Data
Bu,
00-07
Vss Pm 1
Vee Pm 14
iRCi
TOSR
ROSR
+-------'
~-------'
~ _ _ _ _ _ _--'
LOC/DTR
RTS
RESET
TxO
TxC
CTS
•
POWER CONSIDERATIONS
4-551
MC6854e MC68A54e MC68B54
•
Clock Pulse Width, Low IRxC, TxCI PWCL 700 - 450 - 280 - ns
Clock Pulse Width, High IRxC, TxCI PWCH 700 - 450 - 280 - ns
Senal Clock Frequency I RxC, TxCI ISC - 066 - 10 - 15 MHz
Receive Data Setup Time tRDSU 150 - 100 - 50 ns
Receive Data Hold Time tRDH 60 60 60 ns
Request-to-Send Delay Time tRTS 680 460 340 ns
Clock-to-Data Delay lor Transmitter tTDD - 300 - 250 - 200 ns
Flag Detect Delay Time tFD - 680 - 460 - 340 ns
DT R Delay Time tDTR - 680 - 460 - 340 ns
Loop On-Line Control Delay Time tLOC - 680 - 460 - 340 ns
RDSR Delay Time tRDSR - 540 - 400 - 340 ns
TDSR Delay Time tTDSR - 540 - 400 - 340 ns
Interrupt Request Release Time tlR - 12 - 09 - 07 I's
i'iESIT Pulse Width tAESET 10 - 065 - 040 -
~s
Input Alse and Fall Times IExcept Enablel 108 V to 20 VI tr,tl - 10' - 10' - 10' I's
Load A Load B
1D0-D7 m, TxD, ROSA, TOSA 50V
1i'RCi=-{nIYI 50 V
FCAGi5TI, LOci is''i'Rl
AL=25k[J 3 k[J
MMC6150 Test POint
Test POint
or Equlv
C A
MMD7000
or EqUiv roe
C = 130 pF lor 00-07
= 30 pF lor others
A=11 7 k[J lor 00-07
= 24 kn lor others
4·552
MC6854· MC68A54· MC68B54
FIGURE 3 RECEIVER DATA SETUP/HOLD, FLAG DETECT AND LOOP ON-LINE CONTROL DELAY TIMING
~PWCH __
RxC
'i
j.----PWCL-
RxD
tRDS tRDH - - - -
_tFD_
~tLDC ~
•
FIGURE 4 - TRANSMIT DATA OUTPUT DELAY AND REOUEST-TO-SEND DELAY TIMING
PWCH
TxC
TxO
FIGURE 6 - TDSR/RDSR DELAYS, IRQ RELEASE DELAY, RTS AND '6TR DELAY TIMING
E /
ATS
_'ATS-
OTA
_'OTA_
IAa
'IA
TOSA
AOSA
'AOSA
'TOSA
Note' TIming measurement~ are referenced to and from a low voltage of 0.8 volts and 8 hIgh voltage of 2.0 volts, unless otherwise noted
4-553
MC6854- MC68A54-MC68B54
I r-----------~3.-----------_;
R/VV,Addr~s--~~~~~~~~~--------~rr~----~~--------------------------------~~~~
Notes
1 Voltage levels are VLSO 4 V, VH,,2 4 V, unless othewlse speCified
2 Measurement pOints shown are 0 8 V and 2 0 V, unless otherwise specified
4-554,
MC6854- MC68A54- MC68854
FRAME FORMAT
The ADLC transmits and receives data (,nformatIOn or opening flag and closing flag, a frame contains an address
cantrall In a format called a frame All frames start with an field, control field, Information field (optlonall and frame
opening flag (FI and end with a closing flag (FI Between the check sequence field
1~4e-----------------------------------------AFrame ------------------------------------------.~I
01111110 Variable
8 Bits 01111110
Per Byte Length
(5-8)
4-555
MC6854- MC68A54- MC68B54
Frame Check Sequence (FCS) Field - The 16 bits of the aborted frame has not transferred to the M PU
preceding the closing flag is the FCS field. The FCS is the yet. The ADLC clears the aborted frame data In the
"cyclic redundancy check character (CRCC)''' The FIFO and clears flag synchronization. Neither an inter-
polynomial x16 + x12 + x5 + 1 is used both for the transmitter rupt nor a stored status occurs. The status indication
and receiver. Both the transmitter and receiver polynomial IS the same as (11 above.
registers are Initialized to all "l's" prior to calculation of the 3. An abort "in frame" after 26 bits or more are received
FCS. The transmitter calculates the FCS on all bits of the ad- after an opening flag - under thiS condition, some
dress, control, logical control (if selected I , and information fields of the aborted frame might have been transfer-
fields, and transmits the complement of the resulting re- red onto the data bus. The abort status is stored in the
mainder as FCS. The receiver performs the similar computa- receiver status register and the data of the aborted
tion on all bits of the address, control, logical control (if frame In the ADLC is cleared The synchronization is
selected I , Information, and received FCS fields and com- also cleared.
pares the result to FOB8 I Hexadecimal!. When the result
matches FOB8, the Frame Valid status bit is set In the status Idle and Time Fill - When the transmitter IS In an "out of
register. If the result does not match, the Error status bit IS frame" condition (the transmitter is not iransmlttlng a
set. The FCS generation, transmission, and checking are framel, It IS In an idle state. Either a series of contiguous flags
performed automatically by the ADLC transmitter and Itlme filii or a mark Idle (consecutive "l's" on a blt·by-bit
receiver. The FCS field IS not transferred to the Rx FIFO. basis I is selected for the transmiSSion In an Idle state by the
Flag/Mark Idle control bit. When the receiver receives 15 or
Invalid Frame - Any valid frames should have at least the more consecutive "l's", the Receive Idle status bit is set and
A-field, C-field, and FCS field between the opening flag and causes an interrupt. The flags and mark Idle are not transfer-
the clOSing flag. YVhen Invalid frames are received, the ADLC red to the Rx FI FO.
handles them as follows.
Rx FIFO. The FCS/IF Error status bit indicates the DUring a power-on sequence, the ADLC IS reset via the
reception of the Invalid frame at the end of the frame. RESET Input and Internally latched In a reset condition to
3. Aborted Frame - The frame which IS aborted by prevent erroneous output tranSitions. The four control
receiving an abort or DCD failure IS also an Invalid registers must be programmed prior to the release of the
frame. Refer to "Abort" and "DCD status bit". reset condition. The release of the reset condition IS perform-
ed via software by writing a "0" Into the Rx RS control bit
Zero Insertion and Zero Deletion - The Zero insertion and (receiver! and/or Tx RS control bit Itransmltterl. The release
deletion, which allows the content of the frame to be of the reset condition must be done after the RESET input
transparent, are performed by the ADLC automatically. A has gone high
binary 0 IS Inserted by the transmitter after any succession of At any time dunng operation, writing a "1" Into the Rx RS
five "l's" within a frame lA, C, LC, I, and FCS fleldl. The control bit or Tx RS control bit causes the reset condition of
receiver deletes a binary 0 that follows successive five con- the receiver or the transmitter.
tinUOUS "1' S" within a frame.
TRANSMITTER OPERATION
Abort - The function of prematurely terminating a data The Tx FIFO register cannot be pre-loaded when the
link IS called "abort." The transmitter aborts a frame by transmitter IS In a reset state. After the reset release, the
sending at least eight consecutive "1' s" Immediately after Flag/Mark Idle control bit selects either the mark Idle state
the Tx Abort control bit in control register #4 IS set to a "1". (,nact,ve Idle) or the Flag "time fill" lactive Idlel state. ThiS
ITx FIFO IS also cleared by the Tx Abort control bit at the active or inactive mark Idle state Will continue until data IS
same time. I The abort can be extended up to (at leastl 16 loaded Into the Tx FIFO.
consecutIVe "1 '5", If the Abort Extend control bit In the con- The availability of the Tx FIFO IS indicated by the TDRA
trol register #4 IS set when an abort IS sent. ThiS feature is status bit under the control of the 2-Byte/l-Byte control bit
useful to force mark Idle transmission Reception of seven or TDRA status is Inhibited by the Tx RS bit or CTS Input being
more consecutive "l's" IS Interpreted as an abort by the high. When the l-Byte mode IS selected, one byte of the
receiver. The receiver responds to a received abort as FIFO IS available for data transfer when TDRA goes high
follows. . When the 2-Byte mode IS selected, two successive bytes can
1. An abort in an "out of frame" condition - an abort be transferred when TDRA goes high
during the idle or time fill has no meaning. The abort The first byte IAddress field I should be wntten Into the Tx
reception IS Indicated in the status register as long as FIFO at the "Frame Continue" address. Then the transmis-
the abort condition continues; but neither an Interrupt sion of a frame automatically starts. If the transmitter IS In a
nor a stored condition occurs. The abort indication mark Idle state, the transfer of an address causes an opening
disappears after 15 or more consecutive "l's" are flag within two or three transmitter clock cycles. If the
received IReceived Idle status IS set.) transmitter has been In a time fill state, the current time fill
2. An abort "In frame" after less than 26 bits are received flag being transmitted IS assumed as an opening flag and the
after an opening flag - under this condillon, any field address field Will follow It
4-556
MC6854-MC68A54-MC68B54
FIFO Empty
Data Being Transmitted:
F = flag
A"" address
C = (link) control
LC = logical control (optional)
I = information
FCS "" frame check sequence
ABT = abort
Flag Idle (C2b2 "" 1)
•
C4b2
C3b2
4-557
MC6854-MC68A54-MC68B54
II
Address Extend
A frame continues as long as dats is written into the Tx causes the last character to be transmitted and the FCS field
FIFO at the "Frame Continue" address. The ADLC internally to automatically be appended along with a closing flag. Data
keeps track of the field sequence in the frama. The frame for- for a new frame can be loaded into the Tx FIFO immediately
mat is described in the "FRAME FORMAT" section. after the old frame data. if TDRA is high. The closing Flag
The frame is terminated by one of two methods. The most can serve as the opening Flag of the next frame or separate
efficient way to terminate the frames from a software stand- opening and closing Flags may be transmitted. If a new
point is to write the last data character into the Transmit frame is not ready to be transmitted. the ADLC will
FIFO "Frame Terminate" address (RS1. RSO= 11> rather automatically transmit the Active (Flagl or Inactive (Mark)
than the Transmit FIFO "Frame Continue" address (RS1. Idle condition.
RSO= 10), An alternate method is to follow the last write of If the Tx FIFO becomes empty at any time during frame
data in the Tx FIFO "Frame Continue" address with the set- transmission (the FIFO has no data to transfer Into transmit-
ting of the Transmit Last Data control bit. Either method ter shift register during transmission of the last hl!lf of the
4-558
MC6854- MC68A54- MC68B54
next to last bit of a word), an underrun will occur and the read on consecutive E cycles. Address Present proVides for'
transmitter automatically terminates the frame by transmit- byte transfers Oflly.
ting an abort. The underrun state IS Indicated by the Tx The sequence of each field In the received frame IS
Underrun status bit. automatically handled by the ADLC. The frame format IS
Any time the Tx ABORT Control bit IS set, the transmitter described in the "FRAME FORMAT" section.
immediately aborts the frame (transmits at least 8 con- When a clOSing flag IS received, the frame is terminated.
secutive ""s") and clears the Tx FIFO If the Abort Extend The '6 bits preceding the closing flag are regarded as the
Control bit IS set at the time, an Idle (at least '6 consecutive FCS and are not transferred to the MPU. Whatever data is
""s") IS transmitted. An abort or idle in an "out of frame" present in the most-Significant byte portion of the receiver
condition can be useful to gain 8 or '6 bits of delay. (For an buffer register it is right justified and transferred to the Rx
example, see "Programming Considerations.") FIFO. The frame boundary pOinter, which IS explained in the
The CTS (Clear-to-Send) input and RTS (Request-to- "Rx FIFO REGISTER" section, is set simultaneously in the
Send) output are provided for a MODEM or other hardware Rx FIFO. The frame boundary pointer sets the Frame Valid
Interface. status bit (when the frame was completed With no error) or
The TDRA! FC status bit (when selected to be Frame the FCSIIF Error Status bit (when the frame was completed
Complete Status) can cause an Interrupt upon frame com- With error) when the last byte of the frame appears at the last
pletion h.e., a flag or abort completion I. location of the Rx FIFO. As long as the Frame Valid or
Details regarding the Inputs and outputs, status bits, con- FCSIIF Error status bit is set, the data transfer from the
trol bits, and FI FO operation are described In their respective second location of the Rx FIFO to the last location of the Rx
sections. FIFO IS inhibited. '
Any time the Frame Discontinue control bit IS set, the
RECEIVER dPERATION ADLC discards the current frame data in the ADLC without
•
Data and a pre-synchrOnized clock are proVided to the dropping flag synchrOnization. This feature can be used to
ADLC receiver section by means of the Receive Data (RxD) Ignore a frame which IS addressed to another station.
and Receive Clock (RxC) Inputs. The data IS a continuous The reception of an abort or idle is explained in the
stream of binary bits With the characteristic that a maximum "FRAME FORMAT" section. The details regarding the In-
of five ""s" can occur in succession unless Abort, Flag, or puts, outputs, status bits, control bits, and Rx FIFO opera-
Idling condition occurs. The receiver continuously (on a blt- tion are described In their respective sections.
by-bit basis) searches for Flags and Aborts.
When a flag is detected, the receiver establishes frame
synchronization to the flag timing. If a series of flags is LOOP MODE OPERATION
received, the receiver resynchronizes to each flag. The ADLC In the loop mode, not only performs the
If the frame IS terminated before the Internal buffer time transmission and receiVing of data frames in the manner
expires (the frame data IS less than 25 bits after an opening previously described, but also has additional features for
flag), the frame is simply Ignored. NOise on the data Input gaining and relinqUishing loop control. In Figure 9a, a con-
(RxDl dUring time fill can cause this kind of Invalid frame. figuration is shown which depicts loop mode operation. The
The received serial data enters a 32-bit shift register (clock- system configuration shows a pnmary station and several
ed by RxC) before It IS transferred into the Rx Data FIFO. secondary stations. The loop IS always under control of the
Synchronization IS established when a Flag IS detected In the primary station. When the primary wants to receive data, It
first eight locations of the shift register. Once synchrOniza- transmits a Poll sequence and allows frame transmission to
tion has been achieved, data IS clocked through to the last secondary stations on the loop. Each secondary IS In series
byte location of the shift register where it is transferred byte- and adds one bit of delay to the loop. Secondary A In the
per-byte Into the Rx Data FIFO. The Rx Data FIFO IS clocked figure receives data from the primary via ItS Rx Data Input,
by E to cause received data to move through the FIFO to the delays the data' bit, and transmits It to secondary B via ItS
last empty register location. The Receiver Data Available Tx Data Output. Secondaries B, C, and 0 operate In a Similar
status bit (RDA) Indicates when data is present In the last manner. Therefore, data passes through each secondary and
register (Register '3) for the '-Byte Transfer Mode. The IS received back by the primary controller.
2-Byte Transfer Mode causes the RDA status bit to Indicate Certain protocol rules must be followed In the manner by
data IS available when the last two FI FO register locations which the secondary station places Itself on-loop (connects
(Registers #2 and '3) are full. If the data character present In ItS transmitter output to the loop), goes active on the loop
the FIFO is an address octet, the status register Will exhibit (starts transmitting Its own station's data on the loop), and
an Address Present status condition. Data being available in goes off the loop (disconnects Its transmitter output). Other-
the Rx Data FIFO causes an interrupt to be Initiated (assum- wise loop data to other stations down loop would be In-
ing the receiver interrupt IS enabled, RIE= "'''1. The MPU terfered. The data stream always flows the same way and
will read the ADLC Status Register as a result of the Interrupt the order in which secondary terminals are serviced IS deter-
or in its turn In a polling sequence. RDA or Address Present
will indicate that receiver data IS available and the MPU
should subsequently read the Rx Data FIFO register. The in-
times the delay through the loop. Should it exceed n
times, where n IS the number of secondary terminals on the
+'
mined by the hardware configuration. The primary controller
bit
terrupt and status bit Will then be reset automatically. If more loop, it Will indicate a loop failure. Control is transferred to a
than one character had been received and was resident in the secondary by transmitting a "Go Ahead" signal following the
Rx Data FIFO, subsequent E clocks will cause the FIFO to clOSing Flag of a polling trame (request for a response from
update and the RDA status bit and Interrupt will again be the secondary) from the primary station. The "Go Ahead"
SET. In the 2-Byte Transfer Mode both data bytes may be from the pnmary is a "0" and seven ""s" followed by mark
4·559
MC6854-MC68A54- MC68B54
• AOLC r- - - - - - - - - - - - - - - --,
I
I
,---------+--< UP-Loop Data
RxO
TxO
LOC
I
IL ________________ -.J
Idling. The pnmary can abort Its response request by inter- through gate A to the down Loop statIons. Any Up-Loop
rupting its Idle wIth flags. The secondary should ImmedIately transmission WIll be receIved by the ADLC The Loop
stop transmissIon and return control back to the pnmary Mode/Non-Loop Mode Control bIt (bIt 5 m Control RegIster
When the secondary completes ItS frame, a closIng flag is 3) must be set to place the ADLC In the Loop Mode. The
transmItted followed by all "1's". The primary detects the ADLC now monitors ItS Rx Data mput for a string of seven
final 01111111 .. ("Go Ahead" to the pnmary) and control is consecutIve "1's" whIch WIll allow a statIon to go on Ime.
gIven back to the primary. Note that, If a down-loop secon- The Loop operatIon may be monItored by use of the Loop
dary (e g., station D) needs to msert informatton follOWIng Status bIt m Status RegIster 1 After power up and reset, thIS
an up-loop statIon (e.g., station A), the go ahead to statIon bIt IS a zero. When seven consecutIve ""s" are receIved by
D IS the last "0" of the closIng flag from statIon A fOllowed the ADLC the LOC/DTR output WIll go to a low level, disabl-
by""s". Ing gate A (refer to FIgure 9b), enabling gate B and connec-
The ADLC In the primary statIon should operate In a non- tIng the ADLC Tx Data output to the down Loop statIons.
loop full-duplex mode. The ADLC in the secondanes should . The up Loop data IS now repeated to the down Loop stattons
operate m a loop mode, monttonng up-loop data on ItS vIa the ADLC. A 1-blt delay IS mserted In the data (m NRZI
receiver data mput. The ADLC can recognize the necessary mode, there will be a 2-blt delay) as It cIrculates through the
sequences In the data stream to automatically go on/off the ADLC. The ADLC IS now on-line- and the Loop Status bIt m
loop and to Insert its own statIon data. The procedure IS the Status RegIster 1 WIll be at a one.
follOWIng and is summarized in Table 1.
(2) Go Active after Poll - The receIver sectIon WIll montlor
(1) Go On-Loop - When the ADLC powers up, the ter- the up-link data for a general or addressed poll command
minal station will be off line. The first task IS to become an and the Tx FIFO should be loaded WIth data so that when the
actIve termmal on the loop. The ADLC must be connected to go ahead sequence of a zero followed by seven ''1's''
a Loop Link via an external sWItch as shown In FIgure Sa. 101111111---) IS detected, transmIssion can be InitIated Im-
After a hardware reset, the ADLC LOC/i5iR Output will be mediately. When the polling frame IS detected, the Go-
In the high state and the up-loop receive data repeated Active-On-Poll control bit must be set (bIt 6 In Control
4-560
MC6854- MC68A54- MC68854
OFF-LOOP Rx section receives data from loop and searches Inactive "a"
tor 7 "1'5" (when On-Loop Control bit set) to go 1) NRZ MODE Tx data output is maintained
ON-LOOP "h igh" (mark l.
2) NRZI MODE. Tx data output reflects the Rx
data input state delayed by one
bit time (Not normally con-
nected to loop.) The N AZ, data
IS Internally decoded to provide
error-free transitions to On-Loop
mode.
ACTIVE Rx section searches for flag (an Interrupt from the Tx data Originates wlthm ADLC until Go Active on "0"
loop controller) at Rx data Input Received flag Poll bit IS reset and a flag or Abort IS completed
causes FO output to go low I RO IS generated If Then returns to ON-Loop state
I
R'iE and FDSE control bits are set
Register 3) A maximum of seven bit times are available to (4) Go Off-Loop - The ADLC can drop off the Loop (go
set this control bit after the clOSing flag of the poll When the off-Ilnel similar to the way It went on-line When the Loop
Go-Ahead IS detected by the receiver, the ADLC will On-Line control bit IS reset the ADLC receiver section looks
automatically change the seventh one to a zero so that the for eight successive "l's" before allOWing the LOC/DTR out-
repeated sequence out gate B In Figure 9b IS now an opening put to return high (the inactive state I Gate A In Figure 9b
flag sequence (011111110) Transmission now continues will be enabled and gate B disabled allOWing the loop to
from the Tx FIFO with data (address, control, etc) as maintain continuity Without disturbance The Loop Status
previously descnbed When the ADLC has gone actlve-on- bit will show an off-line condition (logical zerol
poll, the Loop Status bit In Status Register 1 will go to a
zero The receiver searches for a flag, which indicates that
the pnmary station IS Interrupting the current operation SIGNAL DESCRIPTIONS
(3) Go Inactive when On-Loop - The Go-Actlve-On-Poll All Inputs of ADLC are high-Impedance and TTL-
control bit may be RESET at any time dunng transmission compatible level Inputs All outputs of the ADLC are com-
When the frame IS complete (the clOSing Flag or abort IS patible With standard TTL Interrupt Request IIRQI,
transmlttedl, the Loop IS automatically released and the sta- however, IS an open-drain output Ina Internal pullupl
tion reverts back to being Just a 1-blt delay In the Loop,
repealing up-link data If the Go-Actlve-On-Poll control bit IS INTERFACE FOR MPU
not reset by software and the final frame IS transmitted
lFlag/Mark Idle b,t=O), then the transmitter Will mark Idle Bidirectional Data Bus (DO-D7) - These data bus I/O
and Will not release the loop to up-loop data A Tx Abort ports allow the data transfer between ADLC and system bus
command would have to be used In thiS case In order to go The data bus dnvers are three-state deVices that remain In
inactive when on the loop Also, If the Tx FIFO was not the high-Impedance (offl state except when the MPU per-
preloaded with data (address, control, etc I pnor to chang- forms an ADLC read operation
Ing the "Go Ahead Character" to a Flag, the ADLC Will either
transmit flags (active Idle characterl until data IS loaded Enable Clock (EI - E activates the address Inputs (CS,
(when Flag/ Mark Idle Control bit IS high) or Will go Into an RSO, and RSlI and R/W Input and enables the data transfer
underrun condition and transmit an Abort (when Flag/Mark on the data bus E also moves data through the Tx FIFO and
Idle control bit IS lowl When an abort IS transmitted, the Go- Rx FIFO E should be a free-running clock such as the
Actlve-on-Poll control bit IS reset automatically and the MC6800 MPU system clock
ADLC reverts to ItS repeating mode, (TxD = delayed RxDJ
When the ADLC transmitter lets go of the loop, the Loop Chip Select (CS) - An ADLC read or write operation IS
Status bit will return to a "1", indicating normal on-loop enabled only when the CS Input IS low and the E clock Input
retransmisSion of up-loop data IS high (E·ESI
4-561
MC6854· MC68A54· MC68B54
Register Selects (RSO, RS1) - When the Register Select PERIPHERAL/MODEM CONTROL
inputs are enabled by (E.CS), they select internal registers in
conjunction with the Read/Write input and Address Control Request-to-Send Output (RTS) - The Request-to-Send
bit (control register 1, bit OJ. Register addressing IS defined in output is controlled by the Request-to-Send control bit in
Table 2. conjunction with the state of the transmitter section. When
the RTS bit goes high, the RTS output Islorced low. When
Read/Write Control Line (R/W) - The R/W input con- the RTS bit returns low, the RTS output remains low until
trols the direction of data flow on the data bus when it is the end 01 the frame and there IS no further data in the Tx
enabled by (E.CSI. When R/W is high, the I/O Buffer acts FIFO for a new frame. The positive transition of RTS occurs
as an output driver and as an input buffer when low. It also alter the completion of a Flag, an Abort, or when the RTS
selects the Read Only and Write Only registers within the control bit IS reset dunnJ!...! mark Idling state. When the
ADLC. RESET Input IS low, the RTS output goes high.
Reset Input (RESET) The RESET Input provides a Clear-to-Send Input (CTS) -. The CTS Input provides a
means of resetting the ADLC from a hardware source. In the real-time inhibit to the TDRA status bit and Its associated In-
"low state," the RESET input causes the following: terrupt. The positive transition of CTS IS stored Within the
'Rx Reset and Tx Reset are SET causing both the ReceiV- ADLC to ensure ItS occurrence Will be acknowledged by the
er and Transmitter sections to be held In a reset condi- system. The stored CTS information and ItS associated IRQ
tIOn. (if enabled) are cleared by wntlng a "1" In the Clear Tx
'Resets the following control bits: Transmit Abort, RTS, Status bit or In the Transmitter Reset bit.
Loop Mode, and Loop On-Llne/DTR.
'Clears all stored status condition of the status registers. Data-Carrier-Datset Inupt (DCD) - The DCD Input prCil-
I
'Outputs: RTS and LOC/DTR go high TxD goes to the vldes a real-tIme inhibit to the receiver section. A high level
mark state ("l's" are transmittedl. on the DCD Input resets and Inhibits the receiver register,
When RESET returns "high" (the inactive state) the but data In the Rx FI Fa from a prevIous frame is not disturb-
transmitter and receiver sections will remain In the reset state ed. The positive transition of DCD IS stored Within the ADLC
until Tx Reset and Rx Reset are cleared via the data bus to ensure that its occurrence will be acknowledged by the
undel software control. The Control Register bits affected by system. The stored DCD information and ItS associated IRQ
RESET cannot be changed when RESET is "low." (,f enabled) are cleared by means of the Clear Rx Status Con-
trol bit or by the Rx Reset bit.
Interrupt Request Output (IRQ) - IRQ will be low if an in-
terrupt situation eXists and the appropriate Interrupt enable loop On-Line Control/ Data Terminal Ready Output
has been set. The Interrupt remains as long as the cause for (LOC/DTR) - The LOC/DTR output serves as a DTR out-
the interrupt is present and the enable is set. IRQ will be low put in the non-loop mode or as a Loop Control output In the
as long as the IRQ status bit IS set and is high il the IRQ loop mode. When LOC/DTR output performs the DTR func-
status bit is not set. tion, It is turned on and off by means of the LOC/DTR con-
trol bit. When the LOC/ DTR control bit IS high the DTR out-
CLOCK AND DATA OF TRANSMITTER AND RECEIVER put Will be low. In the loop mode the LOC/ DTR output pro-
vides the means 01 controlling the external loop Interface
Transmitter Clock Input (TxC) - The transmitter shilts hardware to go On-line or OfHne. When the LOCI DTR con-
data on the negative transition 01 the TxC clock input. When trol bit IS SET and the loop has "Idled" lor 7 bit times or more
the Loop Mode or Test Mode IS selected, TxC should be the (RxD=Ollllll1...), the LOC/DTR output Will go low (on-
same frequency and phase as the RxC clock The data rate of line) The RESET Input being low Will cause the LOC/DTR
the transmitter should not exceed the E frequency. output to be high.
Receiver Clock Input (RxC) - The receiver samples the Flag Datect Output (FD) - An output to ,nd,cate the
data on the positive transition of the RxC clock RxC should reception of a flag and initiate an external time-out counter
be synchronized with receive data externally. for the loop mode operation. The FD output goes low for 1
bit time beginning at the last bit of the flag character, as
Transmit Data Output (TxD) - The senal data from the sampled by the receiver clock (RxCI.
transmitter IS coded In NRZ or NRZI (Zero Complement) data
format.
Receiver Date Input (RxD) - The senal data to be re- DMA INTERFACE
ceived by the ADLC can be coded ,n NRZ or N RZI (Zero
Complementl data format. The data rate of the receiver Receiver Data Service Request Output (RDSR) - The
should not exceed the E frequency. If a partial byte receptIOn RDSR Output IS provided primarily for use In DMA Mode
is possible at the end of a frame, the maximum data rate 01 operation and indicates (when high) that the Rx FIFO re-
the receiver IS Indicated by the following relationship: quests service (RSDR output reflects the RDA status bit
regardless of the state of the RDSR mode control bit In
fRxCS - - ' - - - CR1). If the prioritized Status Mode is selected, RDSR Will
2tE + 300 ns be inhibited when any other receiver status conditions are
where tE is the period 01 E. present. RDSR goes low when the Rx FIFO IS read
4-562
MC6854-MC68A54-MC68B54
Transmitter Data Service Request Output (TDSR) - The used for the data transfer. Each register has pOinter bits
TDSR Output is provided for DMA mode operation and in- which point the frame boundary. When these pointers ap-
dicates (when highl that the Tx FIFO request service pear at the last FIFO location, they update the Address Pre-
regardless of the state of the TDSR Mode Control bit In CR1 sent, Frame Valid, or FCS/IF Error status bits.
TDSR goes low when the Tx FIFO is loaded. TDSR is In- The RDA,status bit indicates the state of the Rx FIFO.
hibited by: the Tx RS control bit being SET, RESET being When RDA status bit is "1", the Rx FIFO IS ready to be read.
low, or CTS being high. If the prioritized status mode IS us- The RDA status is controlled by the 2-Byte/1-Byte control
"ed, Tx Underrun also inhibits TDSR. TDSR reflects the bit. When overrun occurs, the data In the first byte of the Rx
TDRA status bit except In the FC mode. In the FC mode the FIFO are not longer valid.
TDSR line IS inhibited. Both the Rx Reset bit and RESET input clear the Rx FIFO.
Abort ("in Frame") and a high level on the DCD input also
ADLC REGISTERS clears the Rx FIFO, but the last bytes of the previous frame,
Eight registers In the ADLC can be accessed by means of which are separated by the frame boundary pointer, are not
the MPU data and address buses. The registers are defined disturbed.
as read-only or write-only according to the direction of infor-
mation flow. The addresses of these registers are defined in
Table 2. The transltter FI FO register can be accessed by two TRANSMITTER DATA FIRST-IN FIRST-OUT REGISTER
different adgresses, the "Frame Terminate" address and the
"Frame Continue" address. (The function of these addresses Tx FIFO - The Tx FIFO consists of three B-bit registers
are discussed In the FIFO section.! which are used for buffer storage of data to be transmitted.
Data is always transferred from a full register to an empty ad-
•
TABLE 2 - REGISTER ADDRESSING jacent register; the transfer occurs on both phases of the E
Input clock. The Tx FIFO can be addressed by two different
Add,ess
Control Bit register addresses, the "Frame Continue" address and the
Register Selected R/W RSl RSO (el bO) "Frame Terminate" address. Each register has pOinter bits
Write Control Register #1 0 0
which point to the frame boundary. When a data byte IS writ-
0 X
ten at the "Frame Continue" address, the pointer of the first
Write Control Register #2 0 0 1 0
FI FO register is set. When a data byte is written at the
Write Control Register #3 0 0 1 1 "Frame Terminate" address, the pointer of the first FIFO
Write Transmit FIFO 0 1 0 X register is reset. Rx RS control bit or Tx Abort control bit
(Frame Continue) resets all pointers. The pointer will shift through the FIFO.
Write Transmit FIFO 0 1 1 0 When a pOSitive transition is detected at the third location of
(Frame Terminate) FIFO, the transmitter initiates a frame with an open flag.
When the negative transition is detected at tt-e third location
Write Control Register #4 0 1 1 1
of FIFO, the transmitter closes a frame, appending the FCS
Read Status Register #1 1 0 0 X
and closing Flag to the last byte.
Read Status Register #2 1 0 1 X The Tx last control bit can be used Instead of uSing the
Read Receiver FIFO 1 1 X X "Frame Terminate" address. When the T x last control bit IS
set with a "1" , the logiC searches the last byte location In the
FIFO and resets the pointer in the FIFO register.
The status of Tx FIFO is Indicated by the TDRA status bit.
RECEIVER DATA FIRST-IN FIRST-OUT REGISTER When TDRA IS "1", the Tx FIFO is available for loading data.
Rx FIFO - The Rx FI FO consists of three B-bit registers The TDRA status IS controlled by the 2-Byte/1-Byte control
which are used for the buffer storage of received data. Data bit. The Tx FIFO is reset by both Tx Reset and RESET input.
bytes are always transferred from a full register to an adla- During this reset condition or when CTS input is high, the
cent empty register; and both phases of the E Input clock are TDRA status bit is suppressed and data loading is Inhibited.
4-563
MC6854-MC68A54-MC68B54
.~
'i
0
1
ADA
Status #2
Aead Aequest
Address Present
Frame Valid
BitO
Bit 1
Transmitter Transmitter:
Date Data
Control Registar #1 Control Register #2 Control Register #3 (Continue Data) (Last Data) Control Register #4
Bit # (C1bO = 0) (C1bO -1) (C1bO -0) (C1bO= 1)
0 Address Control (AC) PriOritized Status Logical Control BltO BltO Double Flag/Single
.
I
Enable Field Select Flag Interframe
f Control
t: 1 Receiver Interrupt 2 Byte/1 Byte Extended Control Bit 1 Bit 1 Word Length Select
'f Enable (A IE) Transfer Field Select Transmit #1
II:
> 2 Transmitter Interrupt Flag/Mark Idle Auto, Address Bit 2 Bit 2 Word Length Select
'E Enable (TIE) ExtenSion Mode Transmit #2
0
3 ADSA Mode (DMA) Frame Completel 01/11 Idle Bit 3 Bit 3 Word Length Select
.~
TDRA Select Receive #1
~
4 TDSA Mode (DMA) Transmit Last Data F lag Detected Blt4 Bit 4 Word Length Select
Status Enable Receive #2
5 Rx Frame C LA A x Status Loop/Non-Loop Mode Bit 5 Bit 5 Transmit Abort
Discontinue
6 Ax AESET CLA Tx Status Go Active on Poll/Test Bit 6 Bit 6 Abort Extend
7 Tx AESET ATS Control Loop On-Line Bit 7 Bit 7 NAZI/NAZ
ControlDTR
4-564
MC6854-MC68A54-MC68B54
CONTROL REGISTERS
7 6 5 4 3 2 1 0
RSl RSO R/W AC TxRS RxRS Dlscontmue TDSR RDSR TIE RIE AC
0 0 0 X Mode Mode
•
(Register Selectl signal I"ternally The AC bit IS used In con- the DISCONTINUE bit IS set, the currently received frame IS
junction with RSO, RS1, and R/W Inputs to select particular Ignored and the ADLC discards the data of the current
registers, as shown In Table 2 frame The DISCONTINUE bit only discontinues the current-
ly received frame and has no affect on subsequent frames,
bl Receiver Interrupt Enable (RIE) RIE even If a follOWing frame has entered the receiver section
enablesl disables the Interrupt request caused by the receiver The DISCONTINUE bit IS automatically reset when the last
section 1 enable, 0 disable byte of the frame IS discarded When the Ignored frame IS
aborted by receiving an Abort or DCD failure, the DISCON-
b2 - Transmitter Interrupt Eanble (TIE) TIE TI NU E bit IS also reset
enablesl disables the Interrupt request caused by the
transmitter 1 enable, 0 disable b6 - Receiver Reset (Rx RS) - When the Rx RS bit IS
"1", the receiver section stays In the reset condition Ali
b3 - Receiver Data Service Request Mode (RDSR reclever sections, Including the Rx FIFO register and the
MODE) - The RDSR MODE bit provides the capability of receiver status bits In both status registers, are reset (During
operation with a bus system In the DMA mode when used In reset, the stored DCD status IS reset but the DCD status bit
conjunction with the prioritIZed status mode When RDSR follows the DCD Input) Rx RS IS set by forcing a low level on
MODE IS set, an Interrupt request caused by RDA status IS the RESET Input or by writing a "1" Into the bit from the
inhibited, and the ADLC does not request data transfer via data bus Rx RS must be reset by writing a "0" from the data
the IRQ output bus after RESET has gone high
b4 - Transmitter Data Service Request Mode (TDSR b7 - Transmitter Reset (Tx RS) - When the Tx RS bit IS
MODE) - The TDS R MODE bit provides the capability of "'1", the transmitter section stays In the reset condition and
operation with a bus system In the DMA mode when used In transmits marks ("1's"l. All transmitter sections, including
conjunction with the Prioritized status mode When TDSR the Tx FIFO and the transmitter status bitS, are reset (FIFO
MODE IS set, an Interrupt request caused by TDRA status IS cannot be loaded) DUring reset, the stored CTS status IS
inhibited, and the ADLC does not request a data transfer via reset but the CTS status bit follows the CTS Input Tx RS IS
the IRQ output set by forcing a low level on the RESET Input or by writing a
"1" from the data bus It must be reset by writing a "0" after
RESET has gone high
4-565
MC6854- MC68A54- MC68B54
7 6 5 4 3 2 1 0
RS1 RSO RM AC RTS CLR CLR Tx FCITDRA F/M 2/1 PSE
0 1 0 0 TxST RxST Last Select Idle Byte
bO - Prioritized Status Enable IPSE) - When the PSE bit after loading the last data byte and before the Tx FIFO emp-
IS SET, the status bits In both status registers are prioritized ties. When the Tx Last bit IS set, the AOLC assumes the byte
as defmed In the Status Register section. When PSE is low, IS the last byte and terminates the frame by appending CRCC
the status bits indicate current status without bit suppression and a closing Flag. This control bit IS useful for OMA opera-
by other status bits. The exception to this rule is the CTS tion. Tx Last bit automatically returns to the "0" state.
b2 - Flag/Mark Idle Select (F/M Idle) - The F/M Idle bit b6 - Clear Transmitter Status (CLR Tx ST) - When a
selects Flag characters or blt-by-blt Mark Idle for the time fill "1" IS written Into CLR Tx ST bit, a reset signal IS generated
or the Idle state of the transmitter. When Mark Idle IS for the transmitter status bits In status register #1 (except
selected, Go-Ahead code can be generated for loop opera- TORA). The reset signal IS enabled for the bits which have
tion in conjunction with the 01111 Idle control bit (C3b3). been present dUring the last "read status" operation. The
1... Flag time fill, O... Mark Idle. CLR Tx ST bit automatically returns to the "0" state.
b3 - Frame CompletelTDRA Select (FC/TDRA b7 - Request-to-Send Control (RTS) - The RTS bit,
Select) - The FC/TORA Select bit selects TORA status or when high, causes the RTS output to be low (the active
FC status for the TORA/ FC status bit Ind,Calion 1. FC statel. When the RTS bit returns low and data IS being
status, 0 .. TORA status. transmitted, the RTS output remains low until the last
character of the frame (the closing Flag or Abort) has been
b4 - Transmit Last Data (Tx Last) - Tx Last bit provides completed and the Tx FIFO IS empty. If the transmitter IS Idl-
another method to terminate a frame This bit should be set Ing when the RTS bit returns low, the RTS output will go
high (the Inactive state) Within two bit times
4-566
MC6854- MC68A54- MC68B54
7 6 5 4 3 2 1 0
RSl RSO R/W AC LOCI GAPI Loop FDSE 01/11 AEX CEX LCF
o 0 1 DTR TST Idle
bO - Logical Control Field Select (LCF) - The LCF select detection will cause the Flag Detect output to go low for 1 bit
bit causes the first byte(s) of data belonging to the informa- time regardless of the state of FDS E.
tion field to remain 8-bit characters until the logical control
field IS complete. The logical control field (when selected) IS b5 - LOOP/NON-LOOP Mode (LOOP) - When the
an automatically extendable field which IS extended when bit LOOP bit IS set, loop mode operation IS selected and the
•
7 of a logical control character IS a "1." When the LCF Select GAPITST control bit, LOC/DTR control bit and LOC/DTR
bit IS reset the ADLC assumes no logical control field IS pre- output are selected to perform the loop control functions.
sent for either the transmit or received data channels. When When LOOP IS reset, the AOLC operates in the point-to-
the logical control field IS terminated, the word length of the point data communications mode.
Information data IS then defined by WLSl and WLS2
b6 - Go Active On Poll/Test (GAP/TST) - In the Loop
b1 - Extended Control Field Select (CEX) - When the Mode - The GAP/TST bit is used to respond to the poll se-
CEX bit IS a "1", the control field IS extended and asusmed to quence and to begin transmission. When GAP/TST IS set,
be 16 bits. When CEX IS "0", the control field IS assumed to the receiver searches for the "Go Ahead" (or End of Poll,
be 8 bits. EOP). The receiver "Go ahead" is converted to an opening
Flag and the AOLC starts its own transmission. When
b2 - Autol Address Extend Mode (AEX) - The AEX bit GAPITST is reset dUring the transmiSSion, the end of the
when "low" allows full 8 bits of the address octet to be utiliz- frame (the completion of Flag or Abort) causes the termina-
ed for addressing because address extension IS inhibited. tion of the "go-active-on-poll" operation and the Rx Data to
When the AEX bit IS "high," bit 0 of address octet equal to Tx Data link is re-establlshed. The AOLC then returns to the
"0" causes the Address field to be extended by one octet. "Ioop-on-line" state.
The exception to this automatic address field extension is In the Non-Loop Mode - The GAP/TST bit IS used for
when the first address octet IS all "O's" (the Null Address!. self-test purposes. If GAP/TST bit IS set, the TxO output is
connected to the RxO Input Internally, and prOVides a "Ioop-
b3 - 01 I 11 Idle (01 I 11 Idle) - The 01 I 11 Idle Control bit back" feature. For normal operation, the GAP/TST bit
determines whether the inactive (Mark) Idle condition beginS should be reset.
with a "a" or not. If the 01/11 Idle Control IS SET, the clOSing
flag (or Abort) will be followed by a 011111 ... pattern. This IS b7 - Loop On-Line ControllDTR Control (LOC/DTR) -
reqUired of the controller for the "Go Ahead" character In In the Loop Mode - The LOC/OTR bit is used to go on-line
the Loop Mode. When 01111 IS RESET, the Idling condition or to go off-line. When LOC/OTR is set, the ADLC goes to
Will be all "l's" the on-line state after 7 consecutive "l's" occur at the RxO
Input. When LOCIDTR IS reset, the ADLC goes to the "off-
b4 - Flag Detect Status Enable (FDSE) - The FDSE bit line" state after eight consecutive "l's" occur at the RxO in-
enables the FD status bit In Status Register #1 to indicate the put.
occurrence of a received Flag character. The status Indica- In the Non-Loop Mode - The LOC/OTR bit directly con-
tion will be accompanied by an Interrupt If RIE IS SET Flag trols the Loop On-Llne/OTR output state 1...0TR output
goes to low level, O... DTR output goes to high level.
4-567
MC6854. MC68A54· MC68B54
7 6 5 4 I 3 2 I , 0
, ,
RS' RSO R/W AC
0 , NRZI/NRZ ABTEX ABT
WLS2
Rx
WLS, WLS2
Tx
WLS,
"FF"/F
bO - Double Flag/Single Flag Interframe Control '-blt delay IS added to the transmitted data (TxD) to allow for
("FF" /"F") - The "FF"I"F" Control bit determines NAZI encoding. ' ... NAZI, O... NAZ.
whether the transmitter will transmit separate closmg and
opening Flags when frames are transmitted successively. NOTE
When the "FF"I"F" control bit is low, the closing flag of the NAZI coding - The serial data remains m the same
first frame will serve as the opening flag of the second frame state to send a binary "'" and sWitches to the op-
When the bit IS high, Independent opening and closmg flags posite state to send a binary "0".
I will be transmitted.
4·568
MC6854- MC68A54- MC68B54
7 6 5 4 3 2 1 0
RSl RSO R/W AC IRQ TDRA/FC TXU CTS FD LOOP S2RQ RDA
0 0 1 X
bO - Receiver Data Available (RDA) - The RDA status b5 - Transmitter Underrun (TxU) - When the transmit-
bit reflects the state of the RDA status bit In status register ter runs out of data dUring a frame transmiSSion, an underrun
#2. It provides the means of achieving data transfers of occurs and the frame IS automatically terminated by
received data In the full Duplex Mode without haVing to read transmitting an Abort. The underrun condition IS Indicated
•
both status registers. by the TxU status bit. TxU can be cleared by means of the
Clear Tx Status Control bit or by Tx Reset
bl - Status Register #2 Read Request (S2RO) - All the
status bits (stored conditions) of status register #2 (except b6 - Transmitter Data Register Available/Frame Com-
RDA bit) are logically ORed and Indicated by the S2RQ plete (TDRA/FC) - The TDRA Status bit serves two pur-
status bit. Therefore, S2RQ indicates that status register #2 poses depending upon the state of the Frame Com-
needs to be read. When S2RQ IS "0", It IS not necessary to plete/TDRA Select control bit. When thiS bit serves as a
read status register #2. The bit IS cleared when the ap- TDRA status bit, It Indicates that data (to be transmitted)
propriate bits In status register #2 are cleared or when Rx can be loaded into the Tx Data FIFO register. The first
Reset is used. register (Register #1) of the Tx Data FIFO being empty
(TDRA = "1 ") will be Indicated by the TDRA Status bit In the
b2 - Loop Status (LOOP) - The LOOP status bit IS used "1-8yte Transfer Mode." The first two registers (Registers
to monitor the loop operation of the ADLC. This bit does not #1 and #2) must be empty for TDRA to be high when in the
cause an IRQ. When Non-Loop Mode IS selected, LOOP bit "2-8yte Transfer Mode." TDRA IS Inhibited by Tx Reset, or
stays "0". When Loop Mode IS selected, the LOOP status bit CTS being high.
goes to "1" dUring "On-Loop" condition. When ADLC IS in When the Frame Complete Mode of operation IS selected,
an "Off-Loop" condition or "Go-Active-On-Poll" condition, the TDRA/ FC status bit goes high when an abort IS transmit-
the LOOP status bit is a "0" ted or when a flag IS transmitted With no data In the Tx FIFO.
The bit remains high until cleared by resetting the TDRA/ FC
b3 - Flag Detected (FD) - The FD Status bit Indicates control bit or setting the Tx Reset bit.
that a flag has been received If the Flag Detect Enable control
bit has been set. The bit goes high at the last bit of the Flag b7 - Interrpt Request (lRO) - The Interrupt Request
Character received (when the Flag Detect Output goes low) status bit Indicates when the IRQ output is in the active state
and IS stored until cleared by Clear Rx Status or Rx Reset (IRQ Output = "0"1. The IRQ status bit IS subject to the same
Interrupt enables (RIE, TIE) as the IRQ output, I.e., with both
b4 - Clear-to-Send (CTS) - The CTS input positive tran- transmitter and receiver Interrupts enabled, the IRQ status
sition IS stored In the status register and causes an IRQ (if bit IS a logical ORed Indication of Status Register 1 status
Enabledl. The'stored CTS condition and ItS IRQ are cleared bits. The IRQ bit only reflects the set status bits which have
by Clear Tx Status control bit or Tx Reset bit. After the Interrupts enabled. The IRQ status bit simplifies status in-
stored status IS reset, the CTS status bit reflects the state of qUiries for polling systems by prOViding Single bit Indication
the CTS Input. of service requests.
4-569
MC6854-MC68A54-MC68B54
7 6 5 4 3 2 1 0
RS1 RSO R/W AC RDA OVRN DCD ERR Rx Rx FV AP
o x ABT Idle
bO - Add_ PIW8I1t (AP) - The AP status bit provides Abort condition IS cleared by the Clear Rx Status Control bit
the frame boundary and indicates an Address octet is or Rx Reset.
available in the Rx Data FIFO register. In the Extended Ad- b4 - Frame Check Sequenoe/lnvalid Frame Error
dressing Mode, the AP bit continues to Indicate addresses (ERR) - When a frame is complete with a cyclic redundancy
until the Address field is complete. The Address present check (CRC) error or a short frame error (the frame does not
status bit is 'cleared by reading data or by Rx Reset. have complete Address and Control fields), the ER R status
bit is set instead of the Frame Valid status bit. Other func-
b3 - Abort Received (RxABT) - The RxABT status bit b7 - Receiver Data Available (RDA) - The Receiver Data
indicates that seven or more consecutive "l's" have been Available status bit indicates when receiver data can be read
received. Abort has no meaning under out-of-frame condi- from the Rx Data FIFO. When the prioritized status mode IS
tions; therefore, no Interrupt nor storing of the status will oc- used, the RDA bit indicates that non-address and non-last
cur unless a Flag has been detected prior to the Abort. An data are available In the Rx FIFO. The receiver data being
Abort Received when "in frame" is stored In the status present in the last register of the FIFO causes RDA to be high
register and causes an IRQ. The status bit IS the logical OR of for the "l-Byte Transfer Mode." The RDA bit being high in-
the stored conditions and the Rx Abort detect logic, which IS dicates that the last.two registers are full when In the "2-Byte
cleared after 15 consecutive "l's" have occurred. The stored Transfer Mode." The RDA status bit IS reset automatically
when data IS not available
4·570
MC6854- MC68A54- MC68B54
PROGRAMMING CONSIDERATIONS
1. Status Priority - When the prioritized status mode is us- Test RDA to indicate whether a I-byte read should be
ed, It is best to test for the lowest Priority conditions first. performed. Then clear the frame end status.
The lowest Priority conditions tYPically occur more fre-
quently and are the most likely conditions to exist when 6. Frame Complete Status and RTS Release - In many
the processor IS interrupted. cases, a MODEM will require a delay for releaSing RTS.
2. Stored va Present Status - Certain status bits (DCD, An a-bit or 16-bit delay can be added to the ADlC RTS
CTS, Rx Abort, and Rx Idle) Indicate a status which is the output by using an Abort. At the end of a transmission,
logical OR of a stored and a present condition. It IS the frame complete status Will Indicate the frame completion.
stored status that causes an Interrupt and which is After frame complete status goes high, write "1" Into the
cleared by a Status Clear control bit. After being cleared, Abt control bit (and Abt Extend bit If a 16-bit delay is re-
the status register will reflect the present condition of an qUired). After the Abt control bit is set, write "0" Into the
input or a receiver Input sequence. R'fS control bit. The transmitter will transmit eight or SIX-
3. Clearing status Registers - In order to clear an Interrupt teen "1 's" and the RTS output will then go high
With the two Status Clear control bitS, a particular status (Inactive).
condition must be read before it can be cleared. In the 7. Note to users not using the MC6800 - (a) Care should be
priOritized mode, clearing a higher PriOrity condition taken when performing a write followed by a read on suc-
might result In another iRQ caused by a lower priority cessive E pulses at a high frequency rate. Time must be
condition whose status was suppressed when a status allowed for status changes to occur. If thiS IS done, the
time that E is low between successive writel read E pulses
•
register was first read. ThiS guarantees that a status con-
dition IS never Inadvertently cleared. should be at least 500 ns. (b) The ADlC IS a completely
4. Clearing the Rx FIFO - An Rx Reset Will effectively clear static part. However, the E frequency should be high
the contents of all three Rx FIFO bytes. However, the enough to move data through the FI FOs and to service
FIFO may contain data from two different frames when the peripheral requirements. Also, the period between
abort or DCD failure occurs. When this happens, the data successive E pulses should be less than the period of RxC
from a previously closed frame (a frame whose clOSing or TxC In order to maintain synchronization between the
flag has been received) Will not be destroyed. data bus and the peripherals
5. Servicing the Rx FIFO in a 2-Byt8 Mode - The procedure 8. Clear-to-Send (CTS) - The CTS input, when high, pro-
for reading the last bytes of data IS the same, regardless of vides a real-time Inhibit to the TDRA status bit and ItS
whether the frame contains an even or an odd number of associated interrupt. All other status bits Will be opera-
bytes. Continue to read 2 bytes until an Interrupt cocurs tional. Since it inhibits TDRA, CTS also inhlbts the TDSR
that IS caused by an end-of-frame status (FV or ERR) DMA request. The CTS Input being high does not affect
When this occurs, Indicating the last byte either has been any other part of the transmitter Information In the T X
read or IS ready to be read, switch temporarily to the FIFO and Tx Shift Register Will, therefore, continue to be
I-byte mode with no prioritIZed status (control register 2). transmitted as long as the Tx ClK IS running.
ORDERING INFORMATION
-
Levell "S"~ 10 Temp Cycles - 1-25 to l50"CI,
HI Temp testing at T A max
Level 2 "D" = 168 Hour Burn-In at 125°C
Level 3 "DS" = Combination of Levelland 2
B~20MHz
DeVice DeSignation
In M6800 Family Speed Device Temperature Range
Temperature Range _ _ _ _ _ _ _ _...1
1.0 MHz MC6854P,L,S o to 70·C
Blank = 0°_ + 70°C MC6854CP,CL,CS -40 to +85·C
C~ -40"- +85"C
Package ____________---l 15 MHz MC68A54P,L,S o to + 70·C
P = PlastiC MC68A54CP,CL,CS -40 to +85·C
5 ~ Cerdlp 20 MHz MC68B54P,L,S o to + 70·C
L= Ceramic
BETTER PROGRAM
Better program processing IS available on all types listed Add
suffiX letters to part number
Levell add "5" Level 2 add "D" Level 3 add "DS"
4-571
® MOTOROLA MC68SS
HMOS
(HIGH-DENSITY, N-CHANNEL
SILlCDN-GATEI
The Senal Direct Memory Access Processor IS intended as a high-speed senal link between MPU's or other Intelligent con-
trollers This deVice can automatically transfer data to or from memory and receive or transmit that data over a serlallrnk USing
bit onented protocols lie, SDLC, HDLC, l( 251, the SDMAP IS capable of handling multidrop, pOlnHo-polnt. or loop con-
figurations In a full or half duplex environment Bit rates of up to4 MHz full duplex can be used The Data Link IS configured With
a pnmary SDMAP connected to one or more secondary SDMAP's The primary station ISDMAP and ItS associated local MPUI
has responsibility for the data link control, such as mode of operation and polling of the secondary SOMAP's The secondary
stations which are relatively transparent to the local MPU Will respond only to link commands from the primary station Each
•
SDMAP has the ability to respond to link-level commands With automatic responses or station status and handle link level error
recovery Without Intervention by the local MPU
An Internal DMA controller IS contained In the SDMAP and is capable of handling both a transmit and receive channel
Simultaneously The DMA controller IS transparent to the user The local MPU only needs to wille the location of a parameter
table to the SDMAP ThiS parameter table contains the start address, message length, type of message, etc The SDMAP
automatically reads and loads the parameters Into It's Internal registers and then starts to transmit (or receive I data
The SDMAP contains 7 control registers and 3 status registers The control registers are used to configure the SDMAP, con-
trol recepllon and transmission of frames, and selectively mask Interrupts The status registers are used to monitor link activity,
error conditIOns, and status of the SDMAP
Other registers ore Included for local and group station addresses, test, I·frame counts (SDLC secondary onlyl, and pOinter
registers used to define blocks of frames to transmit and blocks of receive buffers
MPU INTERFACE PINS select Inputs and are used only as outputs to select the pro-
per memory location
Power - The SDMAP uses a single supply with two pins
dedicated to + 5 V and two pinS for ground DO-D7 (Data Bus Bidirectional) - The 8 bidirectIOnal data
lines allow the transfer of data between the SDMAP and the
RESET - The RES ET Pin IS an Input used to reset the controlling system
SDMAP and place It In the Power-Dn-Reset mode
MCLK - The MCLK Input supplied to the SDMAP IS a
R/W (Read/Write) - R/W determines the direction of
crystal controlled 8 MHz clock used to supply the Internal
data transfers on the data bus fo' register or DMA accesses
timing of the SDMAP
When DMAGNT IS asserted and the DMAREO was DMAVMA (DMA Valid Memory Address Output) -
generated by the SDMAP, the R/W pin IS generated as an DMAVMA goes low at the beginning of a DMA cycle to
output The condition of the R/W pin Ilow or high) IS depen- allow time for one controlling deVice to release the bus and
dent upon the direction of data as determined by the another deVice to become the bus master DMAVMA goes
SDMAP When DMAGNT IS low, R/W IS an Input controlled to zero on the rising edge of DMAGNT and returns to a one
•
bv the external processor and determines the directIOn of state on the next failing edge of E It IS dUring thiS time that
data transfers to or from the SDMAP registers address lines are allowed to SWitch
AO-A15 (Address Bus Bidirectional) - AO-A15, In con- CTS (Clear to Send Input) - In systems uSing modems,
Junction With the R/W Input, are used to select one of the CTS IS a function of RTS and the modem's requirements for
MPU acceSSible registers In the SDMAP for programmed line turnaround In systems not uSing modems, CTS IS a
data transfer. function of fiTS or RTS and an external delay CirCUit No
DUring any DMA operation AO-A15 are Ignored as register data IS transmitted by the SDMAP until ITS IS true
® MOTOROLA Me68S9
Advance In:forIDatlon
MOS
DEPLETION LOAD
DATA SECURITY DEVICE IN-CHANNEL, SILICON-GATEI
~
tion Standard (DES) as adopted by the U.S. Department of Commerce, ~-
National Bureau of Standards (NBS), In pubhcatlon FIPS PUB 46
(1-15-1977) I
Through the use of flexible on-chip control and status CircUitry and 24 I'
, I L SUFFIX
external control lines, the DSD provides direct capabihty of adapting the 1 CERAMIC PACKAGE
functional ImplementatIOn of the DES algorithm for various speCifiC • CASE 716
system reqUirements for data protection.
~" ':1':':
• Direct Compatlbihty with the M6800 Microprocessor Family
•
• Data Encryption Standard Algorithm
• Two Separate Interrupt Output Lines for Program Controlled
SSUFFIX
Interrupt Capability , ,1 • • • CERDIP PACKAGE
• Up to 400 KBPS Throughput Rate of 64-Blt Block Cipher (ExclUSive I: ' • CASE 623
of Software Overhead)
• TTL Compatible
• Single +5 V Power Supply
PIN ASSIGNMENT
IROPE
07
VCC 02
RESET 01
DO
2XE
CS4 VSS
CS3
eso
NOTICE
ThiS product may not be exported
Without prior approval from the U.S.
Department of State, Office of MUni-
tions Control.
4·574
MC6859
MAXIMUM RATINGS
Characteristics Symbol Value Unit ThiS device contains circUItry to protect the in-
Supply Voltage Vcc -03to +70 V puts against damage due to high static voltages
Input Voltage V,n -03to +70 V or electriC fields, however, It IS adVised that nor-
Operating Temperature Range mal precuatlons be taken to avoid application of
TL to TH
MC6869 o to 70 any voltage higher than maximum rated voltages
TA °c
MC6869C -40 to +85 to thiS high-Impedance Circuit Reliability of
operation IS enhanced If unused Inputs are tied to
Storage Temperature Range Tstg -55 to + 150 °c an appropriate logic voltage level (e 9 • either
THERMAL CHARACTERISTICS VSS or VCC)
Characteristic Symbol Value Unit
Thermal Resistance
Ceramic Package 9JA 60 °C/W
Cerdlp Package 65
POWER CONSIDERATIONS
DC ELECTRICAL CHARACTERISTICS (VCC=5 0 Vdc ±5%, VSS=O, TA=TL to TH unless otherWise noted I
Characteristic Symbol Min Typ Max Unit
Input High Voltage VIH VSS+20 - VCC V
Input Low Voltage VIL VSS-O 3 - VSS+08 V
Input Leakage Current (V," - 0 to 5 25 V) lin 10 25 "A
Three-State (all State) Input Current (V ,n - 0 to 5 25 V) DO-07 liZ - 20 10 "A
Output High Voltage IILoad= -205 "A) (See Figure 2) 00-07 VOH VSS+24 - - V
Output Low Voltage
IILoad = 1 6 rnA) 00-07 VOL - - VSS+04 V
II Load = 3 2 rnA) (See Figure 2) iROPE,lROR - - VSS+O 6
Output Leakage Current (Off State) (VOH - 2 4 V) IROPE, )ROR 10Z - 10 10 ~A
Internal Power DISSipation (Measured at TA=TL) PINT - 1000 - mW
Input CapaCitance (V,n=O, TA=25°C, 1= 10 MHz) 00-07
Cin
- - 125
pF
All Others - - 75
Output Capacitance (V,n=O, TA=25°C, 1= 1 0 MHz) IROPE,IROR Cout - - 50 pF
4-575
MC6859
• E
~----------(3r---------~
R/VV.Address--~-r~~~~~~~--------~rT~-----r+---------------------------------~~~~
(Non-Muxedl ____-+~~~~~~~~--------~~~----_+_r----------------------------------_r~~~~
4·576
MC6859
(00-07) IRoPE,IROR
Vee
MMD6150
Test POInt 0----.----....- ....1--<. or Equlv Test POInt
e R
130 pF 117k
MMD7000
or EqUiv
IROPE,IROR
Note Timing measurements are referenced from a low voltage of 08 volts and a high voltage of 20 volts, unless otherwise noted
4·577
MC6859
I
"I 1 1 W EnCipher Secondary Key
Ing edge of E. A low state on the R/W line enables data
1 0 0 R Transfer Malor Key
transfer from the MPU on the trailing edge of the 2XE signal
on the AK6 mask set and on the trailing edge of E for all • Instruction Initiated after eighth byte of Key Block entry
other mask sets. (See Mask Sets)
Enable (E) and 2XEnable (2XE) - The rising edge of the Interrupt Requests - These open drain outputs are used
Enable Input Initiates data transfer from the DSD to the MPU to convey Internal DSD status information to the MPU.
dUring a read cycle The failing edge of the Enable Input lat- Ready Interrupt Request (IROR) - ThiS ac-
ches MPU data mto the DSD dUring a write cycle The 2XE tive low output signals the MPU that the DSD IS
Input IS used In processing the encryption/decryption ready to Initiate another operation The IROR
algorithm for all mask sets E and 2XE are completely asyn- signal Will be Inactive dUring encrYPtion/decryp-
chronous. See section on Mask Sets for exceptions on prior tion or key transfer
revIsion of the DSD Parity Error Interrupt Request (lROPE) - ThiS
active low output IS used to signal the MPU that
Reset (RESET) - ThiS Input signal IS used to initialize the the DSD has detected a parity error The IROPE
Internal control logic, status flags, and counters of the DSD signal Will remain low until a hardware or soft-
The contents of the active key register and major key register ware reset IS received
remain unchanged The RESET function should be coupled
with the system power-on reset to provide orderly system
Initialization It may also be used as a master reset to the chip
dUring system operation
To abort the encryption algOrithm before the required 320 DSD FUNCTIONAL DESCRIPTION
clock cycles (2XE) have occurred, It IS necessary to provide a The MC6859 Data Security DeVice appears to an MPU
RESET signal or a software reset command to the DSD system as an Interface adapter deVice An example of a
When thiS occurs, Information ,n the data register and active system With the encryption function IS shown In Figure 4
key register IS no longer valid The contents of the major key Internal construction of the DSD IS Illustrated by the block
register are unaffected diagram The deVice consists of a Single 8-blt data bus buffer
With three-state operation, through which data may be
Address Lines (AD, A 1, A2) - These Inputs are used In entered Into
conjunction With the R/W line to select one of eleven POSSI- 1) the 56-bit active key register
ble DSD operations, as shown In Tables 1 and 2 The DSD IS 2) the 54-bit major key register
accessed via M PU read and write operations In much the 3) the 54-bit data register
same manner as a memory deVice
Output data from the status register or the data register IS
NOTE: also sWitched through the data bus buffers
Instructions performing operations directly on memory At the bus Interface, the DSD data register appears as
should not be used when the DSD IS accessed Since the eight addressable memory locatIOns to the MPU, through
DSD uses the R/W line as an additional register select Input, which the operatIOnal mode of the chip may be selected,
read-modlfy-wrlte type Instructions Will conflict With normal chip status mOnitored, key or data written Into the device,
operation of the Data Security DeVice and data read from the deVice
4-578
MC6859
OPERATING MODES Data IS always processed uSing the current ActIVe Key Dur-
As shown In Table 1, the operation of the DSD IS split Into Ing algOrithm operation, the DSD constantly performs parity
five major modes: checking on the contents of the active key register The busy
1) status readout flag will be set dUring encryption and then reset when the
algOrithm has finished Completion reqUIres 320 cycles of
2) loading of data or encrypted key
2XE DUring thiS time the DSD Will Ignore all external com-
3) data encryption mands except status read, hardware reset and software
4) data decryptIOn reset
5) data readout
These and additional control modes are activated by three Decipher Data - ThiS process IS Identical to enCipher data
address Input lines and a read/write Input line. except that the eighth byte IS written to the DeCipher Data
register. DUring deCipher or enCipher only a read status
register, hardware reset, or software reset Will be recognIZ-
ed All other commands Will be Ignored
Read Status - Only two bits are used In the status Read Data - ThiS command IS normally executed upon
readout. D7= Parity Error (PE) and D6= READY The re- completion of the enCipher/decipher algorithm (,nd,cated by
maining SIX bits are always read as logiC zeros A read of the READY=O). A read prior to completion of busy Will result In
status register does not change these bits. all zeros being read from DO-D7 As each byte of data IS read,
The PE flag IS set when a parity error IS detected while zeros are automatically shifted Into the data register to en-
loading either a major or secondary key or when the active sure data security.
key IS checked dUring algOrithm operation The PE flag re-
II
mains set and the IRQPE signal Will remain low until a hard- CONTROL MODES
ware/software reset IS received. Shown In Table 2 are the control modes which faCilitate
The READY flag IS set and the IRQR output goes high programming of the primary and secondary keys
whenever the deVice IS processing a block of data. The flag IS
cleared, pulling the IRQR output low, whenever the DSD IS Reset/Initialize - The DSD may be software reset by
not encoding/decoding data or transferring major key IRQR writing the reset/,nit,al,ze command at any time the data bus
may be tied to IRQ of a M6800 family processor for Interrupt- IS Ignored Like the hardware reset, this command initializes
driven encryption If no other peripherals share the IRQ line. the Internal control logiC, status flags, and counters Without
altering the contents of the active key register or the major
Encipher Data - To enCipher an 8 byte block of data, the key register. If a hardware or software reset IS Issued dUring
first seven bytes are written to the Write Data/"C" Key the algonthm processing, the Information In the data register
register The eighth byte is written to the EnCipher Data and active key register Will no longer be valid However, the
register. ThiS automatically Initiates the encryption process contents of the major key register are not affected.
M6800
Microprocessor
I--____-,,-____--,_____--,______-,-__.Oata
Bus
4-579
MC6859
Load Major Key - An unencrypted key will be entered In- more receivers, the follOWing tYPical sequence might be used
to both the active key register and the major key register to transmit confidential data
when eight consecutive bytes are wntten Into the Enter Ma- 11 A software reset IS Issued to each DSD by ItS MPU
Jor Key Register Panty error checking IS automatically per- 21 The sending M PU loads a major key (eight bytes I Into
formed
ItS DSD. ThiS Will serve as the active key If a secondary
key IS not entered
Load Plain Secondary Key - An unencrypted key may be
31 The receiving station must also load thiS same major
loaded Into the active key register and simultaneously
checked for panty errors by wntlng eight consecutive bytes key before data transmission can begin. If lhe current
Into the Enter Plain Secondary Key Register The Major Key major (or secondary) key IS not known In advance, It
Register IS unaffected can be transmitted by the sending MPU, but may not
be encoded as the receiving M PU system has no key
Encipher Secondary Key - A Iter a secondary key IS load- to decode It by The MPU at the receiving station must
ed, It can be enciphered or deciphered (the source of an en- be programmed With the mode and format being used
crypted key IS usually another DSDI A secondary key may for data transmission so ItS DSD can process the data
correctly At thiS pOint both the transmlttlr'g and
be enciphered by loading the first seven bytes of plain text to
receiving stations are ready for data transfer
the Wnte Data/"C" Key register The eighth byte IS entered
to the Encipher Secondary Key register This causes the 41 The sending MPU writes eight bytes of data Into ItS
secondary key to be enciphered uSing the current major key DSD which enciphers them
and automatically loaded Into the Active Key register and 5) The sending MPU retrieves eight bytes of encrypted
checked for panty This operation requires 328 cycles of 2XE data from ItS DSD and transmits them to the receiving
MPU
Decipher Secondary Key - This function IS similar to the 61 The receiving MPU writes these eight bytes of data in-
Transfer Major Key - The contents of the Major Key SECURITY CONSIDERATIONS
register Will be transferred to the ActIVe Key register by a The security of a system emplOYing the NBS Data Encryp-
read of the Transfer Major Key register The data bus IS Ig- tIOn Standard (DESI depends only upon the key used, not
nored The Major Key register remains unchanged This the availability of the algOrithm or of equipment used to Im-
operation requires eight cycles of 2XE plement the algOrithm The key IS the most critical piece of
information In the system and secunty of the key Itself must
KEY CONVENTIONS be maintained both inSide and outside the system
The key used for coding IS a 56-bit data word plus eight GUidelines to be used In selecting a key are
bits of odd panty In the DSD seven bits of key and the panty • Consider the key to be a single 56-bit number
bit make up a key character Eight key characters make up
• Avoid bias In selecting the key
the total key information required by the DSD If panty errors
are to be checked via the PE signal If panty IS not needed for • Change key as frequently as praCtlc31
some reason, then the panty bit need not be calculated and One way to help ensure the security of the key IS to make
can be lelt as a zero An example key With panty IS shown In frequent use of secondary keys Secondary keys can be
Table 3 generated by the sender and distributed selectively to one or
more receivers Since the MC6859 can encipher or decipher
TABLE 3 - EXAMPLE KEY secondary keys uSing the major key, the sender can transmit
Binary Value Parity the secondary key In encrypted form to further ensure
Key Character Hex Value
system security However, the receiver must be aware that a
Byte 1 7C 0 1 1 1 1 1 0 0
secondary key IS being transmitted and must decrypt the key
Byte 2 Al 1 0 1 0 0 0 0 1 If It was sent In encrypted form
Byte 3 10 0 0 0 1 0 0 0 0 Assuming that secrecy of the key IS maintained, It IS nearly
Byte 4 45 0 1 0 0 0 1 0 1 ImpOSSible for an unauthorized user to decode an In-
Byte 5 4A 0 1 0 0 1 0 1 0 tercepted message Into ItS orl91nal form. Since the DES
Byte 6 lA 0 0 0 1 1 0 1 0 algOrithm utilizes a 56-bit active key, there are 256 (or about
Byte 7 6E 0 1 1 0 1 1 1 0 7x 10 16 1 possible encrypted messages which must be
searched to retrieve the original message. In addition, If the
Byts 8 57 0 1 0 1 0 1 1 1
key were changed regularly only a small portion of the
Data Lines 07 06 05 04 03 02 01 DO
message would be retrieved for each successful exhaustive
search Therefore, the basIc "block Cipher" technique
TYPICAL SYSTEM OPERATION described In the TYPical System Operation seclion IS ade-
For a communicatIOns link between a sender and one or quate for today's data security applications
4·580
MC6859
•
deCiphering algOrithms are "mirror Images" of each other DES RAM
Many different feedback techniques are available as alter- AlgOrithm Buffer
natives to the baSIC 64-blt block cipher One of these, known
as cipher feedback (CFB), IS deSCribed below CFB IS a byte-
oriented Implementation In that only one byte IS transmitted
at a time Thus, throughput IS reduced by a factor of eight
(excluding software overhead) Implementation of the CFB
technique IS more dependent upon the system configuration
than IS the block cipher. Ct+l
CFB ENCIPHER
The baSIC flow of the CFB enCipher procedure IS shown In
FIGURE 6 - CFB ENCIPHER DATA FLOW
Figure 5 (RECEIVING)
An Initial eight byte fill of the RAM buffer must be done
prior to accepting plain text bytes for enCiphering ThiS infor-
mation can be conSidered to be a data subset of the key, but
may be any combination of eight-bit bytes as long as the
deCiphering deVice uses the same Imllal fill
After the block of data In the RAM buffer IS enCiphered, RAM DES
one byte of enCiphered data IS read from the DSD ThiS byte Buffer Algcnthm
IS the key byte (Kt+ 11 The plain text byte (Pt+ 1) IS ex-
Ct
clUSive ORed With the key byte and the result IS the Cipher
text byte (Ct + 1) The Cipher text byte IS shifted Into the bot-
tom of the RAM buffer and now IS the newest byte In the
block The oldest prevIous byte IS discarded The Cipher text
byte IS now available for use The new RAM buffer block IS
loaded Into the DSD for enCiphering and Yields the next key Ct+l------~----------~
To purchase a copy of the NBS Data Encryption Standard ask for the Federal Information
Processing Standards (FIPS) PublicatIOn, FIPSP 46 at the follOWing address
National Technical Information Service
U S. Department of Commerce
5285 Port Royal Road
Springfield, VA 22161
4·581
MC6859
MASK SETS old" AK6" mask set and those usmg the more recent mask
Devices marked "AK6XXXX", where "AK6" IS the mask sets.
set designation, latch M PU data mto the DS D on the failing The change to the" AK6" mask set allows the user to treat
edge of 2XEnabie dUring a write cycle as shown m Figure 7 the DSD like any other M6800 peripheral since all data
E and 2XE must be synchronized. Devices marked with a transfers are referenced to the Enable clock E and 2XE are
mask set designation other than" AK6" latch MPU data mto asynchronous on all mask sets except AK6. For thiS reason
the DSD on the failing edge of Enable dUring a write opera- deVices will no longer be produced uSing the" AK6" mask
tion as desCribed m thiS data sheet. ThiS IS the only opera- set. The" AK6" mask set can be Identified by the" AK6"
tional difference between deVices manufactured usmg the deSignatIOn preceding the data code on top of the package
~--------------------tcycE----------------------------------------~~
1 + - - - - - PWEH - - - - - - + 1
•
\ 1-tE------ PWEL -------+-1
tf tf
t8
2XE
to
tAS tAH
I
Address
I I
tH--1
-)
Data8us-----------------------------------------------
t I
-Data IS latched Into the Internal registers on the falling edge of 2XE and while Enable IS high. Therefore, for system conSiderations tDSW=
tDSWl +tD+2X tf MinimIZe tD to ensure operation at 1 MHz tDSWl IS the data setup time for the "AK6" mask set
Note Timing measurements are referenced to and from a low voltage of 0 8 volts and a high voltage of 2 a volts, unless otherwise noted
C"CUlt diagrams external to or containing Motorola products are Included as a means of Illustration only Complete Informa-
tion sufficient for construction purposes may not be fully Illustrated Although the Information herem has been carefully checked
and IS believed to be reliable, Motorola assumes no responsibility for Inaccuracies. Information herem does not convey to the
purchaser any license under the patent rights of Motorola or others.
The mformation contained herem IS for gUidance only, with no warranty of any type, expressed or Implied. Motorola reserves
the right to make any changes to the mformatlon and the product(s) to which the mformatlon applies and to dlscontmue
manufacture of the product(s) at any time.
4-582
® MOTOROLA MC6860
~
Ing a single-voltage supply and be fully TTL compatible
S SUFFIX
The modem IS compatible with the M6800 microcomputer family, In- CERDIP PACKAGe
terfaCing directly With the Asynchronous Communications Interface ~.\l.'· CASE 623
Adapter to provide low-speed data commUnications capability
• Onglnate and Answer Mode
• Crystal or External Reference Control
•
•
•
•
•
Modem Self Test
Terminal Interfaces TTL-Compatible
Full-Duplex or Half-Duplex Operation
Automatic Answer and Disconnect
Compatible Functions for 100 Senes Data Sets
4' P SUFFIX
PLASTIC PACKAGE
CASE 709
•
~-- I
• Compatible Functions for 1001 AI B Data Couplers
LSUFFIX
CERAMIC PACKAGE
I ~ASE 7t6
Telephone
Network
PIN ASSIGNMENT
Control t
J
I
Control Signals Data
VSS Rx Data
I Coupler
Tx Data eTs
Rx Brk ESD
An Ph SH
Transmit Carner
DuplexeT ELS i5TR
Asynchronous Receive ESS RI
Communications Data MC6860
Interface TO TST
Adapter
Tx Brk Rx Car
I ~
Receive '8';kii ST
Filter
Tx Car Mode
Threshold FO Rx Rate
Transmit
Data
Detect I
I
Threshold
Detector r-- VCC Xtal
r-
Receive
Carner J Limiter
I
4-583
MC6860
MAXIMUM RATINGS
ThiS device contains circuitry to protect the
Rating Symbol Value UnIt Inputs against damage due to high static
Supply Voltage Vcc -03to +70 V voltages or electnc fields. however. It IS ad M
Input Voltage Von 03to +70 V vised that normal precautions be taken to
OperatIng Temperature Range aVOId application of any voltage higher than
TL to TH
MC6860 o to 70 'c maximum rated voltages to thiS high Im~
TA
MC6860S, MC6860C -40 to +85 pedance CircUIt
Reliability of operation IS enhanced If unus-
Storage Temperature Range Tstg -55 to +150 'c
ed Inputs are tied to an appropriate logic
voltage level Ie g , eother VSS or VCC)
THERMAL CHARACTERISTICS
Characteristics Symbol Value Unit
Thermal Resistance
Cerdlp 65
8JA 'C/W
PlastiC 120
Ceramic 60
• Tj:TA+I POo8jA)
Where
TA",Amblent Temperature, °c
POWER CONSIDERATIONS
Po IE PINT + PPORT
PINT'" iCC x V CC, Watts - ChIp Internal Power
PPORT'E Port Power Olsslpatlon, Watts - User Oetermlned
For most applIcatIons PPORT'" PINT and can be neglected PPORT may become s,gn,f,cant If the devIce IS confIgured to
drove Oarllngton bases or Sink LEO loads
An approxImate relatIonshIp between Po and T j Ilf PPORT IS neglected) IS
PO=K-lTj+273°C) (2)
SolVIng equatIons 1 and 2 for K gIves
K=PooITA+273°C)+8jAOP02 (3)
Where K IS a constant pertainIng to the partIcular part K can be determIned from equatIon 3 by measuring Po lat eqUIlIbrium)
for a known T A USIng thIS value of K tile values of Po and T j can be obtained by solVIng equations (1) and (2) iteratIvely for any
value of TA
4·584
MC6860
DC ELECTRICAL CHARACTERISTICS
(Vee == 50 ± 5% Vdc all voltages referenced to VSS ==0 T A == TL to TH all outputs loaded as shown In Figure 2 unless otherwise noted)
Characteristic Symbol Min Typ Max Unit
Input High Voltage. All Inputs Except Crystal VIH 20 - VCC V
Input Low Voltage. All Inputs Except Crystal VIL VSS - 080 V
Crystal Input Voltage
(Crystal Input Dnven from an External Reference, Input Coupling Capacitor = 200 pF, Vin 15 - 20 Vp _p
Duty Cycle = 50 ± 5% I
Input Current
(V,n = VSSI All Inputs Except Rx Car. Tx Data. m. TST. AT. SH lin - - -02 rnA
Ai. SH Inputs - - -16
Input Leakage Current IV,n = 70 V. VCC = VSS. TA = 25'CI IlL - - 10 ~A
Output High Voltage. All Outputs Except An Ph and Tx Car
VOH1 24 - VCC V
IIOH1 = -004 rnA. Load AI
Output Low Voltage. All Outputs Except An Ph and Tx Car IIOL 1 = 1 6 rnA. Load AI VOll VSS - 040 V
Output High Current. An Ph IVOH2=0 8 V. Load BI IOH2 030 - - rnA
Output Low Voltage. An Ph IiOL2=O. Load BI VOL2 VSS - 030 V
Input Capacitance (f = 0 1 MHz. T A = 25'CI C,n - 50 - pF
Output Capacitance If=O 1 MHz. TA=25'CI Cout - 10 - pF
Transmit Carner Output Voltage (Load CI VCO 020 035 050 VIRMSI
Transmit Carrier Output 2nd Harmonic (Load C) V2H -25 -32 - d8
•
Input Transition Times, All Inputs Except Crystal tr - - 10'
~s
(Operating In the Crystal Input Mode, from 10% to 90% POints) tf - - 10'
Input Transition Times, Crystal Input tr - - 30
ns
(Operating In External Input Reference Model tf - - 30
Output Transition Times, All Outputs Except Tx Car tr - - 50
~s
(From 10% to 90% POints) tf - - 50
Internal Power DISSipation (All Inputs at VSS and All Outputs Open) (Measured at TA = TLl PINT - - 340 mW
"Maximum l!lput TranSition Times are :sO 1 x Pulse Width or the specified maximum of lOllS, whichever is smaller
Load A - TIL Output Load for Receive Break, Digital Carrier, Mode, Clear-to-Send, load B - Answer Phone Load
and Receive Data Outputs
Vee
RL
257 k
± 1%
Test V,
POint o-----.----.---forII.-"' MMD5100
or Equlv Load C - Transmit Carner Load
100 k
RL
60 k
± 1%
MMD7000
or EqUiv
Simulated TTL Load
CT = 20 pF = total parasI11c capacl1ance, which Includes pfobe, wifing, and load capacitance
4-585
MC6860
Data Terminal
Ready 20 4 Answer Phone
Vee Pm 12
Digital Carner 11
VSS Pin 1
Transmit Carner 10
Receive Data 24
I
Receive 14 Oe
Data Rate modulator
NOTE 1
Receive Carner 17
ES5 Enable Space DI$connert
E'LS Enahle Long Space Disconnect
m Enable Shon Space Disconnec 1
Crystal 13
Test Clock 18
DEVICE OPERATION*
GENERAL
Figure 1 shows the modem and Its Interconnections The all Input-output (1/0) logiC need not be RS-232 compatible.
data to be transmitted IS presented m serial format to the The use of MC1488 and MC1489A line drivers and receivers
modulator for converSion to FS K signals for transmission on Will provide a RS-232 Interface conformmg to the EIA
the telephone line (refer to Figure 3), The modulator output specification.
IS buffered before drlvmg the line
The FSK signal from the remote modem IS received via the
telephone line and filtered to remove extraneous signals such ANSWER MODE
as the local Transmit Carner ThiS filtering can be either a Automatic answering IS first Initiated by a receipt of a Rmg
bandpass which passes only the deSired band of frequencies Indicator (Rii signal. ThiS can be either a low level for at least
or a notch which relects the known Interfering signal The 51 ms as would come from a CBS data coupler. or at least
deSired signal IS then limited to preserve the aXIs crossmgs 20 cycles of a 20-47 Hz ringing smgal (low level," 50% of the
and fed to the demodulator where the data IS recovered from duty cycle) as would come from a CBT data coupler The
the received FS K carner presence of the Rmg Indicator signal places the modem In
The Supervisory Control provides the necessary com- the Answer Mode; If the Data Termmal Ready line IS low. m-
mands and responses for handshaKing with the remote dlcatlng the commUnication terminal IS ready to send or
modem. along with the mterface signals to the data coupler receive data. the Answer Phone output goes high ThiS out-
and commUnication terminal If the modem IS a bUilt-In Unit. put IS deSigned to drive a transistor SWitch which Will activate
4·586
MC6860
the Off Hook (OH) and Data Transmission (DA) relays In the If ESD IS high the modem Will transmit data until hang-up
data coupler Upon answering the phone the 2225-Hz occurs 3 s later Receive Break IS clamped 150 ms follOWing
Transmit Carner IS turned on the Data Terminal Ready Interrupt Refer to Figure 7
The originate modem at the other end detects this 2225-Hz
signal and after a 450 ms delay (used to disable any echo INPUT/OUTPUT FUNCTIONS
suppressors In the telephone network) transmits a 1270-Hz Figure B shows the I/O Interface for the low speed
signal which the local answering modem detects, provided modem The follOWing IS a descnptlon of each Individual
the amplitude and frequency requirements are met The Signal
amplitude threshold IS set external to the modem chip If the
signal level IS suffiCient the fB Input should be low for 20 ,.s Receiver Carrier (Rx Carl
at least once every 32 ms. The absence of a threshold Indica-
The Receive Carner IS the FSK Input to the demodulator
tion for a period greater than 51 ms denotes the loss of
The local Transmit Carner must be balanced or filtered out
Receive Carner and the modem begins hang-up procedures
and the remaining Signal hard limited. The conditioned
Hang-up Will occur 17 s after Ai has been released provided
receive carner IS measured by the MC6B60 Any half-cycle
the handshaking routine IS not re-established The frequeny
penod greater than or equal to 429 ± 1 0 P.s for the low band
tolerance dunng handshaking IS ± 100 Hz from the Mark fre-
or 235 ± 1 0 ,.S for the high band IS detected as a space
quency.
Resultant peak phase Jitter IS as follows
After the 1270-Hz signal has been received for 150 ms, the
Receive Data IS unclamped from a Mark condition and data
Data Rate Answer Mode Originate Mode
can be received. The Clear-to-Send output goes low 450 ms Bits per Second oI>J (Peek %) oI>J (Peek %)
after the receipt of carner and data presented to the answer
300 70 37
modem IS transmitted Refer to Figure 4
200 47 25
•
AUTOMATIC DISCONNECT 150 35 18
110 26 14
Upon receipt of a space of 150 ms or greater duration, the
modem clamps the Receive Break high. ThiS condition eXists
until a Break Release command IS Issued at the receiving sta- Ring Indicator (RII
tion Upon receipt of a 0 3 s space, With Enable Short Space The modem function Will recognize the receipt of a call
Disconnect at the most negative voltage (low), the modem from the CBT data coupler If at least 20 cycles of the
automatically hangs up If Enable Long Space Disconnect IS 20-47 Hz nnglng slngal lIow level '" 50% of the duty cycle)
low, the modem requires 1 5 s of continuous space to hang are present. The CBS data coupler AI Signal must be level-
up Refer to Figure 5 converted to TTL according to the E.IA RS-232 speCificatIOn
before InterfaCing It With the modem function The receipt of
ORIGINATE MODE a call from the CB S data coupler IS recognized If the Ai Signal
Upon receipt of a SWitch Hook (SH) command the IS present for at least 51 ms ThiS Input IS held high except
modem function IS placed In the Originate Mode If the Data dunng nnglng. An Ai Signal automatically places the modem
Terminal Ready Input IS enabled (low) the modem Will pro- function In the Answer Mode
Vide a logiC high output at Answer Phone The modem IS
now ready to receive the 2225-Hz signal from the remote Switch Hook (SH)
answenng modem It Will continue to look for thiS signal until
SH Interfaces directly With the CBT data coupler and via
17 S after SH has been released Disconnect occurs If the
the £LA RS-232 level conversion for the CBS data coupler
handshaking routine IS not established.
An SH Signal automatically places the modem function In the
Upon receiving 2225± 100 Hz for 150 ms at an acceptable
Originate Mode
amplitude, the receive Data output IS unclamped from a
SH IS low dUring origination of a call The modem will
Mark condition and data reception can be accomplished
automatically hang up 17 s after releaSing S H If the hand-
450 ms after receiving a 2225-Hz signal, a 1270-Hz signal IS
shaking routine has not been accomplished
transmitted to the remote modem 750 ms after receiving the
2225-Hz signal, the Clear-to-Send output IS taken low and
data can now be transmitted as well as received Refer to Threshold Detect (TO I
Figure 6 ThiS Input IS denved from an external threshold detector If
the Signal level IS suffiCient, the TO Input must be low for
INITIATE DISCONNECT 20 ,.s at least once every 32 ms to maintain normal opera-
In order to command the remote modem to automatically tion An InsuffiCient Signal level Indicates the absence of the
hang up, a disconnect signal IS sent by the local modem Receive Carner, an absence for less than 32 ms Will not
ThiS IS accomplished by pulSing the normally low Data Ter- cause channel establishment to be lost, however, data dur-
minal Ready Into a high state for greater than 34 ms.' The Ing thiS Interval Will be Invalid
local modem then sends a 3 s continuous space and hangs If the Signal IS present and the level IS acceptable at all
up provided the Enable Space Disconnect IS low. If the times, then the threshold Input can be low permanently.
remote modem hangs up before 3 s, loss of Threshold Loss of threshold for 51 ms or longer results In a loss of
Detect Will cause loss of Clear-to-Send, which marks the line Clear-to-Send. The Transmit Carner of the onglnate modem
In Answer Mode and turns the carner off In the Originate IS clamped off and a constant Mark IS transmitted from the
Mode. answer modem
4·587
MC6860
TIMING DIAGRAMS
Call Received
-I 51ms l-
Ring IndIcator ~r--------------------------------
Ring Indicator CBTlflJi.n.rl.J--------------------------------
I
Mode {~~~;:rte ~ Answer (Low)
Receive Carner - - - - - - - - - - - - - - - - - - - {
_.-.-+-.,-.--h-.--.-_.-.--
•
Threshold Detect -c1_H-',9:..h.;,.'_ _ _ _ _ _ _ _ _ _ _ _ _ _ _+r_,.---,-_
Off (High)
Clear to Send -::.;..:..:.:..="---------------1====;;;;~;:=+====!_~~~:!....----
High
Rtng I ndleator
CBS High
Ring IndlLator --A-n-s-w-er-IL-o-w-,----CC~B~T;O----------------------------
Mode _ _ ~_~~ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
On (Low)
Data Terminal
Ready
Answer Phone - - - - - - - - - - - - - - - - - - - - - - - ,
Transmit Carrier
Receive Carner
On (Low)
Clear to Send
Clamped at Mark
4-588
MC6860
SH Can Be Released
Switch Hook
~##~
On (Low)
Data TermInal
Ready Originate (HIgh)
Mode { ~r~~:;;:rte
Answer (H Igh)
I-Establlsh C a l l - - - - t - -
Receive Carner
Threshold Detect
ReceIve Data
Clamped at Mark ---------j----
Transmit Carner
Clear to Send
---------------j~==============77~500~m~'~============::~On{LOW)
Transm It Data
Enable Space
Disconnect
Clamped at Mark
On (Low) Unclamped
I
FIGURE 7 - INITIATE DISCONNECT
SWitch Hook
--j t--- 34 ms Pulse I nltlates Space DIsconnect
Data Terminal
Ready ~.--------------------------
Mocte
Off Hook
Answer Phone
On Hook
03sESS I
- 2025 Hz Or 2225 Hz - - + - - 1 5 s m ~
Receive Carner
Threshold Detect
Transmit Carner
3'---------~
On (Low)
Clear to Send
4-589
MC6860
ThreShO'd~
Threshold
~
J
J Bandpa" f--
cur
Filter and
Vee t
+50 V
Receive
I Amplifier
Limiter
I
I Mode
Transmit Data
Receive Data
Transm It Carner
J Low Pass
Filter
, Duplexer
l
Enable Long Space Disconnect
Data Terminal
Communi
cations
Ready
Clear to Send
Receive Data Rate
J +50 V
Transmit Break
Enable Space Disconnect
~
1 ·v
1
-v
1
SWitch Hook DT
Break Release
SH
CST
Ring I nOlcator Datd Telephone
R I COl:Pler Line
Self Test
i'Yl OH
J L
Answer Phone
vSS
-=- T
-k 1 0 MH, C,y"al
"-~ DA
DR Gnd
•
H H L L through the power-on reset CirCUit
L I-r"' H L To Insure Initial power-on reset action, the external
L H L H parasitiC capacitance on Ai and SH should be < 30 pF
CapaCitance values> 30 pF may reqUire the use of an exter-
'Note maximum SH low time In Table 1
nal pullup resistor to V CC on these mputs In addition to the
Answer Phone (An Ph) pullup deVices already prOVided on chip
Upon receipt of Ring Indicator or SWitch Hook Signal and
Data Terminal Ready, the Answer Phone output goes high
[(SH + Fiil,DTRJ. ThiS Signal drives the base of a transistor
which activates the Off Hook, and Data Transmission control
lines In the data coupler Upon call completion, the Answer
.o
Phone Signal returns to a low level. ;;
Mode
The Mode output Indicates the Answer (low) or Originate
(high) status of the modem. ThiS output changes state when
.
"'
9
."
~
a Self Test command IS applied. 0.
E
..:
Clear-To-Send (CTS)
A low on the CTS output Indicates the Transmit Data in-
put has been unclamped from a steady Mark, thus allowmg
data transmission.
4·591
MC6860
Due to the asynchronous nature of the Input signals with respect to the Cln:.Ull Internal clock, a delay variation or Input
pulse width requirement WI!! eXist Time uelay A IS the maximum time for which no response will occur Time delay 8 IS the mini
mum time required to guarantee an Input response Input '>Ignal widths In the cross hatched region (I e, greater than A but less
than B) mayor may not be recognized as valid
For output delays, time A IS the minimum delay before an output will respond Time B IS the maximum delay for an output
to respond Output signal response mayor may not occur In the cross-hatched region (I e., greater than A but less than B)
,:," e.;;I
t- 32ms-i
[j 5TR
Tx Car·
ES5 =
~
s(~:~~~~sconnect) I
I
D'TR
~'
SH (I nltlate Space
I
~
t'6ms~ B = 34 ms
~
J
Disconnect)
An Ph
l,"nm.rB= 3 0 5 6 m s _
DTR
m (Inltlate~
1='m.~
(Loss of ~~s:coennect) I ~
Threshold)
t='65ms~
Rx Brk
B oe 51 ms
B'" 185 ms
Answer Mode
TO ~dueto Rx Car (1270 Hz)
DTR
~ ~
1-'6msLJ
I
(I nltlate Spacp
Disconnect)
B CO- 34 ms
C"TS or Rx Srk
C A0432ms~
B=451ms
~
DTR
~
~ ~
J I
T;B";'k
rw'~
t16ms~ J
An Ph
4-592
MC6860
l
I
~ II ~
Tx Car· k/SP
A" 16 ms-l I
Space An Ph
E'S'S = High
f- A" 16949 ms ---j I
B '" 34 ms ----l Us '" High
LBO 17034 ms ----j
ESS =
Us=
Low
High
t I
------I
I
I
CTS 0' Rx B,k I---- A" 32 ms
~-Bo51ms~
I
r- II
Orlgmate Mode
E'LS ~, Low
B ~ 1520 ms --------+j I----- B C 752 inS
Originate Mode
RXD~ Space
TO -----,L - - , , TiS due to Rx Car (2225 Hz)
I - - - - -
I ~
~-A 132ms~
Rx Brk
c I
L - B 0151 inS ~ ---~
• Digital Representation
:J
4-593
MC6860
No Ai No
Low Low
Ves
No No
No
I ES'T'R
Low
Ves
No
Answer
Mode
Ves
Ves
No
4·594
MC6860
Ves Answer No
Mode
Receive No No Receive
1270 Hz In >-=------.-----'-=< 2225 Hz In
Band Band
Ves Ves
Receive No No Receive
1270 Hz 2225 Hz
>150ms >150ms
•
C'Ts And R x Srk Go Lowl
I Unciamp Tx Data FromJ
Mark
No
Note 1
Loss Yes
at Rx Car
>51ms
Note 2
No
No CTS
low
L _ _N~O=-< 0 2335
Delay Note 2 Due to loss 01 Rx Cdr, tile 11l0(lem will (Iaillp
Tx Data to d Mark In ItH' Answer Mode and will
y.,
turn off Tx Car In the Originate Mode If Rx
Car IS deta( led Ilefore comliletion of Tx Srk or
Initiate Space Ols(.onnect, normal operation 01
Note 1 Transmit Break, Initiate Space Disconnect,
Tx Srk or Imtlate Space Disconnect Will con
and Receive Space are mutually exclusive events
Iinue until completion of their respective time
delays
4-595
MC6860
• 0145
No
Delay
Ye, 014 s
Delav
No
No
3 0, No
Delay
03, Ye,
Delay
No
ES'S
Low
No
1 5, Ye,
Delay
No Ye,
IT"S
Low
No
17> Ye,
Delav
No
4-596
® MOTOROLA MC6862
.,, "'l:~
devices, remote data commUicatlon terminals, and I/O Interfaces for
counters. S SUFFIX
CERDIP PACKAGE
N-channel silicon-gate technology permits the M C6862 to operate us-
Ing a single voltage supply and be fully TTL compatible
The modulator IS compatible with the M6800 microcomputer family,
. I>' I ~ ~ ~
CASE 623
~
• Clear-to-Send Delay Options P SUFFIX
•
PLASTIC PACKAGE
• 511-Blt CCITT Test Pattern CASE 700
• Terminal Interfaces are TTL Compatible
• Compatible Functions for 201 B/ C Data Sets
~
• CCITT and U S Phase OptIOns
• 1200/2400 bps OperatIOn . , -- I lSUFFIX
• Answer-Back Tone CERAMIC PACKAGE
I I CASE 716
Delayed
VSS[~PDSC
Clear Request 13432 MHz External CTS2[ 2 23 ~Tx ClK
to Send to Send Clock Clock
4 5 10 11 CTS1[3 22PS5
CTS[ 4 21 pB4
DRTS[ 5 20 ~S3
Rpquest to Send 7
~B2
Delay Options I
crS1 3
CT52 2
13 Test Clock
TPE[ 6
RTS[ 7
19
18 PSl
Tx Mk[ 8 17 pSO
Tx Data[ 9 16 ~PSS
23 T ran5ml! Clock
CLK[ 10 15 ~DRS
Transmit Data 9 24 Olbll Clock
~: :: J
Answer Back 140----..0
1800 Hz
6·811
Data
Camer
19 82 Word
Generator
Vcc=Pln 12 Transmit MarkB ~ 18 B1
VSS=Plnl
17 80
4·597
MC6862
MAXIMUM RATINGS
Rating Symbol Value Unit
Supply Voltage Vcc -03to+70 V
Input Voltage V,n This device contains cirCUitry to protect the In-
-03to +70 V
puts against damage due to high static voltage')
Operating Temperature Range TL to TH or electric fields however, It IS advised that rlor
MC6862 TA o to 70 'c mal precautions be taken to avoid application of
MC6862S, MC6862C -40 to +85 any voltage higher than maximum raled voltages
Storage Temperature Range Tstg -55 to + 150 'c to this high-Impedance CirCUit AeilabJilty of
operation IS enhanced If unused Inputs are tied to
THERMAL CHARACTERISTICS an appropriate logic voltage level Ie 9 , Bither
Characteristic Symbol Value Unit VSS or Vcel
Thermal Resistance
Ceramic Package 60
Plastic Package 8JA 120 'C/W
Cerdlp Package 65
POWER CONSIDERATIONS
DC ELECTRICAL CHARACTERISTICS
IVcc ~ 50 ± 025 Vdc, VSS ~ 0, TA ~ TL to TH, all outputs loaded as shown In Figure 1 unless otherwise noted I
Characteristic Symbol Min Typ Max Unit
Input High Voltage VIH VSS + 20 - VCC V
Input Low Voltage VIL VSS - VSS+08 V
Input Current
IV,n=VSSI CTS1, CTS2, PSS, DRS,;;;:;;sr, and TXiii1K lin - - -02 mA
ii'i'SandTPE - - -16
Input Leakage Current IVIn~5 25 V, VCC=VSSI IlL - - 25 pA
Output High Voltage
IIOH~ -0 04 mA, Load AI VOHl VSS+24 - VCC V
IIOH ~O 0 mA, Load BI VOH2 VCC-05V - VCC
Output Low Voltage IIOL - 1 6 mA, Load AI VOL VSS - VSS+O 4 V
Input Capacitance If-O 1 MHz, TA-25'CI Cin - 50 - pF
Internal Power DIsSipation IMeasured at TA- TLI
IAII Inputs at VSS except Pin 13= 576kHz and ALL outputs openl PINT - 210 315 mW
-MaXimum Input TranSition TImes are sO 1 x Pulse Width or the speCified maximum of 1 0 ",5, whichever IS smaller
4·598
MC6862
-I
I I
I RL
60k MMD7000
I
I
Tx Da ta
~ K
I ±1% or EqUiv
1 -=- 1
_ _ _ --1 Note Tlmmg measurements are referenced to and from a low
voltage of 0 8 volts and a hIgh voltage of 2 0 volts. unless
CT = 20 pF = total parasItIc capacItance. whIch Includes otherwise noted
probe. wIfing, and load capacitances
-10
-20
•
d8 -30
-40
RS-232
-liD
B3 OPSK Signal
MC1406
MC6862 to Line
B2 D/A
Modulator
Converter
Bl
BO Option 8 (U.S.)
Signal Spectra
0
-10
-20
-30
-40
-60
18432 MHz
to 005% 1.0 4.0 5.0
3.0
kHz
4-599
MC6862
2:'~~S Tx ClK
DBC
RTS~~~~~~ __________________________________________-+___________
RTS-crs delay options are selected by Ihe CTSI and CrS2 In- i5Ri'S Will go low Within t3 of the ne~ transilion 01 RTS With
puts, and are slated as lime delay Interval 4 An RTS Input signal the exception of the no-delay option, CTS Will go low within 15 of
synchronized about pOint A Will synchronize CTS With the positive the positive transition of D8C, follOWing the t4 delay selected ThiS
transition of DBC ID,blt Clock I Delay 4 IS measured with respect to applies when lfrn' IS synchronized to POint A as shown
the negative tranSition ofm If RTS goes high and remains high", 20 p.s Wllhln time Interv~
!ITS" signals synchronized with Ihe positive Iransltlon of DBC a reset of the Internal RTS-rn tlmer function Will occur If ~
lpolnl BI, Will resuilin the same crs delay 141 For thiS case the goes high for less than 20 P.s, the CirCUli mayor may not respond to
negative tranSition of CiS" IS synchronlzed With the negative tranSI-
tion of DBC with delay 4 measured with respect 10 the negative
thiS momentary loss of the m Signal
transition of R'i'S.
Note Timing measurements are referenced to and from a low voltage of 0 8 volts and a high voltage of 2 0 volts, unless otherWise noted
4·600
MC6862
DBC
CTS
DRTS ---~.
-r-
•
A positive tranSition of RTS after CTS has become active can go high Within t8 of the next negative tranSition of DBC If RTS were
result In different functional characteristics of the CTS and DRTS to go low after t7, the RTS-CTS delay times given In Figure 4 will
output signals, depending on the time duration that RTS remains in- result
active If ATS goes high In the shaded region shown, and then returns
Under all conditions, CTS will go high within t3 following a low within time Interval t6, the negative tranSition of CTS will follow
positive transition of RTS If RTS goes high In the shaded region within 35/J-s, and "B1ITS will remain In the active or low state Under
shown (j e , synchronized to the positive tranSition of DBc) and re- these conditions, the normal Ri"S-CTS delay times are not en-
mains high beyond the time Interval defined as t7, then ORTS will countered when RTS IS reactivated If RTS goes low for less than
20 p's, the Circuit mayor may not respond
NOTE Timing measurements are referenced to and from a low voltage of 0 8 volts and a high voltage of 2 0 volts, unless otherWise noted
DEVICE OPERATION
4-601
MC6862
Transmit Mark (Tx Mk) selected by the Test Pattern Enable Signal or any other Signal
The Transmit Mark control allows the system designer to that IS found SUitable
select whether the Delayed Request to Send actlvitates and The scrambling of data In the data comm environment IS
deactivates the transmission on the modulator chip or off the not done In an attempt to encrypt information In the normal
chip in the output amplifier. sense of the word Rather, the purpose of the scrambling of
When Tx Mk IS high, transmission IS controlled on the data IS to guarantee that With respect to the modem carner,
modulator ChiP, and occurs from the chip only when i5iii'S there IS always random data on the line With little chance for
or Answer Back IS In the logiC 0 state (see Figure 6) a long string of ones or zeros to exist ThiS IS particularly Im-
When Tx Mk is low, transmission IS controlled off the portant If an adaptive equalizer is being Incorporated at the
modulator chip. In thiS mode, the modulator chip transmits demodulator. The adaptive equalizer Will require reasonably
marks at all times except when data or an Answer-Back tone evenly distributed data to optimize ItS statistical response to
IS being transmitted (see Figure 61. the Incoming Signal The normally used code IS the CCITT
511 sequence which IS EXOR'd With data.
Test Pattern Enable ii'PE) The test pattern generator can be enabled only when CTS
A 511-blt test pattern generator IS contained on the and FiTSare logiC O. If TPE IS activated outSide thiS time In-
modulator chip ThiS pattern IS In accord with CCITT terval, the previously stated mornand 1i'rS-l5R'f'S
speclflcallOn V52. delays, shown In Figures 4 and 5, are not valid
-I,tIe 511-bIt test pattern IS activated by applYing a logic 0 to
TPE.~ark (logic 1) condlllOn on the Transmit Data Input
Data-Rate Select (DRS)
with TPE activated (logic 0) causes the test pattern to appear The modulator can transmit at either 2400 bps or 1200 bps
at the data output. A space (logic 0) condition on Tx Data Both data rates utilize an 1800 Hz carner Signal and employ
with 'TPt activated causes the test pattern data to appear in- phase shlfllng at 1200 Hz. The 2400 bps rate IS obtained by
•
verted at the data output. encoding two bits of data Into each phase shift. The 2400 Hz
Although the Motorola 2400 bps modulator contains a rate IS selected by applYing a logic 1 to the Data-Rate Select
CCITT 511 test pattern generator It does not Incorporate the lead. The 1200 Hz rate IS selected by applYing a logiC 0 to
511 data randomlzer or scrambler. DRS.
Random data applied to Tx data With TPE activated causes
Phase-Shift Select (PSS)
the test pattern data to be scrambled (exclUSive NORed) With
the data, and the result appears at the data output Option A (CCITT) or OpllOn B IU S ) phase shift can be
The MC6863 demodulator does contain a built-In data selected for 2400 bps operation The Input data format and
descrambler, which IS enabled by TPtlnput gOing active To phase shift relationship for these two options are as follows:
scramble data using the modulator, the cirCUit In Figure 7
must precede the TX Data input of the modulator Tx Data IS PSS=O PSS=1
added to the scrambler output pattern. Then the data IS
Data Option A* Option B
delayed by a full data bit before being transmitted by the 00 00 +46 0
modem. ThiS assures a proper Transmit Data/Transmit 01 +90 0 +135 0
Clock phase relationship. 11 +180 0 +225 0
If the data scrambler IS to be an opllOnal feature, then the 10 +270 0 +315 0
transmit data multiplexer would also have to be bUilt ThiS IS • See example Figure 8
~ ~r--------------------------------------
I I
No An Sk No No
Signal Signal Signal Mark Data Signal
T'X"'Mk,., High
An Bk
Mark Signal Mark MlIrk D .... Mark
Tx Mk "" Low
4-602
MC6862
TxCLK
Tx Data .-------1
TPE ...-----!--------1~-...q
•
\:I-----,;,.c:.--.
Tx Data
To Pin 9 Modulator
{ ........----Data Multiplexer
For 1200 bps operation, Option C (CCITTI or Option 0 Transmit Data (Tx Data)
(U S I phase shift can be selected Transmit Data IS the serial binary Information presented
for DPSK modulation A high level represents a mark For
PSS~O PSS~1
timing, see Transmit Clock (Figure 41.
Data Option C Option D
0 +90" +45 0 Transmit Clock (Tx CLK)
1 +270" +225" A 2400/1200 Hz Transmit Clock output IS provided for the
commUnication terminal The Transmit Data signal IS sampl-
Option C IS selected by applYing a logic 0 to the Phase ed on the POSitive transltton of Transmit Clock The Transmit
Shift Select lead when the Data Rate Select lead IS strapped Data to Transmit Clock setup and hold time requirements are
for 1200 bps operation (logic 01 Option D IS selected by ap- shown In the Electrical Characteristics Table and In Figure 2.
plYing a logic 1 to PSS With DRS at logic 0 The phase shifts
Dibit Clock (DBC)
shown are the difference In phase between the signal at the
end of one dlblt period and the new signal at the beginning A 1200 Hz Dlblt Clock Identifies the modulation tlrnlng
of the next dlblt. ThiS Signal goes negative less than 100 "S prior to the start of
dlblt modulation
4-603
MC6862
External Clock (Ex ClK) from a transition on An Bk to the appropriate signal at the
A 2400/1200 Hz clock signal applied to the External Clock modulator chip output IS less than 2 ms
lead causes Transmit Clock to be synchronized with Ex elK ActlvallOn of An Bk la logiC 01 will disable all other opera-
This input must have an accuracy within ± 0.005% tion modes Including the Tx Mk function, and Will reset CTS
When no transitions occur on this Input, the internal clock to an Inactive state along With the RTX-CTS Internal timer
provides the 2400/1200 Hz transmit tlmmg signal. Fast syn- An Bk should therefore be activated only before mltlallng
chronization of Tx ClK to Ex ClK IS not provided on the RTS or after loss of the ORTS output signal The combma-
chip. When Ex eLK IS not used, it should be tied to either the tlon of a logic 0 on An Bk With a logiC 0 on TPE IS not used In
logic 0 or logic 1 state. normal system operation, and hence IS used as a reset Input
dUring deVice test
1.8432 MHz (ClK)
This Input must be a square wave With rise and fall times Digital Output (BO-B5)
of less than 40 ns and a 50 ± 20% duty cycle The clock ac- These outputs are desl::Jned to Interface With a 6-blt
curacy must be written ± 0.005% dlgltal-to-analog converter The resultant signal out of the
0/ A IS the differential phase shift keyed signal quantIZed at a
Answer Back (An Bkl 14.4 kHz rate A low-pass filter can then be used to smooth
A logic 0 level applied to Answer Back causes a 2025 Hz the data transitions. BO IS the least-significant bit, and the
carner to be generated on the modulator chip mstead or a positive level the active state
phase shifted 1800 Hz carner A logic 1 level applied to An Bk
enables the modulator to generate the normal phase shifted Test Clock (TST)
1800 Hz carner signal, as shown In Figure 6 The time delay A test signal Input IS provided to decrease test time of the
chip. In normal operation this input must be strapped low
4..604
® MOTOROLA
MC6870, MC6871
series
MC6871A
CRYSTAL osc.
1.0 MHz
@MOTOROLA
actual size
•
the crystal. the oscillator CirCUit. the NMOS and TIL drivers, and the result of combining three of Motorola's fields of experience. quartz
waveshaplng and Interface CirCUitry, all the components necessary to crystal technology, clock OSCillator deSign, and thick film hybrid inte-
provide the cntlcal non-overlapping 2-phase waveforms used by the grated CirCUit manufactUring. Mass automated production techniques
MC6800 MPU assure volume production. Gold plating of all crystals and Class 100
FEATURES clean room processing testify that no short cuts are taken that might
diminish reliability EnVIronmental testing proves the effectiveness of
Clock Module-Each clock module requires only a single 5 volt
the rugged deSign for those apphcaliOns In which shock and Vibration
power supply The NMOS outputs can drive highly capacitive loads
are likely hazards
ranging from 80 pf to 160 pf end meet all MPU Input waveshape and
timing requirements Complete Process Control- Motorola IS the only totally Integrated
manufacturer of quartz frequency control deVices; full control of all
Each TIL output signal leads the <l>z NMOS so that additional system
processes from growing, sawing. lapping, and finishing quartz to
device delays can be accommodated All TTL outputs are buffered so
combining it With other components Into an electroniC product - the
they can drive 5 TIL devices and maintain all output speCifications MC6870A, MC6871A, and MC6871B MPU clocks.
Each module IS crystal-controlled and IS compensated for vanatlons In Volume Production - Production faCilities are Oriented to mass
temperature, voltage. and load The standard frequency of each
automated producliOn techniques. And, If required. capital for expan-
model IS 1 MHz; however. other frequencies between 250 kHz and 2 5 Sion IS available to meet even greater reqUirements.
MHz can be ordered
4·605
MC6870A +5V DC ~ ~~ II, NMOS
limited funcUon microprocessor clock GND MC6870A p, NMOS
L -______~ ~TTL
250 kHz to 2.5 MHz
specifications
Rlting Symbol Vllue Unit
Supply Voltage V" 5.00+5% Vdc
Operallng Temperature Range T. Oto +70 ·C
Storage Temperature Til'll -55 to +125 ·C
Power Supply Dram (max.) I.. 100 mA
•
5 0,TTL
mput voltage change, load
change, aging, shock and 7 V" (+5VDC)
vibration)
12 0. NMOS
NMOS Outputl It 1.0 MHz Operltlon""
Pulse Width (meas. at Tl2l,H 430 ns 13 0, NMOS
V,,= -.3V dc level) Tl2l,H 450 ns GND
18
LogiC Levels VOLC V.. ·.l - V.. +3 Vdc
VOHC V,,-.3 - V,,+.1 Vdc 20 NC
Rise and Fall Times t. 5 12 50 ns NC
22
t, 5 12 50 ns
'Overshoot/Undershoot 24 NC
Logic "I" V,,-.5 V,,+.5 Vdc
Logic "0" Vos V.. -.5 V.. +.5 Vdc
Pulse duration 01 any over-
Note All dlmenstOns are In Inches
shoot or undershoot Tos 40 ns
Period @ 0.3V dc Level tcyc 1.00 us
Edge Timing @ V,,_0.3V dc Tx 940 ns
NMOS Relationship t.., 0
@ +0.5V dc Level I., 0 8.0 us
nLOutpull
In rei. 10 0, NMOS @ 0.3V dc
0, TTL @ +1.4V dc T. 15 30 45 ns
TH 10 25 40 ns
Logic Levell VOH 2.4 3.2 Vdc
VOL .3 .4 Vdc
Rise and Fall Times
.4Vand 2.4V t. 15 ns
2.4Vand .4V I, 15 ns
Logic "0" Sink (lGale) 10L -1.6 mA
LogiC "I" Source (lGate) 10H +40 uA
Currenl Outpul Shorted Isc -18 -57 mA
Load
NMOS-Load Capacity l2l" l2l, I eN""" I 80 120 160 I pi
TTL-No. 01 Loads I I I 5 I ttl
TTL-Load Capacity I Cm I I I 50 J pi
*Into speCified test load
"'Apply the following parameters for frequencies other than 1 0 MHz
T\>,H=O 5 (P-140) ns
T\>,H=O 5 (P-l00) ns
Tx=(P-60) ns
where P=deSlred penod of operation In nanoseconds
4·606
MC6870A (continued)
DIMENSIONS
- 1 .340 ------J
1 MAX I
MC6870A
MPU CLOCK .840
FREQ.-
~~~~~i~~L;: ~MAX.
SYMBOL DENOTES
PIN #1 LOCATION
•227 ± .01OL
J i
~ 'IT 'IT 'ITt.~20+
~
L183 MAX •
.010
-I i- 015- 021 (DIA PIf~S) -
WAVEFORM TIMING
(ALL TIME IN NANOSECONDS)
T0,H
~------------~-----T,-------~
ld,
!oo----T0,H-----01 I !4---T0,H--------IM
II
V,,-.3V
.5V
F-----------------"f .3V
TEST CIRCUIT
1.01'F
111---+-......,
SCOPE
PROBES
- A
OSCILLOSCOPE
TEKTRONIX
25 pFd M
~ 7904 OR EQUIV
B
4·607
+5VDC ~ ~ 2xfc
MC6871A GND MC6871A 0, NMOS
0,NMOS
full function microprocessor clock 0,TTL
850 kHz to 2.5 MHz f f
HOLD 1 MEMORY
MEMORY CLOCK
READY
specifications
Rating Symbol Value Unit
Supply Voltage V" 5.00-+-5% Vdc
Operattng Temperature Range T, o to +70 °C
Storage Temperature T,tg -55 to +125 °C
Power Supply Drain (max.) I.. 100 mA
ELECTRICAL CHARACTERISTICS (V" = 5.0 ± 5%, V.. = O,T,
= 0° to 70°C, unless otherWise noted)
Characteristic Symbol Min Typ Max Unit
Frequency
Operatlnq Frequency I, 850 25 MHz PIN CONNECTION
IFrequency staoility (InClUSive ±01 %
01 calibration tolerance at 1 GND
+25°C, operating temperature,
Input voltage change, load 3 MEMORY CLOCK
change, aging, shock and 5 0,TTL
Vibration)
NMOS Outputs at 1.0 MHz Operation'" 7 V" (+5VDC)
Pulse Width (meas. at T0,H 430 ns 12 0, NMOS
V,,= - 3V dc level) T0,H 450 ns
Logic Levels VOLe V.. -.1 - V.. +.3 Vdc 13 0, NMOS
VoHc V,,-3 - V,,+-1 Vdc
•
18 GND
Rise and Fall Times t, 5 12 50 ns
t, 5 12 50 ns 20 HOLD 1
• Overshoot/ Undershoot 22 MEMORY READY
Logic "1" V,,-.5 V,,+ 5 Vdc
Logic "0" Vas V.. - 5 V.. + 5 Vdc 24 2xfc
Pulse duration 01 any over-
shoot or undershoot Tos 40 ns
Note All dimenSions are In ,nches
Period @ 0.3V dc Level tc~ t 100 us
Edge Timing @ V,,=O 3V dc Tx 940 ns
NMOS Relationship td' 0
@ +0 5V dc Level td' 0 80 us
TTL Outputs
In ref 100, NMOS @ 0 3V dc
0, TTL T, 15 30 45 ns
@ 1 4V de TH 10 25 40 ns
Memory Clock Te 30 50 70 ns
@ 1 4V dc TJ 20 40 60 ns
2xlc @ 1 4Vdc T, 40 80 120 ns
logic levels VOH 24 32 Vdc
VOL .3 A Vdc
Rise and Fall Times
o4V and 204V t, 15 ns
2AVand AV I, 15 ns
LogiC "0" Sink (lGale) 10L -16 mA
LogiC "1" Source (lGale) 10H +40 uA
Currenl OUlpul Shorted Ise -18 -57 mA
load
NMOS-Load Capaclly 0,,0, CNMOS 80 120 160 pi
TTL-No. 01 Loads 5 ttl
TTL-Load Capacily GTTL 50 pi
logic Inputs" ("O" Level Applies HOLD or MEMORY READY)
Holds 0, NMOS 'High', 0, HOLD 1 -.2 +4 Vdc
NMOS 'Low', 0, TTL 'Low'
Holds 0, NMOS 'Low', 0, NMOS MEM- -2 +4 Vdc
'High', 0, TTL 'High', and ORY
MEMORY CLOCK 'High' READY
"'nto speCified test load
'**Must be externally held at "1 ' level (2 4V min, 5 OV max) If not used
* *" Apply the follOWing parameters for frequencies other than 1 MHz
T¢,H=O 5 (P-140) ns
T¢,H=O 5 (P-100) ns
Tx=(P-60) ns
where P=deslred period of operation In nanoseconds
4-608
MC6871A (continued)
MC6871A
MPU CLOCK
--1- --1.100
~~:="='=-::'::'
-::-::='='=-
FREO - I,. 1M; MOTOROLA ==~ ~,8t MAX
I
.600
DIMENSIONS L SYMBOL DENOTES :!: .005
PIN #1 LOCATION
j L
J l - f - T 8 3 MAX
WAVEFORM TIMING
(ALL TIME IN NANOSECONDS)
TO,
TTL
MEMORY
CLOCK
1,4V •
lAV
2xfc
~--__-_nMEMORY CLOCK
w........----< 02 NMOS
Q-I........
.-
OUT
SCOPE A
PROBE S OSCILLOSCOPE
25 pF M AX TEKTRONIX
7904 OR EOUIV
"1= B
L-______________--{ HOLDl
1 O~F L-________________ -< MEMORY READY
~
100 MHz
2xfc FREOUENCY
COUNTER
Cm - MAX CAPACITY 50 pF HP5327C
CNMOS - 120 pF ± 40 pF IS THE SPECIFIED I cm OR EOUIV
~
MAX LOAD CAPACITANCE
THAT SIMULATES THE MOTOROLA
MC6800 MPU INPUT Rs-(22.!l.) SIMULATES
REAL PART OF MPU TO EXTERNAL
'HOLD AND MEMORY READY MUST FREQUENCY
STANDARD
BE EXTERNALLY HELD AT 1
LEVEL (2 4VDC MIN. 5 OVDC MAX)
WHEN NOT USED
4-609
+5VDC ~ MC6~~ 0,
2xfc
MC6871B GND NMOS
0,NMOS
0,nL
alternate function microprocessor clock
250 kHz to 2.5 MHz
~~ 0,UNGATED
HOLD 1 HOLD 2
specifications
Rating Symbol Value Unit
Supply Voltage V" 5.00+5% Vdc
Operating Temperature Range T, o to +70 "C
Storage Temperature T"g -55 to + 125 "C
Power Supply Drain (max) I.. 100 rnA
•
18 GND
VoHc V,,-3 - V,,+.1 Vdc
Rise and Fall Times t. 5 12 50 ns 20 HOLD 1
tf 5 12 50 ns
22 HOLD2
• Overshoot/Undershoot
LogiC "1" V,,-5 V,,+.5 Vdc 24 2xfc
LogiC "0" Vas V.. - 5 V.. +.5 Vdc
Note 4xfc available on request
Pulse duration 01 any over-
shoot or undershoot Tos 40 ns Nole All dimenSions are In Inches
4-610
MC6871 (continued)
--1.100
FREO
MC6871B
MPU CLOCK I .840
=:::J~ MAX
}l:::::C=M=-O=T=O=R=O=LA=--='
DIMENSIONS
SYMBOL DENOTES
PIN #1 LOCATION
Jr-----------J' ~
~3MAX
WAVEFORM TIMING
ALL TIME IN NANOSECONDS.
/I4--------------+----T, ---------1*
I-------------+---tcyc-----_o/
•
Ti1!,
NMOS .5V
,3V
Ti1!, 1,4V
~~TE~D~-----_..J
2xfc
~ __~_~o~,nL
UNGATED
-A
SCOPE OSCILLOSCOPE
PROBE S TEKTRONIX
25 pF M AX 7904 OR EOUIV
~--------------<HOLD1 f= B
10l'F
~--------<HOLD2
Cm - MAX CAPACITY 50 pF ~-------<p---<2xfc
CNMOS - 120 pF ± 40 pF IS THE SPECIFIED
MAX LOAD CAPACITANCE
THAT SIMULATES THE MOTOROLA
*cm ~
100 MHz
FREOUENCY
COUNTER
HP5327C
MC6BOO MPU INPUT
OR EOUIV
'HOLD 1 AND HOLD 2 MUST BE Rs-(22,n) SIMULATES
EXTERNALLY HELD AT "1" LEVEL
(2 4VDC MIN. 50VDC MAX)
WHEN NOT USED
REAL PART OF MPU
~
TO EXTERNAL
FREOUENCY
STANDARD
4·611
® MOTOROLA MC6875
MC6875A
~
supply, and a crystal or RC network for frequency determination
are required.
"flN1N VU ~
• Typical MPU System with Bus Extenders
GND +5 V
</l1 (>2
c::J 4
-.:r
x fa MPU
L SUFFIX
CERAMIC PACKAGE
CASE 620
PIN CONNECTIONS
X1 vee
X2 MPU</>1
ADDRESS Ext In Reset Output
AND 4 x fo MPU</>2
CONTROL
BUS 2 x to Power-On Reset
Memory
DMA/Ref Grant
Ready
Bus¢2 OMAlRef Req
Ground Memory Clock
ORDERING INFORMATION
Device Temperatura Range Package
MC6875L I o to +70 0 C I Ceramic Dip
MC6875AL I -55 to +1250 C l Ceramic DIp
4·612
MC6875- MC6875A
•
(Vee = 4.75 V, IOHM ~ -200 "AI VOHM Vee - 0 6 - -
(Vee = 5.25 V, IOHMK = +5.0 rnA) VOHMK - - Vee + 1.0
Bus I/> 2 Output v
(Vee =4.75 V,IOHB = -10 mAl VOHB 24 - -
(Vee = 5.25 V, IOHBK = +5.0 mAl VOHBK - - Vee + 1.0
4 x 10 Output V
(Vee =4.75 V, VIH = 2.0 V,IOH4X • -500 "A) VOH4X 2.4 - -
2 x 10, DMA/Relr•• h Grant and Memory elock Outputs VOH 2.4 - - V
~ee = 4.75 V, IOH = -500 "AI
Reset Output VOHR 2.4 - - V
(Vee =4.75 V, VIH = 3.3 V,IOHR = -100 "A)
Output Voltage - low logiC State
MPU I/> 1 and I/> 2 Outputs \I
(Vee = 4.75 V, IOlM = +200 "AI VOlM - - 0.4
(Vee = 4.75 V,lOlMK = -5.0 rnA) VOlMK - - -10
Bus I/> 2 Output V
(Vec = 4.75 V,lOlB = +48 mAl VOlB - - 05
(Vec = 4.75 V, IOlBK = -5.0 mAl VOlBK - - -1.0
4 x 10 Output V
(Vec = 4.75 V, Vil = 0.8 V,IOl4X = 16 mAl VOl4X - - 05
2 x 10, DMA/Reiresh Grant and Memory Clock Outputs VOL 05 V
~CC = 4.75 V,lOl = 16 rnA)
Reset Output VOlR - - 0.5 V
(VCC = 4.75 V, Vil = 0.8 V,IOlR= 3.2 mAl
I nput Voltage - High logiC St.te V
Ext. In, Memory Ready and DMA/Reiresh Request Inputs VIH 2.0 - -
Input Voltage - low logiC State V
Ext In, Memory Ready and DMA/Refresh Request Inputs Vil - - 08
4-613
MC6875. MC6875A
SWITCHING CHARACTERISTICS
(These specifications apply whether the Internal Oscillator (see Figure 9) or an External Oscillator IS used (see Figure 10)
TYPical values measured at Vee = 5.0 V, T A = 2SoC, fa = 1.0 MHz (see Figure 8),
•
Pulse Width (Figure 3) tpWM ns
(fo: 1.0 MHz) 400 - -
(fo: 1.5 MHz) 230 - -
(fo: 2.0 MHz) 180 - -
Total Up Time (Figure 3) tUPM ns
(fo: 1.0 MHz) 900 - -
(fo: 1.5 MHz) 600 - -
(fo : 2.0 MHz) 440 - -
Delay Time Referenced to Output Complement (Figure 31
Output High to Low State (Clock Overlap at 1.0 V) tPLHM 0 - - ns
Delay Times Referenced to 2 x to (FIgure 4 MPU r/J2 only)
Output Low to High Logic State tpLHM2X - - 85 ns
Output High to Low Logic State tPHLM2X - - 70 ns
TransitIon Times (Figure 3)
Output Low to High Logic State tTLHM - - 25 ns
Output High to Low Logic State tTHLM - - 25 ns
BUS </>2 CHARACTER ISTICS
Pulse W,dth - Low Logic State (Figure 4) tpWLB ns
(fo : 1.0 MHz! 430 - -
(fo = 1.5 MHz) 280 - -
(fo: 2.0 MHz! 210 - -
Pulse WIdth - High Logic State tpWHB ns
(fo : 1.0 MHz) 450 - -
(fo : 1.5 MHz) 295 - -
(fo : 2.0 MHz) 235 - -
Delay Times - (Referenced to MPU <pI) (Figure 4)
Output Low to High LogIc State tpLHBMl ns
(to: 1.0 MHz! 480 - -
(fo = 1.5 MHz) 320 - -
(fo : 2.0 MHz) 240 - -
Output High to Low Logic State tpHLBMl
(CL : 300 pF) - - 25
(CL: 100 pF) - - 20
Delay Times (Referenced to MPU <l>2! (Figure 4)
Output Low to High Logic State tPLHBM2 -30 - +25 ns
Output High to Low Logic State tPHLBM2 0 - +40 ns
Transition Times (Figure 4)
Output Low to High Logic State tTLHB - - 20 ns
Output High to Low Logic State tTHLB - - 20 ns
4-614
MC687S- MC687SA
•
4 x fo CHARACTERISTICS
Delay Times (Referenced to Ext. Inl (Figure 4)
Output Low to High Logic State tPLH4X - - 50 ns
Output High to Low Logic State tpHL4X - - 30 n.
Transition Time (Figure 41
Output Low to High Logic State tTLH4X - - 25 n.
Output High to Low Logic State tTHL4X - - 25 ns
MEMORY READY CHARACTERISTICS
Set·Up Times (Figure 51
Low Input Logic State tSMRL 55 - - ns
High Input Logic State tSMRH 75 - - n.
Hold TIme (Figure 5)
Low Input Logic State tHMRL 10 - - ns
DMAIREFRESH REQUEST CHARACTERISTICS
Set·Up Times (FIgure 6)
Low Input Logic State tSDRL 65 - - n.
High Input Logic Stata tSDRH 75 - - ns
Hold Time (Figure 6)
Low Input Logic State tHDRL 10 - - n.
DMAIREFRESH GRANT CHARACTERISTICS
Delay Time Referenced to Memory Clock (Figure 6)
Output Low to High LogIc State tPLHG -15 - +25 ns
Output High to Low Logic State tPHLG -25 - +15 ns
Transition Times (Figure 61
Output Low to High Logic State tTLHG - - 25 ns
Output High to Low Logic State tTHLG - - 25 ns
RESET CHARACTERISTICS
Delay Time Referenced to Power-On Resat (Figure 71
Output Low to High Logic State tPLHR - - 1000 ns
Output High to Low Logic State tpHLR - - 260 ns
Transition Times IFigure 7)
Output Low to High Logic State tTLHR - - 100 ns
OutPUt High to Low Logic State tTHLR - - 60 ns
4·615
MC6875. MC6875A
4 x fo 2 x fo
Xl
X2'
In
e Q~~r-------'-~
•
MPU 1;2
(13)
50 k Reset (14)
'Output 0-+------------' Pin 16 ~ +5,0 Volts
Pin 8 - Gnd
0
10 20 3D 40 50 Vov = 1 0 V ::: Clock Overlap
V" INPUT VOLTAGE (VOLTS)' POWER·ON RESET PIN measurement pomt
4-616
MC6875. MC6875A
4-617
MC687S. MC687SA
2.0 V
Memorv Ready
0.8 V
DMA/Refresh Request
~ Irrelevant
DMA/Refresh Grant
(Low)
4-618
MC6875- MC6875A
Memory Readv
~ Irrolov8nt
tTLHDR
1.5 Vee
•
-+----tPwDMA = fO -2-
2.0 V 20 V
OMAlFIefr.sh Gr.nt
o.s V OSV
4·619
MC6875- MC6875A
5.0 V ----"--+--tr----------------,
Power-On Reset
OV _ _ _ _--I
Reset
0,8 V 0.8 V
+50 V
RLL=18k
For 8us ¢2
+5
RLL
68
av
RLH RLH
20 k 240
An dIodes are 1 N916 All diodes are 1 N916
or equIvalent or equ Iva lent
+50 Volts
foutput
Pm i'4--+---.----+4.--+
CL'
100pF I RLH
4.7 k
All diodes are 1 N916
Dr equIvalent
All dIodes are 1 N916
or equ Ivalent
4-620
MC6875- MC6875A
APPLICATIONS INFORMATION
FIGURE 9 - TYPICAL RC FREQUENCY versus VOLTAGE GENERAL
+11.0 The MC6875 Clock Generator/Driver should be located
.",
...- on the same board and within two inches of the MC6800
MPU, Series damping resistors of 10-30 ohms may be
utilized between the MC6875 and the MC6800 on the .pI
V and .p2 clocks to suppress overshoot and reflections.
The VCC pin (pin 16) of the MC6875 should be
/ bypassed to the ground pin (pin 8) at the package with a
/" fo ~ 1 OMH'.:- - 0.1 IlF capacitor. 8ecause of the high peak currents
/' @VCC=50V'
TA~25'C - - associated with driving high Iy capacitive loads. an ade,
./" 1 1 quately large ground strip to pin 8 should be used on the
V MC6875. Grounds should be carefully routed to minimize
coupling of noise to the sensitive oscillator inputs. Unnec-
-2.0 essary grounds or ground planes should be avoided near
45 50 5.5 60 65 7.0
Vcc. SUPPLY VOLTAGE (VOLTS) pin 2 or the frequency determining components. These
components should be located as near as possible to the
respective pins of the MC6875. Stray capacitance near
FIGURE 10 - TYPICAL RC FREQUENCY pin 2 or the crystal. can affect the frequency. The can of
I
versus TEMPERATURE the crystal should not be grounded. The ground Side
of the crysta1 or the C of the R-C oscillator should be con-
+1.0 /
1/ nected as directly as possible to pin 8.
~ +D.8 ./ Unused Inputs should be connected to VCC or ground.
w / Memory Ready. DMA/Refresh Request and Power·On
'"~ +06 ./ Reset should be connected to VCC when not used.
'" i'/ The External Input should be connected to ground
'"
> ./
ffi +0.4 / when not used.
g ./ fo~1.0MHz._
~ +0.2 - OSCILLATOR
/ ~:~C2;~COV- -
/ A tank circuit tuned to the desired crystal frequency
:t V connected between terminals X 1 and X2 as shown in
--
-02 V Figure 12. is recommended to prevent the oscillator from
I starting at other than the desired frequency. The 1kn
-10 w ~ ~ ~ ~ ~ ro ~ 00
resistor reduces the Q sufficiently to maintain stable
TA. TEMPERATURE (1:)
crystal control. Crystal manufacturers may recommend a
capacitance (CLl to be used in series with the crystal for
optimum performance at senes resonance.
FIGURE 11 - TYPICAL FREQUENCY.ersus See Figures 9 and 10 for tYPical oscillator temperature
RESISTANCE FOR C VARIABLE
200
and VCC supply dependence for R-C operation.
........ r-.,. I I I I I I
80 ......
~
....... ...... ...... MC6875
~
20
."" ...... ~
~
,,"
"\ r\
~
'\ [\
iF
(Trim) L__ -
CL
_
(3)
Ext In
'"
\ \
"I\.
I - 4 X fO=1 ' Ar::-
2"~-TCT
10
I'
i
R 5 k 4k i 3k 2k 1k 0 5k
1
• Requ Ired by some
2.5 "H " LT " 22 "H
75 pF'" CT'" 200 pF
1 7 8 9 10 Crystal manufacturers RT = lkO
4 X fo. FREQUENCY (MHz)
4-621
MC6875- MC6875A
I
(21
C memory. The transients on the clock lines during the
X2
(31 time the Reset Output is high impedance could initiate
Ext I" MC6876 the system in some unknown mode and possibly write
I
into the backup memory system. Therefore in battery
(31
Ext In backup systems, more elaborate reset circuitry will
be required.
51
External Pulse
Please note that the Power·On Reset input pin of the
Generator MC6875 is not suitable for use with a manual MPU reset
switch if the DMA/Ref Req or Memory Ready inputs are
going to be used. The power on reset circuitry is used to
To precisely time a crystal to desired frequency, a
initialize the internal control logic and whenever the
variable trimmer capacitor in the range of 7 to 40 pF
input is switched low, the MC6875 is irresponsive to
would typically be used. Note it is not a recommended
the DMA/Ref Req or Memory Ready inputs. This may
practice to tune the crystal with a parallel load capaci·
result in the loss of dynamic memory and/or possibly
tance.
a byte of slow static memory. The circuit of Figure 14
The table above shows typical values for CT and LT.
is recommended for applications which do not utilize the
typical crystal characteristics. and manufacturers' part
DMA/Ref Req or Memory Ready inputs. The circuit of
numbers for 4.0 and 8.0 megahertz operation.
Figure 15 is recommended for those appl ications that do.
The MC6875 will function as an R-C oscillator when
FIGURE 14 - MANUAL RESET FOR APPLICATIONS NOT USING
connected as shown in Figure 13. The desired output OMA/REFRESH REQUEST OR MEMORY REAOY INPUTS
frequency (M¢1) is approximately:
Vcc
Formula 320 C in picofarads
4 x fa '" C (R+ .27) + 23 R in K ohms
(See Figure 11) 4 x fo in Megahertz
cl 12 14 40
y\
It would be desirable to select a capacitor greater than
15 pF to minimize the effects of stray capacitance. It is
also desirable to keep the resistor in the 1 to 5 k n
range. There is a nominal 270 n resistor internally at
X, which is In series with the external R. By keeping
-= Manual Reset Switch
the external R as large as possible, the effects due to FIGURE 15 - MANUAL RESET FOR SYSTEMS USING
process variations of the internal resistor on the frequency DYNAMIC RAM OR SLOW STATIC RAM IN CONJUNCTION
will be reduced. There will, however, still be some WITH MEMORY REAOY OR DMA/REFRESH REQUEST INPUTS
variation in frequency in a production lot both from VCC
the resistance variations, external and internal, and 1/474LS08
process variations of the input switching thresholds. 47 k
Therefore, in a production system, it is recommended
a potentiometer be placed in series with a fixed R 14
between X1 and X2.
POWERoON RESET '\:' Manual Asset
As the power to the MC6875 comes up, the Reset J:..Switch
Output will be in a high impedance state and will not give
4-622
MC6875- MC6875A
OUTLINE DIMENSIONS
NOTE:
Operation of the MC6875AL over the full military tem-
perature range (to maximum T A) will result in excessive
operating Junction temperature_
MILLIMETERS INCHES
The use of a clip on 16 pin heat sink similar to AAVID DIM MIN MAX MIN MAX
•
Engineering, Inc_, Model 5007 (ReCA = 180 C/W) IS A 1905 19.81 0.750 I 0780
recommended above T A "" 950 C_ a 6.22 698 0.245 0 275
oC 406
0.38
5.08
0.51
I 0160 100.020
.200
F 1.40 165 0065
G 2.54 asc asc
Contact AAVID Englneenng, Inc. H 0.51 1 14 0.020 0.045
J 0.20 0 30 0.008 0.012
30 Cook Court K 3.18 4.06 0125 0.160
Lacoma, New Hampshire 03246 L 737 787 0290 0310
M 150 150
Tel. (603) 524-4443 N 0.51 1.02 0.020 0.040
NOTES
1 LEAOSWITHINO.13mm(0005)RAOIUS
OF TRUE POSITION AT SEATING PLANE
AT MAXIMUM MATERIAL CONOITION
PKG INOEX NOTCH IN LEAD
NOTCH IN CERAMIC OR INK DOT
DIM "L" TO CENTER OF LEADS
WHEN FORMED PARALLEL
CASE 620-02
R8JA = 100oC/W (Tvp)
THERMAL INFORMATION
The maximum power consumption an Integrated CirCUit the sum of the products of the supply voltages and supply
can tolerate at a given operating ambient temperature, can currents at the worst case operating condition
be found from the equation TJ(max) = MaXimum Operating Junction Temperature
TJ(max) -TA as listed In the MaXimum Ratings Section
PD(T A) = ROJA T A = MaXimum DeSIred Operating Ambient
Temperature
Where PD(T A) = Power DISSipation allowable at a given
ROJA = Thermal Resistance Junction to Ambient
operating ambient temperature. ThiS must be greater than
R8JC = Thermal Resistance Junction to Case
4·623
® MOTOROLA
MC6880A
MC8T26A
This device may be ordered under
either of the above type numbers.
I
CASE 620
• High Speed Schottky Technology
• Three·State Drivers and Receivers
• Compatible with M6800 Family Microprocessor PSUFFIX
PLASTIC PACKAGE
CASE 648
Rece.Ver
Enable
Input
1 Vee
Receiver Driver
Output Enable
1 Input
Bus 1 14 Aecelver
Output
Driver 4
Input Bus4
1
Receiver Driver
Output Input
2 4
Receiver
Output
3
Dnver
Input 7 Bus3
2
Driver
Gnd Input
3
ORDERING INFORMATION
Temperatur.
Device Alternate Range Package
4-624
MC6880AI MC8T26A
ELECTRICAL CHARACTERISTICS 14.75 V .. VCC" 5.25 V and OOC .. TA .. 750 C unless otherwise noted.)
Characteristic Symbol Min Typ Max Unit
Input Current - Low Logic State
I Aecelver Enable Input, VILIAEI = 04 VI IILIREI - - -200 ~A
I Dnver Enable Input, VILIDEI = 04 VI IILlDE) - - -200
IDnver Input, VILIDI = 04 VI IILIDI - - -200
IBus I Aecelver! Input, VILIBI = 04 VI IILlBI - - -200
Input Disabled Current - Low Logic State
IILIDI DIS
•
IDriver Input. VILIDI = 0.4 V) - - -25 itA
Input Current-High Logic State
I Receiver Enable Input, VIHIREI = 525 VI IIHIREI - - 25 ~A
IDriver Enable Input, VI HIDEI = 525 VI IIHIDEI - - 25
IDnver Input, VI HIDI = 525 VI IIHIDI - - 25
IRecelver Input, VIHIBI = 5.25 VI IIHIBI - - 100
Input Voltage - Low Logic State
I Receiver Enable Input) VILIREI - - 085 V
I Driver Enable Input VILIDEI - - 085
(Driver Inputl VILIDI - - 085
(Receiver Input) VILIBI - - 085
4·625
MC6880A/MCST26A
SWITCHING CHARACTERISTICS (Unless otherwIse noted, specIfIcations apply at TA • 250 e and Vee = 5.0 V)
C",acteristic Symbol Figura Min Max Unit
PropagatIon Delay TIme from Receiver (Bus) Input to tPLH(R) 1 - 14 ns
High LogIc State Receiver Output
Propagation Delay Time from Receiver (Bus) I "put to tPHL(R) 1 - 14 ns
Low LOQ1c State Receiver Output
Propagation Delay Time from Driver I"put to tPLH(o) 2 - 14 ns
High LogIc State orrver (Bus) Output
Propagation Delay Time from Driver I nput to tPHL(D) 2 - 14 ns
Low LogIc State Drrver (Bus) Output
PropagatIon Delay Time from Receiver Enable I nput to tPLZ(RE) 3 - 15 ns
HIgh Impedance (Open) LogIc State ReceIver Output
Propagation Delay Time from Receiver Enable Input to tPZL(RE) 3 - 20 ns
Low Logic level Receiver Output
Propagation Delay Tune from Dnver Enable Input to tPLZ(oE) 4 - 20 ns
HIgh Impedance LogIc State Drrver (Bus) Output
Propagation Delay Time from DrIVer Enable Input to tpZL(DE) 4 - 25 ns
Low LogIc State Drrver (Bus) Output
Input
o V _-:'=31
Input Pulse Frequency'" 10 MHz
tpHLfR) Duty Cycle:::: 50%
VOH---_
Output
VOL----------·~-------J
2.6 V
To Scope ~r To Scope
(Input) "E,;';ijj; (Input)
Input
92
Receiver lN916
Output or Equiv.
Orlver
Input
Pulse 51 1.3 k 30pF
E?river
Generator
Enable
Input
4-626
MC6880AI MC8T26A
FIGURE 2 - TEST CIRCUIT AND WAVEFORMS FOR PROPAGATION DELAY TIME FROM
DRIVER INPUT TO BUS (DRIVER) OUTPUT, tPLH(D) AND tpHLlD)
tTHL';;; 5.0"s
2.6V-----
Input
26V 26V
To Scope Dnver To Scope
(Input) Enable (Output)
Input
Driver 30
(Bus) lN916
Driver
Input Output or EqU1V
Receiver
Output
51 260 300 pF
~
Enable
Input
FIGURE 3 - TEST CIRCUIT AND WAVEFORMS FOR PROPAGATION DELAY TIME FROM
RECEIVER ENABLE INPUT TO RECEIVER OUTPUT, tpLZ(RE) AND tpZL(RE)
r-
2.6 V ---+;I.:-:=C----=~
Input
OV---Jrl
tPLZ(AE) tpZL(AE)
"'3.5 V ----+--;;;.__-------,. Input Pulse Frequency = 50 MHz
Duty Cycle == 50%
Output 1.5 V
VOL----~
2.4 k 240
Receiver
Output
Pulse 51
Generator
lN916
5.0 k 30 pF or EqU1V
4·627
MC6880A/MC8T26A
FIGURE 4 - TEST CIRCUIT AND WAVEFORMS FOR PROPAGATION DELAY TIMES FROM
DRIVER ENABLE INPUT TO DRIVER (BUS) OUTPUT, tpLZ(OE) AND tpZL(DE)
tTHL ~ 5.0 ns
26 V ---+-;I.;;=------.\-
Input
oii _ _ _.71 Input Pulse Frequency = 5.0 MHz
Duty Cvcle = 50%
tpZL(DE)
~3.5V----
Output
VOL------'-------~
+2.6 V
I
5.0 V
To Scope
To Scope Driver Enable (Output)
Input
----.----+---(>----1
(InpU'r':...)
24k 70
Driver
Input
Driver (Bus)
Pulse I'L 51 Recetver Output
Generator Output
1N916
50k 300pF or Equlv
~
Eii86'ie
Input
Receiver
Outputs Receiver
Outputs
Oriver Driver
Inputs Inputs
To Other
Drivers/Receivers
Driver Receiver
Enable Enable
4·628
MC6880AI MC8T26A
L SUFFIX P SUFFIX
Q
[C ~ :p"":~::::""
CERAMIC PACKAGE PLASTIC PACKAGE
CASE 648-06
: : : : : : :
A8JA - 100o C/W (Tvp)
~F~ I
OPTIONAL LEAD
CON FIG. (1,8,9,& 16)
~JBl
JH~ ~ G
-iL MJl f.- JLD SEATING
PLANE
K
NOTES:
1 LEADS WITHIN 0.13 mm (0.005) RADIUS
OF TRUE POSITION AT SEATING PLANE
AT MAXIMUM MATERIAL CONDITION
PKG. INDEX. NDTCH IN LEAD
NOTCH IN CERAMIC OR INK DOT
DIM "L" TO CENTER OF LEADS
NOTES.
1. LEADS WITHIN 0.13 mm
(0,005) RADIUS OF TRUE
POSITION AT SEATING
PLANE AT MAXIMUM
MATERIAL CONDITION.
2. DIMENSION "L" TO
3. DIMENSION "8" DOES NOT
INCLUDE MOLD FLASH.
4. "F" DIMENSION IS FOR FULL
LEADS. "HALF" LEADS ARE
OPTIONAL AT LEAD POSITIONS
1,8,9, and 16).
II
WHEN FORMED PARALLEL CENTER OF LEADS 5. ROUNDED CORNERS OPTIONAL.
WHEN FORMED
PARALLEL.
MILLIMETERS INCHES
DIM MIN MAX MIN MAX
A 19.06 19.81
B 6.22 6.98 ~
C 4.06 5.08 ..w.!-
D 0.38 0.51 ~
F 1.40 1.65 ~
G 2.54 BSC ~
H 0.51 1.14 ~
J 0.20 0.30 : 0.012
K 3.18 4.06 0.160
L 131 1.81 0.310
M
N
-
0.51
150
1.02
-
0.020
1
10
0.040
THERMAL INFORMATION
The maximum power consumption an Integrated CirCUit the sum of the products of the supplv voltages and supply
can tolerate at a given operating ambient temperature, can currents at the worst case operating condition.
be found from the equation
TJ(max) = MaXimum Operating Junction Temperature
TJ(max) -TA
as listed In the MaXimum Ratings Section
PD(T A) = ROJA(Typ)
T A = MaXimum DeSired Operating Ambient
Where. PD(T A) = Power DISSipation allowable at a given Temper ature
RIIJA(Typ) = TYPical Thermal ReSistance Junction to
operating ambient temperature. ThiS must be greater than
Ambient
@ MOTOROLA SN74LS783
Me6883
Advance Information
SYNCHRONOUS
SYNCHRONOUS ADDRESS MULTIPLEXER ADDRESS
The SN74LS783/MC6883 brings together the MC6809E
MUL TIPLEXER
(MPU). the MC6847 (Color Video Display Generator) and dy-
namic RAM to form a highly effective, compact and cost ef-
LOW POWER SCHOTTKY
fective computer and display system.
• MC6809E, MC6800, MC6801E, MC68000 and MC6847 (VDG)
Compatible
• Transparent MPUIVDG/Refresh
• RAM size - 4K, 8K, 16K, 32K or 64K Bytes (Dynamic or
Static)
• Addressing Range - 96K Bytes N SUFFIX
• Single Crystal Provides All Timing PLASTIC PACKAGE
CASE 711
• Register Programmable:
VDG Addressing Modes
~,u,'"
VDG Offset (0 to 64K)
II RAM Size
Page Switch
MPU Rate (Crystal + 16 or + 8)
MPU Rate (Address Dependent or Independent)
• System "Device Selects" Decoded 'On Chip'
1 CERAMIC PACKAGE
CASE 734
• Timing is Optimized for Standard Dynamic RAMs
• + 5.0 V Only Operation
• Easy Synchronization of Multiple SAM Systems
PIN ASSIGNMENT
• DMA Mode
1 40
SYSTEM BLOCK DIAGRAM 2 39
3 38
4 37
5 36
TV DIsplay SectIon
IS Optional 6 35 (RAS1)
7 34
8 33
9 32
Address AO-AI5 SN74LS7831
MC6883 10 31
RIWI---_ _ _ SAM
11
~
= 14 MHz
30
E~---; 12 29
To a i"4-----I 13 28
ROMs 14 27
and MC6809E
110 MPU 15 26
16 25
DYNAMIC 17 24
Data RAM 18 23
4K. BK. 16K
32K or 64K 19 22
BYTES
20 21
4-630
SN74LS783-MC6883
DC CHARACTERISTICS (Unless otherwise noted specifications apply over recommended power supply and
•
temperature ranges)
Characteristic Symbol Min Typ Max Units
Input Voltage - High logic State VIH 2.0 - - V
Input Voltage - low logic State Vil - - 0.8 V
Input Clamp Voltage VIK - - -1.5 V
(VCC = Min, lin = -18 rnA) All Inputs Except OSCln
Input Current - High logic State at Max Input Voltage II ",A
(VCC = Max, Vin = 5.25 V) VClk Input - - 200
(VCC = Max, Vin = 5.25 V) DAO Input - - 100
(VCC = Max, Vin = 5.25 V) OSCOut Input - - 250
(VCC = Max, Vin = 7.0 V) All Other Inputs Except OSCln - - 100
Input Current High logic State IIH ",A
(VCC = Max, Vin = 2.7 V) All Inputs Except VClk, OSCln* - - 20
Input Current - low logic State III rnA
(VCC = Max, Vin = 0.4 V) DAO Input - - -1.2
(VCC = Max, Vin = 0.4 V) VClk Input - -30 -SO
(VCC = Max, Vin = 0.4 V, OSCln = Gnd) OSCOut Input - - -8
(VCC = Max, Vin = 0.4 V) All Other Inputs Except OSCln - - -.4
Output Voltage - High logic Sta~ _ _ V
(VCC = Min, 10H = -1.0 rnA) RASO, RAS1, CAS, WE VOH(C) 3.0 - -
(VCC = Min, 10H = -0.2 rnA) E, Q VOH(E) VCC - 0.75 - -
(VCC = Min,IOH = -0.2 rnA) All Other Outputs VOH 2.7 - -
Output Voltage - low logic State_ V
(VCC = Min, 10l = 8.0 rnA) RASO, RAS1, CAS, WE VOl(C) - - 0.5
(VCC = Min, 10l = 4.0 rnA) E, Q Outputs VOllE) - - 0.5
(VCC = Min, 10l = 0.8 mAl VClk Output VOl(V) - - O.S
(VCC = Min, 10l = 4.0 rnA) All Other Outputs VOL - - 0.5
Power Supply Current ICC - 180 230 rnA
Output Short-Circuit Current lOS 30 - 225 rnA
*Including OSCOut (when OSCln is grounded).
4-631
SN74LS783·MC6883
I
td(Ol-Ql)
(Cl = 30 pF) Oscillator-Out I to VClk I td(OH-VH) - 50 -
(CL = 30 pF) Oscillator-Out I to VClk "- td(OH-Vl) - 65 -
(Cl = 195 pF) Oscillator-Out "- to Row Address td(OL-AR) - 36 -
(Cl = 195 pF) Oscillator-Out "- to Column Address td(Ol-AC) - 33 -
(Cl = 15 pF) Oscillator-Out "- to DAO I Earliest(l) td(Ol-DH) - -15 -
(el = 15 pF) Oscillator-Out . ._ to DAO Ilatest(1) td(Ol-DH) - +15 -
(Cl = 95 pF on RAS, Cl = 195 pFon CAS) CAS "- to RASI td(Cl-RH) - 208 -
Setup Time for AD thru A15, R/W Rate = -16 tsu(A) - 28 - ns
Rate = - 8 - 28
Hold Time for AO thru A15, R/W Rate = -16 Ih(A) - 30 - ns
Rate = - 8 - 30 -
Width of HS low 2 twl(HS) 2.0 5.0 6.0 fLS
Notes' 1 When uSing the SAM with an MC6847, the rising edge of DAO IS confined within the range shown In the timing diagrams (unless the
synchronizing process IS Incomplete) The synchronization process requires a maximum of 32 cycles of OSCOut for completion
2. tWl(HS) wider than 6 0 J.lS may Yield more than 8 sequential refresh addresses
40
~
30
td IOL·R1LI
~
F
>- 20
~.
;;3 ~ p-f td IOL·CL)
'"z
10 ~
td (OL·ROLI
'"~
<.:>
;t
'"g:
50 100 200 300 400 500
CL, LOAD CAPACITANCE (pFI
4-632
SN74LS783·MC6883
•
RfW 15 MPU READ or WRITE. This signal comes directly from the MPU and is used to enable writing
to the SAM control register, dynamic RAM (via WE). and to enable device select #0.
Oscln 5 Apply 14.31818' MHz crystal and 2.5-30 pF trimmer to ground. See page 12.
DAO 8 Display Address DAO. The primary function of this pin is to input the least significant bit of a
16-bit video display address. The more significant 15-bits are outputs from an internal 15-bit
counter which is clocked by DAO. The secondary function of this pin is to indirectly input the
logic level of the VDG "FS" (field synchronization pulse) for vertical video address updating.
0
O~
2 HS 9 Horizontal Synchronization. The primary function of this pin is to detect the falling edge of
> I,)~ VDG "HS" pulse in orderto initiate eight dynamic RAM refresh cycles. Thesecondary function
is to reset up to 4 least significant bits of the internal video address counter.
r- VClk 7 VDG Clock. The primary function of this pin is to output a 3.579545 MHz square wave" to the
VDG "Clk" pin. The secondary function resets the SAM when this VClk pin is pulled to logic
"a" level, acting as an input.
OS C Out 6 Apply 1.5 k!l resistor to 14.31818' MHz crystal and 33 pF capacItor to ground. See page 12.
....Z
.!!
52
51
25
26
Most Significant Bit (Device Select Bits). The binary value of 52, 51, SO selects one of eight
"chunks" of MPU address space (numbers a through 7). Varying in length, these "chunks"
> .. provide efficient memory mapping for ROMs, RAMs, Input/Output devices, and MPU Vectors.
~;;;I (Requires 74LS 138-type demultiplexer).
SO 27 Least Significant Bit.
..
... ..."
E 14 E (Enable Clock) "E" and "0" are 90" out of phase and are both used as MPU clocks for the
~
.. ::Eo!!
c: I,)
0 13
MC6809E. For the MC6800 and MC6801E, only "E" is used. "E" is also used for many MC6800
peripheral chips .
o (Ouadrature Clock).
ii:
,.
~
Z7t 35 Most Significant Bit
S-
,. Z6t 34 First, the least significant address bits from the MPU or "VDG" are presented to ZO-Z5 (4K
0 ::E :1
Z5t
Z4t
33
32
x 1 RAMs) or ZO-Z6 (16K x 1 RAMs) or ZO-Z7 (64K x 1 RAMs). Next, the most significant
address bits from the MPU or "VDG" are presented to ZO -Z5 (4K x 1 RAMs) or ZO -Z6
:~I Z3t 31 (16K x 1 RAMs) or ZO -Z7 (64K x 1 RAMs). Note that for 4K x 1 and 16K x 1 RAMs, Z7 (Pin
<1:, Z2t 30 35) is not needed for address information. Therefore, Pin 35 is used for a second row
Zlt 29 address select which is labeled (RAS1).
ZOt 28 Least Significant Bit.
RASlt 35 Row Address Strobe One. This pulse strobes the least significant 6,7 or 8 address bits into
dynamic RAMs in Bank #1.
::E f RASOt 12 Row Address Strobe Zero. This pulse strobes the least significant 6,7 or 8 address bits into
<l:c
II: 0
dynamic RAMs in Bank #0.
I,) CASt 11 Column Address Strobe. This pulse strobes the most significant 6,7 or 8 address bits into
dynamic RAMs.
WEt 10 Write Enable. When low, this pulse enables the MPU to write into dynamic RAM.
*14.31818 MHz is 4 times 3.579545 MHz television color subcarrier. Other frequencies may be used. (See page 12.)
"When VOG and SAM are not yet synchronized the "square wave" will stretch (see page 10.)
t Due to fast transitions. fernte beads in series With these outputs may be necessary to avoid high frequency (= 60 MHz) resonances.
4
4-633
• en
z
:i:>!
r
en
TIMING WAVEFORMS for MPU RATE = SLOW
ffi
FIGURE 2 -
: ''''SlI_~ :stt~l~'
1.lsulAlfH
m
w ,1,0-,1,15. RW
~
~
1 1 1 1 1 '"""'_1
.~~~~~========~==~========================~======+=======~=====t====~~~~~~~~~~~==================i=::i-~
~ ~
Vown
1--ldIOHVU
--1/~~b::td{Ql AC)
VALID vaG ADDRESS (COLUMN)
IdIOL-ARI_I~b. I I Id(oL.Ac)_I;~~
VAllO MPU ADDRESS (ROW
!dIDl-ARI
7' 'V.
l~o{1
'0' 'oc
.1""'dIOLR1HI __11_td!OLR1LI
AASl VOHle) -is
'dlOl ROHI __ It-- -IJ.- 'dIOL-ROli
om vOHle) VOlle) -is
'dleL.RH) vouel 1~ld(Ol CHI ----=::;r,:;::=-'dIOl ell
~ •• ~ • VOliel VOHlel VOLIel _~I
WE I ~:~~~l Wll 'diaL WHI __ I,I;=- . n
OHIC
itTlmlng pOints marked With "4" are defined elsewhere (specifically, 8 cycles of "OSCOut" to the left or right I
Note 1 The penod of "VClk" IS four times that of "OSCOut" unless the synchronization process IS Incomplete Also,
VClk may rise Within td(OH-VH) nanoseconds of TO, ,:,1, T2 or TF
'"
en
z
~
r
FIGURE 3- TIMING WAVEFORMS for MPU RATE = FAST
en
fS
i" ONE MACHINE CYCLE ~1
•
~
(')
Rele'encePolnts,nT,me-+-t
---jl
~ VOLIEI
a, V IhIM)
(,.)
(J1
AOA15 AW-' IH_ ::!
"IL t<lIA_5)
~~~~=======t==~===================t==~~~~~OODt==t=====t=====t=====t===========t==jm~~.:~
VOL VOH
_ -v
v" "IH _, 'alQl.QHI
Earhesl
,ldlOL DHI
--'11r-Latest
~- ~
I
•
--I I--ldlOH VHI
VOH I VOLIVI (See Nole 2)
Vll ' I I "IL
_~' ,~:
I I
.--; Id(OH-VLI
-
lalso Z7 ,j on 64K model I VOL VOL ~~ I vol."l VOL
YO,
__
~"';~
MSo-
m _. • td(CL-RHI
VO",,/
-1t-ldIOL RfHI
-"
-h-"ldIOLROHI
'v
0"101 -+j~"o,,",
VOHIC}
.-I
VOLIC)
IdiOl-Rlll
-JrtdIOLROLI
_:-1r-'''0''''
VOLle)
.
.~$
~
VOLIC) . ..... i-.talOl Wll _ t--tdIOL.WH)
W'E-- --_]VOlICI VOHIC)
*Tlmlng POints marked With "." are defined elsewhere (specifically, 8 cycles of "OSCOut" to the left or the right)
Notes'- In the "fast MPU rate" mode, the time slot otherwise used for a VDG address is used for a second MPU address
2: The period of "VClk" IS four times that of "OSCOut" un!ess the synchrOnization process IS mcomplete
Also, VClk may rise wlthm td(OH-VH) nanoseconds of 'to, '1'1. '1'2. or TF
•
0>
SN74LS783·MC6883
52 S1 SO VCC Gnd
n n n n n
$ FFCO • $ FFDF E
l Addr •••
Decode
J Refresh Refresh
Re~est yant RIW
t ,~
Clock
t~
Logic
12
• A10
A9
A8
[j--"'t---.J
[j----"'t-.,
[j----"'t-.,
A7Ct----+--I~ A7
A10
A9
AS
Address
Multiplexer
89
B8
B7
-2
-2
-2
-2
u
a;
E
~
0
~
-0
~
« r,;-;:-
TY~ TV ~
PI ~ P1 ~
a
F1
FO
a;
1;;
a::
"0
-2
-2
BOSC
u -160n h
[t---4-~ A6 B6 -2 g? ~~
:g'g
r---- V2 I-' VClk
[J--""""'t-.., A5 B5 -2 tFll---
«:;
VI
Manual ,[
[ (external)
~t8~'"
Reset
[t---t-~ A4 84
A 3 [ t - - t - . , A3 83 -2 '-- ~ Ml
Q Automatic [
[ (Internal)
A1 [U---t-..., A1 Bl \ -2 r R1
Reset
-CP,-
AO [U--+--I'" AO BO v- RO
Z7 ze Z5 Z4 Z3 Z2 ZI ZO
Refresh
Reyest y DAORefresh
G.:r.nt
Multiplexer J'
Control,
Logic
}5
RNV:c1--~~--~-~-~~-~-+-+--t--~R~/W~-
- RASI
__~~--~~~~'~Window
r....
M~ =""" , ,
Select
1
0
E Master
Timing
1-7 Start
~BOSC
4161 ~OS
1/1
~
......
? Pp Oscl n
o [O------+--1f-+-j-+-+--I--t-----~ OSCOut
'R.s.t '---Tj--;jr--.,---'+
Destlnat;ons; L-----_-_-::.I..r1.J:,...LrlWT""IL-..lJr .,-lUr-r-wr-r-wr "';w'''';
1 . . . J r - - - - - - - -wr-'wrr-r,U--------..J
r
RAS1'Z7 Z8 Z5 Z4 Z3 Z2 Z1 ZO iim CAS WE
4-636
SN74LS783·MC6883
•
REFresh Address Counter (CO - C6):
A seven bit binary counter with outputs labeled CO - C6 supplies bursts of eight* sequential addresses
triggered by a HS high to low transition. Thus, while the TV electron beam is in horizontal blanking, eight
sequential addresses are accessed. Likewise, the next eight addresses are accessed during the next horizontal
blanking period, etc. In this manner, all 128 addresses are refreshed in less than 1.1 milliseconds.
Address Multiplexer:
Occupying a large portion of the block diagram in Figure 4, is the address multiplexer which outputs bits
ZO-Z7 (as addresses to dynamic RAM's.) Inputs to the address multiplexer include the VDG address (BO - B15)
the REFresh address (CO- C6) and the MPU address (AO - A 15) or (AO - A 14 plus one paging bit "P".) The pagmg
bit "P" is one bit in the SAM CONTROL REGISTER that is used in place of A 15 when memory map TYpe #0 is
selected (via the SAM CONTROL REGISTER "TY" bit.)
Figure 6 shows which inputs are routed to ZO - Z7 and when the routing occurs relative to one SAM machine
cycle. Notice that Z7 and RAS1 share the same pin. Z7 is selected if "M1" in the SAM CONTROL REGISTER IS
HIGH (Memory size = 64K.)
Address Decode:
At the top left of Figure 4, is the Address Decode block. Outputs S2, S1, and SO form a three bit encoded
binary word(S). Thus S may be one of eight values (0 through 7) with each value representing a different range
of MPU addresses. (To enable peripheral ROM's or 1/0, decode the S2, S1, and SO bits into eight seperate
signals by using a 74LS138, 74LS155 or 74LS156. Notice that S2, Sl, and SO are not gated with any timing
signals such as E or 0.)
Along with the A5 - A15 inputs is the MEMORY MAP TYpe bit (TY.) This bit is soft-programmable (as are all
16 bits in the SAM CONTROL REGISTER,) and selects one of two memory maps. Memory map #0 is intended
to be used in systems that are primarily ROM based. Whereas, memory map #1 is intended for a primarily
RAM based system with 64K contiguous RAM locations (minus 256 locations.) The various meanings of S2, Sl,
SO are tabulated in Figure 16 (page 19) and again on pages 17 and 18.
In addition to S2, S1, and SO outputs is a decode of $FFCO through $FFDF which, when gated with E and
R/W, results in the write strobe for the SAM CONTROL REGISTER.
SAM Control Register
As shown in Figure 4, the CONTROL REGISTER has 16 "outputs":
~DG Addressing Modes: V2, V1, VO MPU Rate: R1, RO
VDG Address OFFset: F6, F5, F4, F3, F2, Fl, FO ~emory Size (RAM): Ml,MO
32K fage Switch: P Memory Map TYpe: TY
When the SAM is reset (see page 10,) all 16 bits are cleared. To set anyone of these 16 bits, the MPU simply
writes to a unique** odd address (within $FFCl through $FFDF.) To clear anyone of these 16 bits, the MPU
.. If HS IS held low longer than 8 ",,5, then the number of sequential addresses 10 one refresh "BURST" IS proportional to the time Interval
dunng which HS IS low.
** See pages 11 or 18 for speCific addresses.
t In thiS document. the "s" symbol always preceeds hexidecimal characters
8
4-637
SN74LS783-MC6883
simply writes to a unique"" even address (within $FFCO through $FFDE.) Note that the data on the MPU data
bus is irrevelant.
Inputs to the control register include A4, A3, A2, A 1 (which are used to select which one of 16 bits is to be
cleared or set), AO (which determines the polarity ... clear or set,) and R/W, E and $FFCO - $FFDF (which
restrict the method, timing and addresses for changing one of the 16 bits.) For more detailed descriptions of
the purposes of the 16 control bits, refer to related sections in the BLOCK D.IAGRAM DESCRIPTION (pages 8
through 12) and the PROGRAMMING GUIDE (pages 14 through 18).
** See pages 17 or 18 for specific addresses.
•
FIGURE 6 - SIGNAL ROUTING for ADDRESS MULTIPLEXER
Memory Size RowlColumn Signals Routed to ZO-Z7 Timing
Signal
Ml MO Source Z7 Z6 Z5 Z4 Z3 Z2 Zl ZO (Figure 2)
4-638
SN74LS783-MC6883
Internal Reset
By lowering VCC below 0.6 volts for at least one millisecond, a complete SAM reset is initiated and is
completed within 500 nanoseconds after VCC rises above 4.25 volts.
NOTE: In some applications, (for example, multiple "VDG-RAM" systems controlled by a single MPU)
multiple SAM ICs can be synchronized as follows:
• Drive all SAM's from one external oscillator.
• Stop external oscillator.
• Lower VCC below 0.6 volts for at least 1.0 millisecond.
• Raise VCC to 5.0 volts.
• Start external oscillator.
• Wait at least 500 nanoseconds.
Now, the "E" clocks from all SAM's should be in-phase.
External Reset
When the VClk pin on SAM is forced below 0.8 volts for at least eight cycles of "oscillator-out", the SAM
becomes partially reset. That is, all bits in the SAM control register are cleared. However, signals such as RAS,
CAS, WE, E or Q are not stopped (as they are with an internel reset), since the SAM must maintain dynamic
RAM refresh even during this external reset period.
Figure 7 shows how VClk can be pulled low through diode D1 when node "A" is low.* When node "A" is
high, only the backbiased capacitance of diode D1 loads the 3.58 MHz on VClk. Diode D2 helps discharge C1
•
(Power-on-Reset capacitor) when power is turned off. Diode D3 allows the MPU reset time constant R2C2 to
be greater than the SAM reset time constant. Thereby, ensuring release of the SAM reset prior to attempting
to program the SAM control register.
+5.0 V +5.0 V
Manual 1
System
Reset
SWitch'
/1
VDG Synchronization
In order for the VDG and MPU to share the same dynamic RAM (see page 13,) the VDG clock must be stopped
until the VDG data fetch and MPU data fetch are synchronized as shown in Figure 12. Once synchronized, the
VDG clock resumes its 3.579545 MHz rate and is not stopped again unless an extreme temperature change (or
SAM reset) occurs. When stopped, the VDG clock remains stopped for no more than 32 OSCOut cycles (ap-
proximately 2 microseconds.)
In the block diagram in Figure 4, DAO enters a block labeled VDG Timing Error Detector. If DAO rises between
time reference points** "A and "c, then Error is high and VClk is the result of dividing BOSC (Buffered OSCOut
= 14 MHz) by four. However, if DAO rises outside the time Window "A to "c, then Error goes LOW and the VDG
stops. A START pulse at time reference point "B (center of Window) restarts the VDG ... properly synchronized.
*Use a diode with sufficiently low forward voltage drop to meet VIL requirement at VClk
10
4-639
SN74LS783-MC6883
Changing the MPU Rate (by changing SAM control register bits RO, R1).
Two bits in the SAM control register determine the period of both "E" and "0" MPU clocks. Three rate modes
are implemented as follows:
RATE MODE R1 RO
SLOW 0 0 The frequency of "E" (and "0") is f crystal - 1S. This rate mode is automatically selected when
the SAM is reset. Note that system timing is least critical In this "SLOW" rate mode.
A.D. 0 1 The frequency of "E" (and "0") is either f crystal - 16 or f crystal - 8, depending on the address
(Address Dependent) the MPU is presenting.
FAST 1 X The frequency of "E" (and "0") is f crystal - 8. This is accomplished by stealing the time that
is normally used for VDG/REFRESH, and uSing this time for the MPU. Note: Neither VDG display
nor dynamic RAM refresh are available In the "FAST" rate mode. (Both are available In SLOW
and A.D. rate modes).
When changing between any two of the three rate modes, the following procedures must be followed to
ensure that MPU timing specifications are met:
RATE MODE
I SLOW
A.D.
FAST
------------Z--
~m" ~'~" /:
~quen'::f~__
(See Below)
Set RO, then CLEAR R1
S R1
et .
Th;. o;rect ,."" ;
- - ' \ ~t~owed exce£.!...b~: __
hardware reset ....-I
•
·When uSing Memory Map 0, addresses $0000 to $7fFF may access DynamiC RAM
·-The MC6S0S outputs $FFFF on AD-A 15 when no other valid addresses are being presented
11
4-640
SN74LS783-MC6883
Oscillator
In Figure 4, an amplifier between OSCln and OSCOut provides the gain for oscillation (using a crystal as shown
in Figure 9.) Alternately, Pin 5 (OSCln) may be grounded while Pin 6 (OSCOut) may be driven at low-power
Schottky levels as shown in Figure 10. Also, see VIH, VIL on page 2.
AC Specifications"
OseOut Units
Max Typ Min
tDH(Ose) - 30 22 ns
tDLlOse) - 30 22 ns
tevclOse) - 70 62.4 ns
•
Suggested Component Values
Freq.
CV
MHz CV" CF" R1" n;'* E:~* X1
SAM
14.31818
2.5-30
pF
33
pF
1.5
kn - 100K 10K .
.
MC6883
~---------------"6
OseOut ""\ ' 16.0000
2.5-30
pF
33
pF
1.5
kn - 100K 10K
\\
\ \
\ \
\ \
"- AC~'
CO 5.0 pF ± 1.5 pF 6.0 pF ± 1.0 pF \
C1 0.0245 pF ± 15% 0.0319 pF ± 15%
L1 5.05 mH 3.1 mH
Q 50K ± 10K 40K ± 10K
CO
Calibration Tolerance 0002% at 26°C
Temperature Tolerance 0001% oDe to 70 D
e
*Optimum values depend on characteristics of the crystal (X1). For many applications, VClk must be 3.579545 MHz ± 50 Hzl Hence,
08COut must be made similarly "drift resistant" (by balancing temperature coefficients of Xl, CV, CF, Rl, R2 and R31.
**Speclfically cut for MC6883 are International Crystal Manufacturing, Inc. Crystals (#167568 for 14.31818 MHz or #167569 for 16.0 MHz).
However, other crystals may be used
12
4-641
SN74LS783·MC6883
THEORY OF OPERATION
Video or No Video
Although the MC6883 may be used as a dynamic RAM controller without a video display*, most applications
are likely to include a MC6847 video display generator (VDG). Therefore, this document emphasizes MC6883
with MC6847 systems.
•
MPU Address MPU Data MPU Address MPU Data
Window Window
Similarly, the MC6847 (non-interlaced) VDG transfers a data byte in a half machine cycle (E or <1>2). Thus,
when properly positioned, VDG and MPU RAM accesses interleave without contention as shown below:
This Interleaved Direct Memory Access (IDMA) is synchronized via the MC6883 by centering the VDG data
window half-way between MPU data windows.**
The result is a shared RAM system without MPUIVDG RAM access contention, with both MPU and VDG
running uninterrupted at normal operating speed, each transparent to the other.
RAM Refresh
Dynamic RAM refresh is accomplished by accessing eight*** sequential addresses every 64*** microseconds
until 128 consecutive addresses have been accessed. To avoid RAM access contention between REFRESH and
MPU, each of the 128 refresh accesses occupies the "VDG half" of the interleaved DMA (IDMA). Furthermore,
refresh accesses occur only during the television retrace period (at which time the VDG doesn't need to access
RAM).
In summary, the VDG, MPU and MC6883's Refresh Counter all transparently access the common dynamic
RAM without contention or interruption.
Why IDMA?
Use of the interleaved direct memory access results in fast modification to variable portions of display RAM,
by the MPU, without any distracting flashes on the screen (due to RAM access contention.) In addition, the
MPU is not slowed down nor stopped by the MC6883; thereby, assuring accurate software timing loops without
costly additional hardware timers. Furthermore, additional hardware and software to give "access permission"
to the MPU is eliminated since the MPU may access RAM at any time.
* Only 1 pm, (DAO) out of 40 PinS is dedIcated to the video display
** See VDG synchronization (page 10) for more detail.
*** When not uSing a MC6847, HS may be wired low for continuous transparent refresh 13
4-642
SN74LS783-MC6883
MSB
Address:
LSB
FIGURE 13 -
PROGRAMMING GUIDE
SAM - Programmability
The SAM contains a l6-bit control register which allows the MC6809E to program the SAM for the following
options:
VDG Addressing Mode .......... 3-bits
VDG Address Offset ............... 7-bits
32K Page Switch ..................... l-bit
MPU Rate ............................... 2-bits
Memory Size .......................... 2-bits
Map Type ................................ l-bit
Note that when the SAM is reset by first applying power or by manual hardware reset,t all control register
bits are cleared (to a logic "0").
VDG Addressing Mode
Three bits (V2, Vl, VOl control the sequence of DISPLAY ADDRESSES generated by the SAM (which are used
to scan dynamic RAM for video information). For example, if you wish to display Dynamic RAM data as
INTERNAL ALPHANUMERICS VIDEO, you should program; the MC6847 for the INTERNAL ALPHANUMERICS
MODE and CLEAR BITS V2, Vl and VO in the SAM. The table on the following page summarizes the available
modes:
t See Figure 7 for manual reset circuit.
*Typically, part of •PIA (MC6821) at location $FF22 is used to control MC6847 modes. (See MC6847 Data Sheet. I
14
4-643
SN74LS783·MC6883
•
Full Graphics - 6e 1 1 1 0 X 1 1 0
Full Graphics - 6R 1 1 1 1 X 1 1 0
Direct Memory Accesst X X X X X 1 1 1
*58,512, & 824 modes are not descnbed In the MC6847 Data Sheet. See appendix ,A " .
I
Note that the "Starting Address" may be placed anywhere within the 64K address space with a resolution of
'12K (the size of one alphanumeric page).
The F6-FO bits take effect during the TV vertical synchronization pulse (i.e., when FS from MC6847 is low).
Page Switch
One bit (P1) is used "in place of" A 15 from the MC6809E in order to refer access within $OOOO-$7FFF to one
of two 32K byte'pages of RAM. If the system does not use more than 32K bytes of RAM, Pl can be ignored.--
**When using 4K x 1 RAMS, two banks of eight IC's are allowed ThiS accounts for Addresses $OOOO-1FFF. Also, thiS same RAM can be
addressed at $2000·$3FFF, $400Q·$5FFF and $6000·$7FFF
15
4-644
SN74LS783-MC6883
MPU Rate
Two bits (R1, RO) control the clock rate to the MCS809E MPU. The options are:
In the "address dependent rate" mode, accesses to $0000-$7FFF and $FFOO-$FF1 F are slowed to 0.9 MHz
(crystal frequency -;- 16) and all other addresses are accessed at 1.8 MHz (crystal frequency ~ 8.)
Memory Size
Two bits IM1 and MO) determine RAM memory size. The options are:
SIZE M1 MO
•
One or two banks of 4K x 1 dynamic RAMs 0 0
One or two banks of 16K x 1 dynamic RAMs 0 1
One bank of 64K x 1 dynamic RAMs 1 0
Up to 64K static RAM" 1 1
IMPORTANT!
Note: 8e sure to program the SAM for the correct memory size before using RAM (i.e., for a subroutine
stack).
Map Type
One bit lTV) is used to select between two memory map configurations.
Refer to pages 17, 18 and 19 for details. When using Map Type "TV = 1", only the "Slow" MPU rate may
be used. Future versions of the SAM may allow use of all rates.
SAMl 46 ROR A 7 6 5 4 3 2
24 06 BCC SAM2
30
A7
01
80
INX
STA
(LEAX1,X)
O,X·
(I II I
20 02 BRA SAM3
SAM2 A7 81 STA O,X"
SAM3 5A DEC B
26 F2 BNE SAMl
39 RTS
16
4·645
SN74LS783-MC6883
COURSE FINE
MC6809E
MC6809E ___ S _ Address
Vectors, Bits f Definitions
SAM ~ $FFFF ~---
Control,
110
1"- $FFOO
ROM2**
(S=3)
(S
Reserved
- - - - k$COOO for future
MPU
ROM1 •• enhancements.
Do not use!
(S=2)
I - - - - k$AOOO
ROMO"'
(S= 1)
{ Transparent
~ Refresh
I (S
RAM
(S=OifRIW = 1)
(5=7 if RIW = 0)
I
I
I
I
I
I
1
-<$4000
iT
:
1
I
16K (5 1102
I
1
I (S 11O,
,--
I
f-<$1000
1 T
I
:
'--'v-"' ' '--'v-"'
r $0000
IS IIOO(Slowl
Page 1 Page 0
4-646
SN74LS783·MC6883
COURSE FINE
MC6S09E 52,
Me6S09E
.... 8 -+- Address 51, SO Me6809E
Vectors, Bits t Label
SAM ~ J$FFFF
Control, ~ I"\.
110, Boot 1 '$FFOO
ROM
(S =3
If
R/W =0)
(S =0
If
R/W =1) Reserved
~ - -.~j-<$COOO
(S=2 ••• for future
If MPU
enhancements,
R/W =0)
(5 = 0 Do not use!
If
•
R/W ='1)
r-(S~~
=1
-f-< SAQOO
if
R/W =0)
l Transparent
(8 = 0 } Refresh
if
:2
«
a:: r!!/~ =- '!.!/-< $8000
...J
...J
« (8=0
if
R/VV=1)
(5=7
if
R/W=O)
,'-----'-< $0000
I/Ool51ow}
*Note:
M,S ... Most Significant
L,S ... Least Significant ~ : ~~;a~i~it \ IAII bits are cleared when SAM is reset.)
= Device Select value = 4 x 52 +
/
S 2 x 51 + 1 x SO
18
4-647
SN74LS783·MC6883
8=4(82)+2
(81)+80
Address Range 8 Value Intended Use
$FFF2 to FFFF 2 MC6B09E Vectors: Reset, NMI, 8WI, IRO, FIRO, 8W12, 8W13.
FFEO to FFF1 2 Reserved for future MPU enhancements.
FFCO to FFDF 7 8AM Control Register: VO, - V2, FO - F6, P, RO, R1, MO, M1, TY.
FF60 to FFBF 7 Reserved for future control register enhancements.
FF40 to FF5F 6 1102: InputiOutput (PIAs, ACIAs, etc.) To subdivide, use AO-A4.
FF20 to FF3F 5 1101: InputlOutput (PIAs, ACIAs, etc.) To subdivide, use AO - A4.
FFOO to FF1 F 4 1100: InputlOutput (PIAs, ACIAs, etc.) To subdivide, use AO - A4.
COOO to FEFF 3 ROM2: 16K addresses. External cartridge ROM".
AOOO to BFFF 2 ROM1: BK addresses. Internal ROM". Note that MC6S0SE vector addresses select this
ROM".
BOOO to SFFF L ROMO: BK addresses. Internal ROM".
0000 to 7FFF o if R/W = 1 RAM: 32K addresses. RAM shared by MPU and VDG.
7 if Riw =0
• Type # 1:
Address Range
$FFF2 to FFFF
8 Value
2
*Not restricted to ROM. For example, RAM or 1/0 may be used here.
8=4(82)+2
(81)+80
Intended Use
MC6B09E Vectors: Reset, NMI, 8WI, IRO, FIRO, 8W12, 8W13.
FFEO to FFF1 2 Reserved for future MPU enhancements.
FFCO to FFDF 7 8AM Control Register: VO - V2, FO - F6, P, RO, R1, MO, M1, TY.
FF60 to FFBF 7 8mall ROM: Boot load program and initial MC6BOS vecto~s.
FF40 to FF5F 6 1102: Input/Output (PIAs, ACIAs, etc.) To subdivide, use AO·A4.
FF20 to FF3F 5 1/01: InputlOutput (PIAs, ACIAs, etc.) To subdivide, use AO-A4.
FFOO to FF1F 4 1100: Input/Output (PIAs, ACIAs, etc.) To subdivide, use A2-A4.
,0000 to FEFF o if R/W = 1 RAM: 64K( - 256) addresses, shared by MPU and VDG.
(If R/W = 0 then 8 = 3 for $COOO-$FEFF; 8 = 2 for $AOOO-$BFFF; 8 = 1 for
$BOOO-$SFFF and 8 = 7 for $OOOO-$7FFF.)
19
4-648
S N74LS783- M C6883
APPENDIX A
VDG/SAM Video Display System Offers 3 New Modes
by
Paul Fletcher
There are three new modes created when the VDG ience B2 should be made equal to BO and B3 should
and SAM are used together in a video display sys- be made equal to B1. This eliminates a screen place-
tem. These modes offer alphanumeric compatibility ment problem which would cause other codes to
with 8 color low-to-high resolution graphics, change patterns when moved vertically on the
64H*64V, 64H*96V, 64H*192V. The new modes S8, screen. The illuminated boxes can be one of eight
S12, and S24 are created by placing the VDG in the colors which are controlled by B4 - B6 (see Figure
Alpha Internal mode and having the SAM in a 2K, 18), The bytes needed to control all the boxes in the
3K or 6K full color graphics mode. In all modes the 8*12 dot box must be spaced 32 address spaces
VDG's S/1>. and Inv. pins are connected to data bits apart in the display RAM because of the addressing
DD7 and DD6 to allow switching on the fly between scheme orginally used in the VDG and duplicated
Alpha and Semigraphics and between inverted by the SAM. This means to place an alphanumeric
and non-inverted alpha. This method is used in character on the TV screen it requires 4, 6, or 12
most \(DG systems to obtain maximum flexibility. bytes depending on the mode used. These bytes are
The three modes divide the standard 8*12 dot box placed 32 memory locations apart in the display
used by the VDG for the standard alpha and semi- RAM (see Figure 18). This multiple byte format al-
•
graphics modes into eight 4*3 dot boxes for the S8 lows the mixing of character rows of different char-
mode, twelve 4 *2 dot boxes for the S 12 mode, and acters in the same 8*12 dot box creating new char-
twenty-four 4*1 dot boxes for the S24 mode. Figure acters and symbols. It also allows overlining and
17 shows the arrangement ofthese boxes. One byte underlining in eight colors by switching to semi-
is needed to control two horizontally consecutive graphics at the correct time.
boxes. It therefore takes four bytes for the S8, six These new modes optimize the memory versus
bytes for the S12, and 12 bytes for the S24 mode to screen density tradeoffs for RF performance on
control the entire 8*12 dot box. These two horizon- color TVs. This could make them the most versatile
tally consecutive boxes have four combinations of of all the modes depending on the users creativity
luminance controlled by bits BO - B3. For conven- and the software sophistication.
APPENDIX B
Memory Decode for "MAP TYPE = 1"
MPU Vectors and
Boot Load ROM
128 X 8 (or 256 X 8)
EN EN
Vee ~ 16
Gnd ~ 8 +5.0 RIW
V
'1103a) 4
+5.0
Ea
6 (02a) 5 V 1/0 2
-= Ea +5.0
5 (01a) 6 V 1/01
+5.0
V
'4 (OOa) liDo
7
SN74LS156
12
3' (03b) Ne
'~~l
11
52 Eb '2 (02b)
Eb
10
-= 3
T(01b) Ne
51 A1 +5.0 V
So 13
AO o(OOb) 9
RAM READ
20
4-649
SN74LS783-MC6883
~8~ .
A~~ress Byte
1
Scan
$XXOO ($011
Lines
•
• • $XX20 ($011
$01 is the
58 • • VDG "ASCII"
12
• •
I
• • • •• $XX40 ($011 code for 'A',
• •
•
• $XX60 ($011
• Alphanumerrc Compatible
• Scan
lines
512
~8_1
1 12
Left
Red
Blue
Off
Right
Red
Off
Green
..
$XXOO ($BFI
$XX20 ($AAI
$XX40 ($851
I
Orange Orange $XX60 ($FFI
Scan
li nes
1- -1 8
f------+-----l
1 Blue
Black
Black
•
Blue
Black
Black
• • • ••
•
*
$XXOO
$XX20
$XX40
$XX60
$XX80
($AFI
($801
($801 VDG
($141 _Code
($181 for T
•••
~r----ij
$XXAO ($18Ij
$XXCO ($181 VDG
524 • • $XXEO ($181 Code
• • $Xl00 ($181 for X
• Black•
Black
$X120 ($181
$X140 ($801
Green Green $X160 ($8FI
• Underline, Overline
21
4-650
en
FIGURE 18 - 58 DISPLAY FORMAT EXAMPLES
LX C2 Cl CO B3,B1 B2,BO
z
~
Color 4
0 X X X Black 0 0 I o~-I ~J r
en
r-(1~.-j 1 0 0 0 Green
ffi•
l I I
BO
L1 LO a) •• Semi
1 0 0 1 Yellow 0 1 [ Off Color
s:
~
1 0 1 0 Blue
L1 LO (b)
Alpha
1 0 1 1 Red 1 0 I I I
Color Off
S8
L1
L1
LO
LO
J 12
(d)
C)
Extra ASCII Code
1
1
1
1
0
1
0
1
Buff
Cyan
Magenta
Orange
1 1 , - - color
en Memory Map
(a)1 $0000
(a)2
(a)3
1st row of 4 x 3
~ _I (a)4
I~
(11 Column 32 Columns dot boxes
m
+
(a)5
c.n of 58 Blocks 32
.....
.. ,~"..
(a§ I
::)1111111111111
"1"1
1 (a)32
(b)1
(b)2
(b)3
$0020
+
16 Rows (c)5
Semi = 64 x 64 of 58 Blocks
Alpha = 32 Char. H. x 16 Rows V
(c 32
(d)1 $0060
(d)2
(d)3
4th row of 4 x
(d)4
dot boxes
(d)5
d 32
$0080
I:l
•
SN74LS783·MC6883
) ENDC
r-- ~ .--- ~
I
A15
Al'
A13
A12 21 21
S S
A11 18 18
S A11
19 19
~- Al0 Al0
A9 12 22
AS 23 23
A7 1 1
A6 2 2
A5 3 3
A2 6 6
I Al
AD
RiN
RSl
RSO
CS2
35
36
~I/Oo
21
RSO
CS2
RSl
35
36
~IIOl
21
7
S~ROM2
7
E~·ROM' E
EXPANSION BA
CONNECTOR
"5
BUSY
lIC
...l> '"
0 '"03: '"03:
TSC
~ s:
3: 3: 3: 3: ;;::
n n n n n
) E
en
~
25 (II
co 25 3: ...
3: 3:
...'"l> '"'"l>w
Q ~ co 1 ~
~ '"
II:!
'"'"
FIRQ
IRQ 38,37 38,37
IRQA,B iRQA,B
HALT
NMI
RESET 3' 34
~+12V
+5V 20 20 2. 2.
GND 1 1 12 12
~ -12 V
D7 26 26 17 17
07 D7 07 D7 D7
D6 27 27 16 16
D5 28 15 15
D4
2"
29 29 ,. ,.
03 30 30 13 13
D2 31 31 11 11
Dl 32 32 10 10
DO 33 33 9 9
DO DO DO DO DO
DSPB
'-- '--
64 KEY
ca- .I
l17116115114113\121"1'°\
PB- PA- CB- CA- KEYBOARD PB- PA-
, , ~
CA-
~
~ CONNECTS ~
7 6 5
•
3 2 1 0 7 6 5 • 3 2 1 0 2 1 2 1 HERE 7 6 5 4 3 2 1 0 2 1 2 II
91 81 71 61 51 41 31 2 1 191'813"!,°1 ::.--J 1711611511411311211111°1 91 81 71 61 51 41 31 'I '"1'61 39
1 401
MC6847 Mode Control & MIse 110 connects here
23
4-652
SN74LS783-MC6883
+
~l
r--- Vee
12-NC
23 36 A15 .JV
A'5 _ 9 -
22 Vee 6 ";'-10,
A" :r1 At.
2'
A'3 38 A13 5~-'Ol v~
2.
A12
21
18 19
A12 39 A12
S,~ A2'"
.- ~,-
10.
All
19 ,. All 1 A11
~3
12. RoM, .... ~
A'.
22 '7 A9
A'. 2 AtO
3AS
SI~ A' _ , ~ROMl
Iii _ To
Chip
23 16
AS • AS S.~ AQ"-
1
w
~ROM'!J
Selects
<,.A..!.!;.
1 15 24 A7
A7
2 23 1i~
3
"'3 A6
22
AS
Vee- 16
AS A5 2.
Gnd-8 CHB -4
• 12
A4
21
Gnd
"+
,.
A4 EN EN
5 11 '9 A3
A3 5 •
•
6 lB
A2 A2 ~
7 9 17
~
A' AI
6 15 k
8 8
AD
16
AD s:
~ROMO s:
OSCQUI
50 pF ~ c6- 1431818
iC
~
32
Riii
15
OSCIn
5 -'T MHZ
37
;;OS
f9-35 pF
FS
8
BA
TO PIA
5
BS
33 H5 9 t38H5
BUSY
38 OA.f.'8'-_ _ _ _ _ _ _+_---=24
2 DAD
s:
39
Lie
TSC"G
• C VClk f.'7'---_ _ _----._ _ _ +_---=3~3 elk g~
s:
34
35
E
a Ii
m
i 1--__----""-1
13
r-----'-j0
4 E
;...
4_
FIRQ
3
iRO eAS
40 Z7 Z6 Z5 Z4 Z3 Z2 Zl ZO RASO WE
HALT
2 35 34 33 32 3~ 30 29 28 12 11 10
NMI
I
. . 37
RESET
24
~ ~
~
~
~
~f 7
~Inv
,
12
Vee
Gnd
----0+5 V
~
. As AS A4 A3 A2 At AO
RAM', MCM4116A
RAS CAS WE
r--=19
E2~
I ~
elk r AS
f'--+-~I,",
J
17 2.
07
2 07 3 E117 07 14 3 0 0 2 0 007
"-"1.
'8 26 2 06 5 15 06 14
• 5
P--+--4' ~
..
OB 006 "G
'"...Z '" p-_ _ _,8 DDS GM2~
•
as '4
ii:!
'5 28 2 05 7 13 7
os
7 004 GMl ~
14 27
D4
2 D4 9
Iiit 11 A. I. 8 9
P-----'-t
13 28 2 03 12 8 03 13 12 6 003 GM. ~
OJ
,. " ,. ,.
f'-O-----"1
I.
11 29
30
3'
02
01
2 02
2 0'
2DO
"
16
18
Vcc=zo 6
Gnd=10 4
2
02
01 ,.
co ,.
17 Gnd
18 0
Vee- 20
1-"'-----'1
I. f.!"-_
18
5 002
_ _-"1
o p19 _ _ _,3 DO.
ess
4 DOl EXT ~
~
DO --<I-
fl
'------- 1 ClEAR
VOO Vee VSS VBB
L!!!o Gnd
'5~
'---
f1~r
11
-;-4X01 ... F
24
*Thls pin number on 8 different RAM chips IS connected to thiS point
4·653
SN74LS783-MC6883
Vee
TYPICAL INPUT
Vee
= =
25
4-654
® MOTOROLA
MC6889
MC8T28
This device may be ordered under
either of the above type numbers.
NON·INVERTING
QUAD THREE·STATE BUS TRANSCEIVER
This quad three-state bus transceiver features both excellent MOS NON·INVERTING
or MPU compatibility, due to its high impedance PNP transistor BUS TRANSCEIVER
Input, and high-speed operation made possible by the use of Schottky
diode clamping. Both the -48 mA driver and -20 mA receiver outputs MONOLITHIC SCHOTTKY
are short-circuit protected and employ three-state enabling inputs. INTEGRATED CIRCUITS
The device IS useful as a bus extender in systems employing the
M6800 family or other comparable MPU devices. The maximum
Input current of 200 J1A at any of the device input pins assures
proper operation despite the limited drive capability of the MPU
chip. The Inputs are also protected with Schottky-barrier diode
clamps to suppress excessive undershoot voltages.
Propagation delay times for the driver portion are 17 ns maximum
while the receiver portion runs 17 ns. The MC8T28 is identical to
the N E8T2B and it operates from a single +5 V supply.
L SUFFIX
•
• High Impedance Inputs CERAMIC PACKAGE
• Single Power Supply CASE 620
_ I
• High Speed Schottky Technology 16 ,
1
• Three-State Drivers and Receivers
P SUFFIX
• Compatible with M6800 Family Microprocessor
PLASTIC PACKAGE
• Non-Inverting CASE 648
Receiver
Enable
Vec
Input
R eee Iver Driver
,
Output 2 Enable
Input
Receiver
Output
4
Bus 4
Receiver Driver
Output 5 Input
2 4
Receiver
Bus 2 Output
3
Driver
Input 7 Bus 3
2
Gnd
ORDERING INFORMATION
Temperature
Device Alternate Rlngl Plckagl
MC6889L MC8T28L 0 to +7SoC Ceramic DIP
MC6889P MC8T28P 0 to +75 C PI.'tlc DIP
4-655
MC68891 MC8T28
ELECTRICAL CHARACTERISTICS 14.75 V" VCC" 5.25 V and OoC" TA" 75°C unl ... otherwise noted.)
Characteristic Symbol Min Typ Max Unit
Input Current - Low LogiC State
I Aecelver Enable Input, VllIAE) = 04 V) IlllREI - - -200 IJA
I Dnver Enable Input, VlllDEI = 0.4 VI IIUDEI - - -200
IDnver Input, VlllDI = 04 VI IlllDI - -200
IBus I Aecelverl Input, VILIBI = 0.4 VI IIUBI - - -200
Input Disabled Current - Low LogiC State
IlllDI DIS
I
IDriver Input, VI liD) =0.4 V) - - -25 itA
Input Current-High LogiC State
IAecelver Enable Input, VIHIAEI = 525 VI IIHIREI - - 25 IJA
IDnver Enable Input. VI HIDEI = 5 25 VI IIHIDEI - - 25
IDnver Input, VI HIDI = 525 VI IIHIDI - - 25
Input Voltage - Low logiC State
f~ Ernibiel npud VlllREI - - 085 V
(Driver Enable Input VIUDEI - - 085
(Driver Input) VIL(DI - - 085
(ReceIVer Input) VI liB) - - 0.85
I nput Voltage - High LogiC State
(Receiver Enable Input) VIHlREI 20 - - V
(Dnver Enable Input) VIHIDEI 20 - -
(Driver Input) VIHIDI 20 - -
IRecelver Input! VIHIBI 2.0 - -
Output Voltage - Low LogIC State
IBus Driver) Output, 10l1B) = 48 rnA) VOllBI - - 05 V
IRecelver Output, 10l1A) = 20 rnA) VOllAI - - 0.5
Output Voltage - High logiC State
IBus IDnver) Output, 10HIB) = -10 mAl VOHIBI 2.4 31 - V
IAeceiver Output, 10HIRI = -2.0 mAl VOHIAI 2.4 3.1 -
IAecelver Output, 10HIRI = -10ofIJA, VCC = 5.0 VI 3.5 - -
Output Disabled Leakage Current - High LogiC State
IBus Driver) Output, VOHIB) = 2.4 VI 10HUBI - - 100 IJA
IRecelver Output, VOHIR) = 2.4 V) 10HliAI - - 100
Output Disabled Leakage Current - low logiC State
IBus Output, VOlIB) = 0.5 VI 10ll1B) - - -100 IJA
IRecelver Output, VOlIR) = 0.5 V) 10ll1R) - - -100
Input Clamp Voltage
IDriver Enable Input IIDIDE) = -12 rnA) VICIDEI - - -10 V
IRecelver Eneble Input IICIRE) = +12 rnA) VICIAEI - - -10
IDriver Input IICID) = -12 rnA) VICIDI - - -10
Output Short·Corcull Current, VCC = 525 V III
I Bus I DrIVer) Output! 10SIBI -50 - -150 rnA
I Aeceiver Output! 10SIAI -30 - -75
Power Supply Current ICC - - 110 mA
IVCC = 5.25 V)
(1) Only one output may be .hort-clrculted .t a lime.
4·656
MC68891 MC8T28
o v--------11'o='------='-'r1
ir.--
Input Pulse Frequency = 10 MHz
tPHUR)----..j Duty Cycle = 50%
VOH
Output 15 V "-
VOL-----------,--------------__- - J
26V
To Scope ~r To Scope
(I nput} ~ ( In{'Jut)
Input T
92
Receiver 1N916
Output or Equlv.
Driver
Input
Pulse 51 1.3 k 30 pF
Driver
Generator
Enable
Input
4-657
MC68891 MC8T28
FIGURE 2 - TEST CIRCUIT AND WAVEFORMS FOR PROPAGATION DELAY TIME FROM
DRIVER INPUT TO BUS (DRIVER) OUTPUT, tpLH(D) AND tpHL(D)
tTHL ~ 5.0 ns
26V---:="'\I
Input
OV-----
Input Pulse Frequencv = 10 MHz
tpHL!D) Duty Cycle = 50%
VOH-----~
Output
VOL - - - - - - ' - - - - - - - - '
26 V 26V
To Scope Orlver To Scope
( Input) (Output)
Enable
Input
Driver 30
Driver (Bus) lN9.6
Input Output or EqUlv.
I 51
Receiver
Output
~
Enable
Input
260 300 pF
FIGURE 3 - TEST CIRCUIT AND WAVEFORMS FOR PROPAGATION DELAY TIME FROM
RECEIVER ENABLE INPUT TO RECEIVER OUTPUT, tPLZ(RE) AND tpZL(RE)
Input
Output
26 V
~3 5 V
----+-J:=-----=,.,...,L
oV----",
tpLZ(REI
-----+-____ ....- - - - - - .
VOL-----"
r-
15 V
tPZL(REI
Input Pulse Frequency = 5 0 MHz
Duty Cycle = 50%
To Scope OV 50 V
To Scope
(Input)
(Output)
24k 240
Receiver
Output
Pulse 51
Generator
lN9.S
SOk 30 pF or Equiv.
4-658
MC68891 MC8T28
FIGURE 4 - TEST CIRCUIT AND WAVEFORMS FOR PROPAGATION DELAY TIMES FROM
DRIVER ENABLE INPUT TO DRIVER IBUS) OUTPUT, tPLZIDE) AND tPZLIDE)
tTHL~50ns
26 V ---+-j,,=,,-------,t
Input
011 _ _ _.71 Input Pulse Frequency - 50 MHz
Duty Cycle = 50%
tpZLiDE)
~35V---~
Output
VOL------,----------~
OV
I
50 V
To Scope
To Scope Driver Enable (Output)
(I npu.~''-I--4----+---'n.(p,...u_'__--------1
24 k 70
Driver
Input
Driver (Bus)
Pulse .I1.. 51 Receiver Output
Generator Output
lN916
50 k 300 pF or EqU1V
~
Enabi8
Input
Receiver
Outputs Receiver
Outputs
Driver Driver
Inputs Inputs
To Other
Drivers/Receivers
Driver Receiver
Enable Enable
4·659
MC68891 MC8T28
P SUFFIX
PLASTIC PACKAGE
CASE 648-05
L SUFFIX
CERAMIC PACKAGE
CASE 620-02
OPTIONAL LEAD
\ CONFIG. (1,8,9,& 16)
~_ _ _ _ _ _ _---.~TE 5 r, L ~
-"'"-JCo ~.~ 11
PLANE
•
NOTES NOTES
1 LEADS WITHIN 0 13 mm (0 005) RADIUS
1. LEADS WITHIN 0.13 mm 3. DIMENSION "8" DOES NOT
OF TRUE POSITION AT SEATING PLANE
(0.005) RADIUS OF TRUE INCLUDE MOLD FLASH.
AT MAXIMUM MATERIAL CONDITION
POSITION AT SEATING 4. "F" DIMENSION IS FOR FULL
PKG INDEX NOTCH IN LEAD
PLANE AT MAXIMUM LEADS. "HALF" LEADS ARE
NOTCH IN CERAMIC OR INK DOT
MATERIAL CONDITION. OPTIONAL AT LEAD POSITIONS
DIM "L" TO CENTER OF LEADS
WHEN FORMED PARALLEL 2. DIMENSION "L" TO 1,8,S,and 16)
CENTER OF LEADS 5. ROUNDED CORNERS OPTIONAL.
WHEN FORMED
PARALLEL.
MILLIMETERS
DIM MIN MAX
MILLIMETERS
1905 1981 DIM MIN MAX
G22 698
A 18.80 21.34
406 508
038 051
B 6.10 6.60
4.06 5.08
140 1 65
254 8SC 0 0.38 0.53
051 1 14 F 1.02 1.78
J 020 G30 G 254 BSC
K 318 4 06 H 0.38 2.41
L 737 787 J 0.20 .38
M 15' 3.43
N 051 101 0020 L 7.628SC
M 0 10'
CASE 620-02 N 051 1.02
THERMAL INFORMATION
The maximum power consumption an Integrated ClfCUlt the sum of the products of the supplv voltages and supply
can tolerate at a given operating ambient temperature, can currents at the worst case operating condition
be found from the equation
T J(max) = MaXimum Operating Junction Temperature
TJ(max) -TA
as listed In the MaXimum Ratings Section
PD(T A) = ROJAITyp)
T A = MaXimum DeSIred Operating Ambient
Where PD(T A) = Power DISSipation allowable at a given Temperature
ROJA(Typ) = TYPical Thermal ReSistance Junction to
operating ambient temperature ThiS must be greater than
Ambient
4-660
MC68000L4
® MOTOROLA
(4 MHz)
MC68000L6
(6 MHz)
MC68000LS
Advance InforIDation (8 MHz)
MC68000L10
16-BIT MICROPROCESSING UNIT (10 MHz)
Advances In semiconductor technology have provided the capability
to place on a single Silicon chip a microprocessor at least an order of
magnitude higher In performance and CircUit complexity than has been HMPS
previously available The MC68000 IS the first of a family of such VLSI (HIGH-DENSITY, N-CHANNEL,
microprocessors from Motorola It combines state-of-the-art SILICON-GATE DEPLETION LOADI
technology and advanced circuit design techniques with computer
sCiences to achieve an' architecturally advanced 16-blt microprocessor. 16-BIT
The resources available to the MC68000 user consist of the follOWing. MICROPROCESSOR
• 32-81t Data and Address Registers
• 16 Megabyte Direct AddresSing Range
• 56 Powerful Instruction Types
• Operations on Five Main Data Types
• Memory Mapped 1/0
• 14 AddreSSing Modes L SUFFIX
As shown In the programming model, the MC68000 offers seventeen CERAMIC PACKAGE
II
32-blt registers In addition to the 32-blt program counter and a 16-bit CASE 746
status register The first eight registers (00-07) are used as data
registers for byte (S-blt) , word (l6-blt), and long word (32-bit) data
PIN ASSIGNMENT
operations The second set of seven registers (AO-A6) and the system
stack pOinter may be used as software stack pOinters and base address
registers In addition, these registers may be used for word and long
word address operations All seventeen registers may be used as Index
registers
PROGRAMMING MODEL
31 1615 87 o
- I I - 01
DO
- I I -
- I I - 02 Eight
- I I 03
- 04 Data
l- I I - 05 Registers A22
l- I I - 06 A21
l- I I - Vee
I 07
A20
31 1615 0 A19
l- I - AO A18
l- I - AlA2 A17
t-
t-
- A3
- A4
Seven
Address
A16
A15
Registers
:-. - A5 A14
..... - A6 A13
A12
r ----
L
-U~ Sta"cl;
_______________
Pollu;'r- - -
SupervISor Stack POinter
--~
~
Two Stack
A7 POinters
~ 0
Program
I I Counter
15 ~7 0
ISystem Bvt8 User Byte I Status
Register
4-661
MC68000L4·MC68000L6·MC68000L8·MC68000L 10
MAXIMUM RATINGS
Rating Symbol Value Un~ This device contains circuitry to protect the
Supply Voltage -0:510 +70 Inputs agamst damage due to high static
Vee V
voltages or electnc fields, however, It IS advIs-
Input Voltage V in -03 to + 70 V ed that normal precautions be taken to avoid
Operating Temperature Range TA o to 70 'e application of any voltage higher than
Storage Temperature Tstg -55tol50 'e maximum-rated voltages to this hlgh-
Impedance CirCUit Rehability af operation IS
enhanced If unused Inputs are tied to an ap-
THERMAL CHARACTERISTICS propriate logic voltage level Ie 9 , either VSS
Characteristic or VCC
Thermal Resistance
Ceramic Package
POWER CONSIDERATIONS
•
T J = TA + IPDoOJAI (1)
Where
T A'" Ambient Temperat,;re, °c
OJA'" Package Thermal Resistance, Junctlon-to-Amblent, °C/W
PD'" PINT + PliO
PINT'" ICC x VCC, \II/atts - Chip Internal Power
PI/o",Power DIssipation on Input and Output Pins - User Determined
For most applicatlors PliO"" PINT and can be neglected
4-662
MC68000L4-MC68000L6-MC68000L8-MC68000L10
FIGURE 1 - RESET TEST LOAD FIGURE 2 - HALT TEST LOAD FIGURE 3 - TEST LOADS
+5V
1.. .
RO=7400
To."
Test
~I 130pF
~I 70PF
CL=130 pF
MMD7000
or Equivalent
Characteristic Symbol
4 MHz 6 MHz 8MHz 10 MHz
MC68000L4 MC68000L6 MC68000L8 MC68000L10 Unit
Min Max Min Max Min Max Min Max
II
Frequency of Operation F 2.0 40 20 6.0 20 80 20 10.0 MHz
Cycle Time tcvc 250 500 167 500 125 500 100 500 ns
tCL 115 250 75 250 55 250 45 250
Clock Pulse Width ns
tCH 115 250 75 250 55 250 45 250
tCr 10 10 10 10
Rise and Fall Times ns
tCf - 10 - 10 10 - 10
~-------tcyc------i~
tCH
4-663
MC68000L4· MC68000L6· MC68000L8· MC68000L10
AC ELECTRICAL SPECIFICATIONSIVCC= 50 Vdc ± 5% VSS = 0 Vdc T A = O'C to 70'C See Figures 5 and 61
4 MHz 6 MHz 8 MHz 10 MHz
Number Characteristic Symbol MCtBJOL4 MCtBJOL6 MCtBJOL8 MCtBJOL10 Unit
Min Max Min Max Min Max Min Max
1 Clock Period tcyc 250 500 167 500 125 500 100 500 ns
2 Clock Width Low tCL 115 250 75 250 55 250 45 250 ns
3 Clock Width High tCH 115 250 75 250 55 250 45 250 ns
4 Clock Fall Time tCf - 10 - 10 - 10 - 10 ns
5 Clock Rise Time tCr - 10 - 10 - 10 - 10 ns
6 Clock Low to Address tCLAV - 90 - 80 - 70 - 55 ns
6A Clock High to FC Valid tCHFCV - 90 - 80 - 70 - 80 ns
Clock High to Address Data High Impedance
7 tCHAlx - 120 - 100 - 80 - 70 ns
(Maximum)
8 Clock High to Address/ FC Invalid IMlnlmuml tCHAln 0 - 0 - 0 - 0 - ns
91 Clock High to AS, DS Low IMaxlmuml tCHSLx - 80 - 70 - 80 - 56 ns
10 Clock High to AS, DS Low IM,nlmuml tCHSLn 0 - 0 - 0 - 0 - ns
112 Address to AS, DS IReadl Low/AS Write tAVSL 55 - 35 - 30 - 20 -- ns
11A2 FC Valid to AS, DS, IReadl Low/ AS Write tFCVSL 80 - 70 - 60 - 50 - ns
121 Clock Low to AS, DS High tCLSH - 90 - 80 - 70 - 55 ns
132 AS, DS High to Address/FC Invalid tSHAZ 80 - 40 - 30 - 20 - ns
142,5 AS, DS Width Low IReadl/AS Write tSL 535 - 337 - 240 - 195 - ns
14A2 DS Width Low IWrltel - 285 - 170 - 115 - 95 - ns
152 - 180 - -
I
AS, DS Width High tSH 285 150 - 105 ns
16 Clock High 10 AS, DS High Impedance tCHSZ - 120 - 100 - 80 - 70 ns
172 AS, DS High to R/W High tSHRH 80 - 50 - 40 - 20 - ns
181 Clock High to R/W High IMaxlmuml tCHRHx - 90 - 80 - 70 - 80 ns
19 Clock High to R/W High IM,nlmuml tCHRHn 0 - 0 - 0 - 0 - ns
20 1 Clock High to R/W Low tCHRL - 90 - 80 - 70 - 60 ns
212 Address Valid to R/W Low tAVRL 45 - 25 - 20 - 0 - ns
21A2 FC Valid to R/W Low tFCVRL 80 - 70 - 80 - 50 - ns
222 R/W Low to DS Low IWrltel tRLSL 200 - 140 - 80 - 50 - ns
23 Clock Low to Data Out Valid tCLDO - 90 - 80 - 70 - 55 ns
252 DS High to Data Out Invalid tSHDO 80 - 40 - 30 - 20 - ns
262 Data Out Valid to DS Low IWrltel tDOSL 55 - 35 - 30 - 20 - ns
27 6 Data In to Clock Low I Setup T,mel tDICL 30 - 25 - 15 - 15 - ns
282 AS, DS High to DTACK High tSHDAH 0 240 0 180 0 120 0 90 ns
29 DS High to Data Invalid IHoid T,mel tSHDI 0 - 0 - 0 - 0 - ns
30 AS, DS High to BERR High tSHBEH 0 - 0 - 0 - 0 - ns
31 2,6 DTACK Low to Data In ISetup T,mel tDALDI - 180 - 120 - 90 - 65 ns
32 HALT and RESET Input TranSition Time tRHrf 0 200 0 200 0 200 0 200 ns
33 Clock High to BG Low tCHGL - 90 - 80 - 70 - 60 ns
34 Clock High to BG High tCHGH - 90 - 80 - 70 - 60 ns
35 BR Low to BG Low tBRLGL 15 30 15 30 15 30 15 30 Clk Per
36 BR High to BG High tBRHGH 15 30 15 30 15 30 15 30 Clk Per
37 BGACK Low to BG High tGALGH 15 30 15 30 15 30 15 30 Clk Per
36 BG Low to Bus High Impedance IW,th AS Hlghl tGLl - 120 - 100 - 80 - 70 ns
39 BG Width High tGH 15 - 15 - 15 - 15 - Clk Per
46 BGACK Width tBGL 15 - 15 - 15 - 15 - Clk Per
476 Asynchronous Input Setup Time tASI 30 - 25 - 20 - 20 - ns
48 BERR Low to DTACK Low INote 31 tBELDAL 50 - 50 - 50 - 50 - ns
53 Data Hold from Clock High tCHDO 0 - 0 - 0 - 0 - ns
55 R/W to Data Bus Impedance Change tRLDO 55 - 35 - 30 - 20 - ns
56 Halt/ RESET Pulse Width INote 41 tHRPW 10 - 10 - 10 - 10 - Clk Per
NOTES
1 For a loading capacitance of less than or equal to 500 picofarads, subtract 5 nanoseconds from the values given In these columns
2 Actual value depends on clock penod
3 If #47 IS satisfied for both Di'ACK and BERR, #48 may be 0 ns
4 After VCC has been applied for 100 ms
5 For T6E, BF4, and R9M mask sets #14 and #14A are one clock period less than the given number
6 If the asynchronous setup time (#47) requirements are satisfied, the DTACK low-ta-data setup time (#31) requirement can be Ignored The
data must only satisfy the data-In to clock-low setup time (#27) for the following cycle
4-664
MC68000L4- MC68000L6- MC68000LS- MC68000L 10
51 52 53 54 55 56 57
AS HH--H--+-iI4l-------114~---_W.U,..-::"-----
--+./~-t---'
R/W
FCO-FC2
Asynchronous
Inputs
INote 11
--------~~.~~-+-+------~------+_H_--------
•
BERR/BR - - - - - - - - - - - - - - - - ,
INote 21
Data In - - - - - - - - - - - - - -
NOTE5
1 Setup time for the asynchronous mputs BGACK, IPLO-IPL2, and VPA guarantees their recognition at the next falling edge of the clock
2 "BR need fall at this time only In order to Insure being recognized at the end of this bus cycle
3 Timing measurements are referenced to and from a low voltage of 0 8 volts and a high voltage of 2 0 volts, unless otherwise noted
4-665
MC68000L4e MC68000LSe MC68000L8e MC68000L 10
so Sl S2 S3 S4 S5 S6 S7 so
ClK
-=
r-,t'~
~~6 ~ ~ n-r
A1-A23 ~ f-_ ~@ J
-1+ ~® -;.. ~ 14
1- ~-®
r+- I--@)
-
-
@-;.. r- f- Cc
J
~p- ~ ~ {V
J
I'-
- ~ f'L ®
@
"
I
I+@~ ~ +-@-
1- ~@ f-- t-@
R/IN
~ ~8- ~- f----- @
Data Out
FCO-FC2
@ f--
P -- ~@
Asynchronous
Inputs
)
®-~
f--1r-=:-;..~ ~ @
I-@ ®--
~-- f-@-
"!.- J
~ t-@ --@--------
Ie""-
1'5 J
@ f---
NOTE TIming measurements are referenced to and from a low voltage of 08 volts and a high voltage of 2 a volts, unless otherwise noted
4-666
MC68000L4-MC68000LS-MC68000L8-MC68000L 10
AC ELECTRICAL SPECIFICATIONS - BUS ARBITRATIONIVCC=5 0 Vdc ±5% vSS=O Vdc TA=OoC to 70°C See Figure 7)
4 MHz 6MHz 8MHz 10 MHz
Number Charactenstlc Symbol MC68000L4 MC68000LB MC68000LB MC68000Ll0 Unit
Min Max Min Max Min Max Min Max
33 Clock High to BG Low tCHGL - 90 - SO - 70 - 60 ns
34 Clock High to BG High tCHGH - 90 - SO - 70 - 60 ns
35 BR Low to BG Low tBRLGL 15 35 15 35 15 35 15 35 Clk Per
36 BR Hloh to BG Hloh tRR>-I(;1 15 30 15 30 15 30 15 30 Clk Per
37 BGACK Low to BG High tGALGH 15 30 15 30 15 30 15 30 Clk Per
36 BG Low to Bus High Impedance Iwlth AS High) tGLZ - 120 - 100 - SO - 70 ns
39 BG Width High tGH 15 - 15 - 15 - 15 - Clk Per
46 BGACK Width tBGL 15 - 15 - 15 - 15 - Clk Per
These waveforms should only be referenced in regard to the edge-to-edge measurement of the timing specifications. They are not
intended as a functional description of the input and output signals. Refer to other functional descriptions and their related
diagrams for device operation.
II
Strobes
and R/IN - - - - - - - - - - '
'-----II@
--~----------------~
CLK
NOTES
Setup time for the asynchronous Inputs BERR. EiGACi(:, SR, DTACK, IPLO-IPL2, and VPA guarantees their recognitIOn at the next falling
edge of the ciock
2 Waveform measurements for all Inputs and outputs are specified at logic hlgh=2 0 volts, logic 10w=O 8 volts
4-667
MC68000L4. MC68000L6. MC68000LS· MC68000L 10
SIGNAL DESCRIPTION
The following paragraphs contain a brief description of the Upper And Lower Data Strobes IUDS, LOS). These
Input and output signals A discussion of bus operation dur- Signals control the data on the data bus, as shown In Table
Ing the various machine cycles and operations IS also given 1 When the RiVii line IS high, the processor Will read from
the data bus as Indicated When the R/Vil line IS low, the
SIGNAL DESCRIPTION processor Will write to the data bus as shown
The input and output signals can be functionally organized
Into the groups shown In Figure 8. The following paragraphs TA8LE 1 - DATA STROBE CONTROL OF DATA BUS
provide a brief description of the signals and also a reference
(,f applicable) to other paragraphs that contain more detail ODS LOS R/W 08-015 00-07
about the function being performed. High High - No valid data No valid data
Valid data bits Valid data bits
Low Low High
FIGURE 8 - INPUT AND OUTPUT SIGNALS 8-15 0-7
Valid data bits
High Low High No va)ld data
Vc(2) Address 0-7
GNO(2) Bus A1-A23
Valid data bits
ClK Low High High No valid data
8-15
DO-015
Valid data bits Valid data bits
Low Low Low
8-15 0-7
O~"'
II
Valid data bits Valid data bits
High Low Low
FCO },",,,"
Bus
0-7* 0-7
processor{ FC1 Valid data bits Valid data bits
Status
Control Low High Low
FC2 8-15 8-15*
*These conditions are a result of current Implementation and may
M6S0D { }BUS Arbitration not appear on future deVices
Perrpheral
Control
Control
syste~{
Control
},nterrupt
Control
Data Transfer Acknowledge (DTACK). ThiS Input In-
dicates that the data transfer IS completed When the pro-
cessor recognizes DTACK dUring a read cycle, data IS
latched and the bus cycle terminated When DT ACK IS
recognized dUring a write cycle, the bus cycle IS terminated
An active transition of data transfer acknowledge,
ADDRESS BUS IAl THROUGH A23). This 23-blt,
DTACK, indicates the termination of a data transfer on the
unidirectional, three-state bus IS capable of addressing 8
bus
megawords of data. It provides the address for bus operation
If the system must run at a maximum rate determined by
dUring all cycles except Interrupt cycles DUring Interrupt
RAM access times, the relationship between the times at
cycles, address lines A 1, A2, and A3 provide Information
which DT ACK and DATA are sampled are Important
about what level Interrupt IS being serviced while address
All control and data lines are sampled dUring the
lines A4 through A23 are all set to a logic high
MC68000's clock high time The clock IS Internally buffered,
which results In some slight differences In the sampling and
DATA BUS 100 THROUGH 015), ThiS 16-blt, bidirec-
recognition of variOus Signals. MC68000 mask sets prior to
tIOnal, three-state bus is the general purpose data path It
CCl IR9M and T6E), allowed DTACK to be recognized as
can transfer and accept data In either word or byte length
early as S2 Ibus state 2), and all deVices allow BERR or
DUring an Interrupt acknowledge cycle, an external deVice
DT ACK to be recognized In S4, S6, etc, which terminates
supplies the vector number on data lines 00-07.
the cycle The DT ACK signal, like other control Signals, IS In-
ternally synchronized to allow for valid operation In an asyn-
ASYNCHRONOUS BUS CONTROL. Asynchronous data
chronous system. If the reqUired setup time (#47) IS met dur-
transfers are handled uSing the following control signals' ad-
Ing S4, DTACK Will be recognized dUring S5 and S6, and
dress strobe, read/write, upper and lower data strobes, and
data Will be captured dUring S6 The data must meet the re-
data transfer acknowledge These signals are explained in
qUired setup time 1#27).
the following paragraphs.
If an asynchronous control Signal does not meet the re-
qUired setup time, It IS pOSSible that It may not be recognized
Address Strobe lAS). ThiS Signal ,ndicates that there IS a dUring that cycle. Because of thiS, asynchronous systems
valid address on the address bus_
must not allow DT ACK to precede data by more than
parameter #31
Read/Write (R/W). ThiS Signal defines the data bus Asserting DTACK (or BERR) on the rising edge of a clock
transfer as a read or write cycle. The R/W Signal also works
(such as S4) after the assertion of address strobe Will allow a
in conjunction with the upper and lower data strobes as ex-
MC68000 system to run at ItS maximum bus rate If setup
plained in the following paragraph.
times #27 and #47 are guaranteed, #31 may be Ignored.
4-668
MC68000L4-MC68000L6-MC68000LS-MC68000L 10
BUS ARBITRATION CONTROL. These three signals form Halt (HALT). When thiS bidirectional line IS driven by an
a bus arbitration CirCUit to determine which device will be the external device, It will cause the processor to stop at the
bus master device completion of the current bus cycle. When the processor has
been halted uSing thiS Input, all control signals are inactive
Bus Request (BR). This Input IS wire ORed With all other and all three-state lines are put In their high-Impedance state
devices that could be bus masters This Input ,nd,cates to the Refer to BUS ERROR AND HALT OPERATION paragraph
processor that some other device desires to become the bus for additional information about the interaction between the
master halt and bus error signals
When the processor has stopped executing instructions,
Bus Grant (BG). This output ,nd,cates to all other potential such as In a double bus fault condition, the halt line IS driven
bus master devices that the processor will release bus con- by the processor to Indicate to external devices that the pro-
trol at the end of the current bus cycle cessor has stopped
Bus Grant Acknowledge (BGACK). This Input Indicates M6800 PERIPHERAL CONTROL. These control signals are
that some other device has become the bus master This used to allow the interfaCing of synchronous M6800
signal cannot be asserted until the following four conditions peripheral devices With the asynchronous MC68000 These
are met Signals are explained In the follOWing paragraphs
I a Bus Grant has been received
2. Address Strobe IS inactive which indicates that the Enable (E). ThiS Signal IS the standard enable Signal com-
microprocessor IS not uSing the bus mon to all M6800 type peripheral devices The period for thiS
output IS ten MC68000 clock periods (SIX clocks low, four
Data Transfer Acknowledge IS inactive which in-
clocks high!
•
dicates that neither memory nor peripherals are uSing
the bus
Valid Peripheral Address (VPA). ThiS Input indicates that
4 Bus Grant Acknowledge IS inactive which indicates the device or region addressed IS a M6800 family device and
that no other device IS stili claiming bus mastership that data transfer should be synchronized With the enable (E!
signal ThiS Input also indicates that the processor should
INTERRUPT CONTROL (lPLO, IPL1, IPl2). These Input use automatic vectoring for an Interrupt Refer to INTER-
pinS indicate the encoded Prlonty level of the device re- FACE WITH M6800 PERIPHERALS
questing an Interrupt Level seven IS the highest Priority
while level zero ,nd,cates that no Interrupts are requested Valid Memory Address (VMA). ThiS output IS used to in-
The least Significant bit IS given In IPLO and the most Signifi- dicate to M6800 peripheral devices that there IS a valid ad-
cant bit IS contained In IPL2. dress on the address bus and the processor IS synchrOnized
to enable. ThiS Signal only responds to a valid peripheral ad-
SYSTEM CONTROL. The system control Inputs are used dress (VPA) Input which Indicates that the peripheral IS a
to either reset or halt the processor and to Indicate to the M6800 family device
processor that bus errors have occurred The three system
control Inputs are explained In the following paragraphs. PROCESSOR STATUS (FCO, FC1, FC2). These function
code outputs indicate the state (user or supervisor) and the
Bus Error (BERR). This Input Informs the processor that cycle type currently being executed, as shown In Table 2
there IS a problem With the cycle currently being executed. The Information Indicated by the function code outputs IS
Problems may be a result of. valid whenever address strobe (AS! IS active
1 nonrespondlng devices
2. Interrupt vector number acquIsition failure TABLE 2 - FUNCTION CODE OUTPUTS
3. Illegal access request as determined by a memory FC2 FC1 FCO Cycle Type
management unit Low Low Low (Undefined, Reserved!
4 other application dependent errors Low Low High User Data
The bus error signal Interacts With the halt signal to deter- Low High Low User Program
mine If exception processing should be performed or the cur- Low High High (Undefined, Reserved!
rent bus cycle should be retried. High Low (Undefined, Reserved!
Low
Refer to BUS ERROR AND HALT OPERATION paragraph
High Low High Supervisor Data
for additional information about the interaction of the bus er-
ror and halt signals. High High Low Supervisor Program
High High High Interrupt Acknowledge
Reset (RESET), ThiS bidirectional signal line acts to reset
(,nit,ate a system Initialization sequence) the processor In
response to an external reset signal An Internally generated CLOCK (ClK)' The clock Input IS a TTL-compatible Signal
reset (result of a RESET Instruction) causes all external that IS Internally buffered for development of the Internal
devices to be reset and the internal state of the processor is clocks needed by the processor The clock Input shall be a
not affected. A total system reset (processor and external constant frequency
devices! IS the result of external HALT and RESET signals
applied at the same time Refer to RESET OPERATION SIGNAL SUMMARY. Table 3 IS a summary of all the
paragraph for additional Information about reset operation Signals discussed In the prevIous paragraphs.
4-669
MC68000L4-MC68000L6-MC68000L8-MC68000L 10
*open drain
The following paragraphs describe the registers and data Address registers do not support byte Sized operands
organization of the MC68000 Therefore, when an address register IS used as a source
operand, either the low order word or the entire long word
OPERAND SIZE operand IS used depending upon the operation size When
Operand sizes are defined as follows' a byte equals 8 bits, an address register IS used as the destination operand, the
a word equals 16 bits, and a long word equals 32 bits The entire register IS affected regardless of the operation size If
operand size for each Instruction IS either explicitly encoded the operation size IS word, any other operands are sign ex-
In the instruction or Implicitly defined by the Instruction tended to 32 bits before the operatIOn IS performed.
operation All explicit Instructions support byte, word or long
word operands Implicit instructions support some subset of
all three sizes STATUS REGISTER
The status register contains the Interrupt mask (eight
DATA ORGANIZATION IN REGISTERS levels available) as well as the conditIOn codes, extend (X),
The eight data registers support data operands of 1,8, 16, negative (N), zero (Z), overflow (V), and carry (C)' Addi-
or 32 bits. The seven address registers together with the ac- tional status bits ,nd,cate that the processor IS In a trace (T)
tive stack pOinter support address operands of 32 bits mode andlor In a supervisor (5) state.
4·670
MC68000L4eMC68000L6eMC68000LSeMC68000L 10
DATA ORGANIZATION IN MEMORY The follOWing paragraphs explain the read, write, and
Bytes are individually addressable with the high order byte read-modlfy-wrlte cycles The ,nd,v,s,ble read-modlfy-wnte
having an even address the same as the word, as shown In cycle IS the method used by the MC68000 for Interlocked
Figure 9 The low order byte has an odd address that IS one multiprocessor commUnications
count higher than the word address Instructions and
multlbyte data are accessed only on word (even byte) boun-
NOTE
daries If a long word datum IS located at address n (n even),
then the second word of that datum IS located at address The terms assertion and negation Will be used extensively
n+2 ThiS IS done to aVOid confusion when dealing with a mixture
The data types supported by the MC68000 are bit data, in- of "active-low" and "active-high" Signals. The term assert or
teger data of 8, 16, or 32 bitS, 32-blt addresses and binary assertion IS used to ,nd,cate that a Signal IS active or true In-
coded decimal data Each of these data types IS put In dependent of whether that voltage IS low or high The term
memory, as shown In Figure 10 negate or negation IS used to indicate that a Signal IS inactive
or false.
BUS OPERATION
The following paragraphs explain control Signal and bus
operation dUring data transfer operations, bus arbitration, Reed Cycle. DUring a read cycle, the processor receives
bus error and halt conditions, and reset operation data from memory or a peripheral device The processor
reads bytes of data In all cases If the instruction speCifies a
DATA TRANSFER OPERATIONS. Transfer of data be- word (or double word) operation, the processor reads both
tween devices Involves the following leads. bytes When the Instruction speCifies byte operation, the
processor uses an Internal AO bit to determine which byte to
II
e Address Bus A 1 through A23
read and then Issues the data strobe required for that byte
e Data Bus DO through D15 For byte operations, when the AO bit equals zero, the upper
e Control Signals data strobe IS Issued When the AO bit equals one, the lower
The address and data buses are separate parallel buses used data strobe IS Issued. When the data IS received. the pi [J
to transfer data uSing an asynchronous bus structure In all cessor correctly positions It Internally
cycles, the bus master assumes responsibility for deskewing A word read cycle flow chart IS B,von In I ''It'''' 11 IIllyl"
all Signals It Issues at both the start and end of a cycle In ad- read cycle flow chart IS given In Figuro 17 110,1(1 eyel" tll!IIt1'1
dition, the bus master IS responsible for deskewing the IS given In Figure 13 Figure 14 details word "tid by to ",.. d ( y
acknowledge and data Signals from the slave device. cle operations
15 14 13 12 11 10 9 B 6 5 4 0
Word 00000o
Byte 00000o 1 Byte 000001
Word 1000002
Byte 000002 Byte 000003
7
{
Byte FFFFFE
wordrFFFE
Byte FFFFFF I
4·671
MC68000L4- MC68000LS- MC68000L8- MC68000L 10
Bit Data
1 Byte=8 Bits
6 5 4 0
Integer Data
1 Byte = 8 Bits
15 14 13 12 11 10 9 8 5 0
Byte 0 Byte 1
M
1 " Byte 2
"'I
1 Word = 16 Bits
Byte 3
15 14 13 12 11 10 9 4 3 0
Word 0
"'I
1 M" Word 1
Word 2
I 15
MSB
-
14 13
-Long Word 0- -
12 11
-
10
1 Long Word = 32 Bits
9
- -
High Order
-- ---------
4 3 0
Low Order
LSB
- -Long Word 1- - - - - - - - - - - - - - - - - - - - -
- - Long Word 2 - - - - - - - - - - - - - - - - - - - - -
Addresses
1 Address = 32 Bits
15 14 13 12 11 10 9 B 4 3
MSB
High Order
--_~o---------------------
Low Order
LSB
- - Address 1 - - - - - - - - - - - - - - - - - - - - -
- - Address 2 - - - - - - - - - - - - - - - - - - - - -
4-672
MC68000L4- MC68000LS- MC68000LS- MC68000L 10
FIGURE 11 - WORD READ CYCLE FLOW CHART FIGURE 12 - BYTE READ CYCLE FLOW CHART
Address Device
Address Device 11 Set R/Vii to Read
11 Set R/W to Read 21 Place Address on A l-A23
21 Place Address on Al-A23 31 Place Function Code on FCO-FC2
31 Place FunctIOn Code on FCO-FC2 41 Assert Address Strobe (ASI
41 Assert Address Strobe (ASI 51 Assert Upper Data Strobe (UDSI or Lower
51 Assert Upper Data Strobe (UDSI and Low- Data Strobe (LDSI (based on AOI
er Data Strobe (LDSI I
t
Input Data
11 Decode Address
21 Place Data on 00-07 or 08-015 (based on
11 Decode Address UDS or IDSI
21 Place Data on 00-015 31 Assert Data Transfer Acknowledge
3) Assert Data Transfer Acknowledge (DTACK)
(Di'ACK1
+ •
•
AcqUire Data
ACqUIre Data 11 Latch Data
rns
,
11 Latch Data 2) Negate UDS or
2) Negate iJI5S and TI5S 3) Negate AS
31 Negate AS
Terminate Cycle
Terminate Cycle
11 Remove Data from 00-07 or 08-015
11 Remove Data from 00-015
21 Negate Di'ACK
21 Negate DTACK
+
Start Next Cycle
t
Start Next Cycle
SO S1 S2 S3 S4 S5 S6 S7 SO S1 S2 S3 S4 S5 S6 S7 SO S1 S2 S3 S4 w w w w S5 S6 S7
CLK
H H ==______________
__________
~
~=r
~r_
AS \ I \ r - - \______..Jr_
UDS \ I ~
IDS \ I \ r--\ I
R/Vii \ I
i5'TACK \ I \ I \ r
~~~~~r
08-015 ( ) ( ) {
00-07
FCO-2
=:=
::J<X
(
X __________________
>- ) ( )
~
(
~r
4-673
MC68000L4-MC68000LS-MC68000L8-MC68000L 10
50 51 52 53 54 55 56 57 50 51 52 53 54 55 56 57 50 51 52 53 54 55 56 57
ClK
AO*
AS '--______I
Ui5S \ \ r-
lD5 \ r--\ I
RiW
DTACK \ r-\,-_ _~I \ {
D8-D15 ( ) (
>--
DO-D7 ) ( ~
FCO-2 =x'--_____ ---iX\.._ _ _ _ _ _~
X >-
*Internal 51gnal Only
•
j.. - -Word Read- -..\.- - Odd Byte Read- .j. -Even Byte Read - .j
Write Cycle_ DUring a write cycle, the processor sends BUS ARBITRATION_ Bus arbitration IS a technique used
data to memory or a peripheral device The processor writes by master-type devices to request, be granted, and
bytes of data m all cases If the Instruction specifies a word acknowledge bus mastership In ItS simplest form, It consists
operation, the processor writes both bytes When the m- of
structlon specifies a byte operation, the processor uses an 1 Asserting a bus mastership request
Internal AO bit to determine which byte to write and then 2 Receiving a grant that the bus IS available at the end
Issues the data strobe reqUIred for that byte For byte opera- of the current cycle
tions, when the AO bit equals zero, the upper data strobe IS
3 Acknowledging that mastership has been assumed.
Issued When the AO bit equals one, the lower data strobe IS
Issued. A word write cycle flow chart IS given m Figure 15 A Figure 20 IS a flow chart shOWing the detail Involved m a
byte wnte cycle flow chart IS given In Figure 16 Write cycle request from a smgle device Figure 21 IS a tlmmg diagram
tlmmg IS given m Figure 13 Figure 17 details word and byte for the same operations ThiS technique allows processmg of
write cycle operation bus requests dUring data transfer cycles.
The tlmmg diagram shows that the bus request IS negated
at the time that an acknowledge IS asserted ThiS type of
operation would be true for a system conslstmg of the pro-
cessor and one device capable of bus mastership In systems
Havmg a number of devices capable of bus mastership, the
Read-Modify-Write Cycle_ The read-modlfy-wrlte cycle bus request hne from each device IS wire ORed to the pro-
performs a read, modifies the data m the arithmetic-logic cessor In thiS system, It IS easy to see that there could be
Unit, and writes the data back to the same address In the more than one bus request bemg made The tlmmg diagram
MC68000 thiS cycle IS ,nd,v,s,ble m that the address strobe IS shows that the bus grant signal IS negated a few clock cycles
asserted throughout the entire cycle The test and set IT AS) after the transition of the acknowledge IBGACK) signal
Instruction uses thiS cycle to provide meanmgful com- However, If the bus requests are stili pending, the pro-
mUnication between processors m a multiple processor en- cessor will assert another bus grant Within a few clock cycles
VIronment. ThiS Instruction IS the only Instruction that uses after It was negated ThiS additional assertion of bus grant
the read-modlfy-wrlte cycles and smce the test and set m- allows exte",al arbitration CirCUitry to select the next bus
structlon only operates on bytes, all read-modlfy-wrlte cycles master before the current bus master has completed ItS re-
are byte operations. A read-modlfy-wrlte cycle flow chart IS qUirements. The following paragraphs proVide additional m-
given In Figure 18 and a timing diagram IS given In Figure 19. formation about the three steps m the arbitration process
4-674
MC68000L4- MC68000L6- MC68000LS- MC68000L 10
FIGURE 15 - WORD WRITE CYCLE FLOW CHART FIGURE 16 - BYTE WRITE CYCLE FLOW CHART
t
Input Data
~
11 Decode Address
11 Decode Address
21 Store Data on 00-07 If LOS IS asserted
21 Store Data on 00-015
Store Data on 08-015 If UDS IS asserted
31 Assert Data Transfer Acknowledge
31 Assert Data Transfer Acknowledge
IDTACKI
"~
11
21
31
41
Negate UDS and LOS
Negate AS
f
Terminate Output Transfer
f
Start Next Cycle
t
Start Next Cycle
SO S1 S2 S3 S4 S5 S6 S7 SO 51 S2 S3 S4 S5 S6 S7 50 S1 S2 53 54 55 5657
ClK
AO*
--------~-=========~~~--------~
I
AS==:=:::;~-----;:~--
UD5---==~'----1----Jr--~======~----~~~----~
LOS -----.'----1 '--I
R/wF\ 1\ 1\ r
DTACK \ I \ I \ r
D8-D15==r-<~~~
DO-D7~ ) { }
(
)
) ( )
(
)
4-675
MC68000L4eMC68000L6eMC68000L8eMC68000L 10
Address Device
11 Place Address on A 1-A23 Input Data
21 Set RIW to Read 11 Decode Address
31 Assert Address Strobe IASI 21 Place Data on 00-07 or 08-015
41 Assert Upper Data Strobe IUDSI or Lower 31 Assert Data Transfer Acknowledge
Data Strobe IlDSI IDTACKI
1
AcqUire Data
11 latch Data
21 Negate UDS or lOS
31 Start Data ModiflcaMn Terminate Cycle
11 Remove Data from 00-07 or 08-015
21 Negate DTiiCi<
f
•
Start Output Transfer
11 Set R/W to Wnte
21 Place Data on 00-07 or 08-015 Input Data
31 Assert Upper Data Strobe IUDSI or lower 11 Store Data on 00-07 or 08-015
Data Strobe lLOSI 21 Assert Data Transfer Acknowledge
IDTACKI
T
Terminate Output Transfer
11 Negate UDS or lOS
21 Negate AS
31 Remove Data from 00-07 or 08-015
41 Set RIW to Read
Terrnlnate Cycle
11 Negate DTACK
I
Start Ne" Cycle
FIGURE 19 - READ-MODIFY -WRITE CYCLE TIMING DIAGRAM
SO 51 S2 53 54 5556 57 5859510511512513514515516517518519
ClK
Al-A23
AS \
UDS or lD5 --""'"'\ I \\..-----
R/W \
DTACK
\ I \
08-015 ( ) (
FCO-2 ::x'--___________________
1-<------------- ·Ind,v,s,ble Cycle' -----------+1
4-676
MC68000L4- MC68000L6- MC68000LS- MC68000L10
FIGURE 20 - BUS ARBITRATION CYCLE FLOW CHART Requesting the Bus. External deVices capable of becoming
bus masters request the bus by asserting the bus request
PROCESSOR REQUESTING DEVICE
(BRI signal ThiS IS a wire ORed signal (although It need not
Request the Bus be constructed from open collector devlcesl that ,nd,cates to
11 Assert Bus Request IBRI the processor that some external deVice reqUIres control of
I the external bus The processor IS effectIVely at a lower bus
f Priority level than the external deVice and Will relinqUIsh the
,
Grant Bus Arbitration
bus alter It has completed the last bus cycle It has started
When no acknowledge IS received before the bus request
11 Assert Bus Grant IBGI
I signal goes inactive, the processor will continue processing
when It detects that the bus request IS Inactive ThiS allows
ordinary processing to continue If the arbitration CIrcuitry
Acknowledge Bus Mastership responded to nOise Inadvertently
1) External arbitration determines next bus
master Receiving the Bus Grant. The processor asserts bus grant
2) Next bus master walts for current cycle to IBGI as soon as possible Normally thiS IS Immediately after
complete Internal synchrOnization The only exception to thiS occurs
31 Next bus master asserts Bus Grant when the processor has made an Internal deCISion to execute
Acknowledge I BGACKI to become new
the next bus cycle but has not progressed far enough Into
master
the cycle to have asserted the address strobe (ASI signal In
41 Bus master negates BR
I thiS case, bus grant Will not be asserted until one clock after
II
a bus cycle IS being executed
,
Termln8te Arbitration The bus grant signal may be routed through a daiSY-
11 Negate BG land wall for BGACK to be chained network or through a specific Prlorlty·encoded net·
negatedl work. The processor IS not affected by the external method
of arbitration as long as the protocol IS obeyed
Acknowledgement of Mastership. Upon receiving a bus
Operate as Bus Master
grant, the requesting deVice walts until address strobe, data
11 Perform Data Transfers IRead and Wnte transfer acknowledge, and b~nt acknowledge are
cycles) according to the same rules the pro~
negated before Issuing Its own BGACK The negation of the
cessor uses ,
,
address strobe indicates that the previous master has com-
pleted ItS cycle, the negation of bus grant acknowledge In-
Release Bus MastershiP dicates that the prevIous master has released the bus (While
11 Negate BGACK address strobe IS asserted no deVice IS allowed to "break in-
to" a cycle.) The negation of data transfer acknowledge in-
dicates the prevIous slave has terminated ItS connection to
the prevIous master. Note that In some applications data
Re-Arbltrate or Resume Processor
transfer acknowledge might not enter Into thiS function.
Operation
General purpose deVices would then be connected such that
elK
AS
LDS/UDS
Riw
00-015
~________~\==~__-JI
BG _ _ _~\~---JI ,..._ _ _ _ _ _~\::::;---...JI
BGA"CKI \. / \.
~------~ ~-------------
4-677
MC68000L4eMC68000LSeMC68000LS·MC68000L10
they were only dependent on address strobe When bus been met (see Figure 23) The Input signal IS sampled on the
grant acknowledge IS Issued the device IS bus master until It failing edge of the clock and IS valid Internally after the next
negates bus grant acknowledge Bus grant acknowledge failing edge
should not be negated until after the bus cycle(s) IS (are) As shown In Figure 22, Input Signals labeled R and A are
completed Bus mastership IS terminated at the negation of Internally synchronIZed on the bus request and bus grant
bus grant acknowledge acknowledge pinS respectively The bus grant output IS
labeled G and the Internal three~state control Signal T If T IS
The bus request from the granted device should be drop~ true, the address, data, and control buses are placed In a
ped after bus grant acknowledge IS asserted If a bus request hlgh~lmpedance state when AS IS negated All Signals are
IS stili pending, another bus grant will be asserted within a shown In positive logiC (active high) regardless of their true
few clocks of the negation of bus grant Refer to Bus
active voltage level
ArbitratIOn Control sectIOn Note that the processor does not State changes (valid outputs) occur on the next rising
perform any external bus cycles before It re~asserts bus
edge after the Internal Signal IS valid
grant
A timing diagram of the bus arbitration sequence dUring a
BUS ARBITRATION CONTROL. The bus arbitratIOn con~ processor bus cycle IS shown In Figure 24 The bus arbltra~
tral unit In the MC68000 IS Implemented With a finite state tlOn sequence while the bus IS inactive (, e , executing mter-
machine A state diagram of thiS machine IS shown In Figure nal operations such as a multiply instruction) IS shown In
22 All asynchronous signals to the MC68000 are synchronlZ~ Figure 25
ed before being used Internally ThiS synchronIZation IS ac~ If a bus request IS made at a time when the M PU has
compllshed In a maximum of one cycle of the system clock, already begun a bus cycle but AS has not been asserted (bus
assuming that the asynchronous Input setup time (#47) has state SO), BG Will not be asserted on the next rising edge In~
stead, BG Will be delayed until the second rising edge follow~
•
mg It'S Internal assertion ThiS sequence IS shown In Figure
FIGURE 22 - STATE DIAGRAM OF MC68000 BUS 26
ARBITRATION UNIT
BUS ERROR AND HALT OPERATION. In a bus archltec~
lUre that reqUires a handshake from an external deVice, the
RA pOSSibility eXists that the handshake might not occur Since
different systems Will require a different maximum response
time, a bus error Input IS proVided. External circuitry must be
used to determine the duration between address strobe and
data transfer acknowledge before ISSUing a bus error Signal
When a bus error Signal IS received, the processor has two
options' initiate a bus error exception sequence or try runn~
Ing the bus cycle again
BR IExternal1 ------~
RA
@
R= Bus Request Internal Bii IInternall
A = Bus Grant Acknowledge Internal
G= Bus Grant
T = Three-State Control to Bus Control LogiC
X= Don'l Care Asychronous
Input Delav*
* State machrne Will not change state If bus IS rn SO Refer to
BUS ARBITRATION CONTROL for additional Information *Thls delay time IS equal to parameter #33,tCHGl
4-678
MC68000L4- MC68000L6- MC68000L8- MC68000L 10
•
FCO-FC2 )C
R/W
DTACK '---l \ r--
00-015 (
- Processor
-I-
Alternate Bus Master
-I-
Procps<.,or
•
Bus released from three state and processor starts next bus c y c l e - - - - - - - - - - - - - - ,
BGACK n e g a t e d - - - - - - - - - - - - - - - - - - - - - - - - ,
BG asserted and bus three statedl---------,
BR valid Internall----------,
CLK
50 51 52 53 54 55 56 57 50 51 52 53 54
BR
BG
\ I
BGACK
\ I
\ /
A1-A23--< (
A5
U05
\ I ~
\ I \
~
lDS
\ I ~
FCO-FC2 =::x )
R/WI
OTACK
L-J '--
00-015
. Processor
(
.. \- Bus Inactive
-\ .. Alternate Bus Master • I• Processor _
4-679
FIGURE 26 - BUS ARBITRATION DURING PROCESSOR BUS CYCLE SPECIAL CASE
BR,
8G
SO S1 S2 S3 S4 S5 S6 S7
/
SO S1 S2 S3 S4 S5 S6 S7 SO S1
8GACK
\ /
\ I
A1-A23 ) < >--C
AS
\ I' ~ r--
UOS
\ f' ~ r--
LOS
\ I' ~ r--
• FCO-FC3~
R/WI
OTACK
00-015
.. Processor
'---...J
- I-
Alternate Bus Master
(
-\-
\
Processor
r--
x=
Exception Sequence. When the bus error signal IS 3 Reading the bus error vector table entry
asserted, the current bus cycle IS terminated If BERR IS 4 Executing the bus error handler routine
asserted before the falling edge of S4, AS will be negated In
S7 In either a read or write cycle As long as BERR remains The stacking of the program counter and the status
asserted, the data and address buses will be In the hlgh- register IS the same as If an Interrupt had occurred Several
Impedance state When BER R IS negated, the processor will additional Items are stacked when a bus error occurs These
begin stacking for exceptIOn processing Figure 27 IS a timing Items are used to determine the nature of the error and cor-
diagram for the exception sequence The sequence IS com- rect It, If pOSSible. The bus error vector IS vector number two
posed of the following elements located at address $000008 The processor loads the new
program counter from this location A software bus error
1 StaCKing the program counter and status register handler routine IS then executed by the processor Refer to
2 Stacking the error information EXCEPTION PROCESSING for additional Information
4-680
MC68000L4· MC68000LS. MC68000L8. MC68000L 10
Re-Runmng the Bus Cycle. When, dUring a bus cycle, the the same address, the same function codes, the same data
processor receives a bus error Signal and the halt Pin IS being I for a write operatlonl, and the same controls The bus error
driven by an external device, the processor enters the re~run signal should be removed at least one clock cycle before the
sequence Figure 28 IS a timing diagram for re--runnlng the halt signal IS removeo
bus cycle
NOTE
The processor will not re-run a read-modlfy-wrlte cycle
The processor terminates the bus cycle, then puts the
ThiS restriction IS made to guarantee that the entire cycle
address and data output lines In the high-Impedance state runs correctly and that the write operation of a Test-and-Set
The processor remains "halted," and will not run another operation IS performed Without ever releasing AS If BERR
bus cycle until the halt signal IS removed by external logiC and HALT are asserted dUring a read-modlfy-wrlte bus cycle,
Then the processor will re-run the prevIous bus cycle uSing a bus error operation results
AS ~'- _ _ _ _ _ _ _ _ _ _ _--'/
\'-----
LOS "iJD5 - - - " " ' \ /,---- -----\
'-----
•
R/W
OTACK-------------------------------------
\
00.015::~::::::~(~~~~~~~~~~~~~~~~~~~::~
FCO·2
BERR
=J=::.=========::::::;:\ _______-----;
HAIT-------------~================~
I _ Initiate _ I _ _ 1_ Imtlate Bus
,.... Read~ - -Response Fallure- - - Bus Error Detection --~-----
Error Stacking
ClK
A1·A23
\ I \\..._____1
AS
LDS/UOS \ ,-------------------~\
I r----
Riw
DTACK
00·015 ( )
FCO·2 .:J( X
BERR
\ /
HALT \ /
~ - - Read- - ~- -- - - - Halt- - - - -- -t- -- Rerun- - - --+l
4-681
MC68000L4- MC68000L6- MC68000L8- MC68000L 10
The processor terminates the bus cycle, then puts the ad- ThiS IS reqUired for correct performance of the re-run bus cy-
dress, data and function code output lines In the hlgh- cle operation
Impedance state The processor remainS "halted," and will
not run another bus cycle until the halt signal IS removed by While the processor IS honoring the halt request, bus
external logic Then the processor will re-run the prevIous arbitration performs as usual That IS, halting has no effect
bus cycle uSing the same address, the same function codes, on bus arbitration It IS the bus arbitration function that
the same data Ifor a write operatlonl, and the same controls removes the control signals from the bus
The bus error signal should be removed before the halt signal
IS removed The halt function and the hardware trace capability allow
the hardware debugger to trace Single bus cycles or Single in-
Halt Operation with No Bus Error. The halt Input signal to structions at a time These processor capabilities, along With
the MC68000 performs a Halt/ Run/Single-Step function In a a software debugging package, give total debugging fleXibili-
Similar fashion to the M6800 halt function The halt and run ty
modes are somewhat self explanatory In that when the halt
signal IS constantly actIVe the processor "halts" Idoes Oouble Bus Faults. When a bus error exception occurs,
nothlngl and when the halt signal IS constantly inactive the the processor will attempt to stack several words containing
processor "runs" Idoes something) information about the state of the machine If a bus error ex-
The Single-step mode IS derived from correctly timed tran- ception occurs during the stacking operation, there have
sitions on the halt signal Input It forces the processor to ex- been two bus errors In a row ThiS IS commonly referred to as
ecute a Single bus cycle by entering the "run" mode until the a double bus fault When a double bus fault occurs, the pro-
processor starts a bus cycle then changing to the "halt" cessor will halt Once a bus error exception has occurred,
•
mode Thus, the Single-step mode allows the user to pro- any bus error exception occurring before the execution of
ceed through land therefore debug) processor operations the next Instruction constitutes a double bus fault
one bus cycle at a time Note that a bus cycle which IS re-run does not constitute a
Figure 29 details the timing reqUired for correct Single-step bus error exception, and does not contribute to a double bus
operations Some care must be exercised to aVOid harmful fault Note also that thiS means that as long as the external
Interactions between the bus error signal and the halt pin hardware requests It, the processor will continue to re-run
when uSing the Single cycle mode as a debugging tool ThiS the same bus cycle
IS also true of Interactions between the halt and reset lines The bus error Pin also has an effect on processor operation
since these can reset the machine after the processor receives an external reset Input, The pro-
cessor reads the vector table after a reset to determine the
When the processor completes a bus cycle after recogniz-
address to start program execution If a bus error occurs
Ing that the halt signal IS active, most three-state signals are
while reading the vector table lor at any time before the first
put In the high-Impedance state These Include'
instruction IS executed), the processor reacts as If a double
1 address lines bus fault has occurred and It halts Only an external reset will
2 data lines start a halted processor.
ClK
AS \ I \...___--.J
----~\~------~/r--------------------~\
LOS/UOS ________~.==========~.~ ______________________________~.==========~.Ir----
________
R/W
OTACK-::::;~;;;;;\;~~~~/~::::::::::::::::::::::::::::::::::::::::::::::::::==:::::~\~~~~;----
00-015 ) (>---
FCO·2 :::x x::::
RATI \~-----------------'I
~ -Read- - - -- +- -- -- Halt - - - -- + -- - Read - - - ~
4·682
MC68000L4- MC68000L6- MC68000LS- MC68000L 10
In order to properly control termination of a bus cycle for a may precede HALT on all except R9M and T6E < early mask
re-run or a bus error condition, DTACK, BERR, and HALT sets> which allows fully asynchronous assertlonl.
should be asserted and negated on the rising edge of the Table 4 details the resulting bus cycle termination under
MC68000 clock ThiS Will assure that when two signals are various combinations of control signal sequences The nega-
asserted Simultaneously, the required setup time (#471 for tion of these same control signals under several conditions IS
both of them Will be met dUring the same bus state shown In Table 5 (DTACK,S assumed to be negated normal-
ThiS, or some equivalent precaution, should be deSigned ly In all cases, for best results, both DTACK and BERR
external to the M C68000. Parameter #48 IS Intended to en- should be negated when address strobe IS negated I
sure thiS operation In a totally asynchronous system, and Example A: A system uses a watch-dog timer to ter-
may be Ignored If the above conditions are met minate accesses to un-populated address space The timer
The preferred bus cycle terminations may be summarized asserts DTACK and BERR Simultaneously after time-out
as follows (case numbers refer to Table 41 (case 41
Normal Termination: DTACK occurs first (case 11 Example B: A system uses error detection on RAM con-
Halt Termination: HALT IS asserted at same time, or tents. DeSigner may (al delay DTACK until data verified, and
precedes DTACK (no BERRI cases 2 and 3 return BER R and HALT Simultaneously to re-run error cycle
Bus Error Termination: BERR IS asserted In lieu of, at same (case 61, or If valid, return DTACK, (bl delay DTACK until
time, or preceding DT ACK (case 41, BER R negated at same data verified, and return BERR at same time as DTACK If
time, or after DT ACK data In error (case 41, (cl return DTACK poor to data verifica-
Re-Run Termination: HALT and BERR asserted at the tion, as described In prevIous section If data invalid, BERR IS
same time, or before DT ACK (cases 6 and 71 , HALT must be asserted (case llln next cycle Error-handling software must
negated at least 1 cycle after BERR (Case 5 indicates BERR know how to recover error cycle
I
Assertad on RiSing
Case Control
Edge of State Result
No. Signal _N _II!+
DTACK A S Normal cycle terminate and continue
1 BERR NA X
HALT NA X
DTACK A S Normal cycle terminate and halt Continue when HALT removed
2 BERR NA X
HALT A S
DTACK NA A Normal cycle terminate and halt Continue when HALT removed
3 BERR NA NA
HALT A S
DTACK X X Termmate and take bus error trap
4 BEAR A S
HALT NA NA
DTACK NA X R9M, T6E, BF4: Unpredictable results, no re-run, no error trap,
5 BERR A S usually traps to vector number 0
HALT NA A All others: term mate and re-run
DTACK X X Termmate and re-fun
6 BERR A S
HALT A S
DTACK NA X Terminate and re-run when HALT removed
7 BERR NA A
HALT A S
Legend
N - the number of the current even bus state (e 9 , S4, S6, etc)
A - signal IS asserted In thiS bus state
NA - signal IS not asserted In thiS state
X - don't care
S - signal was asserted In prevIous state and remains asserted In thiS state
Re-run
BERR
HALT
• •
Re-runs the bus cycle
Normal
BERR
HALT
•• or •
May lengthen next cycle
Normal
BERR
HALT • or
• If next cycle IS started It Will
none be terminated as a bus error
4-683
MC68000L4-MC68000LS-MC68000LS-MC68000Ll0
RESET OPERATION. The reset signal 15 a bidirectional registers are affected by the reset sequence.
signal that allows either the processor or an external signal to When a RESET sequence IS executed, the processor
reset the system Figure 30 15 a timing diagram for reset drives the reset pin for 124 clock pulses. In thiS case, the pro-
operations Both the halt and reset lines must be applied to cessor IS trying to reset the rest of the system. Therefore,
ensure total reset of the processor there IS nO effect on the Internal state of the processor All of
When the reset and halt lines are driven by an external the processor's Internal registers and the status register are
device, It 15 recognized as an entire system reset, Including unaffected by the execution of a RESET Instruction All ex-
the processor The processor responds by reading the reset ternal deVices connected to the reset line should be reset at
vector table entry (vector number zero, address $000000) the completion of the RESET Instruction
and loads It into the supervisor stack pOinter (SSP) Vector Asserting the Reset and Halt PinS for 10 clock cycles Will
table entry number One at address $000004 IS read next and cause a processor reset, except when VCC IS Initially ap-
loaded Into the program counter. The processor initializes plied to the processor In thiS case, an external reset must
the status register to an Interrupt level of seven No other be applied for 100 milliseconds
ClK
Plus 5 Volts
VCC
t->l00Mllloseconds ~r---------------
RESET 1 I
HALT 1
~-*t<4
I Bus Cycles
NOTES
11 Internal start-up time
21 SSP High read In here
31 SSP low read In here
41 PC High read In here
51 PC low read ,n here
61 First Instruction fetched here
Bus State Unknown')¢OOO(
>---<
All Control Signals Inactive
Data Bus In Read Mode
PROCESSING STATES
The MC68000 IS always In one of three processing states The halted processing state 15 an indication of catastrophic
normal, exception, or halted The normal processing state 15 hardware failure For example, If dUring the exception pro-
that associated With instruction execution, the memory cessing of a bus error another bus error occurs, the pro-
of the bits In the supervisor portion of the status register are cessor assumes that the system IS unusable and halts Only
covered: the supervisor/user bit, the trace enable bit, and an external reset can restart a halted processor Note that a
the processor interrupt Priority mask. Finally, the sequence processor In the stopped state IS not In the halted state, nor
of memory references and actions taken by the processor On vice versa
exception conditions is detailed.
PRIVILEGE STATES
The MC68000 15 always In one of three processing states The processor operates In one of two states of priVilege
normal, exception, or halted. The normal processing state 15 the "user" state or the "supervisor" state The priVilege state
that assOCiated With Instruction executIOn; the memory determines which operations are legal, IS used by the exter-
references are to fetch instructions and operands, and to nal memory management deVice to control and translate ac-
store results. A speCial case of the normal state 15 the cesses, and 15 used to choose between the supervisor stack
stopped state which the processor enters when a STOP in- pOinter and the user stack pOinter In Instruction references
struction is executed. In thiS state, no further memory The priVilege state IS a mechanism for proViding secUrity In
references are made. a computer system Programs should access only their own
The exception processing state 15 associated With Inter- code and data areas, and ought to be restricted from access-
rupts, trap Instructions, tracing and other exceptional condi- mg mformatlon which they do not need and must not
tions. The exception may be internally generated by an In- modify.
struction or by an unusual condition arising dUring the ex- The priVilege mechanism prOVides security by allowmg
ecution of an instruction. Externally, exception processing most programs to execute m user state In thiS state, the ac-
can be forced by an Interrupt, by a bus error, or by a reset. cesses are controlled, and the effects on other parts of the
Exception processing is deSigned to proVide an effiCient con- system are limited The operatmg system executes In the
text switch 50 that the processor may handle unusual condi- supervisor state, has access to all resources, and performs
tions. the overhead tasks for the user state programs
4-684
MC68000L4· MC68000L6· MC68000LS. MC68000L 10
SUPERVISOR STATE. The supervISor state IS the higher TABLE 6 - REFERENCE CLASSIFICATION
state of privilege For Instruction execution, the supervlsm Function Code Output
state IS determined by the S-blt of the status register, If the Reference Class
FC2 FC1 FCO
S-blt IS asserted (hlghl, the processor IS In the supervisor
state All Instructions can be executed In the supervisor 0 0 0 (Unassigned)
state The bus cycles generated by instructions executed In 0 0 1 User Data
the supervisor state are classified as supervisor references 0 1 0 User Program
While the processor IS In the supervIsor privilege state, those 0 1 1 (Unassigned)
instructions which use either the system stack pOinter Im- 1 0 0 (Unassigned)
plicitly or address register seven expliCitly access the super- 1 0 1 Supervisor Data
Visor stack pOinter
1 1 0 Supervisor Program
All exception processing IS done In the supervisor state,
regardless of the setting of the S-blt The bus cycles 1 1 1 Interrupt Acknowledge
generated dUring exception processing are classified as
supervisor references All stacking operations dUring excep- EXCEPTION PROCESSING
tion processing use the supervisor stack pOinter
Before discussing the details of Interrupts, traps, and trac-
rng, a general description of exception processrng IS In order
USER STATE. The user state IS the lower state of
The processing of an exception occurs In four steps, With
privilege For instruction execution, the user state IS deter-
variations for different exception causes DUring the first
mined by the S-blt of the status register, If the S-blt IS
step, a temporary copy of the status register IS made, and
negated (Iowl, the processor IS executing instructions In the
the status register IS set for exception processing In the sec-
user state
•
ond step the exception vector IS determined, and the third
Most Instructions execute the same In user state as In the
step IS the saving of the current processor context In the
supervisor state However, some Instructions which have
fourth step a new context IS obtained, and the processor
Important system effects are made privileged User programs
SWitches to instruction processing
are not permitted to execute the STOP Instruction, or the
RESET instruction To ensure that a user program cannot EXCEPTION VECTORS. Exception vectors are memory
enter the supervIsor state except In a controlled manner, the locations from which the processor fetches the address of a
Instructions which modify the whole status register are routine which Will handle that exception All exception vec-
privileged To aid In debugging programs which are to be tors are two words rn length (Figure 311. except for the reset
used as operating systems, the move to user stack pornter vector, which IS four words All exception vectors lie In the
(MOVE USPI and move from user stack pOinter (MOVE from supervisor data space, except for the reset vector which IS In
USPI instructions are also privileged the supervisor program space A vector number IS an elght-
The bus cycles generated by an Instruction executed In bit number WhiCh, when multiplied by four, gives the
user state are classified as user state references ThiS allows address of an exception vector Vector numbers are
an external memory management device 10 translate the ad- generated Internally or externally, depending on the cause of
dress and to control access to protected portions of the ad- the exception In the case of Interrupts, dUring the Interrupt
dress space While the processor IS In the user privilege acknowledge bus cycle, a peripheral prOVides an B-blt vector
state, those instructions which use either the system stack number (Figure 321 to the processor on data bus lines DO
pOinter ImpliCitly, or address register seven explicitly, access through D7 The processor translates the vector number Into
the user stack pOinter a full 24-blt address, as shown In Figure 33 The mernory
layout for exception vectors IS given In Table 7
PRIVILEGE STATE CHANGES. Once the processor IS rn As shown In Table 7, the memory layout IS 512 words
the user state and executing Instructions, only exception long (1024 bytesl. It starts at address 0 and proceeds
processing can change the privilege state DUring exception through address 1023. ThiS proVides 255 unique vectors,
processrng, the current setting of the S-blt of the status some of these are reserved for TRAPS and other system
register IS saved and the S-blt IS asserted, putting the pro- functions Of the 255, there are 192 reserved for user Inter-
cessing In the supervisor state Therefore, when Instruction rupt vectors. However, there IS no protection on the first 64
execution resumes at the address speCified to process the entries, so user Interrupt vectors may overlap at the discre-
exception, the processor IS In the supervisor privilege state tion of the systems deSigner
REFERENCE CLASSIFICATION. When the processor KINDS OF EXCEPTIONS. Exceptions can be generated by
makes a reference, It claSSifies the krnd of reference being either Internal or external causes The externally generated
made, usrng the encoding on the three lunctlon code output exceptions are the interrupts and the bus error and reset re-
Irnes ThiS allows external translation of addresses, control of quests. The Interrupts are requests from peripheral deVices
access, and differentiation of speCial processor states, such for processor action while the bus error and reset Inputs are
as Interrupt acknowledge Table 6 lists the claSSification of used for access control and processor restart The Internally
references generated exceptions come from Instructions, or from ad-
4-685
MC68000L4-MC68000L6- MC68000L8-MC68000L 10
Ignored
Where
v7 IS the MSB of the Vector Number
vO IS the LSB of the Vector Number
All Zeroes
I
TABLE 7 - EXCEPTION VECTOR ASSIGNMENT
Vector Address
Assignment
Number(s! Dec Hex Space
0 0 000 SP Reset· IMlal SSP
- 4 004 SP Reset· Initial PC
2 8 008 SO Bus Error
3 12 OOC SO Address Error
4 16 010 SO Illegal Instruction
5 20 014 SO Zero D,v,de
6 24 018 SO CH K Instruction
7 28 01C SO TRAPV Instruction
8 32 020 SO PriVilege Violation
9 36 024 SO Trace
10 40 028 SO line 1010 Emulator
11 44 02C SO Line 1111 Emulator
12· 48 030 SO IUnasslgned, reserved!
13" 52 034 SO IUnasslgned, reserved!
14· 56 036 SO IUnasslgned, reserved!
15 60 03C SO Unmltlallzed Interrupt Vector
16-23· 64 04C SO IUnasslgned, reserved!
95 05F -
24 96 060 SO SPUriOUS Interrupt
25 100 064 SO Levell Interrupt Autovector
26 '104 068 SO Level 2 Interrupt Autovector
27 108 06C SO Level 3 Interrupt Autovector
28 112 070 SO Level 4 Interrupt Autovector
29 116 074 SO Level 5 Interrupt Autovector
30 120 078 SO Level 6 Interrupt Autovector
31 124 07C SO Level 7 Interrupt Autovector
32-47 128 080 SO TRAP Instruction Vectors
191 OBF -
48-63· 192 OCO SO IUnasslgned, reserved!
255 OFF -
64-255 256 100 SO User Interrupt Vectors
1023 3FF -
·Vector numbers 12, 13, 14, 16 through 23 and 48 through 63 are reserv-
ed for future enhancements by Motorola. No user peripheral deVices
should be assigned these numbers.
4-686
MC68000L4- MC68000LS- MC68000LS- MC68000L 10
dress errors or tracing The trap (TRAPI, trap on overflow priVilege Violation Since only one Instruction can be ex-
ITRAPVI, check register against bounds (CHKI and divide ecuted at a time, there IS no Priority relation Within Group 2.
IDIVI instructions all can generate exceptions as part of their The Priority relation between two exceptions determines
Instruction execution In addition, Illegal instructions, word which IS taken, or taken first, If the conditions for both arise
fetches from odd addresses and privilege violations cause ex- Simultaneously Therefore, If a bus error occurs dUring a
ceptions Tracing behaves like a very high PriOrity, Internally TRAP instruction, the bus error takes precedence, and the
generated Interrupt after each instruction execution TRAP instruction processing IS aborted In another example,
If an Interrupt request occurs dUring the execution of an in-
EXCEPTION PROCESSING SEQUENCE. Exception pro- struction while the T-blt IS asserted, the trace exception has
cessing occurs In four Identifiable steps In the first step, an PriOrity, and IS processed first Before Instruction processing
Internal copy IS made of the status register. After the copy IS resumes, however, the Interrupt exception IS also processed,
made, the S-blt IS asserted, putting the processor Into the and instruction processing commences finally In the Inter-
supervisor privilege state Also, the T-blt IS negated which rupt handler routlr,e. A summary of exception grouping and
will allow the exception handler to execute unhindered by Priority IS given In Table 8
tracing For the reset and Interrupt exceptions, the Interrupt
priority mask IS also updated TABLE 8 - EXCEPTION GROUPING AND PRIORITY
In the second step, the vector number of the exception IS
Group Exception Processing
determined For Interrupts, the vector number IS obtained by
a processor fetch, classified as an Interrupt acknowledge Reset
Exception proceSSing beginS
0 Bus Error
For all other exceptions, Internal logic provides the vector Within two clock cycles
Address Error
number ThiS vector number IS then used to generate the ad-
dress of the exception vector Trace
The third step IS to save the current processor status, ex- Interrupt Exception proceSSing begins before
I
1
cept for the reset exception The current program counter Illegal the next Instruction
PriVilege
value and the saved copy of the status register are stacked
uSing the supervisor stack pOinter The program counter TRAP, TRAPV,
Exception processtrlg IS started by
2 CHK,
value stacked usually POints to the next unexecuted instruc- normal instruction execution
Zero DIVide
tlon, however for bus error and address error, the value
stacked for the program counter IS unpredictable, and may
be Incremented from the address of the instruction which EXCEPTION PROCESSING DETAILED DISCUSSION
caused the error Additional information defining the current Exceptions have a number of sources, and each exception
context IS stacked for the bus error and address error excep- has processing which IS peculiar to 11. The follOWing
tions paragraphs detail the sources of exceptions, how each
The last step IS the same for all exceptions The new pro- arises, and how each IS processed.
gram counter value IS fetched from the exception vector
The processor then resumes instruction execution. The in- RESET, The reset Input proVides the highest exception
struction at the address given In the exception vector IS level The processing of the reset signal IS deSigned for
fetched, and normal instruction decoding and execution IS system Initiation, and recovery from catastrophic failure.
started Any processing In progress at the time of the reset IS aborted
and cannot be recovered The processor IS forced Into the
MULTIPLE EXCEPTIONS. These paragraphs describe the supervisor state, and the trace state IS forced off The pro-
processing which occurs when multiple exceptions arise cessor Interrupt Priority mask IS set at level seven The vector
Simultaneously Exceptions can be grouped according to number IS Internally generated to reference the reset excep-
their occurrence and priority. The Group 0 exceptions are tion vector at location 0 In the supervisor program space.
reset, bus error, and address error These exceptions cause Because no assumptions can be made about the validity of
the instruction currently being executed to be aborted, and register contents, In particular the supervisor stack pOinter,
the execeptlon processing to commence Within two clock neither the program counter nor the status register is saved,
cycles The Group 1 exceptions are trace and Interrupt, as The address contained In the first two words of the reset ex-
well as the priVilege ViolatIOns and illegal Instructions These ception vector IS fetched as the Initial supervisor stack
exceptions allow the current instruction to execute to com- pOinter, and the address In the last two words of the reset
pletion, but preempt the execution of the next Instruction by exception vector IS fetched as the Initial program counter.
forCing exception processing to occur (privilege Violations Finally, Instruction execution IS started at the address in the
and Illegal Instructions are detected when they are the next program counter The power-up/restart code should be
instruction to be executedl The Group 2 exceptions occur as pOinted to by the Inllial program counter
part of the normal processing of Instructions The TRAP, The RESET instruction does not cause loading of the reset
TRAPV, CHK, and zero diVide exceptions are In thiS group vector, but does assert the reset line to reset external
For these exceptions, the normal execution of an instruction deVices. ThiS allows the software to reset the system to a
may lead to exception processing known state and then continue processing With the next in-
struction.
Group 0 exceptions have highest priority, while Group 2
exceptions have lowest PriOrity Within Group 0, reset has INTERRUPTS. Seven levels of Interrupt priorities are pro-
highest PriOrity, followed by bus error and then address er- Vided. DeVices may be chained externally Within interrupt
ror Within Group 1, trace has PriOrity over external inter- PriOrity levels, allOWing an unlimited number of peripheral
rupts, which In turn takes Prlonty over Illegal Instruction and devices to Interrupt the processor Interrupt PriOrity levels
4-687
MC68000L4e MC68000L6e MC68000LSe MC68000Ll 0
are numbered from one to seven, level seven being the FIGURE 34 - INTERRUPT ACKNOWLEDGE SEQUENCE
highest Priority The status register contains a three-bit mask FLOW CHART
which indicates the current processor PriOrity, and Interrupts
PROCESSOR INTERRUPTING DEVICE
are inhibited for all Prlonty levels less than or equal to the
current processor pnonty
An Interrupt request IS made to the processor by encoding Request Interrupt
the Interrupt request level on the Interrupt request lines, a
zero indicates no Interrupt request Interrupt requests arriv-
Ing at the processor do not force Immediate exception pro-
cessing, but are made pending Pending Interrupts are
detected between Instruction executions If the Priority of
the pending Interrupt IS lower than or equal to the current
t
Grant Interrupt
1) Compare Interrupt level In status register
processor PriOrity, execution continues with the next instruc- and walt for current Instruction to complete
tlon and the Interrupt exception processing IS postponed 21 Place Interrupt level on AI, A2, A3
IThe recognition of level seven IS slightly different, as ex- 31 Set Rlw to read
plained In a following paragraph I 41 Set function code to Interrupt acknowledge
51 Assert address strobe IASI
If the Prlonty of the pending Interrupt IS greater than the
61 Assert lower data strobe IlDSI
current processor Prlonty, the exception processing se-
quence IS started First a copy of the status register IS saved, I
and the privilege state IS set to supervisor, tracing IS sup-
pressed, and the processor Priority level IS set to the level of
the 'nterrupt being acknowledged The processor fetches ProVide Vector Number
the vector number from the Interrupting deVice, classifYing 11 Place vector number of 00-07
r
the reference as an Interrupt acknowledge and displaYing the 21 Assert data transfer acknowledge IDTACKI
level number of the Interrupt being acknowledged on the ad-
dress bus If external logiC requests an automatic vectoring,
I"
IRead or Wrltel \ PCl \ IVector Number Acqursrtlonl
.. orE ISSPI-l"*orE~--'-========-'----)-*,,~e--==':"':':=~-
"\_ Vector Fetch ' \
4-688
FIGURE 36 - INTERRUPT EXCEPTION TIMING SEQUENCE
Last B us Cycle
of Instruction
(During Which
Interrupt Was
Recognized)
r---
Stack
PCl
ISSPI
- lACK
Cycle
(Vector Number
AcquIsItion)
r---
Stack
Status
(SSPI
r-
Stack
PCH
(SSPI
-
~
Read
Vector
High
IA16-A231
r-
Read
Vector
low
(AO-A151 - Fetch First Word
of Instruction
of Interrupt
Routine
Priority level seven IS a special case Level seven Interrupts PRIVILEGE VIOLATIONS. In order to prOVide system
cannot be inhibited by the Interrupt Priority mask, thus pro- security, various instructions are priVileged An attempt to
viding a "non-maskable Interrupt" capability An Interrupt IS execute one of the priVileged InstructIOns while In the user
generated each time the Interrupt request level changes from state will cause an exception The priVileged Instructions are
I
some lower level to level seven Note that a level seven Inter- STOP AND (word) Immediate to SR
rupt may stili be caused by the level comparison If the re- RESET EaR (word) Immediate to SR
quest level IS a seven and the processor Priority IS set to a
RTE OR (word) Immediate to SR
lower level by an Instruction
MOVE to SR MOVE USP
UNINITIALIZED INTERRUPT. An interrupting deVice
TRACING. To aid In program development, the MC68000
asserts VPA or provides an Interrupt vector dUring an inter-
Includes a faCility to allow Instruction by instruction tracing
rupt acknowledge cycle to the MC68000 If the vector
In the trace state, after each instruction IS executed an ex-
register has not been Initialized, the responding M68000
ception IS forced, allOWing a debugging program to monitor
Family peripheral will provide vector 15, the unltlallzed inter-
the execution of the program under test
rupt vector This provides a uniform way to recover from a
programming error The trace faCility uses the T -bit In the supervisor portIOn of
the status register If the T-blt IS negated (off), tracing IS
SPURIOUS INTERRUPT. If dUring the Interrupt acknowl- disabled, and Instruction execution proceeds from Instruc-
edge cycle no deVice responds by asserting DT ACK or VPA, tion to instruction as normal II the T-blt IS asserted (on) at
the bus error line should be asserted to terminate the vector the beginning of the execution of an Instruction, a trece ex-
acquIsition The processor separates the processing of this ception will be generated after the execution of that instruc-
error from bus error by fetching the SPUriOUS Interrupt vector tion IS completed II the Instruction IS not executed, either
Instead of the bus error vector The processor then proceeds because an Interrupt IS taken, or the instruction IS Illegal or
With the usual exception processing privileged, the trace exception does not occur The trace ex-
ception also does not occur If the instruction IS aborted by a
INSTRUCTION TRAPS. Traps are exceptIOns caused by reset, bus error, or address error exception II the Instruction
Instructions They anse either from processor recognttlon of IS Indeed executed and an Interrupt IS pending on comple-
abnormal conditions dUring instruction execution, or from tion, the trace exception IS processed before the Interrupt ex-
use of Instructions' whose normal behavior IS trapping ception If, dUring the execution of the instruction, an excep-
Some instructions are used speCifically to generate traps tion IS forced by that Instruction, the forced exception IS pro-
The TRAP Instruction always forces an exception, and IS cessed before the trace exception
useful for Implementing system calls for user programs The As an extreme Illustration of the above rules, conSider the
TRAPV and CHK Instructions force an exception If the user arrival of an Interrupt dUring the execution of a TRAP in-
program detects a runtime error. which may be an arithmetiC struction while tracing IS enabled First the trap exception IS
overflow or a subscript out of bounds processed, then the trace exception, and finally the Interrupt
The Signed divide (DIVS) and unSigned divide (DIVU) In- exception Instruction execution resumes In the Interrupt
structions will force an exception If a diVISion operation IS at- handler routine
tempted With a diVISor of zero
ILLEGAL AND UNIMPLEMENTED INSTRUCTIONS. il- BUS ERROR. Bus error exceptions occur when the exter-
legal Instruction IS the term used to refer to any of the word nallogIC;; requests that a bus error be processed by an excep-
bit patterns which are not the bit pattern of the first word of tion The current bus cycle which the processor IS making IS
a legal instruction DUring instruction execution, If such an then aborted Whether the processor was dOing instruction
Instruction IS fetChed, an Illegal instruction exception occurs or exception processing, that processing IS terminated, and
Word patterns With bits 15 through 12 equaling 1010 or the processor Immediately begins exception processing
1111 are distinguished as Unimplemented instructions and Exception processing for bus error follows the usual se-
separate exception vectors are given to these patterns to per- quence of steps The status register IS copied, the supervisor
mit effiCient emulation ThiS faCIlity allows the operating state IS entered, and the trace state IS turned off The vector
system to detect program errors, or to emulate number IS generated to refer to the bus error vector Since
Unimplemented instructions In software the processor was not between instructions when the bus er-
4-689
MC68000L4- MC68000L6- MC68000L8-MC68000L 10
ror exception request was made, the context of the pro- Ing the exception processing for a bus error, address error,
cessor IS more detailed To save more of this context, addi- or reset, the processor IS halted As shown In Figure 38, an
tional information IS saved on the supervisor stack The pro- address error Will execute a short bus cycle followed by ex-
gram counter and the copy of the status register are of ception processing
course saved The value saved for the program counter IS ad-
vanced by some amount, two to ten bytes beyond the ad-
dress of the first word of the instruction which made the INTERFACE WITH M6800 PERIPHERALS
reference causing the bus error If the bus error occurred
dUring the fetch of the next instruction, the saved program Motorola'S extensive line of M6800 peripherals are directly
counter has a value In the vIcinity of the current Instruction, compatible with the MC68000 Some of these deVices
even If the current instruction IS a branch, a Jump, or a return that are particularly useful are
Instruction BeSides the usual Information, the processor MC6821 Peripheral Interface Adapter
saves ItS Internal copy of the first word of the instruction be-
Ing processed, and the address which was being accessed MC6840 Programmable Timer Module
by the aborted bus cycle SpecifiC Information about the ac- MC6843 Floppy Disk Controller
cess IS also saved whether It was a read or a Write, whether MC6845 CRT Controller
the processor was processing an instruction or not, and the MC6850 Asynchronous Communication Interface Adapter
classification displayed on the function code outputs when MC6852 Synchronous Serial Data Adapter
the bus error occurred The processor IS processing an In-
MC6854 Advanced Data Link Controller
struction If It IS In the normal state or processing a Group 2
exception, the processor IS not processing an Instruction If It MC68488 General Purpose Interface Adapter
IS processing a Group a or a Group 1 exception Figure 37 Il- To Interface the synchronous M6800 peripherals with the
•
lustrates how thiS information IS organIZed on the supervisor asynchronous MC68000, the processor modifies ItS bus cycle
stack Although thiS information IS not suffiCient In general to meet the M6800 cycle requirements whenever an M6800
to effect full recovery from the bus error, It does allow soft- deVice address IS detected ThiS IS pOSSible since both pro-
ware diagnosIs Finally, the processor commences Instruc- cessors use memory mapped I/O Figure 39 IS a flow chart of
lIOn processing at the address contained In the vector It IS the Interface operation between the processor and M6800
the responsibility of the error handler routine to clean up the deVices
stack and determine where to continue execution
If a bus error occurs dUring the exception processing for a DATA TRANSFER OPERATION
bus error, address error, or reset, the processor IS halted, Three Signals on the processor prOVide the M6800 Inter-
and all processing ceases ThiS Simplifies the detection of face They are enable (EI, valid memory address (VMAI,
catastrophic system failure, since the processor removes and valid peripheral address (V PAl Enable corresponds to
Itself from the system rather than destroy all memory con- the E or </>2 Signal In eXisting M6800 systems The bus fre-
tents Only the RESET pin can restart a halted processor quency IS one tenth of the Incoming MC68000 clock frequen-
ADDRESS ERROR. Address error exceptions occur when cy The timing of E allows 1 M Hz peripherals to be used With
the processor attempts to access a word or a long word an 8 MHz MC68000 Enable has a 60/40 duty cycle, that IS, It
operand or an Instruction at an odd address The effect IS IS low for SIX Input clocks and high for four Input clocks ThiS
much like an Internally generated bus error, so that the bus duty cycle allows the processor to do successive VPA ac-
cycle IS aborted, and the processor ceases whatever process- cesses on successive E pulses
Ing It IS currently dOing and begins exception processing M6800 cycle timing IS given In Figures 40 and 41 At state
After exception processing commences, the sequence IS the zero (Sal In the cycle, the address bus and function codes
same as that for bus error Including the information that IS are In the high-Impedance state One-half clock later. In state
stacked, except that the vector number refers to the address 1, the address bus and function code outputs are released
error vector Instead LikeWise, If an address error occurs dur- from the h,qh-,mpedance state
High
- - Access Address - - - - - - - - - - - - - - - - - - ------
Low
Instruction Register
Status Register
High
- - Program Counter - - - ------ -------------
Low
R/W (read/wrltel wnte=O, reed = 1 I/N "nstrucllon/notl Instructlon=O, not= 1
4·690
MC68000L4-MC68000L6-MC68000L8-MC68000L10
so S 1 S2 S3 S4 S5 S6 S7 SO S 1 S2 S3 S4 S5 S6 S7 SO S1 S2 S3 S4 S5
ClK
A1-A23=:=======3~~:::=~::~=:~==~~~::~=:::==~~==::~~::========::~~~::==::~
,\8-, 1 ~ ,
UDS--------~,~-----,~~r_-_-_-_~_=_=_\~--------~~,:===~~r'-------------------~-=-=~'~---
lDS - - - - - - - - , •
, I'~
A/W) I'r-·-----"
DTACK - - - - - - - - - - - , '...._ _--'
••
D~D15--------------{==============:=J ..•
1""""1------ Read -------+\+------- I Approx 8 Clocks.. I""
~""ot-'-'-- Idle
- - - - - '.. Wnte Stack-----+j
IS placed on the data bus, and In state 4 the data strobes are
Issued to ,nd,cate valid data on the data bus
The processor now Inserts walt states until It recognizes Define M6800 Cycle
the assertion of VPA The VPA Input signals the processor 11 External hardware asserts Valid Penpheral
that the address on the bus IS the address of an M6800 Address IV PAl
deVice (or an area reserved for M6800 devlcesl and that the
bus should conform to the 1/>2 transfer charactenstlcs of the
M6800 bus Valid penpheral address IS denved by decoding
the address bus, conditioned by address strobe
After the recognition of VPA, the processor assures that SynchronIZe With Enable
the Enable (E) IS low, by waiting If necessary, and subse- 11 The processor mortltors Enable lEI until It IS
quently asserts VMA Valid memory address IS then used as low IPhase 11
part of the chip select equation of the penpheral ThiS en-
I
21 The processor asserts Valid Memory Ad-
'--------',
sures that the M6800 penpherals are selected and deselected dress IVMAI
at the correct time The penpheral now runs ItS cycle dunng
the high portion of the E signal Figures 40 and 41 depict the
best and worst case M6800 cycle timing ThiS cycle length IS
dependent stnctly upon when VPA IS asserted In relationship Transfer Data
to the E clock 11 The penpheral walts until E IS active and
Dunng a read cycle, the processor latches the penpheral then transfers the data
data In state 6 For all cycles, the processor negates the ad-
~
dress and data strobes one half clock cycle later In state 7,
and the Enable signal goes low at thiS time Another half
clock later, the address bus IS put In the high-Impedance
state Dunng a wnte cycle, the data bus IS put In the hlgh-
Impedance state and the read/write signal IS sWitched high Terminate Cycle
The penpheralloglc must remove VPA Within one clock after 11 The processor walts until E goes low IOn a
address strobe IS negated Read cycle the data IS latched as E goes
low Internallyl
DT ACK should not b~ asserted while VPA IS asserted 21 The processor negates VMA
Notice that the MC68000 'i7Mi'i. IS active low, contrasted With 31 The processor negates AS, UDS, and lDS
the active high M6800 VMA ThiS allows the processor to put
ItS buses In the high-Impedance state on DMA requests
Without Inadvertently selecting penpherals
t
Start Next Cycle
4-691
• ~
n
~
~
FIGURE 40 - M6800 TIMING - BEST CASE
•
~
n
~
SO Sl S2 S3 S4 w w w w w w w w w w w S5 S6 S7 SO
CLK \. Jr \. I \. I + I + I \. I -+ I \. I \. I \. I -'!;: /I \. I
r-
0)
A1-A23 1>---< ) •
~
n
AS \
® ~
Ii)
~
f-@ ® •
~
m
CO
n
~
VPA
I\)
@)
VMA
r-
.-
@ 0
Data Out
Data In _________________________________________ _
NOTE This figure represents the best case M6800 timing where VPA falls before the third system clock cycle after the failing edge of E
s:
~
CLK
R/Vii
(Read)
®
!
r.....
o
Data In
(Jl5'S1 rns
Read
R/WWnt8
Data Out
@-1l b =J 1.-@
UDS/LDS
Wnte
•
MC68000L4-MC68000L6-MC68000L8-MC68000L 10
INTERRUPT OPERATION
DUring an Interrupt acknowledge--El'..cle while the pro- there are SIX normal Interrupt vectors and one NMI type vec-
cessor IS fetching the vector, If VPA IS asserted, the tor. As With both the M6800 and the MC68000's normal vec-
MC68000 will assert VMA and complete a normal M6800 tored Interrupt, the Interrupt service routine can be located
read cycle as shown In Figure 42 The processor Will then use anywhere In the address space This IS due to the fact that
an Internally generated vector that IS a function of the inter- while the vector numbers are fixed, the contents of the vec-
rupt being serviced This process IS known as autovectorlng tor table entries are assigned by the user
The seven autovectors are vector numbers 25 through 31 Since VMA IS asserted dUring autovectorlng, the M6800
Ideclmall peripheral address decoding should prevent unintended ac-
This operates In the same fashion Ibut IS not restricted to) cesses.
the M6800 interrupt sequence. The basIc difference IS that
ClK
A1-A3
A4-A23
AS
UOS
I
lOS
R/W
OTACK ~
08-015 ----<:::)-----------------
0~D7 ----<:::)----------------------------
FCO-2 X y 'C
IPlO-2
~~====~------~==~-
L-.
VPA \ r\......
VMA \ I
~ ~r~I ____-t-- _ _ _ -Autovector Operatlon- _ _ _ _ ~
~ Cycle ---".. ~
4-694
MC68000L4- MC68000L6- MC68000L8- MC68000L 10
Five baSIC data types are supported Thllse data types are.
_ Bits
_ BCD Digits 14-blts)
_ Bytes IB-blts)
TABLE 9 -
Mode
Register Direct Addressing
Data Register Direct
Address Register Direct
Absolute Data Addressing
ADDRESSING MODES
EA=Dn
EA=An
Generation •
Absolute Short EA= INext Wordl
_ Word 116-blts) Absolute Long EA= INext Two Wordsl
_ Long Words 132-bits) Program Counter Relative Addressing
In addition, operations on other data types such as memory Relative with Offset EA=IPCI+d16
addresses, status word data, etc, are proVided for In the in- Relative with Index and Offset EA=IPCI+IXn)+ds
struction set Register Indirect Addressing
Register Indirect EA= IAnl
Postlncrement Register Indirect EA=IAnl, An-An+N
Predecrement Register Indirect An-An-N, EA=IAnl
Register Indirect with Offset EA = IAnl + d16
The 14 addreSSing modes, shown In Table 9, Include SIX
Indexed Register Indirect with Offset EA= IAnl+ IXnl+ dS
baSIC types
_ Register Direct Immediate Data Addressing
Immediate DATA=Next Wordlsl
_ Register Indirect QUick Immediate Inherent Data
_ Absolute
Implied Addressing
_ Immediate Implied Register EA= SR, USP, SP, PC
_ Program Counter Relative NOTES:
- Implied EA = Effective Address de = Eight-bit Offset
An = Address Register Idlsplacement!
Included In the register indirect addreSSing modes IS the
On = Data Register d16 = Sixteen-bit Offset
capability to do postlncrementlng, predecrementlng, offset-
Xn = Address or Data Register used Idlsplacementl
ting and IndeXing. Program counter relative mode can also
as Index Register N = 1 for Byte, 2 for
be modified via IndeXing and offsetting
SR = Status Register Words and 4 for Long
PC = Program Counter Words
I I = Contents of - = Replaces
4-695
INSTRUCTION SET OVERVIEW
long words and most Instructions can use any of the 14 ad-
The MC68000 instruction set IS shown In Table 10. Some dressing modes. Combining Instruction types, data types,
additional instructions are Variations, or subsets, of these
and addressing modes, over 1000 useful Instructions are pro-
and they appear In Table 11. Special emphasIs has been given
vided These instructions Include signed and unsigned
to the Instruction set's support of structured high-level
multiply and divide, "quick" arithmetic operations, BCD
languages to facIlitate ease of programming. Each instruc-
arithmetic and expanded operations (through trapsl
tion, with few exceptions, operates on bytes, words, and
I
BSR Branch to Subroutine MOVEM Move Multiple Registers SCC Set Conditional
BTST Bit Test MOVEP Move Penpheral Data STOP Stop
CHK Check Register Against Bounds MULS Signed Multiply SUB Subtract
CLR Clear Operand MULU Unsigned Multiply SWAP Swap Data Register Halves
CMP Compare NBCD Negate Decimal With Extend TAS Test and Set Operand
DBCC Test Condition, Decrement and NEG Negate TRAP Trap
Branch NOP No Operation TRAPV T rap on Overflow
DIVS Signed D,v,de NOT One's Complement TST Test
DIVU Unsigned DIvide OR Logical Or UNLK Unlink
Instruction Instruction
Variation Description Variation Description
Type Type
ADD ADD Add MOVE MOVE Move
ADDA Add Address MOVEA Move Address
ADDQ Add QUick MOVEQ Move QUick
ADDI Add Immediate MOVE from SR Move from Status Register
ADDX Add With Extend MOVE to SR Move to Status Register
AND AND Logical And MOVE to CCR Move to Condition Codes
ANDI And Immediate MOVE USP Move User Stack POinter
4-696
M C68000L4. MC68000L6· MC68000LS. MC68000L 10
The following paragraphs contain an overview of the form The multiply and diVide operations are available for Signed
and structure of the MC68000 Instruction set The Instruc- and unSigned operands uSing word multiply to produce a
tions form a set of tools that Include all tne machine func- long word product, and a long word diVidend With word
tions to perform the follOWing operations diVisor to produce a word quotient With a word remainder
Data Movement Multlpreclslon and mixed size arithmetiC can be ac-
Integer ArithmetiC complished uSing a set of extended instructions These In-
structions are add extended IADDX), subtract extended
Logical
(SUBX), sign extend (EXT), and negate binary With extend
Shift and Rotate (NEGX)
Bit Manipulation A test operand ITST) Instruction that Will set the condition
Binary Coded Decimal codes as a result of a compare of the operand With zero IS
Program Control also available Test and set ITAS) IS a synchronization In-
struction useful In multiprocessor systems Table 13 IS a sum-
System Control
mary of the Integer arithmetiC operations
The complete range of Instruction capabilities combined
With the flexible addressing modes described previously pro-
vide a very flexible base for program development TABLE 12 - DATA MOVEMENT OPERATIONS
Instruction Operand Size Operation
ADDRESSING
EXG 32 Rx-Ry
Instructions for the MC68000 contain two kinds of infor-
LEA 32 EA-An
mation the type of function to be performed, and the loca-
tion of the operand lsi on which to perform that function An-SP@-
LINK - SP-An
II
The methods used to locate laddressl the operand lsi are ex-
plained In the following paragraphs SP+d-SP
Instructions specify an operand location In one of three MOVE 8,16,32 IEAls-EAd
ways lEAl-An, On
MOVEM 16,32
Register Specification - the number of the register IS An,On-EA
given In the register field of the instruction lEAl-On
MOVEP 16,32
Effective Address - use of the different effective On-EA
address modes MOVEa 8 #xxx- On
ImpliCit Reference - the definition of certain Instruc- PEA 32 EA-SP@-
tions Implies the use of specific registers On(31 16]- On[15 0]
SWAP 32
4·697
MC68000L4-MC68000LS-MC68000LS-MC68000L 10
I
speCified by the effective address register field
8,16,32 Dn-IEAI-Dn
IEAI-Dn-EA
SUB Address Register Direct. The operand IS In the address
IEAI-#xxx-EA
16,32 An-lEAl-An register speCified by the effective address register field
Dx- Dy- X- Dx
SUBX 8,16,32 MEMORY ADDRESS MODES. These effective address-
Ax@--Ay@- -X-Ax@
Ing modes speCify that the operand IS In memory and prOVide
TAS 8 IEAI-0,1-EA[7J
the speCifiC address of the operand
TST 8,16,32 IEAI-O
Address Register Indirect. The address of the operand IS In
NOTE. [ J= bit number the address register speCified by the register field The
reference IS claSSified as a data reference With the exception
of the Jump and Jump to subroutine Instructions
15 14 13 12 11 10 9 8 6 5 4 3 o
Operation Word
IFirst Word SpeCifies Operation and Modesl
Immediate Operand
IIf Any, One or Two Words I
Source Effective Address ExtenSion
IIf Any, One or Two Wordsl
Destination Effective Address ExtenSion
IIf Any, One or Two Wordsl
FIGURE 44 - SINGLE-EFFECTIVE-ADDRESS
INSTRUCTION OPERATION WORD GENERAL FORMAT
4-698
MC68000L4- MC68000LS- M C68000L8- MC68000L 10
Address Register Indirect With Postincrement. The extension word The reference IS claSSified as a program
address of the operand IS In the address register specified by reference
the register field After the operand address IS used. It IS in-
cremented by one. two. or four depending upon whether the Program Counter With Index. ThiS address mode requires
size of the operand IS byte. word. or long word If the one word of extension ThiS address IS the sum of the
address register IS the stack pOinter and the operand size IS address In the program counter. the sign-extended displace-
byte. the address IS Incremented by two rather than one to ment Integer In the lower eight bits of the extension word.
keep the stack pOinter on a word boundary The reference IS and the contents of the Index register The value In the pro-
classified as a data reference gram counter IS the address of the extension word ThiS
reference IS classified as a program reference
Address Register Indirect With Predecrement. The
address of the operand IS In the address register specified by Immediate Data. ThiS address mode requires either one or
the register field Before the operand address IS used. It IS two words of extenSion depending on the size of the opera-
decremented by one. two. or four depending upon whether tion
the operand size IS byte. word. or long word If the address Byte operation - operand IS low order byte of exten-
register IS the stack pOinter and the operand size IS byte. the sion word
address IS decremented by two rather :han one to keep the
Word operation - operand IS extenSion word
stack pOinter on a word boundary The reference IS classified
Long word operation - operand IS In the two extenSion
as a data reference
words. high-order 16 bits are In the first extenSion
word. low-order 16 bits are In the second extension
Address Register Indirect With Displacement. This
word
address mode requires one word of extension The address
of the operand IS the sum of the address In the address
II
Condition Codes or Status Register. A selected set of In-
register and the sign-extended 16-blt displacement Integer In
structions may reference the status register by means of the
the extension word The reference IS classified as a data
effective address field These are
reference with the exception of the Jump to subroutine In-
structions ANDI to CCR
ANDI to SR
Address Register Indirect With Index. This address mode EaRl to CCR
requires one word of extenSion The address of the operand EaRl to SR
IS the sum of the address In the address register. the slgn- ORI to CCR
extended displacement Integer In the low order eight bits of ORI to SR
the extension word. and the contents of the Index register
The reference IS claSSified as a data reference with the excep- EFFECTIVE ADDRESS ENCODING SUMMARY
tion of the Jump and Jump to subroutine Instruclions Table 14 IS a summary of the effective addreSSing modes
discussed In the prevIous paragraphs
SPECIAL ADDRESS MODE. The special address modes
use the effective address register field to speCify the special
TABLE 14 - EFFECTIVE ADDRESS ENCODING SUMMARY
addreSSing mode Instead of a register number
Addressing Mode Mode Register
Absolute Short Address. This address mode requires one
Data Register Direct 000 register number
word of extension The address of the operand IS the exten-
sion word The 16-blt address IS sign extended before It IS
Address Register Direct 001 register number
used The reference IS classified as a data reference With the Address Register Indirect 010 register number
exception of the Jump and Jump to subroutine instructions Address Register Indirect With
Postlncrement 011 register number
Absolute Long Address. This address mode requires two Address Register Indirect With
words of extension The address of the operand IS developed Predecrement 100 register number
by the concatenation of the extension words The high-order Address Register Indirect with
part of the address IS the first extension word. the low-order Displacement 101 register number
part of the address IS the second extenSion word The Address Register Indirect With
reference IS classified as a data reference With the exceplion Index 110 register number
of the ,ump and Jump to subroutine instructions Absolute Short 111 000
Absolute Long 111 001
Program Counter With Displacement. This address mode
Program Counter with
requires one word of extension The address of the operand
Displacement 111 010
IS the sum of the address In the program counter and the
sign-extended 16-blt displacement Integer In the extension Program Counter With Index 111 011
word The value In the program counter IS the address of the Immediate 111 100
4-699
MC68000L4- MC68000LS- MC68000L8- MC68000L 10
~ IIIi
state of the S-blt In the status register If the S-blt ,nd,cates
supervisor state, SSP IS the active system stack pOinter, and
the USP cannot be referenced as an address register If the
ROl 8.16.32 IJ
S-blt ,nd,cates user state, the USP IS the active system stack
pOinter, and the SSP cannot be referenced Each system
ROR 8,16,32 ~ •~
stack fills from high memory to low memory ROXl 8,16,32 ~ IIIi Hi]J
ROXR 8,16,32 4iH •~
•
LOGICAL OPERATIONS
Logical operation instructions AND, OR, EOR, and NOT
are available for all sizes of Integer data operands. A similar BIT MANIPULATION OPERATIONS
set of Immediate Instructions (ANDI, ORI, and EORIl provide Bit mampulatlon operations are accomplished uSing the
these logical operations With all sizes of Immediate data follOWing instructions bit test IBTSTI, bit test and set
Table 15 IS a summary of the logical operations IBSET), bit test and clear (BClR), and bit test and change
IBCHG) Table 17 IS a summary of the bit manipulation
operations IBlt 2 of the status register IS Z I
4·700
MC68000L4e MC68000LS-MC68000L8-MC68000L10
•
Conditional TRAP Trap
BSR
8- and lE>-b,t displacement
Branch to subroutine
MOVE SR to EA StOl"e status register
I
8- and 16-blt displacement
JMP Jump
JSR Jump to subroutine
Returns
RTR Return and restore condition codes
RTS Return from subroutine I
4-701
MC68000L4-MC68000LS-MC68000L8-MC68000L10
INSTRUCTION SET
The following paragraphs provide information about the These categones may be combined, so that additional,
addressing categones and Instruction set of the MC68000. more restnctlve, classifications may be defined For exam-
ple, the Instruction descnptlons use such classifications as
ADDRESSING CATEGORIES alterable memory or data alterable The former refers to
Effective address modes may be categonzed by the ways those addressing modes which are both alterable and
In which they may be used. The following classifications will memory addresses, and the latter refers to addreSSing modes
be used In the Instruction definitions. which are both data and alterable
Data If an effective address mode may be
used to refer to data operands, It IS INSTRUCTION PRE-FETCH
considered a data addressing effective The MC68000 uses a 2-word tightly-coupled instruction
address mode. prefetch mechanism to enhance performance This
Memory If an effective address mode may be mechanism IS descnbed In terms of the microcode opera-
used to refer to memory operands, It IS tions Involved If the executIOn of an instruction IS defined to
considered a memory addressing ef- begin when the micro routine for that instruction IS entered,
fective address mode some features of the prefetch mechanism can be descnbed
Alterable 11 When execution of an Instruction beginS, the operation
If an effective address mode may be
word and the word follOWing have already been fetch
used to refer to alterable Iwnteablel
ed The operation word IS In the instruction decoder
operands, It IS considered an alterable
21 In the case of multi-word Instructions, as each addi-
•
addressing effective address mode
tional word of the Instruction IS used Internally, a fetch
Control If an effective address mode may be IS made to the Instruction stream to replace It
used to refer to memory operands 31 The last fetch from the instruction stream IS made
without an associated Size, It IS con- when the operation word IS discarded and decoding IS
sidered a control addressing effective started on the next InstructIOn
address mode 41 If the Instruction IS a Single-word instruction causing a
branch, the second word IS not used But because thiS
Table 21 shows the vanous categones to which each of the word IS fetched by the preceding instruction, It IS Im-
effective address modes belong Table 22 IS the instruction possible to aVOid thiS superfluous fetch In the case of
set summary an Interrupt or trace exception, both words are not
used
The status register addressing mode IS not permitted 51 The program counter usually POints to the last word
unless It IS explicitly mentioned as a legal addressing mode fetched from the InstructIOn stream
Effective
Addressing Categories
Address
Modes Mode Register Date Memory Control Alterable
Dn 000 register number X - - X
An 001 register number - - - X
An@ 010 register number X X X X
An@+ 011 register number X X - X
An@- 100 register number X X - X
An@ldl 101 register number X X X X
An@(d, IX) 110 register number X X X X
xxxW 111 000 X X X X
xxx L 111 001 X X X X
PC@(d) 111 010 X X X -
PC@(d, IX) 111 011 X X X -
Ixxx 111 100 X X - -
4·702
MC68000L4· MC68000L6. MC68000L8. MC68000L 10
Condition
Mnemonic Description Operation Codes
X N Z V C
ABCO Add Decimal with Extend (Oestm8tlonll0+ (Source)10- Destination U U
ADD
ADDA
Add Binary
Add Address
(Destmatlon) + (Source) -
(Destination) + (Source) -
Destination
Destination - -
·
- - -
ADD I Add Immediate (Destination) + Immediate Data - Destination
. ·
ADDQ Add QUick (Destination) + Immediate Data - Destination
ADDX Add Extended (Destmatlon) t (Source) + X- Destination
AND AND Logical (Destmatlon) A (Source)- Destination - a a
ANDI AND Immediate (Destination) A Immediate Data - Destmatlon - a a
ASL, ASR Arithmetic Shift (Destination) Shifted by <count> - Destination
BCC Branch Conditionally If CC then PC+ d - PC - - - - -
-«bit number>) OF Oestlnatlon-Z
BCHG Test a Bit and Change -«bit number» OF Oe5tlnatlon-
< bit number> OF Destination
- - · - -
II
BAA Branch Always PC+d-PC - - - - -
-«bIt number» OF Destlnatlon-Z
BSET Test a Bit and Set - - - -
1 - < bit number> OF DestInatIon
BSA Branch to Subroutine PC-SP@-, PC+d-PC - - - - -
BTST Test a Bit - « bit number» OF Destination - Z - - - -
CHK Check RegIster agaInst Bounds If Dn <Oar Dn> l<ea>1 then TRAP - U U U
CLA Clear an Operand 0 - Destination - a 1 a a
CMP Compare (DestinatIon) - (Source) - ·
CMPA Compare Address IDestlnatlonl-ISourcel - ····
CMPI Compare Immediate (DestInatIon) -ImmedIate Data - ··
CMPM Compare Memory (DestinatIon) - (Source) - ···
DBCC Test CondItIon, Decrement and Branch If-CC then Dn-1-Dn, If Dn .. -1 then PC+d-PC - - - - -
DIVS Signed D,v,de (Destlnatlon)/ (Source) - Destination - 0
DIVU Unsigned DIvIde (Destlnatlon)/ (Source) - DestInation - · a· aa
EOR ExclusIve 0 R Logical (DestinatIon) m (Source) - Destination - ·
EORI
EXG
ExclusIve OR Immediate
Exchange Register
(DestinatIon) m Immediate Data -
Rx-Ay
DestinatIOn -
-
· a -a
- - -
EXT
JMP
Sign Extend
Jump
(Destination) SIgn-extended -
Destination - PC
DestInation -
-
··aa
- - - -
JSR Jump to Subroutine PC- SP@-, Destlnatlon- PC - - - - -
LEA Load Effective Address DestinatIon - An - - - - -
LINK LInk and Allocate An-SP@-, SP-An, SP+d-SP - - - - -
LSL, LSA Logical Shift (DestinatIOn) ShIfted by < count> - DestInatIon · a ·
MOVE Move Data from Source to Destination (Source) - Destination - a a
MOVE to CCR Move to CondItIon Code
MOVE to SA Move to the Status Register
(Source) -
ISourcel- SA
CCR
. ··
• affected o cleared U defined
- unaffected 1 set
4-703
MC68000L4. MC68000L6. MC68000LS· MC68000L 10
Condition
Mnemonic Description Operation Codes
X N Z V C
MOVE from SR Move from the Status Register SR- Destination - - - - -
MOVE USP Move User Stack POinter USP-An, An-USP - - - - -
MOVEA Move Address (Source) - Destination - - - - -
Registers - Destmatlon
MOVEM Move Multiple Registers - - - - -
(Source) - Registers
MOVEP Move Penpheral Data (Source)- Destination - - - - -
MOVEQ Move QUick Immediate Data- Destination - 0 0
MULS Signed Multiply (Destination)" (Source) - Destination - 0 0
MULU Unsigned Multiply (Destination)· (Source) - Destination - 0 0
NBCD Negate Decimal with Extend 0- (Oestlnatlon}10 - X - Destination U U
NEG Negate 0- (Destination) - Destination
NEGX Negate with Extend 0- (Destination) - X - Destination
NOP No Operation - - - - - -
NOT Logical Complement - (Destlnatlonl- Destination - 0 0
OR Inclusive OR Logical (Destination) v (Source) - Destination - 0 0
II
ORI Inclusive OR Immediate (Destmatlon) v Immediate Data- Destination - 0 0
PEA Push Effective Address Destination - S P@ ~ - - -- - -
RESET Reset External Devices - - - - - -
ROL, ROR Rotate (Without Extend) (Destination) Rotated by < count> - Destination - 0
ROXL, ROXR Rotate with Extend (Destination) Rotated by < count> - Destination 0
RTE Return from Exception SP@+-SR, SP@+-PC
RTR Return and Restore Condition Codes SP@+-CC,SP@+-PC
RTS Return from Subroutine SP@+-PC - - - - -
SBCO Subtract Decimal with Extend (Destination) 10 ~ (Source)1 a~ x- Destination U U
SCC Set According to Condition If CC then 1's- Destination else O's- Destination - - - - -
STOP
SUB
Load Status Register and Stop
Subtract Bmary
Immediate Data- SR, STOP
(Destination) ~ (Source) - Destination .
SUBA Subtract Address (Destination) ~ (Source) - Destination - - - - -
SUBI Subtract Immediate (Destination) -Immediate Data- Destination
SUBQ Subtract QUick (Destination) - Immediate Data - Destination
SUBX Subtract with Extend (Destination) - (Source) - X - Destination
SWAP Swap Register Halves Register [31 16]- Register [150] - 0 0
TAS Test and Set an Operand (DestlnaliOn) Tested - CC, 1 - [7] OF Destination - 0 0
TRAP Trap PC- SSP@-, SR- SSP@-, IVectorl- PC - - - - -
TRAPV T rap on Overflow If V then TRAP - - - - -
TST Test an Operand lDestlnatlOn) Tested- CC - 0 0
UNLK Unlink An-SP, SP@+-An - - - - -
[ ]= bit number
4-704
MC68000L4- MC68000L6- MC68000LS- MC68000L 10
•
pute an Instruction's effective address It Includes fetching read and wllte cycles must be added respectively to those of
of any extension words, the address computatIOn, and the effective address calculation where Indicated
fetching of the memory operand The number of bus read In Table 27, the headings have the follOWing meanings
and Wllte cycles IS shown In parenthesIs as Ir/wl Note there # ~ Immediate operand, On ~ data register operand, An ~
are no wllte cycles Involved In processing the effective ad- address register operand, M ~ memory operand, and
dress S R ~ status register
-The size of the Index register (IX) does not affect execution time
4-705
MC68000L4· MC68000LS. MC68000L8. MC68000L 10
Destination
Source
Dn An An@ An@+ An@- An@ldl An@ld,ixl- xxx.W xxx.L
Dn 411/01 411/01 811/11 811/11 811111 1212/11 1412111 1212/11 1613/11
An 411101 411/01 811/11 811/11 811/11 1212/11 1412111 1212/11 1613/11
An@ 812101 812/01 1212/11 1212/11 1212/11 1613111 1813/11 1613/11 2014/11
An@+ 812101 812/01 1212/11 1212/11 1212/11 1613111 1813/11 1613/11 20141 11
An@- 1012/01 1012/01 1412/11 1412111 1412/11 1813/11 2013/11 1813/11 2214111
An@ldl 1213/01 1213/01 1613/11 1613111 1613/11 2014/11 2214111 2014/11 2415/11
An@ld, ixl- 1413/01 1413/01 1813111 1813/11 1813111 2214/11 2414111 2214111 2615/11
xxx.W 1213/01 1213/01 1613111 1613111 1613/11 2014/11 2214111 2014111 2415/11
xxx.l 1614/01 1614/01 2014111 2014111 2014111 2415/11 2615/11 2415111 2816111
PC@ldl 1213/01 1213/01 1613/11 1613111 1613/11 2014/11 2214111 2014111 2415111
PC@ld, ixl' 1413/01 1413/01 IS13/11 IS13/11 IS13/11 2214111 2414111 2214111 2615.11
'xxx SI2/01 SI2/01 1212/11 1212/11 1212111 1613/11 1813/11 1613111 2014/11
The size of the Index register IIx) does not affect execution time
•
Destination
Source An An@ An@+ An@- An@ldl An@ld,ixl* xxx.W xxx.L
Dn
Dn 411/01 411/01 1211/21 1211/21 1411/21 1612/21 1812/21 1612/21 2013/21
An 411101 411/01 1211/21 1211/21 1411/21 1612/21 1812/21 1612/21 2013.21
An@ 1213/01 1213/01 2013/21 2013/21 2013/21 2414/21 2614/21 2414121 2815121
An@+ 1213/01 1213/01 2013121 2013/21 2013/21 2414/21 2614/21 2414121 28(5/21
An@- 1413/01 1413/01 2213121 2213/21 2213/21 2614/21 2814/21 2614/21 3015/21
An@ldl 1614/01 1614/01 2414/21 2414/21 2414121 2815/21 3015121 2815/21 3216/21
An@ld, ixl' 1814/01 1814/01 2614/21 2614/21 2614/21 3015/21 3215/21 3015/21 3416/21
xxx.W 1614/01 1614/01 2414/21 2414/21 2414/21 2815/21 3015121 2815/21 3216/21
xxx.L 2015101 2015/01 2815/21 2815/21 2815121 3216/21 3416/21 3216/21 3617/21
PC@ld) 1614/01 1614/01 2414/21 2414/21 2414/21 2815121 3015/21 2815/21 3215121
PC@ld, ix)' 1814/01 1814/01 2614/21 2814121 2614/21 3015121 3215/21 3015121 3416121
Ixxx 1213/01 1213/01 2013/21 2013/21 2013121 2414/21 2614/21 2414121 2815/21
-The size of the mdex register (Ix) does not affect execution time
EOR
Byte, Word - 411/01'" 811/11+
Long - 811/01'" 1211/21+
MULS - - 7011/01 +' -
MULU - - 7011/01+' -
Byte, Word - 411101+ 811/11+
OR
Long - 611/01+*' 1211/11+
Byte, Word 811101+ 411/01+ 811/11+
SUB
Long 611/01+" 611/01+" 1211/21+
+ add effective address calculation time •• total of 8 clock periods for instruction If the effective address IS register direct
• Indicates maximum value I ••• only available effective address mode IS data regIster dIrect
4·706
MC68000L4· MC68000LS· MC68000LS. MC68000L 10
Instruction Size op #, On op #, An op #, M
Byte, Word 812/01 - 1212/11+
ADDI
Long 1613/01 2013121+
Byte, Word 411/01 811/01' 811/11+
ADDQ
Long 811/01 811/01 1211/21+
Byte, Word 812101 - 1212/11 +
ANDI
Long 1613/01 2013111+
Byte, Word 812/01 812/01 812/01 +
CMPI
Long 1413/01 1413/01 1213/01 +
EORI
Byte, Word 812101 - 1212/11 +
Long 1613/01 2013/21 +
MOVEa Long 411/01 - -
Byte, Word 812101 - 1212/11+
ORI
Long 1613/01 2013/21+
Byte, Word 812101 - 1212/11+
SUBI
Long 1613/01 2013/21 +
Byte, Word 411/01 811101' 811/11 +
SUBO
Long 811/01 811/01 1211/21+-
II
+ add effective address calculation time
·word only
BIT MANIPULATION INSTRUCTION CLOCK PERIODS JMP, JSR, LEA, PEA, MOVEM INSTRUCTION CLOCK
Table 30 Indicates the number of clock periods reqUired for PERIODS
the bit manipulation Instructions The number of bus read Table 32 Indicates the number of clock penods reqUired for
and write cycles IS shown In parentheSIS as: (r/wl The the Jump, Jump to subroutine, load effective address, push
number of clock penods and the number of read and write effective address, and move multiple registers instructions.
cycles must be added respectively to those of the effective The number of bus read and wnte cycles is shown In paren-
address calculation where indicated. theSIS as: (r/wl.
4-707
MC68000L4-MC68000LS-MC68000L8-MC68000L 10
Dynamic Static
Instruction Size
Register Memory Register Memory
Byte - 811111+ - 1212/11+
II
BCHG
Long 811101'" - 1212/01* -
Byte - 811111+ - 1212/11+
BCLR
Long 1011/01* 1412/01*
Ii~ - 8(1111+ - 1212/11+
BSET Long 811101* 1212/01*
BTST
Byte - 411/01+ - 012/01+
Long 611/01 - 1012/01 -
4-708
MC68000L4-MC68000LS-MC68000L8-MC68000L 10
Instr Size An@ An@+ An@- An@ldl An@ld,lxl* xxx.W xxx.L PC@ldl PC@ld, Ixl*
JMf' - 812/01 - - 1012/01 1413/01 1012/01 1213/01 1012/01 1413/01
JSR - 1612/21 - - 1812/21 2212121 1812/21 2013121 1812/21 2212121
LEA - 411101 - - 812/01 1212/01 812101 1213/01 812101 12<2/01
PEA - 1211/21 - - 1612/21 2012121 1612/21 2013121 1612/21 2012121
MOVEM Word 12+40 12+40 - 16+4n 18+40 16+40 20+40 16+40 18+40
13+ n/Oi 13+n/01 - 14+n/01 14+n/0i 14+n/0i 15+ n/Oi 14+ n/OI 14+n/0i
M-R Long 12+80 12+80 - 16+80 18+80 16+80 20+80 16+80 18+80
13+2n/0i 13+2n/01 - 14+ 2n/01 14+ 2n/0i 14+ 2n/0i 15+ 2n/0l 14+2n/01 14+2n/01
MOVEM Word 8+50 - 8+50 12+50 14+50 12+50 16+50 - -
12/nl - 12/nl 13/nl 13/nl 13/nl 14/nl - -
R-M Long 8+1On - 8+1On 12+10n 14+1On 12+100 16+100 - -
12/2nl - 12/2nl 13/2nl 13/2nl 13/2nl 14/2nl - -
n IS the number of registers to move
* IS the size of the Index register hx) does not affect the InstructIOn's execution time
•
MULTI-PRECISION INSTRUCTION CLOCK PERIODS
Table 33 Indicates the number of clock periods for the number of read and write cycles IS shown In parenthesis as:
multi· precISion instructions The number of clock periods In (r/w!.
cludes the time to fetch both operands, perform the opera- In Table 33, the headings have the follOWing meanings
tions, store the results, and read the next instructions. The On = data register operand and M = memory operand
CMPM
Byte, Word - 1213/01
Long - 2015101
Byte, Word 411101 1813111
SUBX
Long 811/01 3015/21
ABCD Byte 811/01 1813/11
SBCD Byte 811101 1813/11
Table 34 Indicates the number of clock periods for the Table 35 indicates the number of clock peroods for excep-
follOWing miscellaneous instructions The number of bus tion processing The number of clock periods Includes the
read and write cycles IS shown In parenthesIs as· (r/w) The time for all stacking, the vector fetch, and the fetch of the
number of clock periods plus the number of read and wme first Instruction of the handler routine. The number of bus
cycles must be added to those of the effective address read and write cycles IS shown In parenthesIs as: (r/w!.
calculation where Indicated
4-709
MC68000L4. MC68000L6. MC68000LS· MC68000L 10
MOVEP
Word - - 1612/21 1614/0}
Long - - 2412/41 2416/0}
EXG - 611101 - - -
EXT
Word 411/0} - - -
Long 411/0} - - -
LINK - 1612/21 - - -
MOVE from USP - 41110} - - -
MOVE to USP - 411/0} -
NOP - 411/0} - - -
RESET - 13211/0} - - -
RTE - 2015101 - - -
RTR - 2015/0} - - -
RTS - 1614/0} - - -
STOP - 41010} - - -
II SWAP
UNLK
-
-
+ add effective address calculation time
411/0}
1213/01
-
-
Exception Periods
Address Error 5014171
Bus Error 5014171
Interrupt 4415/31*
Illegal Instruction 3414/31
Privileged Instruction 3414/31
Trace 3414/31
*The Interrupt ac'<.nowledge bus cycle IS assumed
to take four external clock periods
4-710
MC68120 MC68121
® MOTOROLA
(1.0 MHz)
MC68120·1 MC68121·1
(1.25 MHz)
(1.0 MHz)
(1.25 MHz)
Advance Infor:rn.atlon
HMOS
(HIGH-DENSITY N-CHANNEL
SILICON-GATE)
INTELLIGENT PERIPHERAL CONTROLLER
INTELLIGENT PERIPHERAL
The MC68120/MC68121 Intelhgent Penpheral Controller OPC) IS a CONTROLLER
general purpose, mask programmable peripheral controller. The IPC
provides the Interface between an M68000 or M6800 Family
microprocessor and the final penpheral devices through a system bus
and control hnes. System bus data IS transferred to and from the IPC via
.-
dual-port RAM while the software utlhzes the semaphore registers to
control RAM tasking or any other shared resource. Multiple operating
modes range from a Single chip mode with 21 1/0 lines and 2 control
lines to an expanded mode supporting an address space of 64K bytes.
The MC68120 has 2K bytes of on-chip ROM to make full use of all
operating modes The MC68121 utlhzes only the expanded address
modes, due to the absence of on-chip ROM. , L SUFFIX
A senal commUnications Interface, 16-blt timer, dual-ported RAM CERAMIC PACKAGE
and semaphore registers are available for use by the IPC In all operating CASE 740
modes.
SAO P37
SDO P40
SDI P41
SD2 P42
SD3 P43
SD4 P44
SD5 P45
SD6 P46
SD7 P47
4·711
M C68120· M C68121. M C68120-1· M C68121-1
~N~~~
c...c...o....o...c... cs
I-~«« SR/W
z::>.-J~~ OTACK
f= ~~@~
SOl
o 000
:::::-:::::::::::::::
'OO}
S02
S03 -;::
1+----+.., ~g~ ~ ~
Mode
S06
'"E
S07
*
>
(/)
SAO
SAl
SA2
SA3
SA4
RA[i'ISAINMI SA5
"iiiOl SA6
SA7
RESET CPU Data
II VSS
Vee
Address
OOOOOOOOI"'I'" •
Single Chip { ::::::::::::::::::::::::::::::::::::::: ~ ~
00000000
:::::::::::::::::::::::::::::::::::::::
MAXIMUM RATINGS
Rating Symbol Value Unit ThiS device contains cirCUItry to protect the
Supply Voltage VCC -03to+70 V Inputs against damage due to high static
Input Voltage V,n -0310 +70 V voltages or electnc fields, however, It IS ad-
vised that normal precautions be taken to
Operating Temperature Range TA o to 70 'c avoid application of any voltage higher than
Storage Temperature Range Tstg -55 to + 150 'c maximum rated voltages to thiS hlgh-
Impedance Circuit For proper operation It IS
recommended that Vln and Vout be con-
THERMAL CHARACTERISTICS strained to the range VSSs (V ,n or
Characteristic VoutsVCC
Unused Inputs must always be tied to an
Thermal Resistance
appropnate logic voltage level (e g , either
Ceramic Package
VSS or VCCI
4-712
MC68120- MC68121- MC68120-1-MC68121-1
POWER CONSIDERATIONS
II
DC LOCAL BUS ELECTRICAL CHARACTERISTICS IV CC = 50 Vdc ± 5%, VSS = 0, T A = 0° to 70'C unless otherwise noted I
IRefer to Figures 1 and 21
Characteristic Svmbol Min Typ Max Unit
Input High Voltage E VEIH VCC-O 75 - VCC V
Input Low Voltage E VEIL VSS -0 3 - VSS+06 V
Input High Voltage RESET . VSS +40 - VCC
VIH V
Other Inputs' VSS + 20 - VCC
Input Low Voltage All Inputs' VIL VSS-03 - VSS+08 V
Input Load Current Port4 - - 05
lin mA
IVIn=Oto 2 4 VI SCl - - 08
Input Leakage Current
lin - 15 25 ~A
IV,n =Ot0525VI HALT INMI, TiiCi1, RESET
Three-State IOff Statel Input Current
IV,n =05t024VI SOO-SD7, P30-P37 ITSI - 20 10 ~A
P20-P24 - 100 100
Output High Voltage
IIload= -205~A, VCC= mini P30-P37 VSS+24 - -
VOH V
IIload = - 145 ~A, VCC = min I P40-P47, SC1, SC2 VSS + 24 - -
IIload= -l00~A, Vcc=mlnl Other Outputs VSS+24 - -
Output Low Voltage - - V
VOL VSS + 05
IIload=2 0 mA, VCC= mini All Outputs
Internal Power DISSipation (measured at T A - aOC) PINT - - 1200 mW
Input Capacitance
IV In =0, T A = 25°C, fo= 1 0 MHzI P30-P37, P40-P47, SCl Cin - -- 125 pF
Other Inputs - - 100
'Except Mode Programming Levels, See Figure 31
t·
Test Pomt O~--,
RL=20kO
Test Pomt
MMD6150
or EqUiv
o
"
MMD7000
or Equlv
4-713
MC68120-MC68121-MC68120-1-MC68121-1
RL= 750 0
MMD7000
C=130pF or EqUiv
R~6kO
•
tOSDI
Delay Time, Enable Positive Transition to 053 Positive Transition tOSD2 - 350 ns
Delay Time, Enable Negative TransItIOn to Penpheral Data Valid IPorts 2, 3, 41 tpWD - 350 ns
Delay Time, Enable Negative Transition to Penpheral CMOS Data Valid tCMOS - 20 ~s
FIGURE 4 - DATA SETUP AND HOLD TIMES FIGURE 5 - DATA SETUP AND HOLD TIMES
IMPU READ LOCAL BUSI IMPU WRITE LOCAL BUS)
P20-P24
P40-P47
Inputs All Data
Port Outputs _ _ _ _ _ _ _ _....J Data Valid
P30-P37 Notes
Inputs· 1 10 k Pullup resistor required for Port 2 to reach 0 7 Vee
2 Not applicable to P21
'Port 3 Non-Latched Operation ILATCH ENABLE= 01 3 Port 4 cannot be pulled above Vee
Address
Bus
P30-P37
Inputs
4-714
MC68120-MC68121-MC68120-1-MC68121-1
II
Enable Rise Time Extended tERE - 80 - 80 ns
Processor Control Setup Time tpcs 200 - 200 - ns
Processor Control Hold Time tpCH 20 40 20 40 ns
tERE
Riw,105,
Address
---ti1E~~~~~Gf~----------------ti--------------------------------t-~~~
INon-Muxedl
f+----{ 19l--~~
Address
Strobe IASI _ _ _ _ ---"r
NOTES
Voltage levels shown are Vl:S;O 5 V, VH~2 4 V, unless otherwise specIfied
a
rv1easur€noent pOints shown are 08 V and 2 V, unless otherwise specified
Address valid on the occurrence of the latest of 11 or 23
Usable access time IS comp'.Jted by 1- (4+ 11 + 17)' see note 8
4-715
MC68120e MC68121 e MC68120-1 e MC68121-1
• FIGURE 9 - ASYNCHRONOUS READ OF SEMAPHORE REGISTER FIGURE 10 - ASYNCHRONOUS WRITE OF SEMAPHORE REGISTER
sRiViJ
SAO-SAl
SAOoAl -i-----=I
SOD-SOl ---~'H"-H<I
SDD-SDl
i5TACK--:,--:---J
Three State
Note Timing measurements are referenced to and from a low voltage of 0 8 volts and a high voltage of 2 0 volts, unless otherwise noted
4-716
MC68120e MC68121 eMC68120-1 eMC68121-1
~------------------~--------~------------------------~~
VEIH
I
1+---0------.1
~-------'CD~------~
R/W.Add,ess--~~~~~~~~rr--------~~~~---+4----------------------------
cs----~-r------------------~
Notes
1 Voltage levels shown are VL'sO 5 V, VH~2 4 V, unless otherWise speCified
2 Measurement POints shown are 0 8 V and 2 0 V, unless otherWise speCified
4·717
MC68120-MC68121-MC68120-1-MC68121-1
INTRODUCTION
The MC6B1ZO/MC68121 IS an 8-bIt Intelligent Penpheral The remaining ports (2, 3. and 4) are 1/0 ports. Each port
Controller (lPC) which can be configured to function In a IS controlled by ItS Data DlrecllOn Register The CPU has
wide variety of applications. This extraordinary flexibility IS direct access to the port PinS of each port through ItS Data
provided by its ability to be hardware programmed into eight Register Port PinS are labeled as PII where I Identifies one of
different operating modes. These operating modes allow the three ports and I indicates the particular bit Port 2 IS a 5-blt
IPC to operate on its local bus and communicate with an ex- port which may be configured for 1/0 or for use of the on-
ternal system bus through the Internal dual-ported RAM chip timer and Senal Communications Interface (SCII Ports
The operating mode controls the configuration of 18 of the 3 and 4 may be used as 16 bits of 1/0 or may form a local ad-
48 pins on the IPC, the available on-chip resources, the dress and data bus With control hnes allOWing communica-
memory map, the location !Internal or externall of Interrupt tions With external memory and penpherals
vectors, and the type of local bus. The configuratIOn of the The IPC contains an enhanced M6800 MPU With addl-
remaining 30 pins is not controlled by the operating mode IIOnal capabilities and greater throughput It IS upward
The dual-ported RAM provides a vahlcle for devices on source and oblect code compatible With the MC6800 and
two seperate buses to exchange data Without directly affect- directly compatible With the MC6801 The programming
Ing the devices on the other bus. The dual-ported RAM IS ac- model IS depicted In Figure 14, where accumulator 0 IS a
cessible from the MC681ZO/MC68121 CPU and acceSSible concatenation of accumulators A and B.
synchronously or asynchronously to the system bus through The MC68121 has all of the features of the MC68120 With
Port 1. Semaphore registers are provided as a software tool the exception of on-chip ROM Thus the MC68121 normally
to arbitrate shared resources such as the dual-ported RAM operates In the modes utlhzlng external ROM (modes 2 and
The semaphore registers are acceSSible from both buses In 3) Therefore, modes 0, I, 4, 5, 6 and 7 should not be used
1'5
)(
01 Index Register IXI
4-718
MC68120-MC68121-MC68120-1-MC68121-1
I
% = Binary, $ = Hexadecimal
"Mode Dependent
The reserved memory areas %CHlOOl 0110 and %0001 direction of data transfer IS selected by the System
1101-%0111 1111 cannot be written to from the System bus Read/Write (SR/W) hne. The Data Transfer Acknowledge
If read from the System bus these memory locations return a IDTACK) Signal IS the asynchronous handshake reqUired by
value of $FF. an MC68000. Refer to DT ACK under Functional Pin DeSCrip-
The dual-ported RAM IS accessed from the external tion for more Information. DTACK can be used to control a
System bus by way of eight address hnes (SAO-SA7) and Memory Ready Signal on the M6800 Family processor where
eight data hnes (SOO-S071. Three control hnes prOVide for Memory Ready capablhty IS prOVided (sea Figure 17). The lat-
synchronous or asynchronous access to the dual-ported ter would allow the M6800 Family processor to run asyn-
RAM through Port 1. Figure 15 shows an example of a syn- chronously with the MC68120/MC68121. It should be noted
chronous Interface (using MC68(9) and Figure 16 shows an that If the Memory Ready Signal (on M6800 processors) IS to
example of an asynchronous Interface (using MC68000) The be used With the t5TACK Signal, the system clock must be
dual-ported RAM IS selected In each case by address lines faster than or equal to the clock driVing the IPC. Example
SAO-SA7 and Chip Select (CS) from the system bus The clock CirCUitS are shown In Figures 18 and 19
MC68120 MC6809
Data Lines
4-719
MC68120-MC68121-MC68120-1-MC68121-1
MC68120 MC68000
SDO-SD7
Lower Data Lines
SAO-SA7
MC68120 MC6809
4-720
MC68120-MC68121-MC68120-1-MC68121-1
Schematic
r---------------------------.. O
AS
U1 SN74LS 175
U2 SN75LS08
tRC= 10 I's
8 MHz
OB a
J
•
QD __~______________~
L
The semaphore registers allow arbitration between shared The semaphore bits are test and set bits with hardware ar-
resources, which may be part or all of the dual-port RAM, or bitration dunng simultaneous accesses. BaSically, the
a penpheral The semaphore registers may also be used to in- semaphore bit IS cleared when wntten and set when read,
dicate that non-reentrant code IS In use or that a task IS In dunng a single processor access This IS shown In Table 2
process or IS complete To prevent the writing or reading of
erroneous data from the dual-ported RAM, all simultaneous TABLE 2 - SINGLE PROCESSOR SEMAPHORE
accesses involving a write to the dual-ported RAM should be BIT TRUTH TABLE
aVOided The responsibility for mutual exclusion resides In
O';ginal Data Resulting
software. The semaphore registers are a convenient means R/W
SEM Bit Read SEM Bit
for the software to control the simultaneous accesses involv-
0 R O· 1
Ing a wnte to the dual-ported RAM Each of the SIX
1 R l' 1
semaphore registers consist of a semaphore bit (SEM, bit 71 - 0
0 W
and an ownership bit (OWN, bit 61 The remaining SIX bits 1 W 0
(bO-b51 will read all zeros
SEMAPHORE REGISTER '0 - Resource Available
1 - Resource Not Available
7 6 5 4 3 2 1 0
t SEM laWN I 0 0 0 0 0 0
4-721
MC68120-MC68121-MC68120-1-MC68121-1
AS
CLR PRE
)O----tCLK a o
U2a U2b
I TImIng
01
02
03J
04 - - - , ' -_ _---1
EJ '------'I
AS _ _ _ _ _ _~r_l~ ______~~
o--'L..__ ....J
The data wrotten IS dIsregarded and the InformatIon obtaoned In Table 3. the forst four states are consIdered proper and
from the Read may be onterpreted as. 0 - resource avaIlable. they occur In correctly written software. The last four states
1 - resource not avaIlable Thus. any wrote to a semaphore are Improper and only eXIst In Improperly written software
clears the semaphore bIt and makes the assocIated resource The ownershIp bIt IS a read-only bIt that IndIcates whIch
.. avaIlable .. processor sets the semaphore bIt If the semaphore bIt IS set.
An access where both the IPC and system processors at- the ownershIp bIt ,nd,cates whIch processor set It If the
tempt to read or wrote the same semaphore regIster semaphore bIt IS not set. the ownershIp bIt ,nd,cates whIch
sImultaneously IS a contested access Durong a contested ac- processor last set the semaphore bIt. OWN = O. the other
cess. the hardware decIdes whIch processor reads a clear processor set SEM. OWN = 1. thIS processor set SEM
semaphore bIt and whIch reads a set semaphore bIt. Table 3 The reset state of the semaphore and ownershIp bIts IS
descrobes contested operatIon of a semaphore bIt defoned on Table 4 All of the semaphore bIts are set after an
The IPC always reads the actual semaphore bIt. the MC68120/MC68121 reset The IPC owns all of them except
system processor reads the semaphore bIt In all cases except the second semaphore whIch IS owned by the system pro-
the sImultaneous read of a clear semaphore bIt. ThIS arbItra- cessor ThIS confIguratIon should prevent the system pro-
tIon durong a sImultaneous read ensures that only one pro- cessor from readong a clear semaphore and ImplYIng the
cessor reads a clear bIt and therefore controls the resource. system processor set It when the IPC REm IS held low
that processor IS arbItrarily the IPC
4-722
MC68120- MC68121- M C68120-1- MC68121-1
I
4 1 1 1 0
5 1 1 1 0
6 1 1 1 0
The standard MC68120 comes preprogrammed with a decoder for the ROM may be mask programmed as a 0 or a 1
monitor In the ROM. Custom programs are placed In ROM to change the ROM starting address from $FBOO to $CBOO,
by special order (see Appendix AI. $DBOO or $EBOO A12 and A13 may also be "don't cares" In
The MC68120 contains 2048 bytes of on-chip, mask pro- thiS decoder. Address $FFEF IS reserved for the checksum
grammable read-only memory (ROM) In memory locations value for the ROM ThiS value IS the complement of the "Ex-
$FBOO through $FFFF The contents of thiS ROM allows the clusive OR" of the 2047 bytes of mask programmed ROM
IPC to perform a custom function for the user The Interrupt An IPC without ROM IS also available as the MC68121. The
vectors $FFFO-$FFFF are decoded to provide vectors at the MC68121 should only be used In modes 2 and 3 to access ex-
top of resident ROM Address lines A 12 and A 13 of the ternal ROM after reset
VCC AND VSS On the positive edge of RESET, the IPC latches the
VCC and VSS provide power and ground to the IPC The operating mode from P22, P21 and P20, and then configures
power supply should provide + 5 volts (± 5%) to V cc and Port 3, Port 4, SC1 and SC2 The restart vector IS then
VSS should be tied to ground Total power dissipation fetched and transferred to the program counter, then In-
should not exceed PD milliwatts struction execution begins.
Reset timing IS Illustrated In Figure 20 The RESET line
RESET must be held low for a minimum of three E-cycles for the IPC
The reset function IS used for three purposes The first IS to complete ItS entire reset sequence. An external RC-
to provide the IPC with an orderly and defined start-up pro- network may be used to obtain the reqUired timing
cedure from a powerdown condition The second IS to return
to start-up conditions without an Intervening powerdown ENABLE - E
condition The third IS to proVide a control signal to latch the The E clock Input IS reqUired for timing to synchrOnize
operating mode Data Bus transfers A "CPU E-cycle" (or bus cycle) consists
DUring reset (low logiC level on RESET Pin), execution of of a negative half-cycle of E followed by a positive half-cycle.
the current instruction IS suspended and the CPU enters a For any given bus cycle, the address IS valid dUring the
"reset state." The register contents are not pushed onto the negative half-cycle of E and the selected deVice must be
stack and their contents become undefined dUring reset The enabled to the Data Bus dUring the next positive half-cycle.
"reset state" Initializes the IPC, as shown In Table 5 The data bus IS active only while E IS high. It should be noted
4-723
MC68120-MC68121-MC68120-1-MC68121-1
-,A: mIn
vee ~r-""------Exlernal
E Slart-up Tlme--------i-~:::::s:_- ___-____
RESET __________~~r_______- -______- - -
Internal
AddressBusu..u.u.u..u..:u,....".:u.:u.:u.:u.u.u.....,..J'-;-F~FF:-;E-f'-...~FF:-;F-;'E·H-;F";F7F7E·"·";"F7f;:;FE,.,.''-~FF;:;F-;'F7,'';:N7:e:-:w-;P~C~.~-..''.I\r.....J·'---''--F-FF~E.J'-FF"'F""E
~~-------------~
1!1~tructl(Hl
~NotValid
that thiS Input should have some provIsion to obtain the function IS activated An external pullup resistor to V CC IS re-
specified logical high level which IS greater than standard qUired on pin 3 for ellner function TYPical pullup resistor
TTL levels values range from 3K to 10K depending on the dnve capabili-
Enable IS the pnmary IPC system timing signal and all tim- ty of the external deVice
Ing data specified as cycles IS assumed to be referenced to When the NMI function IS Implemented, pin 3 IS con-
thiS clock unless otherwise noted figured as an Input A negative edge on pin 3 then requests
an IPC non-maskable Interrupt sequence, but the current In-
struction Will be completed before responding to thiS re-
HALT/BUS AVAILABLE/NON-MASKABLE quest. To assure an Interrupt under all conditions, NMI must
INTERRUPT - HALT/BA/NMI be held low for at least one E-cycle N M I may be used to
The HALT /BA/NMI (pin 31 serves one of two functtons. cause the IPC to eXit the Walt instruction For Interrupt tim-
These functions are NMI or Halt/BA and the function Ing specifications, see the Interrupt portion of the Operating
selected IS determined by the Halt Control (HC, bit 2) bit of Mode Section.
the Functional Control Register lIocation $14), If the HC bit IS When configured to utilize the HaitI BA function of thiS
set (to a "1"1. then the NMI function IS activated. Alternate- Pin. such as after reset, the circuit of Figure 21 IS recom-
ly. If HC IS cleared (to a "0" as It IS dunng reset I , the HaitI BA mended to detect and supply continuous HALT and BA
4.. 724
MC68120-MC68121-MC68120-1-MC68121-1
,..-........f--'V'I/'Ir-.... VCC
SN74LS74 3-10 kO
PRE
DI-+-----_
SA 0 ClK
CLR
MC681201
MC68121
>-....______.:.3-1 HALTJi3A/NMI
E __~____________~~__~__________________~4
In/Out In
M IL____________~ '---___----'1
R/W~
Add/Data
Add
Note Timing measurements are referenced to and from a low voltaqe of 0 8 volts and a hlqh voltaqe of 20 volts, unless OTherWise noted
4-725
MC68120-MC68121-MC68120-1-MC68121-1
Wait State while in the Halt/BA mode then, IRQ1 and IRQ2 Expanded Non-Multiplexed Mode - In thiS mode, both
are the only Interrupts which may do so; therefore, their SCl and SC2 are configured as outputs SCl functions as
masks must be cleared before entenng the Walt State. Input/Ol/tput Select (lOS) and IS asserted (active-low) only
when addresses $0100 through $01 FF are accessed. SC2 IS
MASKABLE INTERRUPT REQUEST 1 - IRQ1 configured as Riw and IS used to control the direction of
This level-sensitive input can be used to request an Inter- local data bus transfers. An MPU read IS enabled when R/W
rupt sequence. The IPC will complete the current instruction and E are high.
before it responds to the request. If the Interrupt mask bit
(I-bit! in the Condition Code Register IS clear, the IPC will Expanded Multiplexed Modes - In these modes, SCl IS
begin an interrupt sequence: a vector IS fetched from $FFF8 configured as an input and SC2 IS configured as an output
and $FFF9, transferred to the Program Counter, and Instruc- In the expanded multiplexed modes, the IPC has the ability
tion execution is continued at the new location. ThiS IS ex- to access a 64K byte address space SCl functions as an In-
plained in greater detail in the Interrupt Section. put, Address Strobe, which controls demultlplexlng and
IRQ1 tYPically requires an external resistor (3K to 10K enabling of the eight least Significant addresses and the data
depending on external devices dnve capability) to V CC for buses.
wire-OR applicatIOns. IRQl has no Internal pullup resistor. By uSing a transparent latch such as an SN74LS373 or
MC6882, Address Strobe (AS) can also be used to de-
STROBE CONTROL 1 AND 2 - SC1 and SC2 multiplex the two buses external to the IPC. (See Figure 23.)
The functions of SCl and SC2 depend on the operating SC2 proVides the local Data Bus control Signal called
mode SCl IS configured as an Input In all modes except Read/Write (R/"Wl SC2 IS configured as R/W and IS used to
the Expanded Non-Multiplexed Mode, whereas SC2 IS al- control the direction of local data bus transfers An M PU
ways an output. SCl and SC2 can drive one Schottky load read IS enabled when R/W and E are high
•
and 90 pF
Single Chip Modes - In these modes, SCl and SC2 are SYSTEM BUS INTERFACE
configured as an input and output, respectively, and both Port 1 IS a mode-Independent 8-blt data port which per-
function as Port 3 control lines. SCl functions as an Input mits the external system bus to access the dual-ported RAM
strobe (lS3) and can be used to Indicate that Port 3 Input and semaphore registers either asynchronously or syn-
data is ready or output data has been accepted. Three op- chronously with respect to the E clock In addition to the
tions associated with IS3 are controlled by the Control and eight data lines (SOO-S07), eight address (SAO-SA7l and
Status Register for Port 3 and are discussed In the Port 3 three control lines (SR/Vii, CS, OTACK) are used to access
descnptlon. the dual-ported RAM and semaphore registers
SC2 IS configured as an output strobe (OS3) and can be
used to strobe output data or acknowledge Input data for Port 1 Data Lines (SOC-SD7) - These data lines are bi-
Port 3. It IS controlled by Output Strobe Select (OSS) In the directional data lines which allow data transfer between the
Port 3 Control and Status Register The strobe IS generated dual-ported RAM or the semaphore registers, and the
by a read (OSS=O) or write (OSS=l) to ,he Port 3 Data system bus The data bus output drivers are three-state
Register. OS3 timing IS shown In Figure 6 devices which remain In the high-Impedance state except
GND
AS
EN!G
I OCI
D1 01
Port3
Address! Data 1J.... SN74LS373
(TYPical!
r---
I D8 08
I
IIIII
~-
4-726
MC68120-MC68121-MC68120-1-MC68121-1
dunng a read of the IPC dual-ported RAM or semaphore Inputs on P20, P21 and P22 determine the operating mode
registers by the system processor which IS latched Into the Program Control Register on the
positive edge of RESET. The mode may be read from the
System Address Lines (SAG-SA7) - The address lines Port 2 Data Register (PC2 IS latched from pin 45)
together with the Chip Select signal allow any of the 128 Port 2 also prOVides an Interface for the Senal Com-
bytes of RAM or SIX semaphore registers to be uniquely mUnications Interface and Timer Bit 1, If configured as an
selected from the system bus. The address lines must be output, IS dedicated to the Timer Output Compare function
valid before the CS signal goes low for the asynchronous in- and cannot be used to prOVide output from the Port 2 Data
terface and valid before the E signal goes high for the syn- Register.
chronous Interface. The system Interface must be deselected
between reads or between wntes for the asynchronous PORT 3 - P30-P37
operation. Port 3 can be configured as an I/O port, a bl-dlrectlOnal
6-blt data bus, or a multiplexed addressl data bus depending
System Read/Write (SR/W) - This signal IS generated by upon the operating mode. The TTL compatible three-state
the system bus to control the direction of data transfer on output buffers can dnve one Schottky TTL load and 90 pF
the data bus. With the IPC selected, a low on the SR/iN line
enables the Input buffers, and data IS transferred from the Single Chip Modes - In these modes, Port 3 IS an 8-bit
system processor to the IPC. When SRIW IS high and the I/O port where each line IS configured by the Port 3 Data
chip IS selected, the data output buffers are turned on and Direction Register ASSOCiated With Port 3 are two lines, IS3
data IS transferred from the IPC to the system bus and OS3, which can be used to control Port 3 data transfers
Three Port 3 options, controlled by the Port 3 Control and
Chip Select (CS) - ThiS signal IS a TTL compatible Input Status Register and available only In the Single Chip Modes
signal, used to activate the system bus Interface and allows are' 1) Port 3 Input data can be latched uSing IS3 as a control
transfer of data between the IPC and the system processor
dunng synchronous or asynchronous accesses ~ provides
the synchronizing Signal for the Semaphore registers dunng
access by the system bus
4·727
MC68120. MC68121. MC68120-1· MC68121-1
Expanded Multiplexed Modes - In these modes, Port 3 IS pullup resistors to more than 5 volts, however, cannot be
configured as a time-multiplexed address IAO-A7) and data used.
bus 100-071. Address Strobe lAS) must be Input on SC1,
and can be used externally to de-multiplex the two buses. Expanded Non-Multiplexed Mode - In thiS mode, Port 4
Port 3 IS held In a high-Impedance state between valid ad- IS configured from reset as an B-blt Input port, where the
dress and data to prevent potential bus confhcts. Data Direction Register can be Written, to provide any or all
of address lines AO-A7. Internal pull up resistors are Intended
PORT 4 - P40-P47 to pull the lines high until the Data Direction Register IS con-
figured.
Port 4 is configured as B-bit I/O port, as address outputs,
or as data Inputs depending on the operating mode. Port 4
Expanded Multiplexed Mode - In all these modes except
can drive one Schottky TTL load and 90 pF and IS the only
Mode 6, Port 4 functions as half of the address bus and pro-
port with Internal pull up resistors.
vides AB to A 15. In Mode 6, the port IS configured from reset
as an 8-bll parallel Input port, the Port 4 Data-Direction
Single Chip Modes - In these modes, Port 4 functions as Register must be wntten to provide any or all of address
an 8-bit I/O port where each line IS configured by the Port 4 hnes, AS to A15. Internal pullup resistors are Intended to pull
Data Direction Register. Internal pull up resistors allow the the hnes high until the Data Direction Register IS configured
port to directly interface With CMOS at 5 volt levels. External lbit 0 controls AB, etc I.
OPERATING MODES
Single ChiP, Expanded Non-Multiplexed, and Expanded must first be loaded Into the RAM uSing Modes 0, 1,2, or 6
Multiplexed Single Chip Includes Modes 4 and 7, Expanded If the IPC IS reset and then programmed Into Mode 4, execu-
Non-Multiplexed IS Mode 5 and the remaining five are Ex- tIOn Will begin at $XXFE XXFF Mode 5 can be Irreversibly
panded Multiplexed modes A system utilIZing three entered from Mode 4 Without gOing through reset by setting
MC68120's, one In each of the fundamental operating bit 5 of the Port 2 Data Register ThiS mode IS used primarily
modes, IS shown In Figure 24 Table 6 summarizes the to test Port 3 and 4 In the Single Chip and Non-Multiplexed
characteristics of the operating modes Modes
4-728
MC68120- MC68121- MC68120-1- MC68121-1
ROM
SSDA Expanded
ADLC Non-Multiplexed
CATC Mode
System Bus
Expanded
Multiplexed
Mode
•
ROM
Local
00
00
Bus
"
-0
"0
ro
ro
0
« RAM
PIA SSDA
ACIA ADLC
GPIA CATC
PTM
Expanded Non-Multiplexed Mode (51 - A modest amount Expanded-Multiplexed Modes (0, 1, 2, 3, 61 - In the Ex-
of external memory space IS provided In the Expanded Non- panded Multiplexed Modes, the IPC has the ability to access
Multiplexed Mode while retaining significant on-chip a 64K-byte memory space Port 3 functions as a tlme-
resources Port 3 functions as an S-blt bl-dlrectlonal data bus multiplexed address/ data bus with address valid on the
and Port 4 IS configured as an Input data port Any combina- negative edge of Address Strobe (AS I and the data bus valid
tion of AO to A7 may be provided while retaining the re- while E IS high In Modes a to 3, Port 4 provides address lines
mainder as Input data lines. Any combination of the eight AS-A 15. However, In Mode 6, Port 4 can provide any subset
least-significant address lines may be obtained by writing to of AS to A 15 while retaining the remainder as Input lines
the Port 4 Data Direction Register Internal pullup resistors Writing l's to the desired bits In the Data Direction Register
are provided to pull Port 4 lines high until It IS configured IDDRI will output the corresponding address lines while the
Figure 26 Illustrates the external resources available In the remaining bits will remain Inputs (as configured from reset or
Expanded Non-Multiplexed Mode. The IPC Interfaces direct- from a's written to the DDRI. Internal pullup resistors are
ly with M6800 Family parts and can access 256 bytes of ex- provided to pull Port 4 lines high until software configures
ternal address space at $100 through $1 FF lOS provides an the port. Initialization of Port 4 in Mode six must be done to
address decode of external memory ($100-$1 FFI and may be obtain any upper address lines externally.
used as an address or chip select line
4-729
MC68120-MC68121-MC68120-1-MC68121-1
IAOl
Port 3 8 System
81/0 Lines Address Lines
Port 1
8 System
Data Lines System
Bus
SAlVi
CS
Port 4 DTACK
81/0 Lines
Port 2
5110 Lines
•
SenalllO,
16-Blt Timer
-
VSS
VCC
Port 3 8 System
8 Data Lines Address Lines
Port 1
8 System
A/Vi Data Lmes. System
Bus
lOS SAlVi
CS
Port 4 DTACK
8 Address Lines
Port 2
51/0 Lines
Senoll/O,
16-BIt Timer
VSS
4-730
MC68120-MC68121-MC68120-1-MC68121-1
Figure 27 depicts the external resources available In the after the positive edge of RESET In addition, the Internal
Expanded-Multiplexed Modes. Address Strobe can be used and external data buses are connected together so there
to control a transparent D-type latch to capture addresses must be no memory map overlap (to aVOid potential bus con-
AO-A7, as shown in Figure 23. This allows Port 3 to function filets). Mode a is used primarily to verify the ROM pattern
as a Data Bus when E IS high. and monitor the Internal data bus with automated test eqUip-
In Mode a, the reset vector is external at $BFFE and $BFFF ment
RESET HALT/SA/NMI
MC681201
MC68121 IRQ1
Port 3
S Lines Multiplexed S System
Addressl Data Address Lines
Port 1
R/iN 8 Syslem
Data Lmes System
Sus
Port 4
AS
8 Address Lines
SR/W
CS
DTACK
Port 2
5110 Lines
II
SenalllO,
16-Blt Timer
VSS
MODE PROGRAMMING used, otherwise, the three-state buffers can be used to pro-
The operating mode IS programmed by the levels asserted Vide Isolation while programming the mode
on P22, P2l, and P2a dUring the positive edge of RESET
These are latched Into PC2, PC1, and pca of the program MEMORY MAPS
control register. The operating mode may be read from the The IPC provides up to 64K bytes of address space
Port 2 Data Register and programming levels and timing depending upon the operating mode. A memory map for
must be met as shown In Figure 28 and Table 7 A brief each operating mode IS shown In Figure 30. In Modes 1Rand
outline of the operating modes IS shown In Table 8 6R, the "R" means the ROM has been relocated by a mask
CirCUitry to provide the programming levels IS primarily option. The first 32 locations of each map are reserved for
dependent on the normal system use of the three pins. If the IPC Internal register area, as shown In Table 9, with ex-
configured as outputs, the CirCUit shown In Figure 29 may be ceptions as Indicated.
See Figure 31
for Diode
VMPDD
tMPH
VMPL
IP20, P21, P221 Mode Latch Level
Mode Inputs
-...It~----'--~~ VMPH Min
IP20, P21, P221 ---<I RESET
l"--'-------'71 VM PL Max
4-731
MC68120-MC68121-MC68120-1-MC68121-1
I 2
1
0
Legend'
I - Internal
L
L
L
H
L
L
L
H
L
Notes.
E
I
I
I
I
I
MC681201
A2 Al Al Rl MC68121
,..--,
AESET ~~--L-'--4~-+---r-------~~AESET
P20 4i;---~t--1~-+--+-------43., P20 (PCO!
P21 4ir----r-t--1f--......--+------~44::::!.1 P21 (PC 1)
P22 41r---t-t--1f---+---+-------4
,5 P221PC2)
L __ .I
OptIOnal
Three-State
Buffers
Mode
MCI4066B
Control
Notes
1 Mode 7 as shown
2 A2.C = Reset time constant
3 Rl = 10 k (typical)
4 D= lN914, lN4001 (tYPical)
4·732
MC68120e MC68121 e MC68120-1 e MC68121-1
II
$F8OO
Internal ROMI51
MC68120 MC68120
Mode
1 Mode
Internal ROMI21
internal ROM
$FFFOr
'------I~ External Memory Space
External Interrupt Veclors(2) $FFFF External Interrupt Vectors
$FFFF ~ _ _--'
Notes Notes
1) Excludes the following addresses which may be 1) Excludes the following addresses which may be
used externally $04, $05, $06, $07 and $OF used externally $04, $05, $06, $07, and $OF
21 Internal ROM addresses $FFFO to $FFFF are not 2) Starting addresses for the Internal ROM may be
usable $C8OO, $D800 or $E8OO as a mask option
MC68120-MC68121-MC68120-1-MC68121-1
MC68120/ 3
2
MC68120/
MC68121 MC68121
Mode Mode
Internal RAM
Internal Reglsters(2)
II
$FFFO~---t External Interrupt Vectors
External Interrupt Vectors
$FFFF .......--~
Notes
1) Relocating the Internal registers and the Internal
RAM to high memory allows processor to run
Notes MOOS
1) Excludes the following addresses which may be 21 Excludes the following addresses which may be
used externally $04, $05, $06, $07, and $OF used externally $COO4, $C005, $COO6, $C007,
and $CooF
4 5
MC68120 MC68120
Mode Mode
$O:~ ~W
@}Internal Registers
$ o o o o T \ Internal Reg!sters l51
f
$0060~unusable~
$001F
Internal RAM
$ooFF
$0100
External Memory Space
$01 FF
Unusablel11141
4·734
MC68120-MC68121-MC68120-1-MC68121-1
MC68120 MC68120
Mode
& Mode
Internal ROMI31
•
External Memory Space
Internal ROM
External Interrupt Vectors
Internal Interrupt Vectors
Notes Notes
1) Excludes the following addresses which may be 1) Excludes the following addresses which may be
used externally $04, $06, $OF used externally $04, $06, $OF
2) Address lines AS-A 15 will not contam addresses 2) Address lines AS-A 15 will not contam addresses
until the Data Direction Register for Port 4 has until the Data Direction Register for Port 4 has
been wntten with" 1's" In the appropriate bits been wntten with "l's" In the appropriate bits
These address lines will assert "l's" until made These address lines will assert "1's" until made
outputs by wntmg the Data Direction Register outputs by writing the Data Direction Register
3} Starting addresses for the Internal ROM may be
$C8OO, $0800 or $EBOO
MC68120
Mode
7
Single Chip
'OOCC I Notes
1} MPU reads of Port 3's Data Direction Register
will access Port 3's Data Register Instead
Unusable
7-735
MC68120-MC68121-MC68120-1-MC68121-1
Register
Address...
( Hexadecimal!
··* Register
Address·***
( Hexadecimal!
Reserved 00 SCI Rate and Mode Control Register 10
Port 2 Data Direction Register· ** 01 Transmit/Receive Control and Status Register 11
Reserved 02 SCI Receive Data Register 12
Port 2 Data Register 03 SCI Transmit Data Register 13
Port 3 Data Direction Reglster-·· 04'
Port 4 Data DIrection Reglster-·· 05" Function Control Register 14
Port 3 Data Register 06' Counter Alternate Address IHlgh Byte! 15
Port 4 Data Register 07" Counter Alternate Address (Low Byte) 16
Timer Control and Status Register 08 Semaphore 1 17
Counter IHlgh Byte! 09 Semaphore 2 18
Counter I Low Byte) OA Semaphore 3 19
Output Compare Register (High Byte) OB Semaphore 4 lA
Output Compare Register I Low Byte) OC Semaphore 5 lB
Input Capture Register I High Byte) 00 Semaphore 6 lC
Input Capture Register ILow Byte! OE Reserved 1D-IF
Port 3 Control and Status Register OF'
--
'These external addresses on Modes 0, 1, 2, 3, 5, 6 cannot be ac- '''1 = Output, 0= Input
cessed In Mode 5 Ina lOS) , .. 'These addresses relocated at $COOO-$COI F In Mode 3
··These are external addresses In Modes 0, 1, 2, 3
4-736
FIGURE 31 - INTERRUPT FLOWCHART s::
()
~
....
~
s::•
()
~
.....
.....
N
s::•
()
~
.....
!?.....
s::•
()
~
.....
""'"
.!..J
c.v .....
N
-....J .....
I
Vector- PC
Mode 0 Modes 1-7
NMI BFFC-BFFD FFFC-FFFDINon-Maskable Interrupt
SWI BFFA-BFFB FFFA-FFFB I Software Interrupt
IRQl BFF8-BFF9 FFF8-FFF9 I Maskable Interrupt Request 1
ICF BFF6-BFF7 FFF6-FFF7 Iinput Capture Interrupt
OCF BFF4-BFF5 FFF4-FFF5 IOutput Compare Interrupt
TOF BFF2-BFF3 FFF2-FFF3 IT,mer Overflow Interrupt
SCI BFFO-BFFI FFFO-FFFI ISCI Interrupt !TDRE + RDRF + ORFE)
•
MC68120-MC68121-MC68120-1-MC68121-1
Last In!>tructlon...j
Cycle
#1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12 I
NMI or IR02 \
---I !--tpcs First Ins! of
Interrupt Routine
Internal -----.r----.,r-~.r--"V"--_v--"""--"""-- .......
r_-~..,_--_V--_V---V_--V_--"--,
DataBUS-----J'---~~a-p-c-O-d~e~a-p-c-Od-e~-PC-O--7~P-C-8---1b~-X-O--7~-X-8--15-/'-A-C-CA~''--A-CC-8-/'-C-C-R-J''-I,-'e-le-va-'-l'~-ve-c-to-,'~-ve-c-to-,~---r
_--==-__________--;+ 1 Data MSB LSB
Internal R/W
\'-------------------------~I
II
PROGRAMMABLE TIMER
The Programmable Timer can be used to perform input when clear, the Interrupt IS inhibited, It IS
waveform measurements while Independently generating an cleared by rese,t,
output waveform, Pulse widths can vary from several Bit 3 EOCI Enable Output Compare Interrupt When set, an
microseconds to many seconds, A block diagram of the IR02 Interrupt IS enabled for an output com-
Timer is shown in Figure 33, pare, when clear, the Interrupt IS Inhibited, It IS
cleared by reset.
TIMER CONTROL AND STATUS REGISTER ($08) Bit 4 EICI Enable Input Capture Interrupt, When set, an
The Timer Control and Status Register (TCSRI IS an 8-blt IR02 Interrupt IS enabled for an Input capture,
register of which all bits are readable while bits 0-4 can be when clear, the Interrupt IS Inhibited, It IS
wntten, The three most significant bits provide the timer cleared by reset
status and they indicate: Bit 5 TOF Timer Overflow Flag, TOF IS set when the
_ a proper level transition has been detected, or counter contains alil's, It IS cleared by reading
- a match has been found between the free-running the TCS R (With TOF setl followed by reading
counter and the output compare register, or the highest byte of the counter ($091, or by
_ the free-running counter has overflowed, reset Reading the counter at $15 Will not clear
TOF
Each of the three events can generate an IR02 Interrupt
and IS controlled by an Individual enable bit In the TCSR Bit 6 OCF Output Compare Flag OCF IS set when the Out-
put Compare Register matches the free-running
TIMER CONTROL AND STATUS REGISTER
counter It IS cleared by reading the TCS R (With
ITSCRI
OCF setl and then wntlng to the Output Com-
6 543 2 1 0 pare Register I$OB or $OCI, or by reset.
ICF I OCF I TOF I EICII EOCII ETO'IIEDG I OLVL I $08 Bit 7 ICF Input Capture Flag ICF IS set to indicate a pra-
per level transition-It IS cleared by reading the
Bit 0 OLVL Output level. OLVL IS clocked to the output level TCSR (With ICF setl and then reading the Input
register by a successful output compare and Will Capture Register High Byte ($001, or by reset,
appear at P21 If Bit 1 of the Port 2 Data DirectIOn COUNTER ($09:0AI
Register IS set It IS cleared by reset
The key timer element IS a 16-blt free-running counter
Bit 1 IEDG Input Edge, IEDG IS cleared by reset and con- which IS Incremented by E IEnablel It IS cleared dunng reset
trols which level transition Will tngger a counter and IS a read-only With one exception' a write to the counter
transfer to the Input Capture Register. 1$091 Will preset It to $FFFB ThiS feature, Intended for
IEDG = 0 Transfer on a negative edge testing, can disturb senal operations because the counter
IEDG = 1 Transfer on a positive edge proVides the SClmternal bit rate clock TOF IS set whenever
Bit 2 ETOI Enable Timer Overflow Interrupt When set, an the counter contains alil's, The counter may also be read at
IR02 interrupt IS enabled for a timer overflow; location $15 and $16 to aVOid the cleanng of the TOF,
4-738
MC68120-MC68121-MC68120-1-MC68121-1
__
Timer 'r'':T~='"'=..., ===~~'''
•
Control 'r---Lr....,r'-.&.;..~~.;..L-r.....-'='-J
and
Status
Register
$08 Bit 1
Port 2
DDR
IRQ2
Output Compare Pulse ___ _ I Output Input
Level Edge
Bit 1 Bit a
Port 2 Port 2
4-739
MC68120-MC68121-MC68120-1-MC68121-1
_ clock: external or internal clock source RATE AND MODE CONTROL REGISTER IRMCR)
a
_ Baud rate: one of four per E-clock frequency, or one-
eighth of the external clock input to P22
_ wake-up features: enabled or disabled
ex 7
I x
6
I
5
x I
432
x
1
I CCl I CCO I SSl I SSO I $10
Bit1: Bit a SS1.SS0Speed Select. These two bits select
_ interrupt requests: enabled individually for transmitter the Baud rate when usmg the internal clock
and receiver Four rates may be selected which are a function
• clock output: internat bit rate clock enabled or disabled of the IPC input frequency (EI. Table 11 lists bit
to P22 times and rates for three selected I PC frequen-
cies.
SERIAL COMMUNICATIONS REGISTERS Bit 3: Bit 2 CC1. CCO Clock Control and Format Select
The Serial Communications Interface includes four ad- These two bits control the format and select the
dressable registers as depicted In Figure 34. It is controlled senal clock source. If CC11s set. the Data Direc-
by the Rate and Mode Control Register and the tIOn Register (DDRI value for P22 IS forced to
Transmit/Receive Control and Status Register. Data IS the complement of CCO and cannot be altered
transmitted and received utilizing a wnte-only Transmit until CC1 IS cleared. If CC1 IS cleared after hav-
Register and read-only Receive Register. The shift registers Ing been set, Its DDR value IS unchanged Table
are not accessible by software. 12 defmes the format. clock source. and use of
P22
Rate and Mode Control Regiater ($10) - The Rate and If both CC1 and CCO are set, an external TTL compatible
Mode Control Register (RMCR) controls the SCI Baud rate. clock must be connected to P22 at eight times (8XI the
format, clock source, and under certam conditions, the con- deSired Baud rate. but not greater than E. with a duty cycle
figuration of P22. The register consists of four write-only bits of 50% (± 10% I. If Ce1.CCO= 10, the Internal Baud rate
I
which are cleared by reset The two least significant bits con- clock IS proVided at P22 regardless of the values for TE or RE
trolthe Baud rate of the internal clock and the remaining two
bits control the format and clock source. NOTE: The source of SCI Int~rnal baud rate clock IS the
free-running counter of the timer. An IPC write to the
counter can disturb senal operations.
$12
Port 2
(Not Addressable)
45
47
$13
4·740
MC68120-MC68121-MC68120-1-MC68121-1
TABLE 12 - SCI FORMAT AND CLOCK SOURCE CONTROL will be transmitted only If TORE has been
Clock Port 2 cleared.
CC1:CCO Format Bit 60RFE Overrun Framing Error. If set, ORFE ,nd,cates
Source B~ 2
0 0 B,-Phase Internal Not Used either an overrun or framing error. An overrun
0 1 NRZ Internal Not Used
occurs when a new byte is ready to transfer to
the Receiver Data Register with RDRF stili set.
1 0 NRZ Internal Output
A receiver framing error has occurred when
1 1 NRZ External Input
the byte boundaries of the bit stream are not
synchronized to the bit counter. An overrun
Transmit/Receive Control and Status Register ($11) - can be distinguished from a framing error by
The Transmit/Receive Control and Status Register (TRCSR) the value of RDRF: If RDRF IS set, then an
controls the transmitter, receiver, wake-up features, and two overrun has occurred, otherwise, a framing er-
individual Interrupts and monitors the status of senal opera- ror has been detected. Data IS not transferred
II
tions. All eight bits are readable while only bits 0 to 4 are to the Receive Data Register In an overrun
wntable. The register IS initialized to $20 by reset. condition. ORFE IS cleared by reading the
TRCSR (With ORFE set) then reading the
TRANSMIT / RECEIVE CONTROL AND STATUS REGISTER
Receive Data REl9lster, or by reset.
(TRCSR)
Bit 7 RDRF Receive Data Register FUll. RDRF IS set when
7 654 3 0
IRDRFIORFEITDREI RIE I RE I TIE TE WU $11
the contents of the Input senal shift register IS
transferred to the Receive Data Register. It IS
B,tOWU "Wake-up" on Idle Line. When set, WU cleared by reading the TRCSR (With RDRF
enables the wake-up function, It IS cleared by set), and then reading the Receive Data
ten consecutive 1's or by reset WU will not set Register, or by reset.
If the line IS Idle.
Bit 1 TE Transmit Enable. When set, the P24 DDR bit IS
set, cannot be changed, and will remain set If
TE IS subsequently cleared When TE IS SERIAL OPERATIONS
changed from clear to set, the transmitter IS The SCI IS Initialized by writing the control bytes first to
connected to P24 and a preamble of nine con- the Rate and Mode Control Register and then to the
secutive 1's IS transmitted TE IS cleared by Transmit/Receive Control and Status Register. When TE IS
reset set, the output of the Transmit Shift Register IS connected to
P24 and senal output IS Initiated by the transmiSSion of a
Bit 2 TIE Transmit Interrupt Enable When set, an IR02
9-blt preamble of 1's.
Interrupt IS enabled when TDRE IS set. when
At thiS pOint one of two situatIOns exist: 1) If the Transmit
clear, the Interrupt IS Inhibited. TIE IS cleared
Data Register IS empty (TDRE= 1), a continuous string of 1'5
by reset.
Will be sent indicating an Idle line, or 2) If a byte has been
Bit 3 RE Receive Enable. When set, the P23 DDR bit IS wntten to the Transmit Data Register (TDRE=O), the byte
cleared, cannot be changed, and Will remain
Will be transferred to the Transmit Shift Register (syn-
clear If RE IS subsequently cleared. While RE IS
chrOnized With the bit rate clock), TORE Will be set, and
set, the SCI receiver IS enabled. RE IS cleared
transmission will begin ..
by reset
The start bit (0), eight data bits (beginning With bit Ol and a
Bit 4 RIE Receiver Interrupt Enable. When set, an IR02 stop bit (1), will be transmitted. I! TORE IS still set when the
Interrupt IS enabled when RDRF and/or OR FE next byte transfer should occur, 1's Will be sent until more
IS set; when clear, the Interrupt IS inhibited. data IS proVided. Receive operation is controlled by RE which
RIE is cleared by reset. configures P23 as an input and enables the receiver. In BI-
Bit 5 TDRE Transmit Data Register Empty TDRE IS set phase format, the output toggles at the start of each bit and
when the contents of the Transmit Data at hal! time when a "1" IS sent. SCI data formats are il-
Register IS transferred to the output senal shift lustrated in Figure 35. In receiVing BI-phase, a "1" IS input
register or by reset. It IS cleared by reading the when two transitions occur In less than 3/4 blt-tlme, and a
TRCSR (With TORE set) and then writing to "0" is Input when more than 3/4 bit-time passes after a tran-
the Transmit Data Register Additional data SItIOn on P23.
4·741
MC68120-MC68121-MC68120-1-MC68121-1
NAZ
Format
BI-Phase
Format
Bit Bit
Idle Start 0 Stop
2 4 5 6 7
Data 01001101 ($401
INSTRUCTION SET
II
The MC68120/MC68121 is upward source and object code E-cycies Instruction execution times are summanzed In
compatible With the MC6800 processor and directly compati- Ta.ble 17. With an Input frequency (E) of 1 MHz, E-cycles are
ble with the M6801 Family processors. eqUivalent to microseconds. A cycle-by-cycle description of
bus actiVity for each instruction IS provided In Table 18 and a
descnption of selected Instructions IS shown In Figure 38.
PROGRAMMING MODEL
A programming model for the MC68120/MC68121 IS Immediate Addressing - The operand IS contained In the
shown In Figure 14. Accumulator A can be concatenated follOWing byte(s) of the instruction where the number of
with accumulator B and jOintly referred to as accumulator D bytes matches the size of the register. These are two or three
where A is the most significant byte. Any operation which byte Instructions.
modifies the double accumulator will also modify ac-
cumulator A and/or B. Other registers are defined as Direct Addressing - The least Significant byte of the
follows: operand address IS contained In the second byte of the in-
Program Counter - The program counter IS a 16-blt struction and the most significant byte IS assumed to be $00.
register which always pOints to the next instruction. Direct addreSSing allows the user to access $00 through $FF
uSing two byte Instructions and execution time IS reduced by
Stack Pointer - The Stack Pointer IS a 16-blt register eliminating the additional memory access (refer to Table 1)
which contains the address of the next available location In a In most applications, thiS 256-byte area IS reserved for fre-
pushdown/pullup (LiFOI queue The stack resides In ran-
quently referenced data. Note that no direct addreSSing of
dom access memory at a location specified by the software.
Internal control registers IS pOSSible In Mode 3
Index Register - The Index Register IS a 16-blt register
which can be used to store data or provide an address for the Extended Addressing - The second and third bytes of the
Indexed mode of addreSSing instruction contain the absolute address of the operand.
These are three byte Instructions
Accumulators - The IPC contains two 8-bit ac-
cumulators, A and B, which are used to store operands and Indexed Addressing - The unSigned offset contained In
results from the arithmetic logic unit (ALUI. They can also be the second byte of the Instructions IS added With carry to the
concatenated and referred to as the D (doublel accumulator. Index Register and used to reference memory Without
Condition Code Register - The Condition Code Register changing the Index Register These are two byte instruc-
,nd,cates the results of an Instruction and Includes the tions.
follOWing five condition bits' Negative (NI, Zero (ZI,
Overflow (VI, Carry/Borrow from MSB (CI, and half carry Inherent Addressing - The operand(s) are registers and
from bit 3 (H I. These bits are testable by the conditional no memory reference IS reqUired. These are single byte In-
branch Instructions Bit 4 IS the Interrupt mask (I-bltl and In- structions.
hibits all maskable Interrupts when set. The two unused bits
b6 and b7, are read as ones. Relative Addressing - Relative addreSSing IS used only for
branch Instructions. If the branch condition IS true, the Pro-
ADDRESSING MODES gram Counter IS overwntten With the sum of a Signed single
The MC68120/MC68121 provides SIX addreSSing modes byte displacement In the second byte of the Instruction and
which can be used to reference memory A summary of ad- the current Program Counter. ThiS provides a branch range
dressing modes for all instructions IS presented In Tables 13, of - 126 to 129 bytes from the first byte of the instruction
14, 15 and 16 where execution times are provided In These are two byte instructions.
4·742
MC68120·MC68121·MC68120-1·MC68121-1
•
SP + 1 -SP, MSp -XL
Accumuiator and Immed Direct Index Extend Inher Boolean Condition Codes
Memory Operations MNE Op # Op - # Op # Op # Op - # Expression H I N Z V C
Add Acmltrs ABA lB 2 1 A + B-A
•
AddBtoX
Add With Carry
ABX
ADCA 89 2 2 99 3 2 A9 4 2 B9 4 3
3A 3 1 OOB+X-X
A+M+C-A
• •• • • • •
Add
ADCB
ADDA
C9 2 2 09 3 2 E9 4 2 F9 4 3
88 2 2 9B 3 2 AB 4 2 BB 4 3
8+M+C--B
A + M--A
••
••
ADDB CB 2 2 DB 3 2 EB 4 2 FB 4 3 B+ M-A
Add Double ADDD C3 4 3 03 5 2 E3 6 2 F3 6 3 0+ M M + 1-0
•• ••
And ANDA 84 2 2 94 3 2 A4 4 2 B4 4 3 A'M-A R
ANDB C4 2 2 04 3 2 E4 4 2 F4 4 3 B'M-B R
Shift Left, ASL 68 6 2 7B 6 3
Arithmetic ASLA 48 2 1
ASLB 58 2 1
Shift Le Obi ASLD 05 3 1
Sh,lt Right, ASR 67 6 2 77 6 3 I
Anthmetlc ASRA 47 2 1
ASRB 57 2 1
Bit Test BITA
BITB
85 2 2 95 3 2 A5 4 2 B5 4 3
C5 2 2 05 3 2 E5 4 2 F5 4 3
A·M
B'M
R
R
••
Compare Acmltrs CBA 11 2 1 A,B I
Clear CLR 6F 6 2 7F 6 3 OO-M R S R R
CLRA 4F 2 1 00 -A R S R R
CLRB 5F 2 1 OO-B R S R R
Compare CMPA 81 2 2 91 3 2 Al 4 2 Bl 4 3 A,M I I
CMPB Cl 2 2 01 3 2 El 4 2 Fl 4 3 B, M I
1 's Complement COM 63 6 2 73 6 3 IM-M R S
COMA 43 2 1 A-A R S
COMB 53 2 1 ii-B R S
DeCimal Ad), A OM 19 2 1 AdJ binary sum to BCD
Decrement DEC
DECA
6A 6 2 7A 6 3 M,I-M
4A 2 1 A, I - A
••
Excl uSlve OR
DECB
EORA B8 2 2 9B 3 2 AB 4 2 BB 4 3
5A 2 1 B,1
A @ M-A
B
R
••
EORB CB 2 2 DB 3 2 EB 4 2 F8 4 3 B @ M-B I R •
- Contlnued-
4-743
MC68120-MC68121-MC68120-1-MC68121-1
Accumulator and Immed Diract Index Extend Inher Boolean Condition C odes
MNE # Op # :>p H
Memory Operations Op - # Op - # Op # Expression N Z V C
Increment INC
INCA
16C 16 12 7C 16 3
4C 2
M+ 1-M
1 A + 1-A
\
! •
•
INCB 5C 2 1 B + 1 -B I •
Load Acmltrs LDAA
LDAB
B6 2
C6 2
2 96 3
2 D6 3
2 A6 4
2 E6 4
2 B6 4
2 F6 4
3
3
M-A
M-B
R
R
••
Load Double
Logical Shift,
LDD
LSL
CC 3 3 DC 4 2 EC 5
68 6
2 FC 5
2 78 6
3
3
M M + 1-D R
•
Left LSLA 48 2 1
LSLB 58 2 1
LSLD 05 3 1
Shift Right, LSR 64 6 2 74 6 3 R
Logical LSRA 44 2 1 R
LSRB 54 2 1 R
LSRD 04 3 1 R
Multiply
2's Complement
(Negate)
MUL
NEG
NEGA
60 6
,
2 70 6 3
3D
40
10 1 AXB-D
00 - M-M
2 1 00 - A-A
•! •
T
I
-
j
-•••
NEGB 50 2 1 00 - B-B
No Operation NOP 01 2 1 PC + 1 -PC
• •
•
Inclusive OR DRAA 8A 2 2 9A 3 2 AA 4 2 BA 4 3 A + M--A R
DRAB CA 2 2 DA 3 2 EA 4 Z FA 4 3 B + M-B TT R
Push Data PSHA 36 3 1 A -Stack
•
••• •• ••
••
PSHB 37 3 1 B --Stack
•j ••I ••I
Pull Data PULA 32 4 1 Stack -A
Rotate Left
PULB
ROL 69 6 2 79 6 3
33 4 1 Stack -B
•I
ROLA 49 2 1 I
ROLB 59 2 1 I
Rotate Right ROR 66 6 2 76 6 3 I I
RORA 46 2 1 I
RORB 56 2 1
Subtract Acmltr SBA 10 2 1 A- B-A
Subtract with SBCA 82 2 2 92 3 2 A2 4 2 B2 4 3 A-M C-A
Carry S8CB C2 2 2 02 3 2 E2 4 2 F2 4 3 B - M - C-B
Store Acm Itrs STAA 97 3 2 A7 4 2 B7 4 3 A-M R
•
STAB
STD
D7
DD
3
4
2 E7 4
2 ED 5
2 F7 4
2 FD 5
3
3
B-M
o -MM + 1
R
R
••
Subtract SUBA BO 2 2 90 3 2 AD 4 2 BO 4 3 A- M-A I I
SUBB CO 2 2 DO 3 2 EO 4 2 FO 4 3 B - M-B '\
Subtract Double SUBD B3 4 3 93 5 2 A3 6 2 B3 6 3 D - M M + 1 -D I j I
Transfer Acmltr TAB 16 2 1 A-a R
•
Test, Zero or
TBA
TST 6D 6 2 7D 6 3
17 2 1 B-A
M - 00
R
R
•
R
MinUS TSTA 4D 2 1 A - 00 R R
TSTB 5D 2 1 B - 00 j j R R
4-744
MC68120· MC68121. MC68120-1. MC68121-1
•
Branch If Overflow Clear BVC 28 3 2 v-o
Branch If Overflow Set BVS 29 3 2 V-I
••••••
Branch If Plus BPL 2A 3 2 N=O
••••••
Branch To Subroutine BSR 806 2
} See Special ••••••
Jump JMP 6E 3 2 7E 3 3 Operations -
••••••
Jump To Subroutine JSR 905 2 AD 6 2 BD 6 3 Figure 38
••••••
No Operation
Return From Interrupt
NOP
RTI
01 2 1
3B 0 1
• • •I !,• III
• •,
I
"
!
Return From Subroutine RTS 39 5 1 } See Special
1 Operatlons- ••••••
Software Interrupt SWI 3F 2
Figure 38 • •••• S
Walt For Interrupt WAI 3E 9 1
• •• •••
TABLE 16 - CONDITION CODE REGISTER MANIPULATION INSTRUCTIONS
Inherent 5
Cond Code Reg
4 3 2 , 0
Operations MnemoniC OP - # Boolean Operation H I N Z V C
Clear Carry CLC oe 2 1 o -e
••••• R
Clear Interrupt Mask eLi OE 2 1 0-1
• ••••
R
Clear Overflow CLV OA 2 1 O-V
•• • •• •• • R
Set Carry SEe 00 2 1 1 -e
• • S
Set Interrupt Mask SEI OF 2 1 1-1
• ••••
S
Set Overflow SEV
TAP
OB 2 1 1 -V
•••• • S
Accumulator A --CCR 06 2 1 A-eCR ill I I Ii
CCR --Accumulator A TPA 07 2 1 eCR -A
••••••
LEGEND CONDITION CODE SYMBOLS
OP Operatton Code (Hexadeci mal)
H Half-carry from bit 3
- Number of MPU Cycles
I Interrupt mask
MSp Contents of memory location pOinted to by Stack POinter
N Negative (sign bit)
# Number of Program Bytes Z Zero (byte)
+ Arithmetic Plus V Overflow, 2's complement
- ArithmetIc Mmus C Carry/Borrow from MSB
• Boolean AND R Reset Always
X Arithmetic Multiply S Set Always
+ Boolean InclUSIve OR
@ Boolean ExclusIve OR
I Affected
• Not Affected
iiii Complement of M
-- Transfer Into
OBit = Zero
00 Byte = Zero
4-745
MC68120·MC68121·MC68120-1·MC68121-1
.E
.c
.E
.!!
II
a: .§
E !
is
~
w
....EII .c
.E
.!!
a:"
ABA •• •• •• •• • 2 INX
•• •• •3 • •• •
3
•• •••
ABX 3 JMP 3
ADC
ADD
2
2
3
3
4
4
4
4
JSA
lOA •2 5
3
6
4
6
4
••
ADDD
AND
4
2
5
3
6
4
6
4
•• •••
lDD
lOS
3
3
4
4
5
5
5
5
•
••• •• •• •• • • •
ASL 6 6 2 lOX 3 4 5 5
ASLD
• • 3 • lSl 6 6 2
••• •
ASR 6 6 2 lSlD 3
••• ••• •• • •• •• • •
BCC 3 lSA 6 6 2
•• •••
BCS 3 lSRD 3
BEO
• ••• ••
3 MUl
• • • • 10
••2 ••
BGE 3 NEG 6 6 2
••• •• •• • •
BGT NOP 2
•
3
•• •• •• • •
BHI 3 OAA 3 4 4
BHS • •• 3 , PSH
••• ••• •• 3
BIT
••
2 3 4 4
•3 PSHX 4
••• •• •• •• •• ••
BlE PUl 4
BlO
• ••
3 PUlX
••• •• 5
••• •
BlS 3 AOl 6 6 2
BlT
• 3 AOA
•• •• 6 6 2
••• ••• • •• •
BAA 3 SBC 3 4 4
••• •2 •••
BVS 3 STA 3 4 4
CBA STD 4 5 5
ClC
Cli
•• ••
2
2
STS
STX •• 4
4
5
5
5
5
• •
••2 ••
ClA 6 6 2 SUB 2 3 4 4
ClV • • • • 2 SUBD 4 5 6 6
••• •• •• •••
CMP 3 4 4 SWI 12
COM
• • 6 6 2 TAB 2
•• • • • ••• ••
CPX 4 5 6 6 TAP 2
DAA
DEC
•• 6 6
2
2
TBA
TPA •• • ••
2
2
DES •• •• •• ••
3 TST
• •• 6 6 2
••• •• ••
DEX 3 TSX 3
EOA
••
2 3 4 4
•• TXS •• • •
3
••
INC 6 6 WAI 9
INS • • 3
4-746
MC68120e MC68121 e MC68120-1 e MC68121-1
PC
{
Direct RTN t=:::~=:;::::::::::::j
PC
{
INDXD RTN t::;:;~~~ft:;=j
PC
{
EXT ND I--:cS'-L_--cS::':uc:.b,--:-Ad::':d:-,--j
RTN Next Main Instr
SP Slack
•
______ SP - 2 ~----~
SP-1
RTN '--'-=~_"--..J
SP
PC I
Subroutine
$39-ATS
I q ~:EEStack
SP.+-l
______ SP+2
RTNH
RTNL
I q
Main Program SP Stack
SWI ______ SP - 7
$3'
R:: I SP-6
SP-5
Condition Code
Acmltr B
SP-4 Acmltr A
WAI, Walt for Interrupt SP-3 Index Register IXHI
Iq
Main Program SP-2 Index Register (XU
R~: f
$3E WAI SP-l RTNH
SP RTNL
PC I
Interrupt Program
$38-RTI I q SP
SP
SP+ 1
Stack
Condition Code
SP+2 Acmltr B
SP+3 Acmltr A
SP+4 Index Register (XH)
SP+5 Irldex Register (XL
SP+6 RTNH
--'SP+7 RTNL
JMP, Jump
E Main Program
{'
PC $6E-JMP
K-Offset
Extended
INDXD{
4-747
MC68120-MC68121-MC68120-1-MC68121-1
Address Mode II
Address Bus
RIW Data Bus
Instructions Line
IMMEDIATE
ADC EOR 2 1 Op Code Address 1 Op Code
2 Op Code Address + 1
•
ADD LOA 1 Operand Data
AND ORA
BIT SBC
CMP SUB
LOS
LOX
3 1
2
Op Code Address
Op Code Address + , ,
1 Op Code
Operand Data (High Order Byte)
LOD 3 Op Code Address + 2 1 Operand Data (Low Order Byte)
CPX 4 1 Op Code Address 1 Op Code
SUBD 2 Op Code Address + 1 1 Operand Data (High Order Byte)
ADDO 3 Op Code Address + 2 1 Operand Data (Low Order Byte)
4 Address Bus FFFF 1 Low Byte of Restart Vector
DIRECT
ADC EOR 3 , Op Code Address 1 Op Code
ADD LOA 2 Op Code Address + 1 1 Address of Operand
AND ORA 3 Address of Operand 1 Operand Data
BIT SBC
CMP SUB
STA 3 , Op Code Address 1 Op Code
2 Op Code Address + , 1 Destination Address
3 Destmatlon Address 0 Data from Accumulator
LOS 4 1 Op Code Address 1 Op Code
LOX 2 Op Code Address + 1 1 Address of Operand
LDD 3 Address of Operand 1 Operand Data (High Order Byte)
4 Operand Address + 1 1 Operand Data (Low Order Byte)
STS 4 1 Op Code Address 1 Op Code
STX 2 Op Code Address,. 1 1 Address of Operand
STD 3 Address of Operand 0 Register Data (High Order Byte)
CPX 5 ,
4 Address of Operand + 1
Op Code Address
0
1
Register Data (Low Order Byte)
Op Code
SUBD
ADOD
2
3
Op Code Address + 1
Operand Address ,
1 Address of Operand
Operand Data (High Order Byte)
4 Operand Address + 1 1 Operand Data (Low Order Byte)
JSR 5 ,
5 Address Bus FFFF
Op Code Address
1
1
Low Byte of Restart Vector
Op Code
2 Op Code Address + 1 1 Irrelevant Data
3 Subroutine Address 1 First Subroutine Op Code
4 Stack Pomter 0 Return Address (Low Order Byte)
5 Stack POinter + 1 0 Return Address (Hloh Order Byte)
- Contmued-
4·748
MC68120-MC68121-MC68120-1-MC68121-1
II
(High Order Byte)
LDD 3 Op Code Address + 2 1 Address of Operand
(Low Order Byte)
4 Address of Operand 1 Operand Data (High Order Byte)
5 Address of Operand + 1 1 Operand Data (Low Order Byte)
STS 5 1 Op Code Address 1 Op Code
STX 2 Op Code Address + 1 1 Address of Operand
(High Order Byte)
STD 3 Op Code Address + 2 1 Address of Operand
(Low Order Byte)
4 Address of Operand 0 Operand Data (High Order Byte)
5 Address of Operand + 1 0 Operand Data (Low Order Byte)
ASL LSR 6 1 Op Code Address 1 Op Code
ASR NEG 2 Op Code Address + 1 1 Address of Operand
(High Order Byte)
CLA ROL 3 Op Code Address + 2 1 Address of Operand
(Low Order Byte)
COM ROA 4 Address of Operand 1 Current Operand Data
DEC TST 5 Address Bus FFFF 1 Low Byte of Aestart Vector
INC 6 Address of Operand 0 New Operand Data
CPX 6 1 Op Code Address 1 Op Code
SUBD 2 Op Code Address + 1 1 Operand Address
(High Order Byte)
ADDD 3 Op code Address + 2 1 Operand Address
(Low Order Byte)
4 Operand Address 1 Operand Data (High Order Byte)
5 Operand Address + 1 1 Operand Data (Low Order Byte)
6 Address Bus FFFF 1 Low Byte of Restart Vector
JSR 6 1 Op Code Address 1 Op Code
2 Op Code Address + 1 1 Address of Subroutine
(High Order Byte)
/
3 Op Code Address + 2 1 Address of Subroutine
(Low Order Byte)
4 Subroutine Starting Address 1 Op Code of Next Instruction
5 Stack Pomter 0 Return Address
(Low Order Byte)
6 Stack POinter - 1 0 Retum Address
HIQh Order ~~l
- Continued -
4-749
M C68120- M C68121- M C68120-1- M C68121-1
II STX
STD
ASLLSR
ASR NEG
6
2
3
4
5
1
2
Op Code Address + i
Address Bus· FFFF
Index Register Plus Offset
Index Register Plus Offset + 1
Op Code Address
Op Code Address + 1
1
1
Q
0
1
1
Offset
Low Byte of Restart Vector
Operand Data (High Order Byte)
Operand Data (Low Order Byte)
Op Code
Offset
CLR ROL 3 Address Bus FFFF 1 Low Byte of Restart Vector
COM ROR 4 Index Register Plus Offset 1 Current Operand Data
DEC TST (I) 5 Address Bus FFFF 1 Low Byte of Restart Vector
INC 6 Index Register Plus Offset 0 New Operand Data
CPX 6 1 Op Code Address 1 Op Code
SUBD 2 Op Code Address + 1 1 Offset
AODD 3 Address Bus FFFF 1 Low Byte of Restart Vector
4 Index Register + Offset 1 Operand Data (High Order Byte)
5 Index Register + Offset + 1 1 Operand Data (Low Order Byte)
6 Address Bus FFFF Low Byte of Restart Vector
JSR 6 1 Op Code Address 1 Op Code
2 Op Code Address + 1 1 Offset
3
4
Address Bus FFFF
Index Register + Offset ,
1 Low Byte of Restart Vector
First Subroutine Op Code
5 Stack POinter 0 Return Address (Low Order Byte)
6 Stack POinter - 1 0 Return Address (High Order Byte)
- Contlnued-
4-750
MC68120-MC68121-MC68120-1-MC68121-1
•
INX 3 1 Op Code Address 1 Op Code
DEX 2 Op Code Address +1 1 Op Code of Next Instruction
3 Address Bus FFFF 1 Low Byte of Restart Vector
PSHA 3 1 Op Code Address 1 Op Code
PSHB 2 Op Code Address +, 1 Op Code of Next Instruction
3 Stack POinter 0 Accumulator Data
TSX 3 1 Op Code Address 1 Op Code
2 Op Code Address +1 1 Op Code of Next Instruction
3 Stack POinter 1 Irrelevant Data
TXS 3 1 Op Code Address 1 Op Code
2 Op Code Address +1 1 Op Code of Next Instruction
3 Address Bus FFFF 1 Low Byte of Restart Vector
PULA 4 1 Op Code Address 1 Op Code
PULB 2 Op Code Address +1 1 Op Code of Next Instruction
3 Stack POinter 1 Irrelevant Data
4 Stack POinter +1 1 Operand Data from Stack
PSHX 4 1 Op Code Address 1 Op Code
2 Op Code Address +1 1 Irrelevant Data
3 Stack POinter 0 Index Reg,ster (Low Order Byte)
4 Stack POinter -1 0 Index Reg,ster (High Order Byte)
PULX 5 1 Op Code Address 1 Op Code
2 Op Code Address +1 1 Irrelevant Data
3 Stack POinter 1 Irrelevant Data
4 Stack POinter +1 1 Index Register (High Order Byte)
5 Stack POinter +2 1 Index Register (Low Order Byte)
RTS 5 1 Op Code Address 1 Op Code
2 Op Code Address +1 1 Irrelevant Data
3 Stack POinter 1 Irrelevant Data
4 Stack POinter +1 1 Address of Next Instruction
(High Order Byte)
5 Stack POinter +2 1 Address of Next 1nstructlon
(Low Order Byte)
WAI 9 1 Op Code Address 1 Op Code
2 Op Code Address +1 1 Op Code of Next Instruction
3 Stack POinter 0 Return Address (Low Order Byte)
4 Stack Pomter -1 0 Return Address
(High Order Byte)
5 Stack POinter -2 0 Index Register (Low Order Byte)
6 Stack POinter -3 0 Index Register (High Order Byte)
7 Stack Pomter -4 0 Contents of Accumulator A
8 Stack POinter -5 0 Contents of Accumulator B
9 Stack Pomter -6 0 Contents of Cond Code Register
- Contlnued-
4-751
MC68120-MC68121-MC68120-1-MC68121-1
•
from Stack
7 Stack Pomter +4 1 Index Register from Stack
(High Order Bytel
B Stack POinter +5 1 Index Register from Stack
(Low Order Bytel
9 Stack POinter +6 1 Next Instruction Address from
Stack (High Order Bytel
10 Stack POinter +7 1 Next Instruction Address from
Stack (low Order Bytel
SWI 12 1 Op Code Address 1 Op Code
2 Op Code Address +1 1 Irrelevant Data
3 Stack POinter 0 Return Address (Low Order Bytel
4 Stack POinter -1 0 Return Address
(High Order Bytel
5 Stack POinter -2 0 Index Register (Low Order Bytel
6 Stack POinter -3 0 Index Register (High Order By tel
7 Stack POinter -4 0 Contents of Accumulator A
B Stack POinter -5 0 Contents of Accumulator B
9 Stack POinter -6 0 Contents of Cond Code Register
10 Stack POinter -7 1 Irrelevant Data
11 Vector Address FFFA (Hexi 1 Address of Subroutine
(High Order Bytel
12 Vector Address FFFB (Hexi 1 Address of Subroutine
(Low Order By tel
RELATIVE
BCC BHT BN E BLO 3 1 Op Code Address 1 Op Code
BCS BlE BPl BHS 2 Op Code Address +1 1 Branch Offset
BEQ BlS BRA BRN 3 Address Bus FFFF 1 Low Byte of Restart Vector
BGE Bll BVC
BGl BMl BVS
BSR 6 1 Op Code Address 1 Op Code
2 Op Code Address +1 1 Branch Offset
3 Address Bus FFFF 1 Low Byte of Restart Vector
4 Subroutine Starting Address 1 Op Code of Next Instruction
5 Stack POinter 0 Return Address (Low Order Byte)
6 Stack POinter -1 0 Return Address(Hlgh Order Bytel
4-752
MC68120-MC68121-MC68120-1-MC68121-1
OP
00
01
MNEM
NOP
MODE
IN ER
-
2
.
1
OP
14
J5
MNEM
DES
TXS
MODE
INHfA
-
3
3
.
TABLE 19 - CPU INSTRUCTION MAP
1
1
OP
.B
69
MNEM
ASL
AOL
MODE
-
6
6
.
2
2
OP
9r
90
MNEM
CPX
JSA
MODE
D1J,
-.
5
5
2
2
OP
DO
01
MNEM
SUBB
(.MPB
MODE
D1A
-3
3
.
2
2
T
02 36 PSHA 3 1 6A DEC 6 2 9E LOS 4 2 02 S~CB 3 2
03 J7 PSHB 3 1 6B 9F STS DA 4 2 03 AOOO S 2
04
Ob
LSAD
ASlO
3
3
1
1
3B
3'
PUlX
ATS
5
S
1
1
6C
60
lNC
TST
6
6
2
2
40
Al
SUBA
rMPA
fNoxa
,,
4 2
2
04
OS
ANOS
81T8
3
3
2
2
06 TAP 2 1 3A ABX 3 1 6E JMP 3 2 A2 serA 2 06 LOAS 3 2
07
08
TPA
lNX
2
3
1
1
3B
3C
An
PSHX ,
10 1
1
SF
70
CLA
NEG
INoxa
EXTND
6
6
2
3
A3
A'
SUBD
ANOA
6
,, 2
2
07
DB
STAB
EORB
3
3
2
,
2
ADce
,,,
09 DEX 3 1 3D MUl 10 1 71 AS BITA 2 D. 3
OA
OB
CLV
SEV ,
2 1
1
JE
JF
WAl
SWl
•
12
1
1
72
7J COM 6 3
A6
A7
LDAA
ST.A,A
2
2
DA
DB
DRAB
ADDS
3
,,
3
2
2
oc
00
CLC
SEC
2
2
1
1
40
41
NEGA 2 1 74
75
LSR 6 3 A8
A9
EORA
AorA ,, 2
2
Dr
DO
LDD
SlD
2
2
OE ClI 2 1 42 76 AOR 6 3 AA OAAA
, 2 DE LDX 4
, 2
,,
OF SEI 2 1 43 COMA 1 1 77 ASR 6 3 A8 ADOA 2 Of STX DIR 2
10 SBA 2 1 44 LSRA 2 1 78 ASL 6 3 AC rpx 6 2 EO SUBS INoxa 2
11
12
CBA 2 1 45
46 RORA , 1
7'
7A
AOL
DEC
6
6
3
3
AD
AE
JSR
LDS
,,
6 2
2
E1
E2
eMP8
serB 4
2
2
13 47 ASRA 2 1 7B Af STS
sus A
INoxa
, , 2 E3 ADOD
,
,
6 2
14 48 ASLA 2 1 7C INC 6 3 80 ~XTNO
, E4 ANDB 2
15
16 TAB 1 1
4'
4A
ROLA
oeCA ,
2 1
1
70
7E
TST
JMP
6
3
3
3
81
82
rMPA
serA , E53
3 E6
BITS
LDAS ,
,
2
2
17 TBA 2 1
,
48 7f rLR EXTND 6 3 B3 sueo 6
, 3 E7 STAB
,
2
18 4C INCA 2 1 80 SUBA IMMED 2 2 8' ANDA
, 3 E8 EORB
ADes
,
4 2
"
DAA INHER 2 40 TSIA 2 1 81 CMPA 2 2 85 BITA
, 3 E9
,
2
,,, ,,
lA 4E T 82 SBCA 2 2 86 LDAA 3 EA DRAB 2
18 ABA INHE~ 2 1 4F CLAA 2 1 83 SUSD 3 87 STAA 3 LB ADDS 2
lC 50 NEGB 2 1 8' ANDA 2 88 FORA
, 3 Er LDD 5 2
•
,,
10 51 85 BITA 2 B9 ADIA 3 ED STD 5 2
S
1E
1F
52
53 COMB
,
2 1
86
87
LOAA 7 2 8A
88
ORAA
AODA " 3
3 Ef
LD'
SlX INoxa S
, 2
20
21
BRA
8RN
AEL 3
3
2
2 "
55
LSAB 1 B8
89
WRA
ADCA ,
2 2
2
8C
80
CPX
J>A
6
, "
6
3
3
fO SUBS
rMPB
EXINO
,,
3
3
22 8HI 3 2
" RORB 2 1 8A ORAA
,
2
,
2 8E LOS 3 F2 SBCS
,
3
2J
24
8LS
BCC
3
3
2
2 "
58
ASAB
ASlS
2
2
I
I
88
8C
ADDA
CPX IMMED
2
3
8f
CO
STS
SUBB
EXTND
IMMEO
S
2 " 3
2 f4
AOOD
ANOB
6
,
3
3
, ,,,
25 BCS 3 2 5. ROlS 2 1 80 BSR REl 6 2 C1 rMPS 2 2 '5 SITS 3
26 BNE 3 2 5A OECS 1 8E LDS IMMED 3 3 C2 SBrs 2 2 f6 LOAS 3
27 BEO 3 2 C3 ADDO 4 3 F7 STAS 3
5B
" ,
,,
28 8VC 3 2 5C INCB 2 I 90 SUBA DIR 3 2 C4 ANDS 2 2 F8 [ORB 1
2. BVS 3 2 TSTB 1 CMPA 3 2 r; BITS F9 ADC8 3
2A
28
8PL
8MI
3
3
2
2
50
Sf
SF
T
CLRB INHER
2
2 1
"
'2
.3
SSCA
SUSD ,
1 2
2
co
C7
LOAS 2 fA
f8
aRAB
ADDS ,
4 3
3
2C 8GE 3 2 C8 EORB 2 2 f(' LOO S 3
BLT
60 NEG INDXD 6 2
" ANDA 3 2
C9 ADeB 2 2 fD STO S 3
I
20 3 2 61 95 SITA 3 2
2E
2F
BGT
BLE AEL
3
3
2
2
62
6J COM 6 2
96
97
LDAA
STAA
3
3
2
2
CA
C8
ORAS
ADDS
2
2
2
2
FE
ff
LD'
STX EXTND ,
S 3
3
'T
30 TSX 3 1 64 LSA 6 2 .8 EORA 3 2 CC LOD 1 3
31
J2
INS
PULA ,
3 I
1
55
66 AOA 6 2
.9
9A
ADCA
ORAA
3
3
2
2
rD
CE LOX IMMED 3 3
UNDUINto OP rODE
4·753
MC68120-MC68121·MC68120-1-MCP8121-1
APPENDIX A
MC68120 CUSTOM ORDERING INFROMATION
A.O MC2708s must be clearly marked to Indicate which PROM
Address $FFEF IS Reserved for the Checksum value for the corresponds to which address space ($X8OQ-$XFFF) See
ROM, to be generated at the factory. Figure A-2 for recommended marking procedure.
~ ~
A) EPROM(s)
B) MDOS diskette
~ ~
The specification should be formatted and packaged, as
indicated In the appropriate paragraph below, and mailed
prepaid and Insured with a cover letter (see Figure A-1) to'
Motorola Inc. xxx = Customer 10
MPU Marketing L2787
3501 Ed Bluestein Blvd.
Austin, Texas 78721 After the EPROM(s) are marked, they should be placed In
A copy of the cover letter should also be mailed separately conductive I C carners and securely packed Do not use
styrofoam.
II A.2 EPROMs
MCM2708 and MCM2716 type EPROMs. programmed
with the custom program (positive logiC notation for address
and data). may be submitted for pattern generation. The
A.3 MOOS DISKETTE
The file name and startl end location should be written on
the label
FIGURE A-1
ADDRESS ______________________________________________________________
INolell _____________________________________________________________
SIGNATURE ____________________________________________________________
TITLE ________________________________________________________________
4·754
® MOTOROLA
MC68122
(1.0 MHz)
MC68122·1
(1.25 MHz)
Advance InforDl.ation
HMOS
(HIGH-DENSITY N-CHANNEL
MC68122 CLUSTER TERMINAL CONTROLLER SILICON-GATE)
The MC68122 Cluster Terminal Controller (CTC) relieves a host MPU CLUSTER TERMINAL
of the time consuming tasKS related to communicating with devices CONTROLLER
such as terminals and line printers The CTC performs the tasKS
necessary to handle strings of characters and the proper control func-
tions for communicating with asynchronous, commUnicatlons-
compatible components The MC68000 asynchronous bus and the
MC6800/MC6809 synchronous bus are readily supported by the CTC
The CTC prOVides the host MPU with the following features
~
• Automatic Collection of Text Strings DUring Input, Automatic
Transmission of Text Strings DUring Output
• Broadcast Messages Can Be Sent to All Devices
• Notification of Attention, 1/0 Request Termination, and Error
Conditions
CERAMIC PACKAGE
• Wide Range of Control Options Which Can Be Uniquely SpecI- CASE 740
II
fied for Each Device
• Controlled Halting or Ignoring of Output Line Features Available
for Interactive Terminals
• Conversational Protocol Between Host MPU and CTC - Ideal for
Multi-TasKing Implementations PIN ASSIGNMENTS
• Operates In Two Configurations: Stand Alone and Expanded
• Stand Alone - An Internal Serial Communications Interface VSS ~
Performs All Data Transfer to a Single Terminal VCC Cl/SAI
• Expanded - M C6850 Asynchronous Communications Interface
VCC C2
Adapters (ACIA) are Used on the CTC Local Bus
• The Number of Communication Devices May Be SpeCified at E
Power-up SR/Vii C4
~ C5
c:s R/i}}
SOl
S02
ThiS device contams circuitry to protect the Inputs against damage due to high static
S03
voltages or electnc fields. however, It IS adVised that normal precautions be taken to aVOid
application of any voltage higher than maximum rated voltages to thiS hlgh~lmpedance Cir- SD4
CUit For proper operation It IS recommended that V In and Vout be constrained to the range
S05 A13
VSS s IV,n or Voutl S VCC Reliability of operation IS enhanced If unused Inputs are lied to
an appropriate logic voltage level Ie g , either VSS or VCC) SOB
S07
4·755
MC68122
ConftguratlOn
Select Interface
r----- ---,
I I
I I
I
I
I
I
I
I '"
:J
<II
I E
RESET
E *
>
</)
•
Vss
VCC
I
I
I
I
I
l...rT"""'I""T"'T""'--- - - - - - - - J
POWER CONSIDERATIONS
4-756
MC68122
LOCAL BUS ELECTRICAL CHARACTERISTICS IVCC=5 0 Vdc +5%, VSS=O, TA=O to 70'C unless otherwise noted 1
(Refer to Figures 2 and 31
Characteristic Symbol Min Typ Max Unit
Input High Voltage E VEIH VCC-O 75 - VCC V
Input Low Voltage E VEIL VSS 03 VSS+06 V
Input High Voltage RESET VSS +40 - VCC
VIH V
Other Inputs· VSS + 20 - VCC
Input Low Voltage All Inputs· VIL VSS 03 VSS+08 V
Input Load Current
lin - - 08 mA
IV In =Ot024VI AS
Input Leakage Current
lin - 15 25 ~A
IV In =Ot0525VI RESET
Three-State (Oft State) Input Current
IV ,n =05t024VI SDO-SD7, ADO-AD7, ITS I - 20 10 ~A
A8-A 15, Cl-C5 - 100 100
Output High Voltage
(ILoad= -205~A, Vcc=Mlnl ADO-AD7 VSS + 24 - -
VOH V
IILoad= -145~A, VCC= Mini A8-A15, R/iN VSS + 24 - -
IILoad= -l00~A, VCC= Mini Other Outputs VSS+24 - -
Output Low Voltage
VOL - - VSS+05 V
IILoad=20mA, Vcc=Mlnl All Outputs
Internal Power DISSipation (Measured at T A - QOC)
Input Capacitance
IVIn=O, TA=25'C,f o =1 OMHzI
C,n
-
-
-
-
-
-
1200
125
100
mW
pF
II
DC SYSTEM BUS ELECTRICAL CHARACTERISTICS
(VCC = 50 Vdc '" 5%, VSS = 0, TA = 70°C unless otherwise notedl (Refer to Figure 2)
Characteristic Symbol Min Typ Max Unit
Input High Voltage CS, DTACK, SAO-SA7, SDO-SD7, SR/W VIH VSS + 20 - Vec V
Input Low Voltage CS, DTACK, SAO-SAl, SDO-SD7, SR/W VIL VSS - 03 - VSS+08 V
Output High Voltage IiLoad- 4OO~A, Vcc-mlnl DTACK, SDO-SDl VOH Vss + 2 4 V
Output Low Voltage Ii Load - 53 mA, VCC - mini DTACK,SDO-SD7 VOL - - VSS+05 V
VCC
MMD6150
Test POint or EqUiv C=90 pF for ADO-AD7, A8-A15, E, AS, R/iN
RL
= 130 pF for SOO-S07, DTACK
R=6 kG for SDO-SDl, DTACK
= 12 kG for ADO-AD7
1
C R MMD7000
or Equlv
= 16 5 kG for A8-A 15, R/iN
RL =2,0 kG for ADO-ADl, A8-A15, R/iN, SAO-SA7
=750 kG for SDO-S07, OTACK
-=- ':'
4·757
MC68122
II
Enable Rise Time Extended tERE - 80 - 80 ns
Processor Control Setup Time tpcs 200 - 200 - ns
Processor Control Hold Time tpCH 20 40 20 40 ns
tERE
VEIH
R/vv,Address----rt~~~~~~~~--------------------ti------------------------------------t-~~~~
INon·Muxed)
i+---{ 1911-----l~
Address
Strobe IASI _____-"r
1+----(
NOTES
1 Voltage levels shown are VLSO 5 V, VH0<2 4 V, unless otherwise specified
2 Measurerrent POints shown are 0 8 V and 20 V, unless otherWise specified
3 Address valid on the occurrence of the latest of 11 or 23
4 Usable access time IS computed by' 1 -14+ 11 + 17)
4-758
MC68122
II
• Actual value dependent upon clock penod
.. Data need not be valid on write to Semaphore Registers
FIGURE 4 - ASYNCHRONOUS READ OF SEMAPHORE REGISTER FIGURE 5 - ASYNCHRONOUS WRITE OF SEMAPHORE REGISTER
tSAH;}-
SDO-S07
Three State
SAO-5A7
SRiw ~\..lU-_ _ _ _ _---,IlTu.u
SDD-SD7 ---~'f+f-f<J1
SOO-S07
Note Timing measurements are referenced to and from a low voltage of a 8 volts and a high voltage of 2 a volts, unless otherwise noted
4-759
MC68122
~--------------------~--------------------------------------~
-.J",-----------------------------d... V EI H
~--------<D------------~
RIW, Addless--~~~~~~~,,~r-------~~~~----~t---------------------------------~r1~~~
ES----t-~--------------------~
Notes
1 Voltage levels shown are VLSO 5 V, VH2:2 4 V, unles~ otherwise specified
2 Measurement pOints shown are a 8 V and 2 0 V, unless otherWise s~eclfled
4-760
MC68122
4-761
MC68122
MC68122 MC6809
Data Lines
MC68122 MC68000
SOO-S07
Lower Data Lines
SAO-SA7
Lower Address Lines
Al-A8
·Only needed In Expanded Mode
MC68122. It should be noted that If the memory ready signal LOCK REGISTER
(on M6800 processors) IS to be used with the Dr ACK signal, This register, located at $17, IS used in determining owner-
the system clock must be faster than or equal to the clock ship of the Transfer Area. When read, the high-order bit in-
driving the CTC. Example clock cirCUits are shown in Figures dicates one of two results: If set, the Transfer Area was
12 and 13. already claimed by the host MPU or IS currently under
4-762
MC68122
MCI!8122 MC6809
VCC
FIGURE 12 - CLOCK CIRCUIT EXAMPLE 1 - SCHEMATIC AND TIMING
Schematic
II
U1 SN74LS175
U2 SN75LS08
tRC= 10 ~s
Timing
8 MHz
DA
OA J
OB a
Oc
r-
00
AS J L
4·763
MC68122
AS
ClR PAE
elK Q o
U2a
L U2b
+---;ClK 0 / - - - . "'--''' 0
U1, U2 - SN74lS74 ClA
•
U3 - SN74lS02
Timing
01
02
'----_. . . .1
AS ______~r_l~ ______~~
o - - ,..._ _--'
ownership of the eTe; If clear, the Transfer Area was free, Area has now been passed to the eTC and that service is re-
but now belongs to the host MPU. quired. The eTC scans thiS register at least once every
The T ransler Area should not be read or written by the millisecond.
host MPU until ownership IS obtained.
INTERRUPT REQUEST MIRROR REGISTER
PARAMETER QUALIFICATION REGISTER This register, located at $1A, IS used to mirror the status of
This register, located at $18, Indicates when set that the the interrupt input. In some systems, where Interrupts are
eTe IS In parameter qualification. either not allowed or not required, a polling routine may be
employed by the host MPU to determine when the eTC re-
SERVICE REQUIRED REGISTER quires servicing. ThiS latch would be the location scanned to
This register, located at $19, is set by the host MPU and IS determine if a returned response is ready In the eTC. A zero
used to Indicate to the eTC that ownership of the Transfer indicates that host service IS required.
MC68122
II
CTC to complete ItS entire reset sequence. An external RC to be uniquely selected. The address lines must be vahd
network may be used to obtain the required timing. before the CS signal goes low for the asynchronous transfer
and vahd before the E signal goes low for the synchronous
ENABLE - E transfer. The system Interface must be deselected between
The E clock Input IS required for timing to synchrOnize reads or writes for the asynchronous operation.
local data bus transfers. A "CPU E-cycie" (or bus cycle) con-
SiStS of a negative half-cycle of E followed by a positive half- SYSTEM READ/WRITE (SR/W) - ThiS Signal IS
cycle. For any given bus cycle, the address IS valid dUring the generated by the system bus to control the direction of data
negative half-cycle of E and the selected device must be transfer on the data bus. With the CTC selected, a low on
enabled to the data bus dUring the next positive half-cycle. the SR/W line enables the Input buffers and data IS transfer-
The data bus IS valid only while E is high. It should be noted red from the system processor to the CTC. When SR/W IS
that this Input shuld have some provIsion to obtain the high and the chip IS selected, the data output buffers are
specified logical high level which is greater than standard turned on and data is transferred from the CTC to the system
TTL levels. bus.
Enable is the primary CTC system timing signal and all tim-
Ing data specified as cycles IS assumed to be referenced to CHIP SELECT (CS) - This signal is a TTL-compatible in-
thiS clock unless otherwise noted. put signal used to activate the system bus Interface and
"If operating In the Stand Alone Mode, the senal communications Interface formats are latched In on PinS 29, 30, 31, and 32 See Tables 3 and4
Internal
Add,ess Bus u...;~~...ulllo,l,.;~~~..ullllllU~-;F":'F~FE~"""~FF";'F';"E"-';"FF~F";'EJ\.-;F";F~F~E'":'~F~F:;:F;cF.-:A:-:Ne~w:-;:P-!e"-_J\.""'~II---J~FF~F":'E-":F"'F";';'FE
4-766
MC68122
allows transfer of data between the CTC and the system pro- panslon AS IS reqUired only In the Expanded Mode of opera-
cessor dunng synchronous or asynchronous accesses. CS tion. Figure 15 shows how to demultiplex the bus
provides the synchrOniZing signal for the request registers
dunng access by the system bus MULTIPLEXED ADDRESS/DATA BUS
(AO-A15/00-07)
DATA TRANSFER ACKNOWLEDGE (DTACK) - This
signal IS a handshake hne for Information transfer on the These sixteen hnes function as a multiplexed address/data
system data bus In an asynchronous transfer It IS generated bus. These hnes are held In the high-Impedance state bet-
by the CTC as an acknowledge to the CS signal A low out- ween vahd address and data times to prevent potential bus
put Indicates that vahd data IS on the bus for transfer dUring confhcts All hnes can dnve one Schottky TTL load and 90
the system read cycle or that data has been wntten dunng a pF
system wnte cycle The asynchronous operation uses thiS
signal to synchronize the system bus with the CTC processor OPERATING MODES
as Illustrated by Figures 4, 5, 6, and 7 The CTC proVides two different operating modes which
A low Input on Df ACK dunng the failing edge of CS in- are selectable by hardware programming and are referred to
dicates a synchronous system and data will transfer dunng as the Stand Alone Mode, and the Expanded Mode (see
the positive level of the system E clock The timing for thiS Figure 16) The configuration select Interface IS used to
transfer IS shown In Figures 12 and 13. select the operating mode for the CTC. The logiC levels pre-
The output characteristics for DT ACK are the same as sent on C5 when the positive edge of the Reset Input signal
those for the system data bus with allowance for an external occurs are latched Into the CTC and select the appropnate
pull up resistor LogiC charactenstlcs should be such that the mode. See Figure 20.
external pullup resistor IS a holding resistor (, e., dnven to the In the Stand Alone Configuration, the senal communica-
II high level first, then to the high-Impedance state). tIOns Interface of the CTC IS available at pins 45, 46, and 47
of thiS Interface Also, an Interrupt output IS available at Pin
LOCAL BUS INTERFACE 43 See Figure 17
The local bus Interface IS used to connect the CTC to local In the expanded configuration, Pin 45 IS an Interrupt out-
bus components such as RAM, ACIAs, etc, when the CTC put which should be tied to the system Interrupt hne
IS used In the expanded configuratIOn. In the Stand Alone Figures 18 and 21 are examples of how the MC68122 IS to
Configuration, thiS Interface IS left unconnected be used In the Expanded Mode The Expanded Mode
memory map IS denoted In Figure 22
READ/WRITE (R/W)
ThiS signal IS used to control the direction of data transfer MODE PROGRAMMING
on the local bus ThiS pin can dnve one Schottky TTL load The operating mode IS programmed by the level asserted
and 90 pF. on C5 dUring the positive edge of RESET. See Figure 19 and
Table 2.
ADDRESS STROBE (AS) CirCUitry to prOVide the programming levels IS primarily
ThiS Input signal IS used to control the time-multiplexed dependent on the normal system use of the three pins.
address/data hnes AO-A5/DO-D7 Address strobe may also Figure 20 IS an example of how to program the modes of the
be used to de-multiplex the two buses for address map ex- CTC.
AS
EN!G
l acI
01 01
31
Port Data
Address!
SN74S373
ITYPlcali
08 08
-
4-766
MC68122
68000 6808
6809 6803
6801 6800
6802
.,A- Y
RAM
~ -
,.A- -
V- ~
;----
~
ro
U"
"0 0
ro
r-- « I---
ROM I--- I--
k:=
- - - - - - - - - - . - - - - - ------ ------
System Bus
Vv
MC68122
Expanded Mode
•
~ ;.
Local
Bus ro ~
ro
~'\
0 RAM
-
r--
~
MC6850
v
ACIA
.... IMax= 1281
4·767
MC68122
MC68122
EI
8 System
Address Lines
8 System
Cl
Data Lines System
Senal {
Bus
Data
SR/W
....----CS
DTACK
I
FIGURE 18 - EXPANDED MODE
VCC
RESET - - - . - j
MC68122
EI
8 Lines 8 System
Multiplexed Addressl Data
Address Lines
R/W-----I 8 System
Data Lines System
Bus
AS ---eo! ' - - - - - SR/W
....---CS
8 Address Lines DTACK
Sen.II/O
VSS
4·768
MC68122
See Figure 23
for Diode
'MPH
VMPL
C5 Mode Latch Level
Ir---~----.L VMPH Min
Mode Input
RESET
IC51 ---< VMPL Max
•
RESET Low Pulse Width PWRSTL 30 - - E-Cycles
Mode Programming Setup Time 'MPS 20 - - E-Cycles
Mode Programming Setup Time
RESET Rise Time;;, 1 ~s tMPH 0 - - ns
RESET Rise T,me< 1 ~s 100 - -
T
> ~ MC68122
R2: ~ Rl: Rl ~ Rl~
48 RESET
43 C5
44 C4
EI 45 C3/EI
NOTES
D~~
R2. C = Reset Time Constan t Mode Control
Rl = 10 k !Typicali SWitch
D= lN914, lN4001 (TYPical 1
,- ~
~ At R'EsET, C5 H = Stand Alone Mode
L = Expanded Mode
4-769
FIGURE 21 -
•
MC68122 SYSTEM s:
(')
~
.....
~
MC68122
To
Host
'"'oo~
AS 41
System
A15 25
26
2'i
i
;
30
DevIcE:
AB 32 Buffer
~ Memory
Riw42 1$10001 07'
.!.J
-..j
E4
o
Device
Decode
10k DO
~
+ 5 v-'\I\Ar---,
PQR
Address, E Memory
Decode
INT
ACK
(System)
Por
NOTE Figure shows unbuffered system with only one device Interface (MC6850) and associated memory
MC68122
~ Reserved or Used
~byCTC
ThiS memory map IS the entire 64K map of the eTC Note that the buf-
fer sIze should be the maximum data transmitted to or received from a
I
device without host MPU notification required
NOTE As the Stand Alone Mode of the eTC uses no external RAM
or ACIAs, the memory map IS Irrelevant
4-771
MC68122
Output
Clock
NRZ
Format
BI-Phase
Format
Bit Bit
Idle Start 0 Stop
4 5 7
Data 01001101 ($4DI
MC68122 SYSTEM OPERATION In the Transfer Area at all times. There are no default condi-
tions In thiS configuration. The host must set these values
TRIGGERS before Input or output starts
$83 - SINGLE CHIP OPTIONS Before examining or changing any parameters, the
The options are: Transfer Area must be owned by setting the Lock Register.
$40 - echo Input termination match character When the host M PU IS ready to allow the eTC to begin nor-
$80 - echo Input to output
mal processing, It sets the Service ReqUired Register.
II
$8B - INPUT END-OF-LiNE MATCH CHARACTER
ThiS byte IS used to define the end-of-hne match character Area RAM at this time IS:
which IS commonly a CR When thiS character IS matched, Offset into
an output echo stnng will be transmitted and the Input IS ter- Host/CTC
minated. Address Space "VIes Definition
Control $80 1 Inttlallzatlon Mode SWitch
$8C - INPUT "AND" MASK BYTE Parameter $81 2 Result of RAM Self-Test
Each character that IS entered IS automatically ANDed $83 4 Reserved
with thiS byte before further processing. A common value IS $87 2 Number of DeVices
$7F, which IS normally used to strip off panty bits for seven $89 2 Device Buffer Size
bit data characters. $8B 4 Reserved