1991 Intel 16-Bit Embedded Controller Handbook
1991 Intel 16-Bit Embedded Controller Handbook
1-
Intel Corporation is a leading supplier of microcomputer components,
modules and systems. When Intel invented the microprocessor in 1971, it
created the era of the microcomputer. Today, Intel architectures are considered
world standards. Whether used in embedded applications such as automobiles,
printers and microwave ovens, or as the CPU in personal computers, client
servers or supercomputers, Intel delivers leading-edge technology.
16-BIT
EMBEDDED CONTROLLER
HANDBOOK
1991
"
Intel Corporation makes no warranty for the use of its products and assumes no responsibility for any errors which may
appear in this document nor does it make a commitment to ufildate the information contained herein.
Intel retains the right to make changes to these specifications at any time, without notice.
Contact your local sales office to obtain the latest specifications before placing your order.
The following are trademarks of Intel Corporation and may only be used to identify Intel products:
287, 376, 386, 387, 486, 4-SITE, Above, ACE51 , ACE96, ACE186, ACE196, ACE960,
ActionMedia, BITBUS, COMMputer, CREDIT, Data Pipeline, DVI, ETOX, FaxBACK,
Genius, i, t, i486, i750, i860, ICE, iCEL, ICEVIEW, iCS, iDBP, iDIS, 12 1CE, iLBX, iMDDX,
iMMX, Inboard, Insite, Intel, intel, Inte1386, intelBOS, Intel Certified, Intelevision, inteligent
Identifier, inteligent Programming, Intellec, Intellink, iOSP, iPAT, iPDS, iPSC, iRMK, iRMX,
iSBC, iSBX, iSDM, iSXM, Library Manager, MAPNET, MCS, Megachassis,
MICROMAINFRAME, MULTICHANNEL, MULTIMODULE, MultiSERVER, ONCE,
OpenNET, OTP, Pr0750, PROMPT, Promware, QUEST, QueX, Quick-Erase, Quick-Pulse
Programming, READY LAN, RMX/80, RUPI, Seamless, SLD, SugarCube, SX, TooITALK,
UPI, VAPI, Visual Edge, VLSiCEL, and ZapCode, and the combination of ICE, iCS, iRMX,
iSBC, .iSBX, iSXM, MCS, or UPI and a numerical suffix.
MDS is an ordering code only and is not used as a product name or trademark. MDS® is a registered trademark of Mohawk
Data Sciences Corporation.
Intel Corporation and Intel's FASTPATH are not affiliated with Kinetics, a division of Excelan, Inc. or its FASTPATH trade-
mark or products.
Additional copies of this manual or other Intel literature may be obtained from:
Intel Corporation
Literature Sales
P.O., Box 7641
Mt. Prospect, IL 60056-7641
©INTELCORPORATION 1990
"rW_l®
III'V' .
CUSTOMER SUPPORT
INTEL'S COMPLETE SUPPORT SOLUTION WORLDWIDE
Customer Support is Intel's complete support service that provides Intel customers with hardware support,
software support, customer trainin,\!, consulting services and network management services. For detailed infor-
mation contact your local sales offIces.
After a customer purchases any system hardware or software product, service and support become major
factors in determining whether that product will continue to meet a customer's expectations. Such support
requires an international support organization and a breadth of programs to meet a variety of customer needs.
As you might expect, Intel's customer support is extensive. It can start with assistance during your development
effort to network management. 100 Intel sales and service offices are located worldwide-in the U.S., Canada,
Europe and the Far East. So wherever you're using Intel technology, our professional staff is within close
reach.
HARDWARE SUPPORT SERVICES
Intel's hardware maintenance service, starting with complete on-site installation will boost your productivity
from the start and keep you running at maximum efficiency. Support for system or board level products can be
tailored to match your needs, from complete on-site repair and maintenance support to economical carry-in or
mail-in factory service.
Intel can provide support service for not only Intel systems and emulators, but also support for equipment in
your development lab or provide service on your product to your end-user/customer.
SOFIWARE SUPPORT SERVICES
Software products are supported by our Technical Information Service (TIPS) that has a special toll free
number to provide you wIth direct, ready information on known, documented problems and deficiencies, as
well as work-arounds, patches and other solutions.
Intel's software support consists of two levels of contracts. Standard support includes TIPS (Technical Infor-
mation Phone Service), updates and subscription service (product-specific troubleshooting guides and;
COMMENTS Magazine). Basic support consists of updates and the subscription service. Contracts are sold in
environments which represent product groupings (e.g., iRMX® environment).
NETWORK SERVICE AND SUPPORT
Today's broad spectrum of powerful networking capabilities are only as good as the customer support provided
by the vendor. Intel offers network services and support structured to meet a wide variety of end-user comput-
ing needs. From a ground up design of your network's physical and logical design to implementation, installa-
tion and network wide maintenance. From software products to' turn-key system solutions; Intel offers the
customer a complete networked solution. With over 10 years of network experience in both the commercial
and Government arena; network products, services and support from Intel provide you the most optimized
network offering in the industry.
CONSULTING SERVICES
Intel provides field system engineering consulting services for any phase of your development or application
effort. You can use our system engineers in a variety of ways ranging from assistance in using a new product,
developing an application, personalizing training and customizing an Intel product to providing technical and
management consulting. Systems Engineers are well versed in technical areas such as microcommtinications,
real-time applications, embedded microcontrollers, and network services. You know your application needs;
we know our products. Working together we can help you get a successful product to market in the least
possible time.
CUSTOMER TRAINING
Intel offers a wide range of instructional programs covering various aspects of system design and implementa-
tion. In just three to ten days a limited number of individuals learn more in a single workshop than in weeks of
self-study. For optimum convenience, workshops are scheduled regularly at Training Centers worldwide or we
can take our workshops to you for on-site instruction. Covering a wide variety of topics, Intel's major course
categories include: architecture and assembly language, programming and operating systems, BITBUS'M and
LAN applications.
DATA SHEET DESIGNATIONS
Intel uses various data sheet markings to designate each phase of the document as it
relates to the product. The marking appears in the upper, right-hand corner of the data
sheet. The following is the defiI1ition of these markings:
'Specifications within these data sheets are subject to change without notice. Verify with your local Intel sales
office that you have the latest data sheet before finalizing a de~ign.
MCS® .. 968X9X
Architectural Overview
~MCS® .. 96
Development
Support Tools
ix
Alphanumeric Index
8096/196 Software Development Packages ................................... , . . . .. 6-2
80C196KB User's Guide ........................................................ '. . 4-1
80C196KC User's Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
83C198/80C198, 83C194/80C194 16-Bit CHMOS Microcontroller . . . . . . . . . . . . . . . . . . . .. 4-153
. 87C196KB/83C196KB/80C196KB 16-Bit High Performance CHMOS Microcontroller. . . . . 4-98
87C196KB16 16-Bit High Performance CHMOS Microcontroller. . . . . . . . . . . . . . . . . . . . . . .. 4-126
87C198/87C194 16-Bit CHMOS Microcontroller .................................... , 4-173
87C257 256K (32K x 8) CHMOS EPROM........................................... 7-1
8X9X Hardware Design Information ................................................ 2-1
8XC196KB Express .............................. : .................... : .......... 4-194
8XC196KC 16-Bit High Performance CHMOS Microcontroller .......................'... 5-104
8XC196KC 16-Bit MicroControlier Express .......................................... 5-130
ACE196™ Software .... :........................................................ '. 6-1
EV8097BH Evaluation Board Fact Sheet. ....... : ............................. : ...... 2-107
EV80C196KB Evaluation Board Fact Sheet ..................................... ;... 4-211
EV80C196KC Evaluation Board Fact Sheet ......................................... 5-132
ICE-196KB/HX In-Circuit Emulator ................................................. · 6-13
MCS-96 809XBH/839XBH/879XBH Express. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-80
MCS-96 809XBH, 839XBH, 879XBH Advanced 16-Bit Microcontroller with 8- or 16-Bit
External Bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-58
MCS-96 809XJF/839XJF/879XJF Express. . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . .. . . . . . . . .. 2-102
. MCS-96 809XJF, 839XJF, 879XJF Advanced 16-Bit Microcontroller with 8- or 16-Bit
External Bus .................................................................. 2-83
MCS-96 8X9X Architectural Overview .....,......................................... 1-1
MCS"96 Instruction Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
Real-Time Transparent 80C196 In-Circuit Emulator. . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . 6-10
VLSiCE-96 In-Circuit Emulator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . 6-5
x
MCS®-968X9X 1
" Architectural Overview
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
October 1990
MCS®-96 8X9X
Architectural Overview
1.0 CPU OPERATION .................... 1-3 7.0 HIGH SPEED OUTPUTS ........ ~ ... 1-34
1.1 CPU Buses ........................ 1-3 7.1 HSO CAM ........................ 1-34
1.2 CPU Register File .................. 1~4 7.2 HSO Status ....................... 1-35
1.3 RALU Control ...................... 1-4 7.3 Clearing the HSO ................. 1-35
1.4 RALU ............................. 1-4 7.4 Using Timer 2 with the HSO ....... 1-35
1.5 Internal Timing ..................... 1-5 7.5 Software Timers .................. 1-36
2.0 MEMORY SPACE .................... 1-6 8.0 ANALOG INTERFACE .............. 1-36
2.1 Register File ....................... 1-6 8.1 Analog Inputs ...................... 1-36
2.2 Special Function Registers ......... 1-7 8.2 A/D Commands .................. 1-37
2.3 Power Down ....................... 1-7 8.3 AID Results ......... , ............ 1-37
2.4 Reserved Memory Spaces ......... 1-9 8.4 Pulse Width Modulation Output
2.5 Internal ROM and EPROM ......... 1-9 (D/A) .............................. 1-38
2.6 Internal Executable RAM 8.5 PWM Using the HSO ............. 1-39
(XRAM)-8X9XJF Only ............. 1-10
9.0 SERIAL PORT ...................... 1-39
2.7 Memory Controller ................ 1-10
9.1 Serial Port Modes ................. 1-39
2.8 System Bus ...................... 1-10
9.2 Controlling the Serial Port ......... 1-40
3.0 SOFTWARE OVERViEW ............ 1-17 9.3 Determining Baud Rates .......... 1-41
3.1 Operand Types ................... 1-17 9.4 Multiprocessor Communications .. 1-42
3.2 Operand Addressing .............. 1-18
10.0110 PORTS ........................ 1-42
3.3 Program Status Word ............. 1-20
10.1 Input Ports ...................... 1-42
3.4 Instruction Set ..... ',' ............. 1-21
10.2 Quasi-Bidirectional Ports ........ 1-43
3.5 Software Standards and
Conventions ....................... 1-25 10.3 Output Ports .................... 1-43
10.4 Ports 3 and 4/ ADO-15 .......... 1-43
4.0 INTERRUPT STRUCTURE .......... 1-26
4.1 Interrupt Control .................. 1-28 11.0 STATUS AND CONTROL
REGISTERS .......................... 1-44
4.2 Interrupt Priorities ................. 1-28
11.1 I/O Control Register 0 (lOCO) .... 1-44
/ 4.3 Critical Regions ................... 1-29
11.2 I/O Control Register 1 (IOC1) .... 1-45
4.4 Interrup~ Timing ................... 1-30
11.3 I/O Status Register 0 (IOSO) ..... 1-45
5.0 TIMERS .. ........................... 1-31 11.4 I/O Status Register 1 (IOS1) .... :, 1-45
5.1 Timer 1 .......-.................... 1-31
5.2 Timer 2 ........................... 1-31 12.0 WATCHDOG TIMER . ~ ............. 1-46
5.3 Timer Interrupts .................. 1-31 12.1 SoftWare Protection Hints . ; ...... 1-46
5.4 Timer Related Sections ........... 1-32 12.2 Disabling the Watchdog ......... 1-46
6.0 HIGH SPEED INPUTS .. ............. 1-32 13.0 RESET .......... ," .. ,............... 1-46
6.1 HSI Modes ....................... 1-33 13.1 Reset Signal .................... 1-46
6.2 HSI FIFO ........ ; ............... : 1-33 13.2 Reset Status .................... 1-47
6.3 HSllnterrupts .................... 1-33 13.3 Reset Sync Mode ............... 1-47
6.4 HSI Status ........................ 1-33
1-,2
MCS®·96 8X9X ARCHITECTURAL OVERVIEW
This overview is written about the 8X9XBH, 8X9XJF, 1.0 CPU OPERATION
and 8X98 devices. These devic~ are generically re-
ferred to as the gX9X. All information in this overview The, major components of the CPU on the 8X9X are
refers to the 8X9XBH, the 8X9XJF, and the 8X98 un- the Register File and the RALU. Communication with
less otherwise noted. the outside world is done through either the Special
Function Registers (SFRs) or the Memory Controller.
The 8X9X can be separated into several secti~ns for the The RALU (Register/Arithmetic Logic Unit) does not
purpose of describing its operation. There is a l6-bit use an accumulator, it operates directly on the 256-byte
CPU, a programmable High Speed I/O Unit, an analog register space made up of the Register File and the
to digital converter, a seriaf port, artd a Pulse Width SFRs. Efficient I/O operations are possible by directly
Modulated (PWM) output for digital to analog conver- controlling the I/O through the SFRs. The main bene-
sion. In addition to ihese functional units, there are fits of this structure are the ability to quickly change
some sections which support overall operation of the context, the absence of accumulator bottie!leck, and
chip such as the clock generator. The CPU and the fast throughput and I/O times.
programmable I/O. make the 8X9X very different from
any other microcontroller. Let us first examine the
CPU. 1.1 CPU Buses
A "Control Unit" and two buses connect the Register
File ahd RALU. Figure 1 shows the CPU with its
POWER FREQUENCY
VRE~ ANGND DOWN REFERENCE
······t······~···· ~::~~···l
A- BUS
CLOCK
tEN
8
.. ON-CHIP
EPROM 879 X BH
.....-r----,r-...
I
I
:
I
I
I CONTROL
SIGNALS
ADDR
] DATA
BUS
: PORT 4
HIGH I
SPEED I
I/O I
I
I
I
I
I
1-3
intJ MCS®~96 8X9X ARCHITECTURAL OVERVIEW
major bus connections. The two buses are the "A-Bus" the Register File is reserve,d for use as the stack pOinter
which is 8,bits wide, and the "D-Bus" which is 16-bits so it can not be used for data when stack manipubitions
wide. The D-Bus transfers data only between the are taking place. Addresses for accessing the Register
RALUandthe Register File or Special Function Regis- File and· SFRs are temporarily stored in two 8-bit ad-
ters (SFRs). The A-Bus is used as the address bus for dress registers by the CPU hardware.
the above transfers or' as' a multiplexed address/data
bus connecting to the "Memory Controller". Any ac-
cesses of either the internal ROM or external memory 1.3 RALU Control
are done through the -Memory Controller. '
Instructions to the RALU are taken from the A-Bus
Within the memory controller is a slave program coun- and stored temporarily in the instruction register. The
ter (Slave PC) which keeps track of the PC in the CPU. Control Unit decodes the instructions and generates the
By having most program fetches from memory refer- correct sequence of signals to have the RALU perform
enced to the slave PC, the processor saves time as ad- the desired function. Figure I shows, the instruction
dresses seldom have to be sent to the memory control- register and the control unit.
ler. If the address jumps sequence then the slave PC is
loaded with a new value and processing continues.
Data fetches from memory are also done through the 1.4 RALU
memory controller, but the slave PC is bypassed for
this operation. Most calculations performed by the 8X9X take place in
the RALU. The RALU, shown in Figure 2, contains a
l7-bit ALU, the Program Status Word (PSW), the Pro-
1.2 CPU Register File gram Counter (PC), a loop counter, and three tempo-
rary registers. All of the registers are 16-bits or
The Register File contains 232 bytes of RAM' which 17-bits (16 + sign extension) wide. Some of the regis-
can be accessed as bytes, words, or double-words. Since ters have the ability to perform simple operations to off-
each of these locations can be used by the RALU, there load the ALU.
are essentially 232 "accumulator,s". The' first word in
6-BIT
A-BUS
LOWER
270250-2
1-4
intJ MCS@·96 aX9X ARCHITECTURAL OVERVIEW
A separate incrementor is used for the PC; however,' The crystal or external oscillator frequency is divided
jumps must, be handled through the ALU. Two of the by 3 to genc:rate the three internal timing phases as
temporary registers have their own:' shift logic. These shown in Figure 4. Each of the internal phases repeat
registers are used for the operations which require logi- every 3 oscillator periods: 3 oscillator periods are re-
cal shifts, including Normalize, Multiply, and Divide. ferred to as one "state time", the basic time measure-
The "Lower Word" register is used only when double- ment for 8X9X operations. Most internal operations
word quantities are being shifted, the "Upper Word" are synchronized to either Phase A, B or C, each of
register is used whenever a shift is performed or as a which have a 33% duty cycle. Phase A is represented
temporary register for many instructions. Repetitive externally by CLKOUT, a signal available on the
shifts are counted by the 5.bit "Loop Counter". 68-pin device. Phases Band C are not available exter-
nally. The relationships of XTALl, CLKOUT, and
A temporary register is used to store the second oper- Phases A, B, and C are shown in Figure 4. It should be
and of two operand instructions. This includes the mul- noted that propagation delays have not, been taken into
tiplier during multiplications and the divisor during account in this diagram. Details on these and other tim-
divisions. To perform subtractions, the output of this ing relationships can be found In the Hardware Design
register can be complemented before being placed into chapter. .
the "B" input of the ALU.
XTAL 1
PHASE A
_....'
(CLOCKOUT)
PHASE B ....--,
''--~'
....--,
,'-----'
r
PHASE C -'~_ _ -,rl...__-,rl,-__
270250-4
1-5
I '
MCS®·96 8X9XARCHITECTURAL OVERVIEW
FFFFH
OFFH 255,
EXTERNAL MEMORY
POWER-DOWN
RA~
OR I/O
OFOH 240
OEFH 1--------------1 239 BOOOH
INTERNAL EXTERNAL MEMORY OR I/o 5FFFH
REGISTER FILE (8X9XBH)
(RA~)
INTERNAL PROGRAM STORAGE
RO~/EPROM OR EXTERNAL
IAH 1-_ _ _....._ _....._ _ _ _ _--1
26 MEIIORY' (8X9XJF) 4000H
3FFFH
19H 25 INTERNAL PROGRAM
S'T ACK POINTER STACK POINTER STORAGE ROM/EPROM
l.8H 24 OR
17H PWILCONtROL 23 EXTERNAL MEMORY
2080H
16H 10Sl 10Cl 22
RESERVED 2072H - 207FH
15H 10SO lOCO 21
SIGNATURE WORD 2070H - 2071H
14H 20
RESERVED 2030H - 20BFH
13H RESERVED RESERVED 19
SECURITY KEY 2020H - 202FH
12H 18
RESERVED 201CH - 201FH
llH SP_STAT SP_CON 17
SELF JU~P OPCODE (27H FEH) 201AH-201BH
10H 10 PORT 2 10 PORT 2 16
'RESERVED 2019H
OFH 10 PORT 1 10 PORT 1 15
CHIP CONFIGURATION eYTE 2018H
OEH 10 PORT 0 BAUD_RATE 14
RESERVED 2012H - 2017H
ODH TIMER2 (HI) 13
270250-5
call to external location OOOOH, therefore, the NMI and 2.3 Power Down
TRAP interrupt are also reserved for Intel development
tools. The upper 16 RAM locations (OFOH through OFFH)
receive their power from the VPD pin. If it is desired to
The RALU can operate on any of the 256 internal reg- keep the memory in these locations alive during a pow-
ister locations. Locations OOH through 17H are l,Ised to er down situation, one need only keep voltage on the
access the SFRs. Locations 18H and 19H contain the VPD pin. The current required to keep the RAM alive
stack pointer. These are not SFRs, al).d may be used as is approximately 1 milliamp (refer to the data sheet for
standard RAM if stack operations are not being per- the exact specification). Both Vee and VPD must have
formed. The stack pointer must be initialized by the power applied for normal operation. If VpD is not ap-
user program and can point anywhere in the 64K mem- plied the power down RAM will not function properly,
ory space. The stack builds down. There are no restric- even if Vee is applied. .
tions on the use of the remaining 230 locations except
that code cannot be executed from them. To place the 8X9X into a power down mode, the
RESET pin is pulled low. Two state times later the
device will be in reset. This is necessary to prevent the
2.2 Special Function Registers device from writing into RAM as the power goes down.
The power may now be removed from the Vee pin, the
All of the 110 on the 8X9X is controlled through the VPD pin must remain within specifications. The 8X9X
SFRs. Many of these registers serve two functions; one can remain in this state for any amount of time and the
if they are read from, the other if they are written to. 16 RAM bytes will retain their values.
Figure 5 shows the locations and names of these regis-
ters. A summary of the capabilities of each of these To bring the 8X9X out of power down, RESET is held
registers is shown in Figure 6, with complete descrip- low while Vee is applied. Two state times after the
tions reserved for later sections) oscillator has stabilized, the RESET pin c!m be pulled
high. The 8X9X will begin to execute code at location
There are several restrictions on using special function 02080H 10 state times after RESET is pulled high. Fig-
registers. ure 7 shows a timing diagram of the power down se-
quence. To ensure that the 2 state time minimum reset
Neither the source or destination addresses of the Mul- time (synchronous with CLKOUT) is met, it is recom-
tiply and Divide instructions can be a writable special mended that 10 XT AL I cycles be used. Suggestions for
function register. actual hardware connections are given in the Hardware
Design Chapter. Reset is discussed in Section 13.
These registers may not be used as base or index regis-
ters for indirect or indexed instructions. To determine if a reset is a return from power down or
a complete cold start a "key" can be written into pow-
.These registers can only be accessed as bytes unless er-down RAM while the device is running. This key
otherwise specified in Figure 6. Note that some of these can be checked on reset to determine which type of
registers can only be aCcessed as words, and not as reset has occurred. In this way the validity of the pow-
bytes. er-down RAM can be verified. The length of this key
determines the probability that this procedure will
Within the SFR space are several registers labeled work, however, there is always a statistical chance that
"RESERVED". These registers are reserved for future the RAM will power up with a replica of the key.
expansion and test purposes. Operations should not be
performed with theSe registers as reads from them and Under most circumstances, the power-fail indicator
writes to them may produce unexpected results. For which is used to initiate a power-down condition must
example, in some versions of the 8X9X writing to loca- come from the unfiltered, unregulated seetion of the
tion OCH will set both timers to OFFFXH. This may power supply. The power supply must have sufficient
not be the case in future products, so it should not be storage capacity to operate the 8X9X until it has com-
used as a feature. pleted its reset operation.
1-7
MCS®·96 8X9X ARCHITECTURAL OVERVIEW
1-8
inter MCS®·96 8X9X ARCHITECTURAL OVERVIEW
YPD---------------------+------~~------;_-----------------
a 5:1:.5V
RESET - - - - - - " \
XTALl
IflJIIIJLJ1JlfulI1IU1
10 XTALl CYCLES CLOCK NOT NECESSARY 10 XTALl CYCLES
AFTER CLOCK IS STABLE
270250-6
2.4 Reserved Memory Spaces OOOOH- 0017H Register Mapped I/O (SFRs)
0018H- 0019H Stack Pointer
A listing of locations with special significance is shown
in Figure 8. The locations marked "Reserved" are re- 1FFEH- 1FFFH Ports 3 and 4
served by Intel for use in testing or future products. All 2000H- 2011H Interrupt Vectors
reserved locations except 2019H must be filled with 2012H- 2017H Reserved
Hex value OFFH to insure compatibility with future 2018H Chip Configuration Byte
devices. Location 2019H must be filled with 20H. 2019H Reserved
201AH- 201BH "Jump to Self" Opcode (27H FEH)
Locations lFFEH and IFFFH are reserved for Ports 3 201CH- 201FH Reserved
and 4 respectively. This is to allow easy reconstruction 2020H- 202FH Security Key
of these ports if external memory is used in the system.
2030H- 207FH Reserved
An example of reconstructing the I/O ports is given in
section 7 of the Hardware Design chapter. If ports 3 2080H Reset Location
and 4 are not going to be reconstructed, these locations Figure 8. Registers with Special Significance
can be treated as any other external memory location.
The 9 interrupt vectors are stored in locations 2000H 2.5 Internal ROM and EPROM
through 2011H. The 9th vector is used by Intel devel-
opment systems, as explained in Section 4. When a ROM device is ordered, or an EPROM device
is programmed, the internal memory locations 2080H
Locations 20l2H through 201 7» are reserved for fu- through 3FFFH on the 8X9XBH and 8X98 and loca-
ture use. Location 2018H is the Chip Configuration tions 2080H through 5FFFH on the 8X9XJF are user
byte which will be discussed in the next section. The specified, as are the interrupt vectors, Chip Configura-
Jump~To-Seif opcodes at locations 201AH and 20lBH tion Register and Security Key in locations 2000H
are provided for EPROM programming as detailed in through 202FH.
the Hardware Design chapter. Locations 2020H
through 202FH are the security key used with the Instruction and data fetches from the internal ROM or
ROM Lock feature which will be discussed in the next EPROM occur only if the device has a ROM or
section. All unspecified addresses in locations 2000H EPROM, EA is tied high, and the address is between
through 207FH, including those marked Reserved, 2000H and 3FFFH on the 8X9XBH and 8X98 and
should be considered reserved for use by Intel. between 2000H and 5FFFH on the 8X9XJF. At all
other times data is accessed from either the internal
Resetting the 8X9X causes instructions to be fetched RAM space or external· memory and instructions are
starting from location 2080H. This location was chosen fetched from external memory. The EA pin is latched
to allow a system to have up to 8K of RAM continuous on RESET rising. Information on programming
with the register file. Further information on reset can EPROMs can be found in Section 10 of the Hardware
be found in Section 13. Design chapter.
1-9
MCS®·968X9X ARCHITECTURAL OVERVIEW
2.6 Internal Executable RAM In addition to holding ~ slave PC, the memory control-
(XRAM)-&X9XJF only ler contains a 4 byte queue to help speed execution.
This queue is transparent to the RALU and to the user
Locations OIOOH through OlFFH (8X9XJF only) con- unless wait states are forced during external bus cycles.'
tain the internal executable RAM (XRAM) space. In- The instruction execution times shown in Section 14.8
struction fetches will be performed in this region if the show the normal execution times' with no wait states
program counter points to the addresses OlOOH added and the t"6-bit bus selected. Reldading the slave
through OIFFH. Data accesses can also be performed PC and fetching the first byte of the new instruction
from this region. stream takes 4 state times. This is reflected in the jump
taken/not-taken times shown in the table.
The XRAM is accessed and executed from as if it ~ere
external RAM that is contained on chip. No external
bus signals will be generated when accessing the 2.& System Bus
XRAM.
There are several operating modes on the 8X9X. The
The XRAM is not part of the Register File. 8-bit direct standard bus mode uses a 16-bit multiplexed address/
addressing can not be used on this address space. data bus. Other bus modes include an 8-bit mode and a
mode in which the bus size can dynamically be
switched between 8-bits and l6-bits. In addition, there
2.7 Memory Controller , are several options available on the type of control sig-
nals used by the bus.
The RALU talks to the memory (except for the loca-
tions in the register file and SFR space) through the In the standard mode, external memory is addressed
memory controller which is connected to the RALU by through lines ADO through AD15 which form a 16-bit
the A-Bus and several control lines. Since the A-Bus is multiplexed (address/data) data bus. These lines share
eight bits wide, the memory controller uses a Slave Pro- pins with I/O Ports 3 and 4. The falling edge of the
gram Counter to avoid having to always get the instruc- Address Latch Enable (ALE) line is used to provide a
tion location from the RALU. This slave PC is incre- clock to a transparent latch (74LS373) in order to de-
mented after each fetch. When a jump or call occurs,
the slave PC must be loaded from the A-Bus before
instruction fetches can continue.
PHASE A
(CLKOUT)
PHASE B
PHASE C
REAllY \\\\~\\\\\\\
AD \\-._ _---JI
WR
AIIIIRESSII)ATA ~
\
- - - '/
.....
IIATAOUT n O;AIN
1-10
MCS®-96 8X9X ARCHITE'CTURAL OVERVIEW
CLKOUT
ALE
READY
Ri5 or ViR
--~~\~----------~I~"';"""'---'\,--_~I
270250-42
Figure9A.
multiplex the bus. A typical circuit and the required pins, and the RD (Read) signal goes low. When RD
timings are shown in Section 7 of the Hardware Design falls, external memory should present its data to the
chapter. Since the 8X9X's external memory can be ad- 8X9X.
dressed as either bytes or words, the decoding is con-
trolled with two lines, Bus High Enable (BHE) and
Address/Data Line 0 (ADO). READ
The data from the external memory must be on the bus
To avoid confusion during the explanation of the mem- and stable for a minimum of the specified set-up time
ory system it is reasonable to give names to the demulti- before the rising edge of RD. The rising edge of RD
plexed address/data signals. The address signals will be latches the information into the 8X9X. If the read is for
called MAO through MAIS (Memory Address), and data, the INST pin will be low wheh the address is
the data signals will be called MDO through MDIS valid. if it is for an instruction the INST' pin will be
(Memory Data). high during this time. The 48-lead device dOes not have
the INST pin. The INST pin will be low for the Chip
When BHE is active (low), the memory connected to Configuration Byte and Interrupt Vector fetches.
the high byte of the data bus should be selected. When
MAO is low the memory connected to the low byte of
the data bus should be selected. In this way accesses to WRITE
a 16-bit wide memory can be to the low (even) byte
only (MAO=O, BHE= I), to the high (odd) byte only Writing to external memory requires timings that are
(MAO = I, BHE=O), or to both bytes (MAO=O, similar to those required when reading from it. The
BHE = 0). When a memory block is being used only for main difference is that the write (WR) signal is used
reads, BHE and MAO need not be decoded. instead of the RD signal. The timings are the same until
the falling edge of the WR line. At this point the 8X9X
removes the address and places the data on the bus.
TIMINGS When the WR line goes high the data should be latched
to the external memory. In systems which can write to
Figure 9 shows the idealized waveforms related to the byte locations, the ADO and BHE lines must be used to
following description of external memory manipula- decode WR into WRite to Low byte (WRL) and WRite
tions. For exact timing specifications pl~ase refer to the to High byte (WRH) signals. INST is always low dur-
latest data sheet. W4en an external memory fetch be- ing a write, as instructions cannot be written. The exact
gins, the address latch enable (ALE) line rises, the ad- timing specifications for memory accesses can be found
dress is put on ADO-AD1S and BHE is set to the re- in the data sheet.
quired state. ALE then falls, the address is taken off the
1-11
MCS®-96 8X9X ARCHITECTURAL OVERVIEW
1-12
inter MCS®·96 8X9X ARCHITECTURAL OVERVIEW
CHIP CONFIGURATJPN REGISTER (CCR) address/8-bit data bus. The 8X98 external bus must be
configured as a 16-bit address/8-bit data bus.
Configuration information is stored in the Chip Config-
uration Register (CCR). Four of the bits in the register ~ During 16-bit bus cycles, Ports 3 and 4 contain the
specify the bus control mode and ready control mode. address multiplexed with data using ALE to latch the
Two bits also govern the level of ROM/EPROM pro- address. In 8-bit bus cycles, Port 3 is multiplexed ad-
tection and one bit is NANDed with the BUSWIDTH dress/data while Port 4 is address bits 8 through IS.
pin every bus cycle to determine the bus size. The ,CCR The address bits on Port 4 are valid throughout an 8-bit
bit map is shown in Figure 10. The functions associated bus cycle. Figure II shows the two options.
with each bit are described in this section.
The bus width can be changed each bus cycle on the
8X9XBH and the 8X9XJF and is controlled using bit I
of the CCR with the BUSWIDTH pin. If either CCR.I
17161514131211101 CHIP CONFIGURATION REGISTER or BUSWIDTH is a 0, external accesses will be over a
L RESERVED (Set to 1 for
16-bit address/8-bit data bus. If both CCR.I and BUS-
compatIbility wIth future WIDTH are Is, external accesses will be over a 16:bit
parts) address/16-bit data bus. Internal accesses are always
16-bits wide. The BUSWIDTH pin is not available on
' - - BUS WIDTH SELECT
(16 - BIT BUS /8';--=-><;BIT"'-;;;BU"'S) °
the 8X98. CCR.I must be a on the 8X98.
- WRITE STROBE MODE SELECT
(WR AND BHE/WRL AND WRJi) The bus width can be changed every external bus cycle
ADDRESS VALID STROBE SELECT if a I was loaded into CCR bit I at reset. If this is the
(ALE/ ADV) case, changing the value of the BUSWIDTH pin at run-
time will dynamically select the bus width. For exam-
(IRCO) } INTERNAL READY ple, the user could feed the INST line into the BUS-
(IRC1) CONTROL MODE WIDTH pin, thus causing instruction accesses to be
word wide from EPROMs while data accesses are byte
(LOCO) } PROGRAM LOCK wide to and from RAMs. A second example would be
(LOCI) MOD~ to place an inverted version of Address bit 15 on the
270250-8 BUSWIDTH pin. This would make half of external
memory w.ord wide, while half is byte wide.
Figure 10. Chip Configuration Register
Since BUSWIDTH is sampled after address decoding
The CCR is ,loaded on reset with the Chip Configura- has had time to occur, even more complex memory
tion Byte, located at address 20l8H. The CCR register maps could be constructed. See the timing specifica-
is. a non-memory mapped location that can only be tions ·for an exact description of BUSWIDTH timings.
written to during the reset sequence; once it is loaded it The bus width will be determined by bit 1 of the CCR
cannot be changed until the next reset occurs. The alone on 48-pin devices since they do not have a BUS-
8X9X will correctly read this location in every bus WIDTH pin.
mode.
When using an 8-bit bus, some performance degrada-
If the EA pin is set to a logical 0, the access to 2018H tion is to be expected. On the 8X9X , instruction execu-
comes from external memory. If EA is a logical I, the tion times with an 8-bit bus will slow down if any of
access comes from internal ROM/EPROM. If EA is three conditions occur. First, word writes to external
+ 12.75V, the CCR is loaded with a byte from a sepa- memory will cause the executing instruction to take
rate non-memory-mapped location called PCCB (Pro- two extra state times to complete. Second, word reads
gramming CCB). The Programming mode is described from external memory will cause a one state time exten-
in Section 10 of the Hardware Design chapter. sion of instruction execution time. Finally, if the pre-
fetch queue is empty when an instruction fetch is re-
BUS WIDTH
quested, instruction execution is lengthened by one
state time for each byte that must be externally ac"'
The 8X9XBH and 8X9XJF external bus width can be quired (worst case is the number of bytes in the instruc-
run-time configured to operate as a standard 16-bit tion minus one.)
multiplexed address/data bus, or as an 8051 style 16-bit
1-13
MCS®-96 8X9X ARCHITECTURAL OVERVIEW
BUS CONTROL
8X9X 8X9X
8-BIT
PORT 4 LATCHED
PORT 4
PORT 3
PORT 3
270250-9 270250-10
16-Bit Bus a·Bit Bus
Figure 11. Bus Width Options
ALE Jl rL ALE
Jl rL
WR WR
I
BHE VALID ADO -7 ~ADDR LOwl DATA OUT
~
~ ~ ~
ADO-15 ADDR DATA OUT
~
'270'250-11
ADS-15 ADDRESS HIGH
270250-12
16·Bit Bus Cycle a-Bit Bus Cycle
Figure 12. Standard Bus Control
1-14
MCS®·96 8X9X ARCHITECTURAL OVERVIEW
ADV
r- ADV
WR
I WR
SHE
[ VALID ADO:" 7 . --1 ADDR LOwl DATA OUT
I-
ADO -15 ~ ADDRI DATA OUT
I- AD8-15 --1 ADDRESS OUT HIGH .1-
270250-15 270250-16
16·Blt Bus Cycle a·Blt Bus Cycle
Figure 14. Address Valid Strobe Mode
1-15
inter MCS®·96 8X9X ARCHITECT,URAL OVERVIEW
READY CONTROL executing from external memory. The modes are shown
in Table 2. Internal ROM/EPROM addresses 2020H
To simplify ready control, four modes of internal ready through 3FFFH on the 8X9XBH and the 8X98 and
control logic have been provided. The modes are cho- addresses 2020H through 5FFFH on the 8X9XJF are
sen by properly configuring bits 4 and 5 of the CCR. protected from reads. 2000H through 3FFFH on the
8X9XBH and the 8X98 and 2000H through 5FFFH on
The internal ready control logic can be used to limit the the 8X9XJF are protected from writes, as set by the
number of wait states that slow devices can insert into CCR.
the bus cycle. When the READY pin is pulled low,
wait states will be inserted into the bus cycle until the Table 2. Program Lock Modes
READY pin goes high, or the number of wait states
equals the number specified by CCR bits 4 and 5, LOC1 LOCO Protection
whichever comes first. Table 1 shows the number of 0 0 Read and Write Protected
wait states that can be selected. Internal Ready control 0 1 Read Protected
can be disabled by loading 11 into bits 4 and 5 of the 0 Write Protected
CCR. No Protection
Table 1. Internal Ready Control
Only code executing from internal memory can read
IRC1 IRCO Description protected internal memory, while a write protected
o o Limit to 1 Wait State memory can not be written to, even from internal exe-
o 1 Limit to 2 Wait States cution. As a result of 8X9X prefetching of instructions,
1 o Limit to 3 Wait States however, accesses to protected memory are not allowed
for instructions located above 3FFAH on the 8X9XBH
1 Disable Internal Ready Control and the 8X98 and above 5FFAH on the 8X9X)F, This
is becaus~the lock protection mechanism is gated off of
This feature provides for simple ready control. For ex- the Memory Controller's slave program counter and
ample, every slow memory chip select line could be not the CPU program counter. If the bus controller
ORed together and be connected to the READY pin receives a request to perform a read of protected memo-
with CCR bits 4 and 5 programmed to give the desired ry, the read sequence occurs with, indeterminate data
number of wait states to the slow devices. ' being returned to the CPU. Note that the interrupt vec-
tors and the CCR are not protected .
. ROM IE PROM LOCK To provide verification and testing when the program
Four modes of program memory lock are available on lock feature is enabled, the 8X9X verifies the security
the 8X9X devices. CCR bits 6 and 7 (LOCO, LOCI) key before, programming or test modes are allowed to
select whether· internal· program memory can' be read ' read from protected memory. Before protect,ed memory
(or written in EPROM devices) by a program can be read, the chip reads external memory locations
4020H through 402FH and compares the values
, 1-16
MCS®~96 8X9X ARCHITECTURAL OVERVIEW
/
found to tlje internal security key located from 2020H result must be interpreted in modulo 256 arithmetic.
through 202FH. Only when the values exactly match Logical operations on BYTES are applied bitwise. Bits
will accesses to protected memory be allowed. The de- within BYTES are labeled from 0 to 7, with 0 being the
tails of ROM/EPROM accessing are discussed in Sec- least significant bit. There are no alignment restrictions
tion 10 of the Hardware Design chapter. for BYTES, so they may be placed anywhere in the
MCS-96 address space.
3.Q SOFTWARE OVERVIEW
WORDS
This section provides information on writing programs
to execute in the 8X9X. Additional information can be WORDS are unsigned 16-bit variables which can take
found in the following documents: on the values between 0 and 65535. Arithmetic and
relational operators can be applied to WORD operands
MCS®-96 M;ACRO ASSEMBLER USER'S GUIDE but the result must be interpreted modulo 65536. Logi-
Order Number 186 ASM 96 (Intel Systems) cal operations on WORDS are applied bitwise. Bits
Order Number 086 ASM 96NL (DOS Systems) within words are labeled from 0 to 15 with 0 being the
least significant bit. WORDS must be aligned at even
C-96 USER'S GUIDE byte boundaries in the MCS~96 address space. The least
'Order Number 086 C96NL (DOS Systems) significant byte of the WORD is in the even byte ad-
dress and the most significant byte is in the next higher
PL/M·96 USER'S GUIDE (odd) address. The address of a word is the address of
Order Number 186 PLM 96 (Intel Systems) its least significant byte. Word operations to odd ad-
Order Number 086 PLM 96NL (DOS Systems) dresses are' not guaranteed to operate in a consistent
manner.
Throughout this section, short sections of code are used
to illustrate the operation of the device. For these sec-
tions it has been assumed that a set of temporary regis- SHORT-INTEGERS
ters have been predeclared. The names of these registers SHORT-INTEGERS are 8-bit signed variables which
have been chosen as follows: can take on the values betweep -128 and + 127.
AX, BX, CX, and OX are 16-bit registers. Arithmetic operations which generate results outside of
AL is the low byte of AX, AH is the high byte. the range ofa SHORT-INTEGER will set the overflow
indicators in the program status word. The actual nu-
BL is the low byte of BX meric result returned will be the same as the equivalent
CL is the low byte of CX operation on BYTE variables. There are no alignment
DL is the low byte of OX restrictions on SHORT-INTEGERS so they may be
placed anywhere in the MCS_96 address space.
These are the same as the names for the general data
registers used in the 8086 (80186). It is important to INTEGERS
note, however, that in the 8X9X, these are not dedicat-
ed registers but merely the symbolic names assigned by INTEGERS are 16-bit signed variables which can take
the programmer to an eight byte region within the on- on the values between -32,768 and 32,767. Arithmetic
board register file. operations which generate results outside of the range
of an INTEGER will set the overflow indicators in the
3.1 Operand Types program status word. The actual numeric result re-
turned will be the same as the equivalent operation on
The MCS®-96 architecture provides support 'for a vari- WORD variables. INTEGERS conform to the same
ety of data types which are likely to be useful in a con- alignment and addressing rules as do WORDS.
trol application. In the discussion of these operand
types that follows, the names adopted by the PLM-96 BITS
programming language will be used where appropriate.
To avoid confusion, the name of an operand type will BITS are single-bit operands which can take on the
be capitalized. A "BYTE" is an unsigned eight bit vari- Boolean values of true and false. In addition to the nor-
able; a "byte" is an eight bit unit of data of any type. mal support for bits as components of BYTE and
WORD operands, the 8X9X provides for the direct
BYTES testing of any bit in the internal register file. The MCS-
96 architecture requires that bits be addressed as com-
BYTES are unsigned 8-bit variables which can take on ponents of BYTES or WORDS, it does not support the
the values between 0 and 255. Arithmetic and relational direct addressing of bits that can occur in the MCS-51
operators can be applied to BYTE operands but the architecture.
1-17
inter MCS<B?-96, 8X9X ARCHITECTURAL OVI;RVIEW
DOUBLE-WORDS _ LONG-INTEGERS
DOBBLE-WORDS are unsigned 32-bit variables LONG-INTEGERS are 32-bit signed variables which
which can take on the values, between 0 and 'can take on the values between -2,147,483,648 and
4,294,967,295. The MCS-96 architecture provides di- 2,147,483,647. The MCS-96 architecture provides di-
rect support for this operand type only for shifts and as rect support for this data type only for shifts and as the
the dividend in a 32 by 16 divide and the product of a dividend in.a 32 by 16 divide and the product of a 16 by
16 by 16 multiply. For these operations a DOUBLE- 16 multiply.
, WORD variable must reside in the on-board register
file of the 8096 and be aligned at an address which is LONG-INTEGERS can also be normalized. For these
evenly divisible by 4. A DOUBLE-WORD operand is operations a LONG-INTEGER variable must reside in
addressed by the address of its least significant byte. the onboard register file of the 8X9X and be aligned at '
DOUBLE-WORD operations which are not directly an address which is evenly divisible, by 4. A LONG-IN-
supported can be easily implemented wjth two WORD TEGER is addressed by the address of its least signifi-
operations. For consistency with Intel provided soft- cant byte.
ware the user should adopt the conventions for address-
ing DOUBLE-WORD operands which are discussed in LONG-INTEGER operations which are not directly
Section 3.5. supported can be easily implemented with two INTE-
GER operations. For consistency with Intel provided
software, the user should adopt the conventions for ad-
dressing LONG operands which are discussed in Sec-
tion 3.5.
3.2 Operand Addressing
Operands are accessed within the address space of the modes will be described as they are seen through the
8X9X with one of six basic addressing modes. Some of assembly language. The six basic address modes which
the details of how these addressing modes work are will be described are termed register-direct, indirect, in-
hidden by the assembly language. If the programmer is direct with auto-increment, immediate, short-indexed,
to take full advantage of the architecture, it is impor- and long-indexed. Several other useful addressing oper-
tant that these details 'be understood. This section will ations can be achieved by combining these basic ad-
describe-the addressing modes as they are handled by dressing modes with specific registers such as the
the hardware. At the end of this section the addressing ZERO register or the stack pointer.
REGISTER·DIRECT REFERENCES
The register-direct mode is used to directly access a alignment rules for the operand type. Depending on the
register from the 256 byte on-board register file. The instruction, up to three registers can take part in the
register is selected by an 8-bit field within the instruc- calculation.
tion and register address and must conform to the
--.-.--------~--- . -----'J
U xamPles
ADD
MUL
INCB
AX,BX
CL
'
AX,BX,CX AX:=BX+CX
, AX ':=AX*BX
CL:=CL+l
-------------------
'
INDIRECT REFERENCES
The indirect mode is used to access an operand by plac- register which con til-ins the indirect address is selected
ing its address in a WORP variable in the register fiJe, by an eight bit field within the instruction. An instruc-
The calculated address must conform to the alignment tion can contain only one indirect 'reference and the
rules for the operand type. Note that the indirect ,ad- remaining operands of the instruction (if any) must be
dress can refer to an operand anywhere within the ad- register-direct references.
dress space of the 8X9X, including the register file. The
Examples
LD AX, [A~] AX:=MEM_WORD(AX)
ADDB AL,BL, [CX] AL:=BL+MEM_BYTE(CX)
POP ,[AX] MEM_WORD(AX) :=MEM_WORD(SP)
1-18
MCS®-96 8X9X ARCHITECtURAL OVERVIEW
This addressing mode is the same as the indirect mode SHORT-INTEGERS the indirect address variable will
except that the WORD variable whiCh contains the in- be incremented by one. if the instruction operates on
direct address is incremented after it is used to address WORDS or INTEGERS the indirect address variable
the operand. If the instruction operates on BYTES or will be incremented by two.
Examples
LD AX, [BX]+ AX:=MEM_WORD(BX) ; BX:=BX+2
ADDB AL,BL,[CX]+ AL:=BL+MEM_BYTE(CX) ; CX:=CX+1
PUSH [AX]+ SP:=SP-2;
MEM_WORD(SP) :=MEM_WORD(AX)
AX:=AX+2
IMMEDIATE REFERENCES .
This addressing mode allows an operand to, be taken INTEGER operands the field is 16 bits wide. An in-
directly from a field in the instruction. For operations struction can contain only one immediate reference and
on BYTE or SHORT-INTEGER operands this field the remaining operand(s) must be register-direct refer-
is eight bits wide. for operations on WORD or ences.
Examples
ADD AX,#340 AX:=AX+340
PUSH #1234H SP:=SP-2; MEM_WORD(SP) :=1234H
DIVB AX,#10 AL:=AX/10; AH:=AX MOD 10
SHORT-INDEXED REFERENCES
In this addressing mode an eight bit field in the instruc- Since the eight bit field is sign-extended. the effective
tion selects a WORD variable in the register file which address can be up to 128 bytes before the address in the
is assumed to contain 'an address. A second eight bit WORD variable and up to 127 bytes after it. An in-
field in the instruction stream is sign-extended and struction can contain only one short-Indexed reference
summed with the WORD variable to form the address and the remaining operand(s) must be register-direct
of the operand which will take part in the calculation. references.
Examples
LD AX,12[BX] AX:=MEM_WORD(BX+12)
MULB AX,BL,3[CX] AX:=BL*MEM_BYTE(CX+3)
LONG-INDEXED REFERENCES
This addressing mode is like the short-indexed mode struction can contain only one long-indexed reference
except that a 16-bit field is taken from the instruction and the remaining operand(s) must be register-direct
and added to the WORD variable to form the address references.
of the operand. No sign extension is necessary. An in-
Examples
AND AX,BX,TABLE[CX] AX:=BX AND MEM_WORD(TABLE+CX)
STAX,TABLE[BX] MEM_WORD(TABLE+BX) :=AX
ADDB AL,BL,LOOKUP[CX] AL:=BL+MEM_BYTE(LOOKUP+CX)
1-19
MCS®-96 8X9X ARCHITECTURAL OVERVIEW
The first two bytes in the register file are fixed at zero able in a long-indexed reference. This combination of
by the 8096 hardware. In addition to providing a fixed register selection and address mode allows any location
source of the constant zero for cakulations and com- in memory to be addressed directly.
parisons, this register can be used as the WORD vari-
Examples
ADD AX,1234[0] AX:=AX+MEM_WORD(1234)
POP 5678[0] MEM_WORD(5678) :=MEM_WORD(SP)
SP:=SP+2
The system stack pointer in the 8X9X can be accessed ~an be accessed by using the stack pointer as the
as register ISH of the internal register file. In addition WORD variable in an indirect reference. In a similar
to providing for convenient manipulation of the stack fashion, the stack pointer can be used in the short-in-
pointer, this also facilitates the accessing of operands in dexed mode to access data within the stack.
the stack. The top of the stack, for example,
Examples
PUSH ESP] DUPLICATE TOP_OF_STACK'
LD' AX,2[SP] AX:=NEXT_TO_TOP
The 8X9X assembly language simplifies the choice of The use of these features of the assembly language sim-
addressing modes to be used in several respects: plifies the programming task and should be used wher-
ever possible.
Direct Addressing. The assembly language will choose
between register-direct addressing and long-indexed
with the ZERO register depending on where the oper- 3.3 Program Status Word
and is in memory. The user can simply refer to an oper-
and by its symbolic name; if the operand is in the regis- The program status word (PSW) is a collection of Bool-
ter file, a register-direct reference will be used, if the ean flags which retain information concerning the state
operand is elsewhere in memory, a long-indexed refer- of the user's program. The format of the PSW is shown
ence will be generated. in Figure 16. The information in the PSW can be bro-
ken down into two basic categories; interrupt control
Indexed Addressing. The assembly language will and condition flags. The PSW can be saved in the sys-
choose between short and long indexing depending on tem stack with a single operation (PUSHF) and re-
the value of the index expression. If the value can be stored in a like manner (POPF).
expressed in eight bits then short indexing will be used,
if it cannot be expressed in eight bits then long indexing
will be used.
1-20
MCS®-96 8X9X ARCHITECTURAL OVERVIEW
INTERRUPT FLAGS C. The C (Carry) flag is set to indicate the state of the
arithmetic carry from the most significant bit of the
The lower eight bits of the PSW are used to individual- ALU for an arithmetic operation or the state of the last
ly mask the various sources of interrupt to the 8096. A bit shifted out of the operand for a shift. Arithmetic
logical '1' in these bit positions enables the servicing of Borrow after a subtract operation is the complement of
the corresponding interrupt. These mask bits can be the C flag (i.e. if the operation generated a borrow then
accessed as an eight bit byte (INT_MA&K.-address C = 0).
8) in the on-board register file. Bit 9 in the PSW is the
global interrupt disable. If this bit is cleared then all ST. The ST (STicky bit) flag is setto indicate that dur-
interrupts will be locked out except for the Non Maska- ing a right shift a 1 has been shifted first into the C flag
ble Interrupt (NMI). Note that the various interrupts and then been shifted out. The ST flag is undefined
are collected in the INT_PENDING register even if after a multiply operation. The ST flag can be used
they are locked out. Execution of the corresponding along with the C flag to control rounding after a right
service routines will procede according to their priority shift. Consider multiplying two eight bit quantities and
when they become enabled. Further information on the then scaling the result down to 12 bits:
interrupt structure of the 8X9X can be found in Section 4.
MULUB AX,CL,DL ;AX:=CL*DL
SHR AX.#4 ;Shift right 4 places
CONDITION FLAGS
The remaining bits in the PSW are set as side effects of If the C flag is set after the shift, it indicates that the
instruction execution and can be tested by the condi- bits shifted off the end of the operand were greater-than
tional jump instructions. or equal-to one half the least significant bit (LSB) of the
result. If the C flag is clear after the shift, it indicates
Z. The Z (Zero) flag is set to indicate that the operation that the bits shifted off the end of the operand were less
than half the LSB of the result. Without the ST flag,
generated a result equal to zero. For the add-with-carry
(ADDC) and subtract-with-borrow (SUBC) operations the rounding decision must be made on the basis of this
the Z flag is cleared if the result is non-zero but is never information alone. (Normally the result would be
set. These two instructions are normally used in con- rounded up if the C flag is set.) The ST flag allows a
junction with the ADD and SUB instructions to per- finer resolution in the rounding decision:
form multiple precision arithmetic. The' operation of
the Z flag for these instructions leaves it indicating the CST Value of the Bits Shifted Off
proper result for the entire multiple precision calcula-
tion.
00 Value =0
01 0< Value < %LSB
N. The N (Negative) flag is set to indicate that the
operat\on generated a negative result. Note that the N
10 Value = % LSB
flag will be set to the algebraically correct state even if 11 Value> %LSB
the calculation overflows.
Figure 17. Rounding Alternatives
V. The V (overflow) flag is set to indicate that the oper-
ation generated a result which is outside the range that Imprecise rounding can be a major source of error in a
can be expressed in the destination data type. For the numerical calculation; use of the ST flag improves the
SHL, SHLB and SHLL instructions, the V flag will be options available to the progranimer.
set if the most significant bit of the operand changes at
any time during the shift. 3.4 Instruction Set
VT. The VT (oVerflow Trap) flag is set whenever the V The MCS-96 instruction set contains a full set of arith-
flag is set but can only be cleared by an instruction metic and logical operations for the 8-bit data types
which explicitly operates on it such as the CLRVT or ' BYTE and SHORT INTEGER and for the 16-bit data
JVT instructions. The operation of the VT flag allows types WORD and INTEGER. The DOUBLE-WORD
for the testing for a possible overflow condition at the and LONG data types (32 bits) are supported for the
end of a sequence of related arithmetic operations. This products of 16 by 16 multiplies and the dividends of 32
is normally more efficient than testing the V flag after
each instruction.
1-21
MCS®·96 8X9X ARCHITECTURAL OVERVIEW
by 16 divides and for shift operations. The remaining LDBZE (load byte zero extended) converts a BYTE to
operations on '32-bit variables can be implemented by a WORD and LDBSE (load byte sign extended) con-
combinations of 16-bit operations. As an example the verts a SHORT-INTEGER into an INTEGER.
sequence: WORDS can be converted to DOUBLE-WORDS by
simply clearing the upper WORD of the DOUBLE-
ADD AX,ex WORD (CLR) and INTEGERS can be converted to
ADDe BX,DX LONGS with the EXT (sign extend) instruction.
performs a 32-bit addition, and the sequence The MC~-96 instructions for addition, subtraction, and
compalison do not distinguish between unsigned words
SUB AX,ex and signed integers. Conditional jumps are provided to
SUBe BX,DX allow the user to treat the results of these operations as
either signed or unsigned quantities. As an example, the
performs a 32-bit subtraction. Operations on REAL CMPB (compare'byte) instruction is used to compare
(i.e. floating point) variables are not supported directly both signed and unsigned eight bit quantities. A JH
by the hardware but are supported by the floating point (jump if higher) could be used following the compare if
library for the 8X9X (FPAL-96) which implements a unsigned operands were involved or a JGT (jump if
single precision subset of the proposed IEEE standard greater-than) if signed operands were involved.
for floating point operations. The performance of this
software is significantly improved by the 8X9X Table 3 summarizes the operation of each of the in-
NORMl- instruction which normalizes a 32-bit vari- structions. Complete descriptions of each instruction
able and by the existence of the ST flag in the PSW. and its timings can be found in the Instruction Set
chapter. A summary of instruction opcodes and timing
In addition to the operations on the various data ,types, is included in the quick reference section at the end of
the 8X9X supports conversions between these types. this chapter.
1-22
MCS®·96 8X9X ARCHITECTURAL OVERVIEW
1·23
MCS®·96 8X9X ARCHITECTURAL OVERVIEW
-
5
5
JST 1 Jump if ST = 1 - - - - - - 5
JNST 1 Jump ifST = 0 - - - - - - 5
JBS 3 Jump if Specified Bit = 1 - - - - - - 5,6
JBC 3 Jump if Specified Bit = 0 - - - - - - 5,6
DJNZ 1 D ~ D - 1; if D "" 0 then
DEC/DECB 1
PC ~ PC + 8-bit offset
D ~ 0-1
- - - -
,;,
-
-t
-
-
5
NEG/NEGB 1 D ~ O-D
'" '" '" t -
INC/INCB 1 D ~ 0+ 1
'" '" '" '" t -
EXT 1 D ~ 0; D + 2 - Sign (D)
'" '" '"0 '"0 - - 2
EXTB 1 O-D;O+l ~ Sign(D)
'" '" 0 0 - - 3
D ~ Logical Not (D)
'" '" - -
NOT/NOTB
CLR/CLRB
1
1 D~O
'"1 '"0 00 00 - -
C ~ msb-----Isb ~ 0 t - 7
SHLlSHLB/SHLL
SHRISHRB/SHRL
2
2 o~ msb-----Isb ~ C
'" ?? '" '"0 - 7
SHRAISHRAB/SHRAL 2 msb -+ msb-----Isb -+'C
'" '" 0 - '" 7
SETC 0 C~l -'" -'" '"1 - - '"
-
,
CLRC 0 C~O - - 0 - - -
CLRVT 0 VT ,~ 0 - - - - 0 -
RST 0 PC ~ 2080H 0 0 0 0 0 0 8
DI 0 Disable All Interrupts (I ~ 0) - - - - - -
EI 0 Enable All Interrupts (I ~ 1) - - - - - -
Nap 0 PC ~ PC+ 1 - - - - - -
SKIP 0 PC~PC+2 - - - - - -
NORML 2 Left shift till msb = 1; D ~ shift count ? 0 - - - 7
TRAP 0 SP ~ ,SP - 2; (SP) ~ PC
'"
PC ~ (2010H) - - - - - - 9
NOTES:
1. If the mne,monicends in "B", a byte operation is performed, otherwise a word operation is done. Operands D, B and A
must conform to the alignment rules for the required operand type. D and B are locations in the register file; A ,can be
located anywhere in memory. "
5. Offset is a2's complement number.
6. Specified bit is one of the 2048 bits in the register file.
7. The "L" (Long) suffix indicates,double-word operation.
8. Initiates a Reset by pulling RESET low. Software should re~initialize ali the necessary registers with code starting at
2080H.
9. The assembler will not accept this mnemonic.
1-24
inter MCS®·96 8X9X ARCHITECTURAL OVERVIEW
3.5 Software Standards and byte undefined. Thirty-two bit parameters (LONG-
Conventions INTEGERS, DOUBLE-WORDS, and REALS) are
pushed into the stack as two 16-bit values; the most
For a software project of any size it is a good idea to significant half of the parameter is pushed into the
modularize the program and to establish standards . stack first.
which control the communication between these mod-
ules. The nature of these standards will vary with the As an example, consider the following PLM-96 proce-
needs of the final application. A common component of dure:
all of these standards, however, must be the mechanism
for passing parameters to procedures and returning re- example_procedure: PROCEDURE
sults from procedures. In tlie absence of some overrid- (paraml,param2,param3);
ing consideration which prevents their use, it is suggest- DECLARE paraml BYTE,
ed that the user conform to the conventions adopted by param2 DWORD,
the PLM-96 programming language for procedure link- param3 WORD;
age. It is a very usable standard for both the assembly
language and PLM-96 environment and it offers com- When this procedure is entered at run time the stack
patibility between these environments. Another advan- will contain the parameters in the following order:
tage is that it allows the user access to the same floating
pointarithmetics library that PLM-96 uses to operate ?????? : param1
on REAL variables.
high word of param2
,-
1-25
MCS®·96 8X9X ARCHITECTURAL OVERVIEW
4.0 INTERRUPT STRUCTURE' . PSW which contain.s a global disablebi.t. A block dia-
gram of the system is shown in Figure 21.· The tran-
There are 21 sources of interrupts on the 8X9X. These sition detector looks for OJo I transitions' on any of the
sources are gathered into 8 interrupt types as indicated sources. External sources have a maximum transition
in Figure 19. The 110 control registers which coritrol . speed of om;" edge every state time. If this is exceeded
some of the sources are indicated in the figure. Each of the. interrupt may not be detected.
the eight types of interrupts has its own interrupt vectbr
as listed in Figure 20. In addition to the 8 standard Vector Location
interrupts, there is a TRAP instruction which acts as a Vector (Hjgh (Low Priority
software generated interrupt. This instruction is not Byte) . Byte)
currently supported by the MCS-96 Assembler and is
reserved for use in Intel development systems. Software Trap 2011H ·2010H Not Applicable
Extint 200FH 200EH 7 (Highest)
The programmer must initialize the interrupt vector ta- Serial Port 200DH 200CH 6
ble with the starting address of the appropriate inter- Software 200SH 200AH 5
rupt service routine. It is suggested that any unused Timers
interrupts be vectored to an error handling routine. The HSI.O 2009H 2008H 4
error routine should contain recovery code that will not High Speed 2007H 2006H 3
further corrupt an already erroneous situation. In a de- Outputs
bug environment; it may be desirable to have the rou- HSI Data 2005H 2004H 2
tine lock into a jump to self loop which would be easily Available
traceable with emulation tools. More sophisticated rou-
AID Conversion 2003H 2002H 1
tines may be appropriate for production code recover-
Complete
ies.
Timer Overflow 2001H 2000H o(Lowest)
Three registers control the operation of the interrupt Figure 20. Interrupt Vecto.r Locations
system: Interrupt Pending,. Interrupt Mask, and the
SOURCE
r---
IOC1.l
EXTINT ~..._ _ _ _ _ _ _ EXTINT
ACH.7 ---<>
n FLAG ,...--y-------- SERIAL PORT
RI FLAG --.l r--- HSO_COMMAND.4
SOFTWARE TIMER
SOFTWARE TIMER 1
O~~ SOFTWARE TIMER
SOFTWARE TIMER Z
SOFTWARE TIMER 3
. RESEt TIMER Z'
START AID CONVERSION'
HSI.O,----------HSI.O
,.:--- HSa..cOMMAND.4
ANY tISO OPERATION - - 0 ~ . HIGH SPEED OUTPUTS
, FIFOISFULL~ ".
HOLDING REGISTER LOADED _ .' HSI DATA AVAILABLE
~---IOC1.2
nMERl OVERFLOW _
.
_----r-- TIMER OVERFLOW
nMER2 OVERFLOW ~ •
--IOC1.3
270250-20
NOTE:
'Only when initiated by the HSO unit.
1-26.
intJ MCS®·96 8X9X ARCHITECTURAL OVERVIEW
SOFTWARE TIMER
EXTINT SERIAL PORT TIMERS, HSI.O HSO HSI ADCONV. OVERFLOW
6 o
TRANSITION
DETECTOR
PRIORITY ENCODER
I bit
(PSW.9)
GLOBAL DISABLE
INTERRUPT
_NMI
GENERATOR
D.BUS CONTROL
UNIT
270250-21
1-27
intJ MCS®·96 8X9X ARCHITECTURAL OVERVIEW
I
Figure 22. Interrupt Pending Register EI Enable interrupts again
\
1-28.
MCS®·96 8X9X ARCHITECTURAL OVERVIEW
Note that location 200CH: in the interrupt vector table INT_MASK register (part of the PSW), so any
would have to be loaded with the value of the label changes made to this register during a routine which
serial_io_isr and the interrupt be enabled for this ends with a POPF will be lost.
routine to execute.
Notice that the "preamble" and exit code for the inter-
There is an interesting chain of instruction side-effects rupt service routine does not include any code for sav-
which makes this (or any other) 8X9X interrupt service ing or restoring registers. This is because it has been
routine execute properly: ' assumed that the interrupt service routine has been al-
a) After the hardware decides to process an interrupt, it located its own private set of registers from the on-
generates and executes a special interrupt-call in- board register file. The availa15ility of some 230 bytes of
struction, which pushes the current program counter register storage makes this quite practical.
onto the stack and then loads the program counter
with the contents of the vector table entry ~orre
sponding to the interrupt. The hardware will not al- 4.3 Critical Regions
low another interrupt to be serviced immediately fol-
lowing the interrupt-call. This guarantees that once Interrupt service routines must share some data with
the interrupt-call starts, the first instruction of the other routines. Whenever the programmer is coding
interrupt service routine will execute. those sections of code which access these shared pieces
of data, great care must be taken to ensure that the
b) The PUSHF instruction, which is now guaranteed to integrity of the data is maintained. Consider clearing a
execute, saves the PSW in the stack and then clears bit in the interrupt pending register as part of a non-in-
the PSW. The PSW contains, in addition to the terrupt routine: •
arithmetic flags, the INT_MASK register and the
global disable flag (I). The hardwarewiIl not allow LDB AL,INT_PENDING
an interrupt following a PUSHF instruction and, by ANDB AL,#biLmask
the time the LD instruction starts, all of the inter- STB AL,INT_PENDING
rupt enable flags will be cleared. Now there is guar-
anteed execution of the LD INT_MASK instruc- This code works if no other routines are operating con-
tion. currently, but will cause occasional but serious prob-
c) The LD INT~MASK instruction enables those in- lems' if used in a concurrent envin:mment. (All pro-
terrupts that the programmer chooses to allow to grams which make use of interrupts must be considered
interrupt the serial I/O interrupt service rO,lltine. In to be part of a concurrent environment.) To demon-
this example only ll1e HSI data available interrupt strate this problem, assume that the INT_PENDING
will be allowed to do this but any interrupt or combi- register contains OOoollllB and bit 3 (HSO event in-
nation of interrupts could ,be enabled at this point, terrupt pending) is to be reset. The code does work for
even the serial interrupt. It is the loading of the this data pattern but what happens if an HSI interrupt
INT_MASK register which allows the software to occurs somewhere between the LOB and the STB in-
establish its own priorities for interrupt servicing in- structions? Before the LOB instruction INT_PEND-
dependently from those that the hardware enforces. ING contains oooo1111B and after the LOB instruc-
d) The EI instruction reenables the processing of inter- tion so does AL. If the HSI interrupt service routine
rupts. executes at this point then INT_PENDING will
change to 0000101 lB. The ANDB changes At to
e) The actual interrupt service routine executes within , OOOOOll,IB and the STB ,changes INT_PENDING to
the priority structure established by the software. 00000 III B. It should be 000000 lIB. This code se-
t) A:t the end of the service routine the POPF instruc- quence has manged to generate a false HSI interrupt
tion restores the PSW to its state when the interrupt- The same basic process can generate an amazing assort-
call occurred. The hardware will not allow interrupts ment of problems and headaches. These problems can
to be processed following a,POPF instruction s6the be avoided by assuring mutual exclusion which basical-
execution of the last instruction (RET) is guaranteed ly means that if more than one routine can change a
before further interrupts can occur. The reason that variable, then the programmer must ensure exclusive
this RET instruction must be prote;cted in this fash- access to the variable during the entire operation on the
ion is that it is quite likely that the i>OPF instruction variable.
will reenable an interrupt which is already pending.
If this interrupt were serviced before the RET in- In many cases the instruction set of the 8X9X allows
struction, then the return address to the code that the variable to be modified with a single instruction.
was executing when the original interrupt occurred The code in the above example can be implemented
, would be left on the stack. While this does not pres- with a single instruction.
ent a problem to the program flow, it could result in
a sta,ck overflow if interrupts are occurring at a high ANDB
frequency. TliePOPF instruction also pops the
1-29
inter MCS®-96 8XgXARCHITECTVRAL OVERVIEW.
Instructions are indivisible so mutual exclusion is en- There are 6 instructiorts whiph always inhibit interrupts
sured in this case. Changes to the INT,-PENDING .. from I?eing acknowledged until after th~ next instru~
register must be made·as a single instruction, since bits tion has been executed. These instructions are:
can be changed in this register even if interrupts are EI, DI ~ Enable and Disable Interrupts .'
disabled. Depending on system configurations, several
other SFRs might also need to be' changed in a single POPF, PUSHF-;- Pop and Push Flags
instruction for the same reason. SIGND ...,... Prefix tQ' perform signed multiply
and divide (Note that Jhisis not an
When variables must be modified without interruption, ASM-96 Mnemonic,but is used for
and a single instruction can not be used, the program- signed multiply and divide)
mer must create what is termed a critical region in SOFTWARE
which it is safe to modify the variable. One way to do TRAP - Software interrupt
this is to simply disable interrupts with a D I instruc-
tion, perform the modification, and then re-enable in- When an interrupt is acknowledged, the interrupt
terrupts with an EI instruction. The problem with this pending bit is cleared, and a call is forced to the loca-
approach is that it leaves the interrupts enabled even if tion indicated by the specified interrupt vector. This
they were not enabled at the start. A better solution is call occurs after the completion of the instruction in
to enter the critical region with a PUSHF instruction process, except as noted above. The procedure of get-
which saves the PSW and also clears the. interrupt en- ting the vector and forcing the call requires- 21 state
able flags. The region can then be terminated with a times. If the stack is in external RAM an additional 3
POPF instruction which. returns the interrupt enable to state times are required.
the state it was in before the code sequence. It should be
noted that some system configurations might require The maximum n).l)l1ber of state times required from the
more protection to form a critical region. An example time an interrupt is generated (not acknowledged) until
is a system in which more than one processor has ac- the 8X9X begins executing code at the desired location
cess to a common resource such as memory or external is the time of the longest instruction, NORML (Nor-
I/O devices. malize - 42 state times), plus the. 4 'state times prior to
the end of the previous instruction, plus the response
time (21 to 24 state times). Therefore, the maximum
4.4 Interrupt Timing response time is 70 (42 + 4 + 24) state times. This
does. not include the 12 state times required for PUSHF
Interrupts are not always acknowledged immediately. if it is used as the first instruction in the interrupt rou-
If the interrupt signal does not occur prior to 4 state- tine' or additional latency caused by having the inter-
times before the end of an instruction, the interrupt will rupt masked or disabled. Refer to Figure 22A, Inter-
not be acknowledged until after the next instruction has rupt Response Time, to visualize an example of a worst
been executed. This is because an instruction is fetched case scenario.
and prepared for execution a few state times before it is
actually executed.
EXECUTION ( ENDING
) INSTRUCTION
I '({
'NORML)",-
END 1 CALL IS
}_'_N_OR_M_L_'~.....
<(
F_OR_C_E_D.,./)
IF STACK
EXTERNAL
PENDING ..J"S~E~T-----------;lcLEARED
BIT •
1-30
MCS®·96 8X9X ARCHITECTURAL OVERVIEW
Interrupt latency time can be reduced by careful selec- tiple functionality of the timer is determined by the
,tion of instructions in areas of code where interrupts state of 1/0 Control Register 0, bit 7 (IOCO.7). To en-
are expected. Using. 'El' followed immediately by a sure that all CAM entries are chec\<.ed each count of
long instruction (e.g. MUL, NORML, etc.) will in- Timer 2, the maximum transition speed is limited to
crease the maximum latency by 4 state. times, as an once per eight state times. Timer 2 can be cleared by~
interrupt cannot occur between EI and the instruction executing a reset, by setting lOCO. I, by triggering HSO
following in. The "DI", "PUSHF", "POPF" and channel OEH, or by pulling T2RST or HSI.O high. The
:'TRAP" instructions will also cause the same situa- HSO and CAM are described in Section 7 and 8.
tion. Typically the PUSHF, POPF and TRAP instruc- IOCO.3 and ICOO.S control the resetting of Timer 2.
tions would only effect latency when one interrupt Figure 23 shows the different ways of manipulating
routine is already in process, as these instructions are Timer 2. It is recommended that the lOCO register only
seldom used at other times. be used once during power on reset to initialize the
timers and pins, fohowed by an HSO command 14 to
clear Timer 2 internally; or externally cleared by the
5.0 TIMERS T2RST or HSI.O pins. T2RST is not available on the
8X98. Some 8X9XBH devices have errata associated
Two l6-bit timers are available for use on the 8096. The with Timer 2. See the data sheets for more information.
first is designated "Timer I", the second, "Timer 2".
Timer I is used to synchronize events to real time,
while Timer 2 can be clocked externally and synchro- 5.3 Timer Interrupts
nizes events to external occurrences.
Both Timer I and Timer 2 can be used to trigger a
timer oyerflow interrupt and set a flag in the 1/0 Status
5.1 Timer 1 Register I (lOS 1). The interrupts are controlled by
IOC1.2 and IOC1.3 respectively. The flags are set in
Timer 1 is clocked once every eight state times and can IOS1.S and 1081.4, respectively.
be cleared only by executing a reset. The only other
way to change its value is by writing to OooCH but this Caution must be used when examining the flags, as any
is a test mode which sets both timers to OFFFXH and access (including Compare and Jump on Bit) of 10SI
should not be used in programs. clears bits 0 through S including the software timer
flags. It is, therefore, recommended to write the byte to
a temporary register before testing bits. The general en-
5.2 Timer 2 abling and disabling of the timer iriterrupts are con-
trolled by the Interrupt Mask Register bit O. In all cas- .
Timer 2 can be incremented by transitions (one count . eg., setting a bit enables a function, while clearing a bit
each transition, rising and falling) on either T2CLK or disables it.
HSI.1. T2CLK is not available on the 8X98. The mul-
.
IOCO.S
270250-22
1-31.
MCS®·96 8X~X ARCHITECTURAL OVERVIEW
FIfO
INTERRUPT
&;
CONTROL LOGIC
4 8x20 BIT
FIFO
+iSI PINS
4
~LO
~OHI
--'Hi(,R LoL-
t t
.IlJ'1.I'lJ1.I1
EVERY EIGHTH POSITIVE
TRANSITION
270250-23
.1-32
,
6.1 HSI Modes events. It can take up to 8 state times for this informa-
tion to reach the holding register. For this reason, 8
There are 4 possible modes of operation for each of the state times must be allowed between consecutive reads
HSI pins. The HSI mode register is used to control of HSI_TIME. When the FIFO is full, for a total of 8
which pins will look for what type of events. The 8-bit events, were be stored by considering the holding regis-
register is set up as shown in Figure 25. ter part of the FIFO. If the FIFO and holding register
are full, any additional events will cause an overflow
High and low levels each need to be held for at least 1 condition. Any eight consecutive events will overflow
. state time to ensure proper operation. The maximum on the ninth event if the program does not clear all
input speed is I event every 8 state times except when e.ntries in the FIFO before the ninth event occurs. Some
the 8 transition mode is used, in which case it is I versions of the 8X9X have errata associated with the
transition per state' time. The divide by eight counter HSI unit. See the data sheets for more infor.mation.
can only be zeroed in mid-count 'by performing a hard-
ware reset on the 8X9X.
6.3 HSI Interrupts
HSI_Mode (03H) Interrupts can be generated by the HSI unit in three
ways; two FIFO related interrupts and 0 to I tran-
171 6 I 5 4 I 3 2111 0 I sitions on the HSLO pin. The HS10 pin can generate
L HSI.O ~ODE
interrupts even if it is not enabled to the HSI FIFO.
Interrupts generated by this pin cause a vector through
HSI.l· ~ODE
location 2008H. The FIFO related interrupts are con-
HSI.2 ~ODE
trolled by bit 7 ofI/O Control Register I, (IOCI.7). If
HSI.3 MODE
the bit is a 0, then an interrupt will be generated every
WHERE EACH 2 - BIT MODE CONTROL FIELD
DEFINES ONE OF 4· POSSIBLE MODES: time a value is Iqaded into the holding register. If it is a
I, an interrupt will only be generated when the FIFO,
00 8 POSITIVE TRANSITIONS
01 EACH POSITIVE TRANSITION (independent of the holding register), has six entries in
10 EACH NEGATIVE TRANSiTION it. Since all interrupts are rising edge triggered, if
11 EVERY TRANSITION
(POSITIVE AND NEGATIVE) IOCI.7 = I, the processor will not be re-interrupted
270250-24 until the FIFO first contains 5 or less records, then
contains six or more.
Figure 25. HSI Mode Register Diagram
The HSI lines can be individually enabled and disabled 6.4 HSI Status
using bits in lOCO, at location OOI5H. Figure 26 shows
the bit locations which control the HSI pins. If the pin Bits 6 and 7 of the I/O Status register I (lOS I) indicate
is disabled, transitions will not be entered in the FIl2'O. the status of the HSI FIFO. If bit 6 is a I, the FIFO
contains at least six entries. If bit 7 is a 1, the FIFO
contains at least 1 entry and the HSI holding register
has data available to be read. The FIFO may be read
I
T2RST~5
Y,lO-,---:-- T2 RESET after verifying that it contains valid data. Caution must
"-·IOCO.3 be used when reading or testing bits in IOS1, as this
;--IOCO.O
action clears bits 0-5, including the softwah; and hard-
HSI.O :i""-o_-..,..---- HSI ware timer overflow flags. It is best to store the byte
• _. IOCO.2
~'-o---"---- HSI and then test the stored value. See Section 11.
HSI.l ~ TIMER2
T2CLK ~ : _. IOCO.7 CLOCK Reading the HSI is done in two steps. First, the HSI
r-- IOCO.4 Status register is read to obtain the current state of the
HSI,2 ~""'-oo------ HSI . HSI pins and which pins had changed at the recorded
; _. IOCO.6 time. The format of the HSI_STATUS Register is
HSI.3 ~""'-o_----- HSI shown in Figure 27. Second, the HSI Time register is
270250-25 read. Reading the Time register unloads one level of the
FIFO, so if the Time.register is read before the Status
Figure 26. lOCO Control Of HSI Pin Functions register, the event information in the Status register will
be lost. The HSI Status register is at location 06H and
the HSI Time registers are in locations 04H and 05H:
6.2 HSI FIFO
If the HSI_TIME register is read without the holding
When an HSI event occurs, a 9x20 FIFO stores the 16 register being loaded, the returned value will be indeter-
bits of Timer I and the 4 bits indicating which pins had minate. Under the same conditions, the four bits in
1-33
MCS®~96 8X9X ARCHITECTURAL OVERVIEW
TIMER 2 INPUT
16
PORT PINS
270250-27
~---------------------------.---------------------~--~-----
Figure 28. High Speed Output Unit
1-34
inter MCS®-96 8X9X ARCH.ITECTURAL OVERVIEW
command to the HSO unit is shown in Figure 29. Note 7.2 HSO Status
that bit 5 is ignored for command channels 8 through
OFH. Before writing to the HSO, it is desirable to ensure that
the Holding Register is empty. If it is not, writing to the
To enter a command into the CAM file, write the 7-bit HSO will'overwrite the value in the Holding Register.
"Command Tag" into location 0006H followed by the I/O Status Register 0 (IOS0) bits 6 and 7 indicate the
time at which the action is to be carried out into word status' of the HSO unit. This register is describeq in
address 0004H. The typical code would be: Section II. If IOS0.6 equals 0, the holding register is
empty and at least one CAM register is empty. If
LDB HSO_COMMAND,#what_to_do IOSO.7 equals 0, the holding register is empty.
ADD HSO_TIME,TIMERl,#when_to_do_it
The programmer should carefully decide which of these
Writing the time value loads the HSO Holding Register two flags is the best to use for each application.
with both the time and the last written command tag.
The command does not actually enter the CAM file
until an empty CAM register becomes available. . 7.3 Clearing the HSO
Commands in the holding register will not execute even All 8 CAM locations of the HSO are compared before
if their time tag is reached. Commands must be in the any action is taken. This allows a pending external
CAM for this to occur. Commands in the holding regis- event to be cancelled by simply writing the opposite
ter can also be overwritten. Since it can take up to 8 event to the CAM. However, once an entry is placed in
state times for a command to move from the holding the CAM, it cannot be removed until either the speci-
register to the CAM, 8 states must be allowed between fied timer matches the written value or the chip is reset.
successive writes to the CAM. If, as an example, a command has been issued to set
HSO.l when TIMER 1 = 1234, then entering a second
To provide proper synchronization, the minimum time command which clears HSO.I when TIMER I = 1234
that should be loaded to Timer I is Timer I + 2. will result in no operation on HSO.1. Both commands
Smaller values may cause the Timer match to occur will remain in the CAM until TIMER I = 1234.
65,636 counts later than expected. A similar restriction
applies if Timer 2 is used. Internal events are not synchronized to Timer I, and
therefore cannot be cleared. This includes events on
Care must be taken when writing the command tag for HSO channels 8 through F and all interrupts. Since
the HSO. If an interrupt occurs during the time be- interrupts are not synchronized it is possible to have
tween writing the command tag and loading the time multiple interrupts at the same time value.
value, and the interrupt service routine writes to the
HSO time register, the command tag used in the inter-
rupt routine will be written to the CAM at both the 7.4 Using Timer 2 with the HSO
time specified by the interrupt routine and the time
specified by the main program. The command tag from Timer 1 is incremented only. once every 8 state-times.
the main program will not be executed. One way of When it is being used as the reference timer for an HSO
avoiding this problem would be to disable interrupts action, the comparator has a chance to' look at all 8
when writing commands and times to the HSO unit. CAM registers before Timer I changes its value. Fol-
See also Section 4.5. lowing the same reasoning, Timer 2 has been synchro-
nized to anow it to change·at a maximum rate of once
per 8 state-times. Timer 2 increments on both edges of
CHANNEL: the input signal.
0-5 HSO.O - HSO.5
BIT: HSO.O AND HSO.l When using Timer 2· as the HSO reference, caution'
HSO.2 AND HSO.3 must be taken that Timer 2 is not reset prior to the
8-B SOFTWARE TIMERS highest value for a Timer 2 match in the CAM. This is
E RESET TIMER2 because the HSO CAM will hold an event pending until
START A I D CONVERSION a time match occurs, if that match is to a time value on
Timer 2 which is never reached, the event will remain
INTERRUPT I NO INTERRUPT
pending in the CAM until the device is reset.
SET ICI,.EAR
TIMER 2/TIMER 1
Additional caution must be used when Timer 2 is being
reset using the HSO unit, since resetting Timer 2 using
X the HSO is an internal event and can therefore happen
270250-28
at any time within the eight-state-time window. This
situation arises .when the event is, set to. occur .when
Figure 29. HSO Command Tag Format
1-35
MCS®·96 8X9X ARCHITECTURAL OVERVIEW
Timer 2 is equal to ze~o. If HSI.O or the T2RST pin is 8.0 ANALo.G INTERFACE
used to clear Timer 2, and Timer 2 equal to zero trig-
gers the event, then the, event may not occur. This is The 8X9X can easily interface to analog signals using
because HSI.O and T2RST clear Timer 2 asynchro- its Analog to Digital Converter and its Pulse-Width-
nously, and Tinler 2 may then be incremented to one Modulated (PWM) output and HSO Unit. There are 8
before the HSO CAM entry can be read and acted inputs to the lO-bit A to D converter on the 8X9XBH
upon. This can be avoided by setting the event to occur and 8X9XJF. There are 4 inputs on the 8X98. The
when Timer 2 is equal to one. This method will ensure PWM and HSO units provide digital signals which can
that there is enough time for the CAM entry recogni .. be filtered for use as analog outputs.
tion. .
The same asynchronous nature can affect events sched- 8.1 Analog Inputs
uled to occur at the same time as an internal Timer 2
reset. These events should be logged into the CAM A to D conversion is performed on one input at a time
with a Timer 2 value of zero. When using this method using successive approximation with a result equal to
to make a programmable· modulo' counter, the count the ratio of the input voltage divided by the analog
will stay at the maximum Timer 2 value only until the supply voltage. If the ratio is 1.00, then the result will
Reset T2 command is recognized. The count will stay be all ones. The AID converter is available on selected
at zero for the transition which would have changed the members of the MCS-96 family. See Section 14 for the
count from "N" to zero, and then changed to a one on device selection matrix.
the next transition.
Each conversion on the 8X9X requires 88 state-times
(22 ,""S at 12 MHz) independent of the accuracy desired
7.5 'Software Timers or value of input voltage. The input voltage must be in
the range of a to VREF, the analog reference and supply
The HSO can be ,programmed to generate interrupts at voltage. For proper operation, VREF (the reference
preset times'. Up to four such "Software Timers" can be voltage and analog power supply) must be 'between
in operation at a time. As each preprogrammed time is 4.5V and 5.5V. The AID result is calculated from the
reached, the HSO unit sets a Software Timer Flag. If formula:
the interrupt bit in the command tag was set then a
Softwar,e Timer Intern,lpt will also be generated. The 1023 x (Input voltage-ANGND)/(VREF-ANGND)
interrupt service routine can then examine I/O Status
register I (IOSI) to determine which software timer It can be seen from this formula that changes in VREF
expired and caused the interrupt. When the HSO resets or ANGND effect the output of the converter. This clm
Timer 2 or starts an A to D conversion, it can also be be advantageous if a ratiometric sensor is used since
programmed to generate a software timer interrupt but these sensors have an output that can be measured as a
there is no flag to indicate that this has occurred. proportion of V REF.
If more than one software timer interrupt occurs in the ANGND must be tied to Vss (digital ground) in order
same time frame it is P9ssible that multiple software for the 8X9X to operate properly. This common con-
timer interrupts will be generated. nection should be made as close to the chip as possible,
and using good bulk and high frequency by-pass capaci-
Each read or test of any bit in lOS 1 will clear bits a tors to decouple power supply variations and noise
through 5. Be certain to save the byte before testing it from the circuit. Analog design rules can for one and
.unless you are only concerned with I bit. See also Sec- only one common connection be.tween analog and digi-
tion 11.5. tal returns to eliminate unwanted ground variations.
1-36
inter MCS<I!l-96 8X9X ARCHITECTURAL OVERVIEW
The AID converter has sample and hold. The sampling The command register is double buffered so it is possi-
window is open for 4: state times which are included in ble to write a command to start a conversion triggered
the 88 state-time conversion period. The exact timings by the HSO while one is still in progress. Care must be
of the AID converter'can be found in Section 3 of the taken when this is done since if a new conversion is
Hardware Design chapter. started while one is already in progress, the conversion
in progress is cancelled and the neW one is 'started.
When a conversion is started, the result register is
8.2 AID Commands cleared. For this reason the result register must be read
before a new conversioh is started or data will be lost.
Analog signals can, be sampled by anyone "of the 8
analog input pins' (ACHO through ACH7) which are
shared with Port O. ACH7 can also be used as an exter- 8.3 AID Results
nal interrupt if IOCl.! is set (see Sections 4 and 11).
The AID Command Regi~ter, at location 02H,' selects Results of the analog conversions are read from the
which channel is to be converted and whether the con- AID Result Register at locations 02H and 03H. Al-
version should start immediately, or when the HSO though these addresses are on a word boundary, they
(Channel #OFH) triggers it. The AID command regis- must be read as individual bytes. Information in the
ter must be written to for each conversion, even if the AID Result register is formatted as shown in Figure
,HSO is used as the trigger. A to D commands are for- 31. Note that the status bit may not be set until 8 state
matted as shown in Figure 30.
1-37
infef I\IICS®-96 8X9X ARCHITECTURAL OVERVIEW
times after the go ~ommand, so it is necessary to wait 8 Figure 33. Note that when the. PWM r~gister equals 00,
state times before testing it. Information on using the the output is always low. Additionally, the PWM regis-
HSO is in Section 7. te, will only be reloaded from the temporary latch
when the counter 'overflows. This means that the com-
pare circuit will not recognize a new value to compare
8.4 Pulse Width Modulation Output against until the counter has expired the remainder of
. (D/A) the current 8-bit count.
to
Digital analog conversion can be done with the Pulse The output waveform is a variable duty cycle pulse
Width Modulation output; a block diagram of the cir- which repeats every 256 state times (64 /-Ls at 12 MHz).
cuit is shown in Figure 32. The 8-bit counter is incre- Changes in the duty cycle are made by writing to the
mented every state time. When it equals 0, the PWM PWM register at location 17H..There are several types
output is set to a one. When the counter matches the of motors which require a PWM waveform for most
value in the PWM register, the output is switched low. efficient operation. Addition,ally, if this waveform is in-
When the counter overflows, the output is once again tegrated it will produce a DC level which can be
switched high. A typical output waveform is shown in changed in 256 steps by varying the duty cycle.
PWM/P2.5
PIN
OVERFLOW
270250-31
• PWM Period (XTAL = 12 MHz) = '64 /Ls, Frequency = 15.625 KHz
• Duty Cycle Programmable in 256 Steps
10% 25
~~J1 n n
HI
50"10 128
LO
90% 230 HI
LO
.J U U
HI
99.6% 255
L9 .1
270250-32
1-38
MCS@·96 8X9X ARCHITECTUR~L OVERVIEW
Details about the hardware required for smO(~th, accu- Control of the serial port is handled through the Serial
rate D/A conversion can be found in Section 4 of the Port ControVStatus'Register at location IIH. Figure
Hardware Design chapter. Typically, some form of 37 shows the layout of this register. The detail~ of using it
butTer and integrator are needed to obtain the most use- to control the serial port will be discussed in Section 9.2.
fulness from this feature.
Data to and from the serial port is transferred through
The PWM output shares a pin with Port 2, pin 5 so SBUF (rx) and SBUF (tx), both located at 07H. Al-
that these two features cannot be used at the same time. though these registers share the same address, they are
10CI.0 equal to I selects the PWM function instead of physically separate, with SBUF (rx) containing the data
the standard port function. More information on lOCI received by the serial port and SBUFr (tx) used to hold
is in Section II. ' data ready for transmission. The program cannot write
to SBUF (rx) or read from SBUF (tx).
8.5 PWM Using the HSO The baud rate at whicb. the serial port operates is con-
trolled by an independent baud rate generator. The in-'
The HSO unit can be used to gen:erate PWM wav~- puts to this generator can be either the XTALI or the
, forms with very little CPU overhead. If the HSO is not' T2CLK pin. Details on setting up the baud rate are
being used for other purposes, a 4 line PWM unit can given in Section 9.3. '
be made by loading the on and otT times into the CAM
in sets of 4. The CAM would then always be loaded and
only 2 interrupts per PWM period would be needed. 9.1 Serial Port Modes
MODE 0
9.0 SERIAL PORT
The ,serial port on the 8X9X has 3 asynchronous and Mode 0 is a synchronous tpode which is commonly
one synchronous mode. The asynchronous modes are used for shift register based I/O expansion. In this
full duplex, meaning they can transmit and receive' at mode the TXD pin outputs a set of 8 pulses while the
the same time. The receiver is double butTered so that RXD pin either transmits or receives data. Data is
the reception of a second byte can begin before the first transferred 8 bits at a time with the LSB first. A dia-
byte has been read. The port is functionally compatible gram of the relative 'timing of theSe signals is shown in
with the serial port on the MCS-51 family of microcon- Figure 34. Note that this is the only mode which uses
trollers, although the software used to control the ports RXD as an output.
is ditTerent.
~~~~~~~M~~~~~~~~~
IIXD (In) VALID VALID VALID, VALID VALID VAUD VALID VALID
--J\.....I\.....I\.....I\.....I\.....I\.....I\.....I\-I\..-I\.....J\-I\.....J\-I\-I\.....I~
270250-34
1-39
inter MCS®·96 8X9X: ARCHI"FECTURAL OVERVIEW
STOP
11).BIT FRAME,
270250-35
STOP
1-40
MCS®·96 8X9X ARCHITECTURAL OVERVIEW
LOCATION 11H
SP_STAT SP_CON
, (READ ONLY) (WRITE ONLY)
• ,
IRI'~RPE I RI I '5
'TI T88
3
REN
1 I 2
PEN
1
M2
1
0
Ml J
~
J
L M2,Ml SPECIFIES THE MOD E,
0,0= MODE 0
0,1 = MODEl
1,0= MODE 2
1,1 = MODE 3
270250-33
NOTE:
TI and RI are cleared when SP_STAT is read.
Oth . Baud = XTAL 1 frequency provide extra 1/0 lines if the timer related features of
€Irs. Rate 64 *(B + 1) these lines are not needed.
Using T2CLK: Input ports cOnnect to the internal bus through an in-
put buffer. Output ports connect through an output
Mode 0'. Baud T2CLK frequency B buffer to an internal register that hold the bits to be
Rate = B ; '* 0 output. Bidirectional ports consist of an internal regis-
ter, an input buffer, and an output buffer.
Others: Baud T2CLK frequency B
Rate = 16 * B ; '* 0 Port 0 is an input port which is also used as the analog
input for the A to D converter. Port 1 is a quasi-bidi-
Note that B cannot equal 0, except when using XTALI rectional port. Port 2 contains three types of port lines:
in other than mode O. ql,lasi-bidirectional, input and output. The input and
output lines are shared with other functions in the
Common baud rate values, using XTALl at 12 MHz, 8X9X as shown in Table 4. Ports 3 and 4 are open-
. are shown below. drain 'bidirectional ports which share their pins with the
addressldata bus.
1-42
inter MCS®·96 8X9X ARCHITECTURAL OVERVIEW
to have D.C. leakage of 3 microamps or less, as speci- and leave the pin pulled up with a relatively high im-
fied in, the data sheet for the device being considered. pedance pullup device which can be easily driven down
The capacitance on these pins is' approximately 5 pF by the device driving the input.
and will instantaneously increase by around 5 pF when
the pin is being sampled by the A to D converter. If some pins of a port are to be used as inputs and some
are to be used as outputs the programmer should be
The 8X98 devices only have 4 Port 0 pins. careful when writing to the port.
The 8X9X samples the input to the A/D for 4 state Particular care should be exercised when using XOR
times at the beginning of the conversion. Details on the opcodes or any opcode which is a read-modify-write
A to D converter can be found in Section '8 of this instruction. It is possible for a Quasi-Bidirectional Pin
chapter and in Section 3 of the Hardware Design chap- to be written as a one, but read back as a zero if an
ter. external deviqe (i.e., a transistor base) is pulling the pin
below VIH' See the Hardware Design Chapter Section
2.2 for further details on using the Quasi-Bidirectional
10.2 Quasi-Bidirectional Ports Ports.
1-43
MCS®-96 8X9X ARCHITECTURAL OVERVIEW
To read Port t3 and 4 requires that "ones" be written to the port registers to first setup the input port configuration
circuit: Note that the ports are reset to this input condition, but if zeroes have been written to the port, then ones
must be re-written to any pins which are to be used as inputs., Reading Port 3.and 4 from a previously written zero
condition is as follows ...
When acting as the system bus the pins have strong' 11.0 STATUS AND CONTROL
drivers to both Vee and Vss. These drivers are used REGISTERS
whenever data is being output on the system bus and
are not used when data is being output by Ports 3 and There are two I/O Control registers, lOCO and lOCI.
4. Only the pins and input buffers ate shared between lOCO controls Timer 2 and the HSI lines. lOCI con-
the bus and the ports, The ports use different output trols some pin functions, interrupt sources and 2 HSO
buffers which are configured as open-drain, and require pins.
pullup resistors. (open-drain is the MOS version of
open-collector.) the port pins and their system, bus Whenever input Hnes are switched between two sourc-
functions are shown in Table 5. es, or enabled, it is possible to generate transitions on
these 'lines. This could cause problems with respect to
. Table 5. P3,4/ADO-15 Pins edge sensitive lines such as the HSI lines, Interrupt line,
System Bus .' and Timer 2 control lines.
Port Pin
Function
P3.0 ADO 11.1 110 Control Register 0 (lOCO)
P3.1 AD1
P3.2 AD2 lOCO is located at 0015H. The four HSllines can be
P3.3 AD3
enabled or disabled to the HSI unit by setting or clear-
ing bits in lOCO. Timer 2 functions including clock and
P3.4 AD4
reset sources are also determined by lOCO. The control
P3.5 AD5 bit locations are shown in Figure 38. lOCO is for initial-
P3.6 AD6 ization only.
,
P3.7 AD7
P4.0 ADS
P4.1 AD9
HSI.O INPUT ENABLE / DISABLE
P4.2 AD10
P4.3 AD11 TIMER 2 RESET EACH WRITE
P4.4 AD12 HSI.l INPUT ENABLE / DISABLE
P4.5 AD13 TIMER 2 EXTERNAL RESET ENABLE / DISABLE
P4.6 AD14
HSI.2 INPUT ENABLE / DISABLE
P4.7 AD15
TIMER 2 RESET SOURCE HSI.O / T2RST
HSI.3 INPUT ENABl.E / DISABLE
TIMER 2 CLOCK SOURCE HSI.l / T2CLK
270250-37
1-44
MCS®·96 8X9X ARCHITECTURAL OVERVIEW
270250-39
1-45
intJ MCS®-96 8X9X ARCHITECTURAL OVERVIt:W
12.0 WATCHDOG TIMER are within reasonable values. Simply using a software
timer to reset the WDT every 15 milliseconds will not
The WatchDog Timer (WDT) provides a means to re- provide much protection against minor problems.
cover gracefully from a software upset. When the
watchdog is enabled it. will initiate, a hardware reset It is also recommended that unused areas of code be
unless the software clears it every 64K state times. filled with NOPs and periodic jumps to an error routine
or RST (reset chip) instructions. This is particularly
The WDT is implemented as an 8-bit timer with an important in the code around lookup tables, since if
8-bit prescaler. The prescaler is not synchronized, so lookup tables are executed undesired results will occur.
the timer will overflow between 65280 and 65535 state Wherever space allows, each table should be surround-
times after being reset. When the timer overflows it ed by 7 NOPs (the longest 8096 instruction has 7 bytes)
pulls down the RESET pin for at least one state time, and a RST or jump to error routine instruction. Since
resetting the 8X9X and any other devices tied to the RST is a one-byte instruction, the NOPs are not needed
RESET line. If a large capacitor is· connected to the if RSTs are used instead of jumps to an error routine.
line, the pin may take a long time to go low. This will This will help to ensure a speedy recovery should the
effect the length of time the pin is low and the voltage processor have a glitch in the program flow. Since RST
on the pin when it is finished falling. Section 1.4 of the instruction has an opcode of OFFH, pulling the data
Hardware Design chapter contains more information lines high with resistors will cause an RST to be execut-
,about leset hardware connections. ed if unimplemented memory is addressed.
1-46
intef MCS®·96 8X9X ARCHITECTURAL OVERVIEW
The 8X9X can be reset using a capacitor, I-shot, or any Port I and Port 2.6, 2.7 reset to a strong or weak pull-
other method capable of providing a pulse of at least 2 up condition. HSO.4 and HSO.5 reset to a floating con-
state times longer than required for Vee and the oscil- dition as they are disabled by IOCl.4 and IOCI.6.
lator to stabilize. '
Other conditions following a reset are:
For best functionality, it is suggested that the reset pin
be pulled low with an open collector device. In this
way, several reset sources can be wire ORed tdgether. Pin Reset Value
Remember, the RESET pin itself can .be a reset source RD high
when the RST instruction is executed or when the WR/WRL high
Watchdog Timer overflows. Details of hardware sug- ALE/ADV high
gestions for reset can be' found in Section 1.4 of the BHE/WAH high
Hardware Design chapter.
INST low
HSO Lines XXOOOOB
13.2 Reset Status Figure 43. Bus Control Pins Reset Status
The I/O lines and control lines of the 8X9X will' be in It is important to note that the Stack Pointer and Inter-
their reset state within 10 XT ALl periods after reset is rupt Pending Register are undefined, and need to be
low, with Vee and the oscillator stabilized (See Figure initialized in software. The Interrupts are disabled by
44, TRLPV), Prior to that time, the status of the I/O both the mask register and PSW.9 after a reset.
lines is indeterminate. After the 10 state time reset se-
quence, the Special Function Registers will be set as
follows: 13.3 Reset Sync Mode
Register Reset Value The RESET line can be used to start the 8X9X at an
exact state time to provide for synchronization of test
Port 1 XXXXXXXXB equipment and multiple chip systems. RESET is active
. Port 2 XXOXXXX1B low. To synchronize devices, RESET is brought high
Port 3 11111111B on the rising edge of XT AL I. Complete details on syn-
Port 4 11111111B chronizing devices can be found in Section 1.5 of the
PWMControl OOH Hardware Design chapter.
Serial Port (Transmit) undefined
Serial Port (Receive) undefined It is very possible that devices which start in sync may
Baud Rate Register undefined not stay that way. The best example of this would be
Serial Port Control XXXXOXXXB when a "jump on I/O bit" is being used to hold the
Serial Port Status XOOXXXXXB processor in a loop. If the line changes during the time
A/DCommand undefined it is being tested, one processor may see it as a one,
AID Result undefined while the other sees it as a zero. The result is that one
Interrupt Pending undefined processor will do an extra loop, thus putting it several
Interrupt Mask OOOOOOOOB states out of sync with the other.
Timer 1 OOOOH
Timer 2 OOOOH
Watchdog Timer OOOOH
HSI Mode XXXXXXXXB
HSI Status undefined
10SO OOOOOOOOB
IOS1 OOOOOOOOB
lOCO XOXOXOXOB
IOC1 XOXOXXX1B
HSI FIFO empty
HSOCAM empty
HSOSFR OOOOOOB
PSW OOOOH
Stack Pointer undefined
Program Counter 2080H
Figure 42. Register Reset Status
1-47
infef MCS®·96 8X9)( ARCHITECTURAL OVERVIEW'
t-:":c4.5 VDe
Vee f--
XTAL
- f-- Start Time from Pow~r Supply Rise ·to. External Output Low
411flllill 111I1111111111111111111111111111I1I111111I1I111111111111111111111111111111111111111
r--
RESET
-I f..- External to Internal
-
Release Time
HSO.0-HSO.3,
P2.0, P2.5
10 STATE TIMES
PORT 3 8c 4
WITH· PULLUPS \ADDRESSe ADDRESS \
201BH ,CCB 20BOH
r--- FIRST BUS FETCH CYCLE PROGRAM
TRLPV = 10 XTAL CYCLES
START
External RESET Low to
Port Valid Time RESET FUNCTION REGISTERS
\
TOTAL 8X9XJF RESET TIME
270250-43
1-48
MCS® ..96 8X9X Hardware 2
Design Information and
Data Sheets
November 1990
5.3 Standard 110 Port Pins ............ 2·22 10.9 Signature Word .................. 2·42
10.10 Erasing the EPROM ............ 2·42 .
6.0 SERIAL PORT TIMINGS ............ 2·22
6.1 Mode 0 ........................... 2·22 11.0 QUICK REFERENCE .............. 2·42
6.2 Mode 1 Timings ............... ; .. 2·22 11.1 Pin Description .................. 2·42
6.3 Mode 2 and 3 Timings ............ 2·23 11.2 Pin List .......................... 2·45
11.3 Packaging ....................... 2·46
7.0 BUS TIMING AND MEMORY
INTERFACE .......................... 2·23 11.4 Package Diagrams .............. 2·47
7. t Bus Functionality .......... '.' ..... 2·23 11.5 Memory Map .................... 2·49
7.2 Timing Specifications ............. 2-24 11.6 Instruction Summary .............. 2·50
7.3 READY Li~e Usage ............... 2·24 . 11.7 Opcode and State Time Listing .. 2·52
7A 1NST Line Usage ..... c .••••••.••• 2·27 ; 11.8 SFR Summary ................... 2.55
2·2/
8X9X HARDWARE DESIGN INFORMATION
OVERVIEW lems due"tQ vQltage drQPs acrQSS the wiring. There
shQuld be no. measurable vQltage difference between
This chapter Qf the manual is devoted to' the hardware VSSI and VSS2. The two. VSS pins and the ANGND pin
eng1neer. All Qf the infQrmatiQn yQU need to' CQnnect must all be nQminally at 0 volts. The maximum current
the CQrrect pin to' the CQrrect el\.ternal circllit is provid- drain Qf 'the 8X9X is arQund 180 rnA, with all lines
ed. Many Qf the special functiQn pins have different unlQaded.
characteristics which are under sQftware cQntrQI.
TherefQre, it is necessary to' define the system cQmplete- When the analQg CQnverter is being used, clean, stable
ly befQre the hardware is wired-up .. PQwer must be prQvided to. the analQg sectiQn Qf the
chip to. assure highest accuracy. To. achieve this, it may
Frequently within this chapter a specificatiQn fQr a cur- be desirable to. separate the analQg PQwer supply frQm
rent, vQltage, Qr time period is referred to.; the values the digital PQwer supply. The VREF pin supplies the
prQvided are to. be used as an apprQximatiQn Qnly. The digital circuitry in the A/D CQnverter and prQvides the
el\.act specificatiQn can be fQund in the latest data sheet ~ -VQlt reference to' the analQg PQrtion of the converter.
fQr the particular device and temperature range that is VREF and ANGND must be cQnnected even if the
being used. A/D cOllverter is not used. More infQrmation Qn the
analQg PQWer supply is in SectiQn 3.1. '
This chapter is written abQut 8X9XBH, 8X9XJF, and
8X98 devices. These devices are generically referred to.
as the 8X9X. All infQrmatiQn in this chapter refers to. 1.2 Other Needed Connections
the 8X9XBH, the 8X9XJF, and the 8X98 unless Qther-
wise nQted. Several Qther. cQnnectiQns are needed to' cQnfigure the
8X9X,. In nQrmal QperatiQn the fQllQwing pins shQuld
be connected to' the indicated PQwer supply.
1.0 REQUIRED HARDWARE
CONNECTIONS Pin Power Supply
NMI Vee
AlthQugh the 8X9X is a single-chip microcQntrQller, it
still requires several ~xternal cQnnectiQns to. make it
EA Vee (to allow internal execution)
wQrk. PQwer must be applied, a clQck SQurce pwvided, Vss (to forCe external execution)
and SQme fQrm Qf reset circuit~y must be present. We
will lQQk at each Qf these areas Qf circuitry separately. AlthQugh the EA pin has an internal pulldQwn, it is
Figure 6 shQWS the CQnnectiQns that are needed fQr a best to' tie this pin to' the desired level. This will prevent
single-chip system. induced nQise from disturbing the system. Raising EA
to' + 12.75 VQlts will place an 8X9X in a special Qperat-
ing mQde desigped fQr programming and program
1.1 Power Supply Information memQry verification (see SectiQn 10). .
PQwer fQr the 8X9X flQWS thrQugh six pins. They are:
three PQsitive vQltage pins-Vee (digital), V REF (PQrt 1.3 Oscillator Information
o digital I/O and A/D PQwer), VPD(PQWer dQwn
mQde), and three CQmmQn returns-two. Vss pins and The 8X9X requires a clock SQurce to Qperate. This
Qne ANGND pin. All six Qf these pins must be CQn- clQck is provided to' the chip through the XTALI in-
nected Qn the 8X9X fQr nQrmal' QperatiQn. The Vee put. The (requency Qf QperatiQn is from 6 MHz to'
pin, VREFPin and VPD pinshQuld be tied to. 5 VQlts. 12 MHz.
The two. Vss pins and the ANGND pin must be
grounded. When the analQg to. digital CQnverter is being The Qn-chip circuitry for the 8X9X Qscillator is a single
used it may be desirable to. CQnne.ct the VREF pin to. a stage linear inverter as shQwn in Figure 1. It is intended
separate'PQwer supply, Qr at least a separate PQwer sup- fQr use as a crystal-contrQlled, positive reactance Qscil-
ply line. lator with external connectiQns as shown in Figure 2.
-In this application, the crystal is being Qperated in its
The three CQmmo.n return pins shQt/ld b~ cQnnected at fundamental response mode as an inductive reac-
the chip with as shQrt a lead as PQssible to. aVQid prob-
2-3
inter 8X9X HARDWARE DESIGN INFORMATION
tance in parallel resonance with shunt capacitartce e~ should be specified for parallel resonance with 25 pF
ternal to the crystal. load capacitance, if C1 and C2 are 30 pF.
The crystal specifications and capacitance values (Cl An external oscillator may encounter as much as a
and C2 in Figure 2) are not critical. Thirty picofarads 100 pF load at XTALl when it starts up. This is due to
can be used in these positions at any frequency with interaction between the amplifier and its feedback ca-
good quality crystals. For 0.5% frequency accuracy, pacitance,'Once the external signal meets the VIL and
the crystal frequency can be specified at series reso- VIH specifications the capacitance will not exceed
nance or for parallel resonance with any load capaci- 20pF.
tance. (In other words, for that degree of frequency I
accuracy, the load capacitance simply doesn't matter.) A more in-depth,discussion of crystal specifications and
For 0.05% frequency accuracy the crystal frequency the selection of vall,les for C1 and C2 can be found in
the Intel Application Note, AP-155, "Oscillators for
Microcontrollers."
TO DIVIDER CIRCUITRY
Vee
To drive the 8X9X with an external clock'source, apply
the external clock signal to XTALl and let XTAL2
float. An example of this circuit is shown in Figure 3.
The required voltage levels on XTALI are specified in
the data sheet. The signal on XTALl must be clean
with good solid levels.'
DIVIDER CIRCUITRy
DIVIDER CIRCUITRY
Vee
Vee Q3 !
Q1
Vee
XTAL1 XTAL2
XTAL2 5K ,FLOAT
270246-3
30 pf .,.. 30pf
270246-2 Figure 3. External Clock Drive
Figure 2. Crystal Oscillator Circuit
2-4
8X9X HARDWARE DESIGN INFORMATION
XTAL1
lONE STATE TIME
PHASE A
(CLKOUT)
PHASE B
PHASE C
a.c
PHASE
I LJ LJ 270246-4
ALE/ ADV
\ .w S~r-- _ pt?'''m
U U
ADBUS----------------~
2-5
inter 8X9XHARDWARE DESIGN INFORMATION
XTAL
- I+- Start Time from Power Supply Rise to External Output Low
I11111111 11111111111111111111111111111111111111111111111111111111III111111111111111111111111
,
-
RESET -I ~
"
External to Internal
Release Time
r---I--
HSO.O-HSO.3,
P2.0, P2.S
10 STATE TIMES
PORT 3 8c <I
WITH PULLUPS IADDRESS~ ADDRESS I
2018H CCB 2080H
- FIRST BUS FETCH CYCLE PROGRAM
TRLPV = 10 XTAL CYCLES START
External RESET Low to
Port Valid TIme RESET FUNCTION REGISTERS
I
270246-44
270246-7 270246-40
NOTES:
1. These capacitors are needed only if A to D is used.
2. VREF & ANGND may be connected to the same traces as the digital power supply if the A to D is not used.
2·6
inter 8X9X HARDWARE DESIGN INFORMATION
The 8X9X RESET pin can be used to allow other chips A capacitor directly connected to RESET cannot be
on the board to make use of the Watchdog Timer or the used to reset the device if the pin is to be used as an
RST instruction. When this is done the reset hardware output. If a large capacitor is used, the pin will pull-
should be a one-shot with an open collector output. The down more slowly than normal. It will continue to pull-
reset pulse going to the other devices may have to be down until the 8X9X is reset. It could fall so slowly
buffered and lengthened with a one-shot, since the that it never goes below the internal switch point of the
RESET low duration is only one state. If this is done, it reset signal (I to 1.5 volts), a voltage which may be
is possible that the 8X9X will be reset and.start running above the guaranteed switch point of external circuitry
before the other devices· on the board' are out of reset. connected to the pin. A circuit example is shown in
The software must account for this possible problem. Figure 7.
8X9X
OTHER
CIRCUITRY
(1)
lOOK
'/. 74SL06
OR
270246-8
NOTE: ,
1. The diode will provide a faster cycle time repetitive power-on-resets.
2-7
inter 8X9X HARDWARE DESIGN INFORMATION
1.5 Sync Mode resetting the Watchdog Timer in software will not clear
the flip-flop which keeps the RESETpulldown on.
If RESET is brought high at the same time as or just
after the rising edge 'Of XTALl, the device will start The pulldown is capable of sinking on the order of 30
executing the 10 state time RST instruction exactly 6'/. milliamps if it is held at 2.0 volts. This amount of cur-
XTALl cycles later. This feature can be used to syn- rent may cause some long term reliability problems due
chronize several MCS-96 devices. A diagram of a typi- to IDealized chip. heating. For this reason, devices that
cal connection is shown in Figure 8. It should be noted will be used .in production should never have had the
that devices that start in sync may not stay,that way, WatchdDg Timer over-ridden for more than a second or
due to propagation delays which may cause the syn- two.
chronized devices to receive signals at slightly different
times. Whenever the reset pin is being pulled high while the
pulldown is on, it should be through a resistor that will
limit the voltage on RESET to 2.5 volts and the current
1.6 Disabling the Watchdog Timer through the pin to 40 milliamps.
The Watchdqg Timer will pull the RESET pin low If it is necessary to disable the Watchdog Timer for
when it overflows. See Figure 9. If the pin is being more than a brief test the software solution of never
externally held above the low going threshold, the pull- initiating the timer should be used. See Section 14 in
down transistor will remain 'On indefinitely. This means the Architecture Chapter.
that 'Once the watchdog overflows, the device must be
reset or RESET must be held high indefinitely. Just
270246-9 .
RESET
8X9X CHIP
PIN
RESET
WATCHDOG TIMER
OVERFLOW
RESET INSTR\JCTION
(OFFH)
270246-10
1.7 Power Down Circuitry the depletion pullup holds the line at a logical '1' state.
The low-impedance pullup is used to shorten the rise
Battery backup can be provided on the 8X9X with a 1 time of the pin, and has current source capability on the
rnA current drain at 5 volts. This mode will hold loca- order of 100 times that of the depletion pullup.
tions OFOH through OFFH valid as long as the power to
the VPD pin remains on. The required timings to put While the depletion mode pullup is the only device on,
the device into power-down and an overview of this the pin may be used as an input with a leakage of
mode are given in Section 2.3 in the 8X9X Archite,cture around 100 microamps from 0.45 volts to Vee. It is
Chapter. ideal for use with TTL or CMOS chips and may even
be used directly with switches. However if the switch
A 'key' can be written into power-down RAM while option is used, certain precautions should be taken. It is
the device is running. This key can be checked on reset important to note that any time the pin is read, the
to determine if it is a start-up from power-down or a value returned will be the value on the pin, not the
complete cold start. In this way the validity of the pow- value placed in the control register. This could cause
er-down RAM can be verified. The length of this key logical operations made directly on these pins to inda-
determines the probability that this procedure will vertently write a 0 to pins being used as inputs. In order
work, however, there is always a statistical chance that to perform logical operations on a port where a quasi-
the RAM will power up with a replica of the key. bidirectional pin is an input, it is necessary to guarantee
that the bit associated with the input pin is always a one
Under most circumstances, the power-fail indicator when writing to the port.
which is used to initiate a power-down condition must
come from the unfiltered, unregulated section of the
power supply. The power supply must have sufficient 2.2 Quasi-Bidirectional Hardware
storage capacity to operate the 8X9X until it has com- Connections'
pleted its reset operation.
When using the quasi-bidirectional ports as inputs tied
to switches, series resistors may be needed if the ports
2.0 DRIVE AND INTERFACE LEVELS will be written to internally after the device is initial-
ized. The amount of current sourced to ground from
There are five types of I/O lines on the 8X9X. Of these, each pin is tyically 20 rnA or more. Therefore, if all 8
two are inputs and three are outputs. All of the pins of pins are tied to ground, 160 rnA will be sourced. This is
the same type have the same current/voltage character- equivalent to instantaneously doubling the power used
istics. Some of the control input pins, such as XTALI by the,chip and may cause noise in some applications.
and RESE'f, may have slightly different characteristics.
These pins are discussed in 'Section 1. This potential problem can be solved in hardware or
software. In software, never write a zero to a pin being
While discussing the characteristics of the I/O pins used as an input.
some approximate current or voltage specifications will
be given. The exact specifications are available in the In hardware, a 1K resistor in series with each pin will
lastest version of the data sheet that corresponds to the limit current to' a reasonable value without impeding
device being used. the ability to override the high impedance pull up. If all
8 pins are tied together a 120n resistor would be rea-
sonable. The problem is not' quite as severe when the
2.1 Quasi-Bidirectional Ports inputs are tied to electronic devices instead of switches,
as most external pUlldowns will not hold 20 rnA to 0.0
The Quasi-Bidirectional pins of Port 1, Port 2.6, and volts. .
Port 2.7 have both input and output port cpnfigura-
tions. They have three distinct states; low impedance Writing to a QuaSi-Bidirectional Port with electronic
current sink (Q2), low impedance current source (QI), devices attached to the pins requires special attention.
and high impedance current source (Q3). As a low im- Consider using P1.0 as an input and trying to toggle
pedance current sink, the pin has specification of sink- P 1.1 as an output:
ing up to around 0.5 rnA, while staying below 0.45
volts. The'pin is placed in this condition by writing a '0' ORB IOPORTl. #OOOOOOOlB ~ Set Pl.O
to the SFR (Special Function Register) controlling the for input
pin. XORB IOPORTl. #OOOOOOlOB Complement
PI'; 1
Examine Figure 10. When the SFR contains a '0' and a
'1' is written to it, QI (a low impedance MOSFET pull-
up} is turned on for ,one state, then it is turned off and
2-9
8X9X HARDWARE DESIGN INFORMATION
PORT 1
PORT 2.6. PORT 2.7
PORT
PIN
READ
PORT
270246-11
C!-~
TYPICAL
4V OV OV 2V 4V
VOH VOH Vol
270246-12
NOTE:
These graphs show typical pin capabilities. they are not guaranteed specifications
The first instruction will work as expected but two The first situation can best be solved by the external
problems can qccur when the second instruction exe- driver design. A series resistor between the port pin and
cutes. The first is that even though PI. I is being driven the base of the transistor often works by bringing up
high by ,the 8X9X it is possible that it is being held low the voltage present on the port pin. The second case can
externally. This typically happens when the port pin is be taken care of in the software fairly easily:
used to drive the base of an NPN transistor which in
turn drives whatever there is in the outside world which LDB AL, IOPORTI
needs to be toggled. The base of the transistor will XORB AL, #OlOB
clamp the port pin to the transistor's Vbe above ORB AL, #OOIB
ground, typically O.7V. The 8X9X will input this va,lue STB AL, IOPOR~l
as a zero even if a one has b,een written to the port pin.
When this happens the XORB instruction will always A software solution to both cases is to keep a byte in
write a one to the port pin's SFR and the pin will not RAM as an image.of the data to be output to fhe port;
togglt;. any time the software,wants to modify the data on the
port it can then modify the image byte and copy jt to
The seCond proplem, which is related to the first, is that the port.
if Pl.O happens to be driven to a zero when Port I is
read by the XORB instruction, then the XORB will , If a switch is used on a long line connected to a quasi,
write a zero, to Pl.O and it will no longer be useable as bidirectional pin, a' pullup resistor is recolWllended to
an input. reduce the possibility 6f noise glitphes and to decrease
2-10
8X9X HARDWARE DESIGN INFORMATION
the rise time of the line. On extremely long lines that 2.4 Open Drain Ports
are handling slow signals, a capacitor may be helpful in
addition to the resistor to reduce noise. Ports 3 and 4 on the 8X9X are open drain ports. There
is no pullup when these pins are used as 110 ports.
These pins have different characteristics when used as
2.3 Input Only Ports bus pins as described in the next section. A diagram of
the output buffers connected to Ports 3 and 4. and ·the
The high impedance input pins on the 8X9X have an bus pins is shown in Figure 11.
input leakage of.a few microa~ps and are predominant-
ly capacitive loads on the order of 10 pF. When Ports 3 and 4 are to be used as inputs, or as bus
pins, they must first be written with a '1'. This will put
Port 0 pins are special in that they may individually be the ports in a high impedance mode. When they are
used as digital inputs, or as analog inputs. A Port 0 pin used as outputs, a pullup resistor must be used external-
being used as a digital input acts as the high impedance ly. The sink. capability of these pins is on the order of
input ports just described. However, Port 0 pins being 0.8 milliamps so the total pullup current to the pin
used as analog inputs are required to provide current to must be less than this. A 15K pullup resistor will
the internal sample capacitor when a conversion begins. source a maximum of 0.33 milliamps, so it would be a
This means that the input characteristics of a pin will reasonable value to choose if no other circuits with
change if a conversion is being done on that pin. See pullups were connected to the pin.
Section 3. In either case, if Port 0 is to be used as analog
or digital 110, it will be necessary to provide power to
this port through the VREF pin.
vcc
DATA
IN
BUS OUTPUT
ENABLE
PORT DATA
270246-19
.-P-
BUSPULLUP BUS PULLDOWN PORT PUL.LDOWN
BUS BUS, P1, P2 BUS, P1, P2
25mA
VOH
e e'
.9 30 mA
10mA
OV 2V
VOL
4V
.9 15 mA
5mA
OV 2V
VOL
4V
270246-20
NOTE:
These graphs show typical, pin capabilities, they are not guaranteed specifications.
2-11
8X9X' HARDWARE Da::SIGN'INFORMATION
2.5 HSO Pins, ControlOutputs and generated with either the chip's PWM output or HSO
Bus Pins unit. This se<;:,tion describes the analog input sugges-
tions. See Section 4 for analog output.
The control outputs and HSO pins have output buffers
with the same output characteristics as those of the bus The 8X9X's Integrated AID converter includes an
pins. Included in the category of control outputs are: eight channel analog multiplexer, sample-and-hold cir-
TXD, RXD (in Mode 0), PWM, CLKOUT, ALE, cuit and lO-bit analog to digital converter (Figure 12).
BHE, RD, and WR. The bus pins have 3 states: output The 8X9X can therefore select one of eight analog in-
high, output low, and high impedance input. As a high puts to convert, sample-and-hold the input voltage and
output, the pins are specified to source around 200 /-tA convert the voltage into a digital value. Each conver-
to 2.4 volts, but the pins can source on the order of ten sion takes 22 microseconds, including the time required
times that value in order to provide the fast rise times. Jor the sample-hold (with XTALI "" 12 MHz). The
When, used as a low output, the pins can sink around method of conversion is successive approximation.
2 mA at 0.45 volts, and considerably more as the volt-
age increases., When in the high impedance state, the Section 3.5 contains the definitions of numerous terms
pin acts as a capacitive load with a few microamps of used in connection with the AID converter.
leakage. Figure II shows the internal configuration of a
bus pin.
VREF
START
CONVERSION
270246-13
2-12
inter 8X9X HARDWARE DESIGN INFORMATION
3.1 AID Overview The total number of state times required is 88 for a
IO-bit conversion. Attempting to short-cycle the IO-bit
The conversion process is initiated by the execution of conversion process by reading AID results before the
RSO command OFR, or by writing a one to the GO Bit done bit is set is not recommended.
in the AID Control Register. Either activity causes a
start conversion signal to be sent to the AID converter
control logic. If an HSO command was used, the con- 3.2 AID Interface Suggestions
version process will begin when Timer 1 increments.
This aids applications attempting to approach spectral- ThCl. external interface circuitry to an analog input is
ly pure sampling, since successive samples spaced by highly dependent upon the application, and can impact
equal Timer 1 delays will occur with a variance of converter characteristics. In the external circuit's de·
about t 50 ns (assuming a stable clock on XT AL 1). sign, important factors such as input pin leakage, sam-
However, conversions initiated by writing a one to the ple capacitor size and mllitiplexer series resistance from
ADCON register GO Bit will start within three state the input pin to the sample capacitor must be consid-
times after the instruction has completed execution re- ered.
sulting in a variance of about 0.75 J.l.s (XTALl =
12 MHz). For the.-8X9X, these factors are idealized in Figure 13.
The external input circuit must be able to charge a sam-
Once the AID unit receives a start conversion signal, ple capacitor (Cs) through a series resistance (RI) to an
there is a one state time delay before sampling (sample accurate voltage given a D.C. leakage (IL). On the
delay) while the successive approximation register is re- 8X9X, Cs is around 2 pF, RI is around 5 KO and IL is
set and the proper multiplexer channel is selected. Af- specified as 3 J.l.A maximum. In determining the neces-
ter the sample delay/the multiplexer output is connect- sary source impedance Rs, the value of VBIAS is not
ed to the sample capacitor and remains connected for important.
four'state times (sample time). After this four state time
"sample window" closes, the input to the sample capac-
~t-yI>
itor is disconnected from the multiplexer so that chang-
es on the input pin will not alter the stored charge while
the conversion is in progress. The comparator is then
auto-zeroed and the conversion begins. The sample de-
lay and sample time uncertainties are each approxi-
..:..
mately t 50 ns, independent of clock speed.
VB1A:L
To perform the actual analog-to-digital conversion the
8X9X implements a successive approximation algo- 270246-14
rithm. The converter hardware consists of a 256-resis-
Figure '13. Idealized AID Sampling Circuitry
tor ladder, a comparator, coupling capacitors 'and a
IO-bit successive approximation register (SAR) with
External circuits with source impedances of 1 KO or
'Iogic that guides the process. The resistor ladder pro·
less will be able to maintain an input voltage within a
vides 20 mV steps (VREF = 5.12V), while capacitive
tolerance of about to.61 LSB (1.0 KO x 3.0 J.l.A
coupling is used'to create 5 mV steps within the 20 mV
= 3.0 mY) given the D.C. leakage. Source impedances
ladder voltages. Therefore, 1024 internal reference volt-
above 2 KO can result in an external error of at least
ages are available for comparison against the analog
input to generate a IO-bit conversion result. one LSB due to the voltage drop caused by the 1 J.l.A
leakage. In addition, source impedances above 25 KO
may degrade converter accuracy as a result of the inter-
A successive approximation conversion is performed by
n~1 sample capacitor not being fully charged during the
comparing a sequence of reference voltages, to the ana-
log input, in a binary search for the reference voltage 1 J.l.s (12 MHz clock) sample window.
that most closely matches the input. The '/. full scale
If large source impedances degrade converter accuracy
reference voltage is the first tested. This corresponds to
because the sample capacitor is not charged during the
a 10·bit result where the most significant bit is zero,
sample time, an external capacitor connected to the pin
and all other bits are ones (011 U 111.11 b). If the ana·
log input was less than the test vbltage, bit 10 of the will compensate for this degradation. Since the sample
capacitor is 2 pF, a 0.005 J.l.F capacitor will charge the
SAR is left a zero, and a new test voltage of '/. full scale
(00 11.1111.11 b) is tried. If this test voltage was lower sample capacitor to an accurate input voltage of to.S
LSB(2048 X 2 pF). An external capacitor does not
than the analog input, bit 9 of the SAR is set and bit 8
is cleared for the next test (0101.1111.11b). This binary compensate for the voltage drop across the source re-
sistance, but charges the sample capacitor fully during
search continues until 10 tests have occurred, at which
time the valid IO-bit conversion result resides in the the sample time.
SAR where it can be read by software.
2-13
8X9X HARDWARE DESIGN INFORMATION
Placing an external capacitor on each analog input will Note that if only ratiometric information is desired,
also reduce the sensitivity to noise, as the capacitor VREF can be connected to V. In addition, VREF and
combines with series resistance in the external circuit to ANGND must be connected even if the AID converter
form a low-pass filter. In practice, one should include a is not being used. Remember that Port 0 receives its
small series resistance prior to the external capacitor on power from the VREF and ANGND pins even when it
the analog input pin and choos~ the largest capacitor is used as digital 1/0.
value practical, given the frequency of the signal being
converted. This provides -a low-pass filter on the input,
while the resistor will also limit input current during 3.4 The AID Transfer Function
over-voltage conditions.
The conversion result is a lO-bit ratiometric representa-
Figure 14 shows a simple analog interface circuit based tion of the input voltage, so the numerical value ob-
upon the discussion above. The circuit in the figure also tained from the conversion will be:
provides limited protection against over-voltage condi-
tions on the analog input. Should the input voltage in- INT [1023 x (VIN - ANGND)/(VREF - ANGND)].
appropriately drop significantly below ground, diode
D2 will forward bias at about 0.8 VDC. Since the speci- This produces a stair-stepped transfer function when
fication of the pin has an absolute maximum low volt- the output code is plotted versus input voltage (see Fig-
age of -0.3V, this will leave about 0.5V across the ure 15). The resulting digital" codes can be taken as
270n transistor, or about ~ mA of current. This should simple ratiometric information, or they can be used to
limit the current to a safe amount. However, before any provide information abou't absolute voltages or relative
circuit is used in an actual application, it should be thor- voltage changes on the inputs. The more demanding
oughly analyzed for applicability to the specific problem the application is on the AID converter, the more im-
at hand. portant it is to fully understand the converter's opera-
tion. For simple applications, knowing the absolute er-
ror of the converter is sufficient. However, closing a
VREF servo-loop with analog inputs ll,ecessitates a detailed
understanding of an AID converter's operation and er-
01 rors.
FROM USER CIRCUIT ::>--....---'WIr-_.rlI ANALOG
INPUT PIN
The errors inherent in an analog-to-4igital conversion
02 process are many: quantizing error; zero offset; full-
o scale error; differential non-linearity; and non-linearity.
These are "transfer function" errors related to the AID
ANGNO converter. In addition, cOhverter temperature drift,
270246-15 . Vee rejection, sample-hold feedthrough, multiplexer
off-isolation, channel-to-channel matching and random
Figur, 14. Suggested AID Input Circuit
noise should be considered,. Foitunately, one "Absolute
!?rror" specification is available which describes the
sum total of all deviations between the actual conver-
3.3 Analog. References sion process and an ideal converter. However, the vari-
Reference supply levels strongly influence the absolute ous sub-componenfs of error are important in many
accuracy of the conversion. For this reason, it is recom- applications. These error components are described in
mended that the ANGND pin be tied to the two Vss Section 3.5 and in the text below where ideal and actual
pins as close to the chip as possible with minimum trace I
converters are compared.
length.' Bypass capacitors should also be used between
VREF and ANGND. ANGND should be within about An unavoidable error simply results from the conver-
a tenth of a volt Vss. VREF should be well regulated sion of a continuous voltage to an integer digital repre-
and used only for the AID converter. The VREF supply sentation. This error is called quantizing error, and is
can be between 4.5V and 5.5V and needs to be able to always ± 0.5 LSB. Quantizing err~r is the only error
source around 5 mAo Figure 6 shows all of these cdn- seen in a perfect AID converter, and is obviously pres-
nections. ent in actual converters. Figure 15 sho~s the transfer
function for an ideal 3-bit AID converter (i.e. the Ideal
Characteristic).
2-14
inter 8X9X HARDWARE DESIGN INFORMATION
Note that in Figure 15 the Ideal Characteristic possess- only. A converter is monotonic if every subsequent
es unique qualities: it's first code transition occurs when code change represents an input voltage change in the
the input voltage is 0.5 LSB; it's full-scale code tran- same direction.
sition occurs when the input voltage equals the full-
scale reference minus 1.5 LSB; and it's code widths are Differential Non-Linearity and Non-Linearity are
all exactly one LSB. These qualities result in a digitiza- quantified by measuring the Terminal Based Linearity
tion without offset, full-scale or linearity errors. In oth- Errors. A Terminal Based Characteristic results when
er words, a perfect conversion. an Actual Characteristic is shifted and rotated to elimi-
nate zero offset and full-scale error (see Figure 17). The
Figure 16 shows an Actual Characteristic of a hypo- Terminal Based Characteristic is similar to the Actual
thetical 3-bit converter, which is not perfect. When the . Characteristic that would be seen ifzero offset and full-
Ideal Characteristic is overlaid with the imperfect char- . scale error were externally trimmed away. In practice,
acteristic, the actual converter is seen to exhibit errors this is done by using input circuits which include gain
in the location of the first and final code transitions and and offset trimming. In addition, VREF on the 8X9X
code widths. The deviation of the first code transition could also be closely regulated and trimmed within the
from ideal is called "zero offset", and the deviation of specified range to affect full-scale error.
the final code transition from ideal is "full-scale error".
The deviation of the code widths from ideal causes two Other factors that affect a real AID Converter system
types of errors. Differential Non-Linearity and Non- include sensitivity to temperature, failure to completely
Linearity. Differential Non-Linearity is a local linearity reject all unwanted signals, multiplexer channel dissim-
error measurement, whereas Non-Linearity is an over- ilarities and random noise. Fortunately these effects are
all linearity error measure. small.
Differential Non-Linearity is the degree to which actual Temperature sensitivities are described by the rate at
code widths differ from the ideal one LSB width. Dif- which typical specifications change with a change in
ferential Non-Linearity gives the user a measure of how temperature.
much the input voltage may have changed in order to
produce a one count change in the conversion result. Undesired signals come from three main sources. First,
Non-Linearity is the worst case deviation of code tran- noise on Vee-Vee Rejection. Second" input signal
sitions from the corresponding code transitions of the changes on the channel being converted after the sam-
Ideal . Characteristic. Non-Linearity describes how ple window has closed-Feedthrough. Third, signals
much Differential Non-Linearities COUld add up to pro- applied to channels not selected by the multiplexer-
duce an overall maximum departure from a linear char- Off-Isolation.
acteristic. If the Differential Non-Linearity errors are
too large, it is possible for an AID converter to miss Finally, multiplexer on-channel resistances differ slight-
codes or exhibit non-monotonicity. Neither behavior is ly from one channel to the next causing Channel-to-
desireable in a closed-loop system. A converter has no Channel Matching errors, and random noise in general '
missed codes if there exists for each output code a results in Repeatability errors,
unique input voltage range that produces that code
2-15
--
71
6
1 I
5-1 II 0)
)(
CO
)(
'TI :z:
US' ACTUAL CHARACTERISTIC OF >
...
C AN IDEAL A/D CONVERTER :D
...
CD
4
C
~
!"
.... >
Q.
CD
a THE VOLTAGE CHANGE
:D
m
!!!. BETWEEN ADJACENT CODE C
~ l>
.... TRANSITIONS (THE "CODE m
0)
c 3 =
WIDTH") IS 1 LSB,
en
0 is
..
:::T
III
Z
Z
-...
III
n "TI
0
-
CD
:D
iii" 2 s:
('j' >
~
0Z
1~ I
FIRST CODE TRANSITION OCCURS
WHEN THE APPLIED VOLTAGE IS
EQUAL TO 1/2 LSB,
0 1
1/2 2 3 4 5 6 61/2 7 B
- --1 ER~
fULL SCALE ERROR I l
6
I CHARACTERISTIC
IDEAL I
5 ABSOLUTE ERROR ~
~ CIt
!!
><
CD
'g
... ~ ~ CHARACTERISTIC
ACTUAL I ><
:::t
CD
-"
:a-
!» :D
C
» 4
~
c: Q
~
:D
!!!.
III m
::s C
~ a. ~-
m
...... a::CD en
!!!. is
z
9 Z
...
III
."
-...
III
()
CD
in
o:D
!!:
!:!:
() - ~
III
S
z
- ~ ZERO OFFSET I
1/2 2 3 4 5
ACTUAL
CHARACTERISTIC C»
5 ><
.., co
><
6c r '" -J TERMINAL BASED :z:
i1
CHARACTERISTIC
»lJ
.....
:"I C
- 4
~ ~
35" Q lJ
I\) \I) "'
o
m
.:.. Di
0) \I) !!!
3
io .C)
z
:T NON-LINEARITY z
...
\I)'
\I). --~
g. :u-
,CD 2 3:-
i0" ~
(5
:z
IDEAL CODE WIDTH
CODE WIDTH-The voltage corresponding to the NON-LINEARITY -The maximum deviation of code
difference between two adjacent code transitions. transitions of the terminal based characteristic from the
corresponding code transitions of the ideal characteris-
CROSSTALK-See "Off-Isolation". tics.
2-19
8X9X HARDWARE DESIGN INFORMATION
SAMPLE tIME-The time that the sample window is In most cases this filtering is best done after the signal
open. is buffered to make it swing from 0 to 5 volts since both
of the outputs are guaranteed only to TTL levels. A
S~PLE TIME UNCERTAINty-The variation in block diagram of the type of circuit needed is shown in
tlte sample time: Figure 18. By proper selection of components, account-
ing for temperature and power supply drift, a highly
SAMPLE WINDOW-Begins when the sample capac- accurate 8-bit D,to A converter can be made using ei-
itor is attached to a selected channel and ends when the ther the HSO or the PWM output. Figure 19 shows two
sample capaCitor is disconnected from the selected typical circuits. If the HSO is used the accuracy could
channel. be theoretically extended to 16-bits, however the tem-
perature and noise related problems wouid be extreme-
SUCCESSIVE APPROXIMATION-An AID con- ly hard to handle.
version method which uses a binary search to arrive at
the best digital representation of an analog input. When driving some circuits it may be desirable to use
unfiltered Pulse Width Modulation. This is particularly
TEMPERATURE COEFFICIENTS-Change in the true for motor drive circuits. The PWM output can be
stat~ variable per degree centigrade temperature used to generate these waveforms if a fixed period on
change. Temperature coefficients are added to the typi- the order of 64 J.ts is acceptable. If this .is not the case
cal values of a specification to see the effect of tempera- then the HSO unit can be used. The HSO can generate
ture drift. a variable waveform with a duty cycle variable in up to
65536 steps and a period of up to 131 milliseconds.
Both of these outputs produce TTL levels.
BUFFER
8X9X TO MAKE
FILTER
HSO
OR
PWM
OUTPUT
SWING
RAIL
TO
RAIL
(PASSIVE
OR
ACTIVE)
(OPTIONAL)
POWER
AMP
(OPTIONAL) - ANALOG
OUTPUT
270246-21
. 2-20
inter 8X9X HARDWARE DESIGN INFORMATION
Vcc
* 1/2 VQ3001P
6
270' 5.1~
PWM----~VV~---- __ .-____~~__--~.-----ANALOG
8
OUT
270246-22
'This resistor limits rise time to. reduce
spikes & high frequency noise.
8X9X
HSO R HIGH ANALOG
,OR ~---I ~~----~~----~r-------~ IMPEDANCE OUTPUT
PWM AMP
. CD4049
5.0 1/0 TIMINGS during Phase B every eight state times. From an exter;
nal perspective the' HSO pin should change just prior to
The lIO pins on the 8X9X are sampled and changed at the rising edge of CLKOUT arid be stable by its falliI'lg
specific times within ll-n instruction cycle. The changes . edge. Information from the HSO can be latched on the
occur relative to the internal phases sjJ.own in Figure 4. CLKOUT falling edge. Internal events can occur any-
Note that the delayrrom XTALI to the internal clocks time during the 8 state time window.
range from about 30 ns to lOP ns over process and
temperature. Signals generated by internal phases are Timer 2 is synchronized to increment no faster than
further delayed by 5 ns to is ns. The timings shown in Timer I, so there will always be'at least one increment-
this section are idealized; no propagation delay factors ing of Timer I, while Timer 2 is at a specific value.
have been taken into account. Designing a system that
depends on an I/O pin to change within a window of
less than SO ns using the information in this section is 5.2 HSI Input Sampling.
not recommended.
The HSI pins are sampled internaUy once each state
time. Any value on these pins must remain stable for at
5,,1 HSO Outputs least 1 full state time to guarantee that it is recognized.
The actual sample occurs at the end of Phase A, which,
Changes in the HSO lines are synchronized to Timer 1. . due to propagation delay, ,is just after the rising edge of
All of the external HSO lines due to change at a certain CLKOUT. Therefore, 'if information is to be synchro-
value of a timer will change just pior to the increment- nized to the HSI it should be latched-in on CLKOUT
ing of Timer 1. This corresponds to an internal change
2-21
intJ 8XQX,HARDWARE DESIGN INFORMATION
falling. The time restriction applies even if t\le divide by the rest of the 8X9X so that information can be passed
eight mode is being used. If two events occur on the back and forth.
same pin within the same 8 state time wil).dow, only one
of the events will be recorded. If the events occur on The baud rate generator is clocked by either XTALI or
different pins they will always be 'reco~ded, regardless T2CLK. Because T2CLK needs to be synchronized to
of the time difference. The 8 state time window, (Le. the the XTALl signal its speed must be limited to '/'6 that
amount of time during which Timer 1 remains, con- of XTAL I. The serial port will not function during the
stant), is stable to within about 20, ns. The window time between the consecutive writes to the baud rate
starts roughly around the rising edge of CLKOUT, register. Section 11.4 of the 8X9X Architecture chapter
however this timing is very approximate due to the discusses programming the baud rate generator.
amount of internal circuitry involved.
6.1 Mode 0
5.3 Standard I/O Port Pins
Mode 0 is the shift register mode. The TXD pin sends
Port 0 is different from the other digital ports in that it out a clock train, while the RXD pin transmits or re-
is actually part of the A/D converter. The port is sam- ceives the data. Figure 20 shows the waveforms and
pled once every state time, however, sampling is not timing. Note that the port starts functioning when a '1'
synchronized to Timer 1. If this port is used, the input is written to the REN (Receiver Enable) bit in the serial
signal on the pin must be stable one state time before port control register. If REN is already high, clearing
the reading of the SFR. the RI flag will start a reception.
Port 1 and Port 2 have quasi-bidirectional I/O pins. In this mode the serial port can be used to expand the
When used as inputs the data on these pins must be I/O capability of the 8X9X by simply adding shift reg-
stable one state time prior to reading the SFR. This isters. A schematic of a typical circuit is shown in Fig-
timing is also valid for the input-only pins of Port 2 and ure 21. This circuit inverts the data coming in, so it
is similar to the HSI in that the sample occurs just after must be reinverted in software. The enable and latch
the rising edge of CLKOUT. When used as outputs, the connections to the shift registers can be driven by de-
quasi-bidirectional pins will change state shortly after coders, rather than directly from the low speed I/O
CLKOUT falls. If the change was from '0' to a '1' the ports, if the software and hardware are properly de-
low impedance pullup will remain on for one state time signed.' ,
after the change. '
The serial port on the 8X9X was'designed to be com- The TI (Transmit Interrupt) and RI (Receive Inter-
patiblewith the 8051 serial port. Since the 8051 uses a rupt) flags are set to indicate when operations are com-
divide by 2 clock and the 8i\9X uses,a divide by 3, the plete. TI is set when the last data bit of the message has
serial port on the 8X9X had to be provided with its been sent, not when the stop bit is sent. If an, attempt to
own clock circuit to maximize its compatibility with send another byte is made before the stop bit is sent the
the 8051 at high baud rates. This means that the serial port will hold off transmission until the stop bit is com-
port itself does not krlow about state times. There is plete. RI is set when 8 data bits are received, not when
circuitry whiCh is synchronized to the serial port and to the stop bit is received. Note that when the serial port
status register is read both TI and RI are cleared.
2-22
inter 8X9X HARDWARE DESIGN INFORMATION
TXD
RXD(OUTj DO D1 D2 D3 04 05 De D7
'DO D1 D2 D3 '04 os De D7
AXD(INI
EXPANDED:
XTAL1~~
TXD ~~;---.
AXD(OUT) - - - - - ( DO c: D1 ~
DO 01
AXD(INI -t:::J----!~
270246-24
CLOCK INHIBIT
---=------jpx.x
15K
DATA
>O-t"-------1 RXD
'--__t--__...,.......:C.:;cLO:..:C.:.;,K, TXD
INPUTS ..
OUTPUTS
ENABLE
1:>-----1 PX.X
270246-25
Caution should be used when using the serial port to 7.0 BUS TIMING AND MEMORY
connect more than two devices in half-duplex, (i.e. one INTERFACE
wire for transmit and receive). If the receiving proces-
sor does not wait for one bit time after .Rris set before
starting to transmit, the stop bit on the link could be 7.1 Bus Functionality
squashed. This could cause a problem,Jor other devices
listening on the link.. . The 8X9X has a multiplexed (address/data) bus which
can be dynamically configured to have an 8-bit or 16-
bit data width. There are control lines to demultiplex
6.3 Mode 2 and 3 Timings the bus (ALE or ADV), indicate reads (RD), indicate
writes (WRL and WRH, or WR with BHE and ADO),
Modes 2 and 3 operate in a manner similar to that of and a signal to indicate accesses that are for an instruc-
Mode I, The only difference is that the data is now tion fetch (INST). Section 3.5 of the 8X9X Architec-
made up of 9 bits, so II-bit packages are transmitted ture chapter contains an overview of the bus operation.
and received. This means that TI and RI will be set on
the 9th data bit rather than the 8th. The 9th bit can be
used for parity or multiple processor communications
(see Section 11 of the 8X9X Architecture chapter).
2-23
8X9X HARDWAREDESIG,N INFORMATION
7.2 Timing Specifications number of inserted wait states is equal to the limit set in
the Chip Configutatidn Register (see Section 2 of the
Figure 22 shows the timing of the bus signals and data MCS-96 Architecture chapter). There is a maximum'
lines. Please refer to the latest data sheet for the exact time that the READY line can be held low without
device you are using to ensure that your system is de- risking a processor malfunction due to dynamic nodes
signed to the proper specifications. The major timing that have not been refreshed during the wait states.
specifications are described in Figure 23. This time is shown ~s TYLYH in the data sheet.
XTAL1
CLOCKOUT
READY
-- ...,--------.-
,
----------_.-
,
'----------
.NOTES:
1. 8-bit bus only.
2. 8-bit or 16-bit bus and write strobe mode selected.
3. When ADV selected.
4. 8-bit or 16-bit bus and no write strobe mode selected.
2-24
8X9X HARDWARE DESIGN INFORMATION
no requirement as to when READY may go high, as If a wait state is inserted, READY is internally latched
Ions- as the maximum READY low time (TYLYH) is on the next rising edge of Phase A. If a 1 is found the
not violated. To ensure that only one wait state is in- bus cycle resumes with the net impact being the inser-
serted it is necessary to provide external circuitry which tiQn of one wait state. If a 0 is seen, a second wait state
brings READY high TLLYH after the falling edge of is inserted. '
ALE!ADV, or program the Chip Configuration Regis-
ter to select a Ready Control limit of one. The READY pin is again latched on the next rising
edge of CLOCKOUT if two wait states were inserted.
Internally, the chip latches READY on the first falling If the chip Sees a I, the bus cycle is resumed with the
edge of Phase A after ALE/ADV falls. Phase A is buff- result being an insertion of two wait states. If another 0
ered and brought out externally as CLOCKOUT, so is seen, a third wait state is inserted in the bus cycle and
CLOCKOUT is a delayed Phase A., If a i 'is seen, the the READY pin is again latched on the following rising
, bus cycle proceeds uninterrupted with no wait state in- edge of CLOCKOUT. If internal Ready Control is not
sertions. If a 0 is seen, one wait state (3 Tosc) is insert- used, the READY line must at this point be a I to
ed. - ensure proper operation. -
TLLYV-ALE/ADV low to READY low: Maxi- TRLDV-READ low to DATA valid: Maximum
mum time after ALE/ADV falls until READY'must time that the memory has to output data after READ
be valid. If this time is exceeded the device could mal- goes low. Nominally, a maximum of 3 Tosc periods.
function necessitating a chip reset. Nominally '2 TOsc
periods. TRHD~READ high to DATA float: Time after
READ is high until the memory must float the bus.
TCLYX":'READY hold after CLOCKOUT low: The memory signal can be removed as soon as READ
Minimu~ time that the value on the READY pin is not low, and must be removed within the speci~ed
must be valid after CLOCKOUT falls. The minimum maximum time from when READ is high. Nominally
hold time is always zero nanoseconds. a maximum of I Tosc period.
TYLYH-READY low to READY high: Maximum TRHDX-DATA hold after READ goes high: Milti-
time the part can be in the not-ready state. If it is mum time that memory must hold input DATA valid
exceeded, the 8X9X dynamic nodes which hold the after RD is high., The hold time minimum is always
current instruction may 'forget' how to finish the in- zero nanqseconds.
struction. '
TRLAZ-READ low to ADDRESS float: This is the
TAVDV-ADDRESS valid to DATA valid: Maxi- bus control specifying the time from an active-low
mum time that the memory has to output valid data READ signal until the 8X9X ADDRESS drivers for
after the 8X9X outputs a valid address. Nominally, a the cy~le are off the bus. This is specified in order fdr
maximum of 5 Tosc periods. data to be returned from the memory system without
bus contention. TypicallY,this is 0 ns for no bus,con-
TAVGV-ADDRESS valid to BUSWIDTH valid: tention, However, up to 10 ns is acceptable in sys-
Maximum time after ADDRESS becomes valid until tems.
BUSWIDTH must be valid. Nominally less than 2
Tosc periods. - '
Figure 23. Timing Specification Explanations
2-25
intJ 8X9X HARDWARE DESIGN INFORMATION
Timings the 8096 Will Provide that proper memory decoding takes place before it is
output enabled. Nominally 2 Tosc periods.
T0HCH-XTALl high to CLOCKOUT high: Delay
from the rising edge of Xl'ALl to the resultant rising TRLRH-READ low to READ high: RD pulse
edge on CLOCKOUT. Needed in systems where the width, nominally I Tosc period.
signal driving Xl' ALl is also used as a clock for ex-
ternal devices. Typically 50 to 100 nanoseconds. TRHLH-READ high to ALE/ADV high: Time be-
tween RD going inactive and next ALE/ADV, also
TCHCH-CLKOUT high to CLKOUT high: The used to calculate time between RD inactive and next
period of CLKOUT and the duration of one state ADDRESS, valid. Nominally I Tosc period.
time. Always 3 Tosc average, but individual periods
could vary by a few nanoseconds. TRHBX--':REAQ high to INST, BHE, ADS-IS In-
active: Minimum time that the INST ·and BHE lines
TCHCL-CLKOUT high to CLKOUl' low: Nomi- will be valid after RD goes high. Also the minimum .
nally I Tosc period. time that the upper eight address lines (S-bit bus
mode) will remain valid after RD goes high. Nomi-
TCLLH-CLKOUT low to ALE high: A help in d!l- nally 1 Tosc.
riving other timings. Typically plus or minus 5 ns to
10 ns. TWHBX-WRITE high to INST, BHE, ADS-15
Inactive: Minimum time that the INST and BHE
TCLVL-CLOCKOUT low to ALE/ADV low: A lines will be valid after WR goes high. Also the mini-
help in deriving other timings. Nominally I Tosc. mum time that the upper eight address lines (S-bit bus
mode) will remain valid after WR goes high. Nomi- '
TLLCH-ALE/ADV low to CLKOUT high: Used nally I Tosc.
to derive other timings, nominally 1 Tosc period.
TWLWH-WRITE low to WRITE high: Write
TLHLL-ALE/ADV high to ALE/ADV low: pulse width, nominally 3 Tosc periods.
ALE/ADV high time. Useful in determining ALE/
ADV rising edge to ADDRESS valid time. Nominal- THLHH-WRL, WRH low to WRL, WRH high:
ly 1 Tosc period for ALE and 1 Tosc for ADY: with Write strobe signal pulse width. Nominally 2 Tosc
back-to-back bus cycles. periods.
TA VLL-ADDRESS valid to . ALE/ADY low: TQVHL-,OUTPUT valid to WRL, WRH low: Min-
Length of time ADDRESS is valid before ALE/ADV imum time that OUTPUT data is valid prior to write
falls. Important timing for address latch circuitry. stro1;>es becoming active. Needed for interfacing to
Nominally I Tosc period. memories that read data on the falling edge of write.
Nominally I Tosc.
TLLAX-ALE/ADV low to ADDRESS invalid:
Length of time ADDRESS is valid after ALE/ADV TQVWH-OUTPUT valid to WRITE J!!Ih: Time
falls. Important timing' for address latch circuitry. that the. OUTPUT data is valid before WR is high.
Nominally I Tosc period. Nominally 3 Tosc periods.
TLLRL-ALE/ADV low to READ or WRITE low: TWHQX-WRITE high to OUTPUT not valid:
Length of time after ALE/ADV falls before RD or Time that the OUTPUT data is valid after WR is
WR fall. Could be needed to ensure that proper mem- high. Nominally I Tosc period.
ory decoding takes place before it is.output enabled.
Nominally I Tosc period. TWHLH-WRITE high to ALE/ADV high: Tune
I '. ,
between write high and next ALE/ADV, also used to
TLLHL-ALE/ADV low to WRL, WRH low: Min- calculate the time between WR high and next AD-
imum time after ALE/ADV is low that the write DRESS valid. Nominally 2 Tosc periods.
strobe signals will go low. Could be needed to ensure
Figure 23. Timing Specification Explanations (Continued)
. )
2-26
8X9X HARDWARE DESIGN INFORMATION
7.41NST Line Usage bus mode, or one 74LS373 for an 8X9X in 8-bit bus
mode. As explained in Section 3.5 of the 8X9X Archi-
The INST (Instruction) line is high during bus cycles tecture chapter, the latched address signals will be re-
that are for an instruction fetch and low for any other ferred to as MAO through MAl5 (Memory Address),
bus cycle. The INST signal (not present on 48-pin ver- and the data lines will be called MOO through MDl5
sions) can be used with a logic analyzer to debug a (Memory Data).
system. In this way it is possible to determine if a fetch
was for instructions or data, making the task of tracing Since the 8X9X can make accesses to memory for ei-.
the program much easier. . ther bytes or words, it is necessary to have a way of
determining the type of access desired when the bus is
l6-bits wide. For write cycles, the signals Write Low
7.5' BUSWIDTH Pin. Usage (WRL) and Write High (WRH) are provided. WRL
will go low during all word writes and during all byte
The BUSWIDTH pin is a control input which' deter- writes to an even location. Similarly, WRH will go low
mines the width of the bus access in progress. . during all word writes and during all byte writes to an
BUSWIDTH is sampled after the rising edge of the first odd loc~tion. During read cycles, an 8X9X in l6-bit
CLOCKOUT after ALE!ADV goes low. If a one is bus mode will always do a word read of an even loca-
seen, the bus access progresses as a l6-bit cycle. If a tion. If only one byte of the word is needed, the chip
zero is seen, the bus access progresses as an 8-bit cycle. discards the byte it does not need.
The BUSWIDTH setup and hold timing requirements
appear in the data sheet. Since 8X9X memory accesses over an 8-bit wide bus
are always bytes, only one write strobe is needed for
The BUSWIDTH pin can be overridden by causing the write cycles. For this purpose the WRL signal was
BUS WIDTH SELECT bit in the Chip Configuration made to go low for all write cycles during 8-bit bus
Register (CCR) to be zero. This will permanently select accesses. When a word operation is requested, the bus
an 8-bit bus width. However, if the BUS WIDTH SE- controller performs two byte-wide bus cycles.
LECT bit in the CCR is a one, the BUSWIDTH pin
determines the bus width. See Section 3.5 of the 8X9X In many cases it may be desirable to have a write signal
Architecture chapter. Since the BUSWIDTH pin is not with a longer pulse width than WRL/WRH. The Write
available on 48-pin or 64-pin devices, the BUS WIDTH (WR) line of the 8X9X is an alternate control signal
SELECT bit in the CCR determines bus width. . that shares a pin with WRL and is only available in
l6-bit bus mode. WR is nominally one Tosc longer
than the WRL/w,RH signals, 'hut goes low for any
write cycle. Therefore it is necessary to decode for the
7.6 Address Decoding type o'1:.vvrite (byte or word) desired.
The multiplexed bus of the 8X9X must be demulti-
plexed before it can be used. This can be done with two The Byte High Enable (BHE) signal and MAO can be
74LS373 transparent latches for an 8X9X in l6-bit used for this purpose. BHE is an alternate control
Vee
BHE--------------~
WRITE HIGH
ALE - - - - I ~~--D
270246-27
Figure 24. Decoding WR and SHE to Generate WriteLow and Write High
2-27
8X9X HARDWARE DESIGN INFORMATION
signal that shares a pin with WRH. When.BHE is low, External memory systems for the ,8X9X can be set up
the high byte of the 16-bit bus is enabled. When MAO is in many ways. Figures 25 through 28 show block dia-
low,- the lower byte is enabled. When MAO is low and grams of memory systems using an 8-bit bus with a
BHE is low, both bytes are enabled. Figure 24 shows single EPROM, using an 8-bit bus with RAM and
how to use WR, BHE and MAO to decode bus accesses. EPROM, using a 16-bit bus with two external
It's important to note that this decoding inserts a delay EPROMs and using a 16-bit bus in a RAM and ROM
in the write signal which must be considered in a sys- system. (The timings for the systems shown are opti-
tem timing analysis. mized for 10 MHz operation.)
- -
RD OE
ADS-IS HIGH ADDRESS
DATA
8X9X
ADO-7
I ~
74LS
3'73
EPROM
LOW ADDRESS
ADV
""r-~ cs
\
OPTIONAL IF
LATCHED EPROM
IS USED
270246-28
ADIS
CS CS
ADV
OE OE WE
RD
WR
270246-29
2-28
/ '
270246-30
BUSWIDTH
AD8-1S
EPROM RAM
ADV r~;;~::JDATA
ADO-7 LOW ADDRESS
8X9X
270246-31
2-29
8X9X HAfU)WAflE,DESIGN INFORMATION
.I '
7.7 I/O Port Reconstructlpn It is also recommended that unused areas of code be
filled with NOPs and periodic jumps to an error routine
When a single-chip system' is being designed using 'a or RST (reset chip) instructions. This is particularly
multiple chip system as a prototype, it may be neces- , important in the code around lookup tables, since if
sary to reconstruct 1/0 Ports j and 4 !'ising a: memory- lookup tables ,are executed all sorts of bad things can
mapped 1/0 technique. The circuit shown in Figure 30 ' happen. Wherever space allows, each table should be
provides this function. It can be attached to a 8X9X surrounded by 7 NOPs (the longest 8X9X instruction
system which has the required address decoding and has 7 bytes) and a RST or jump to error routine in-
bus demultiplexing. struotion. This will help to ensure a speedy recovery ,
should the proceSsor have a glitch in the program flow.
The output circuitry is basically just a latch that oper-
ates when IFFEH or IFFFH are placed on the MA Many hardw~e' ,solutions exist for keeping PC board
lines. The inverters surrounding the latch create an noise to a plinimum. Ground planes, gridded ground
open-collector output tQ' emulate the open-drain output and Vee structures, bypass papacitors, transient ab-
found on the 8X9X. The 'reset' line is, used to set the, sorbers and power busses with built·in capacitors can
ports to all l's when the 8X9X is reset. It should be , all be,of great help.,It is mucll easier to design a board
noted that the voltage and current characteristics of the with these' features than to try to retrofit them later.
port will differ from those of the 8X9X, but the basic Proper PC board layout is probably the single most
functionality will be the same. important and, unfortunately, least understood aspect
of project design. Minimizing loop areas and induc-
The input circuitFY is just a bus transceiver that is ad- tance, as well as providing clean grounds are very im-
dressed at lFFEH or IFFFH. If the ports are going to portant. More information on protecting against noise
be used for either input or output, but not both, some of can be found in the Application Note AP-125, "Design-
the circuitry can be eliminated. ing Microcontroller Systems for Noisy Environments".
2-30
8X9X HARDWARE DESIGN INFORMATION
MOO-MD7 P3
WRH
74LS
8 8 74LS 8
MD8-MD15 04 P4
(Xl\.'l) 273
CLR
RESET INPUT
ADDR = P3, P4
AD 8
ADO-AD7
ADa-AD15 8
270246-33
Factory
User Programmable
Masked CPU
ROM
EPROM OTP
68-Pln 64-Pln 48-Pin 68-Pln 64-Pin 48-Pin 68-Pin 64-Pin 48-Pin 68-Pln 64-Pin 48-Pin
ANALOG 8397BH 8397BH 8395BH 8097BH 8097BH 8095BH 8797BH 8795BH 8797BH 8797JF
8798
8397JF 8397JF 8398 8097JF 8097JF 8098 8798 8797JF 8797BH
NO ANALOG 8396BH 8X9X
Figure 30. HMOS MCS®96 Packaging
o48-Pin devices have four Analog Input pins. o68-Pin devices have all 48- and 64-pin features plus the following:
oFor ROM/OTP /EPROM devices, 8X9XBH and 8X98 = 8 Kbytes, Dynamic Buswidth sizing (8 or 16 bil"bus)
8X9XJF = 16 Kbytes Dedicated System Clock Output (CLKOUT)
o54-Pin devices have all "48-Pin device features plus the following: INST pin for memory expansion
Four additional Analog Input channels Non-Maskable Interrupt for debugging
One additional Quasi-Bidirectional 8 Bit Parallel Port oPackage Designators:
Four additional Port 2 pins with multiplexed features N = PLCC
Timer 2 Clock Source Pin C = Ceramic DIP
Timer 2 Reset pin A = Ceramic Pin Grid Array
Two additional quasi-bidirectional port pins P = Plastic DIP .
R = Ceramic LCC
U = Shrink DIP
2-31
inter 8X9X HARDWARE DESIGN INFORMATION
10.0 USING THE EPROM When an 879X EPROM device is not being erased, the
window must be covered with an opaque label. This
This section refers to the 879XBH,' 8798, and 879XJF prevents functional degradation and data loss from the
devices. These devices are generically referred to as the array.
879X. All information in this section refers to all three
devices unless otherwise noted.
10.1 Power-Up and Power-Down
879XBH and the 8798 contain 8 Kbytes of ultraviolet
Erasable and electrically Programmable Read Only To avoid damaging devices during programming, fol-
Memory (EPROM). The 879XJF contains 16 Kbytes low these rules:
of EPROM. When EA is a TTL high, the EPROM is RULE #l-Vpp must be within IV of Vee while
located at memory locations 2000H through 3FFFfl on Vee is below 4.SV.
the 879XBH and the 8798. It is at locations 2000H RULE #2- Vpp can not be higher than S.OV until
through SFFFH on the 879XJF.
Vee is above 4.SV.
Applying + 12.7SV to EA when the chip is reset places RULE #3- Vpp must not have a low impedance path
the 879X device in the EPROM Programming Mode: to ground when Vee is above 4.SV.
The Programming Mode supports EPROM program- RULE #4--EA must be brought to 12.7SV before
ming and verification. The following is a brief descrip- Vpp is brought to 12.7SV (not needed for
tion of each of the programming modes: run-time programming).
RULE #S-The PMODE and SID pins must be in
The Auto Configuration Byte Programming Mode . their desired state before RESET rises.
programs the Programming Chip Configuration Byte
and the Chip Configuration Byte. RULE #6- All voltages must be within tolerance and
the oscillator stable before RESET rises.
The Auto Programming Mode enables an 879X to RULE # 7- The supplies to Vee, Vpp, EA and
program itself and up to IS other .879X·s. RESET must be well regulated and free
of glitches and spikes.
The Slave Programming Mode provides a standard
interface to program any number of 879X's by a mas- To adhere to these rules you can use the following pow-
ter device such as an EPROM programmer or anoth- er-up and power-down sequences:
er 879X.
EA == 12.7SV(2)
PMODE Programming Mode
0-4 Reserved Vpp = 12.75V(3)
5 Slave Progr~mming Mode WAIT (wait for supplies and clock to settle)
6 ROM Dump Mode
RESET = 5\1,
7-0BH Reserved
OCH Auto Programming Mode WAIT Tshll (see data sheet)
ODH Program Configuration. Byte BEGIN
OEH-OFH Reserved
Figure 31. Programming Function PMODE Values
8X9X HARDWARE DESIGN INFORMATION
~gg:~~~~ ~~~-----------,
PROGRAIIIIING
VOLTAGE
8797BH
270246-34
2-33
8X9)( HARDWARE DESIGN INFORMATION
10.3 Auto Configuration Byte they did not. Programming takes approximately
250 ms. Figure 34 shows a minimum configuration for
Programming Mode Auto Configuration Byte Programming.
The Programming Chip Configuration Byte (PCCB)is
a'non-memory mapped EPROM location. It gets load- Once the CCB and PCCB are programmed, all pro-
ed into the CCR during reset fo~ auto and slave pro- gramming activities and bus operations use the selected
gramming. The Auto Configuration Byte Programming bus width, READY control, bus controls, and READ/
Mode programs the PCCB. WRITE protection until you erase the device. You
must be careful when programming the READ and
The Chip Configuration Byte (CCB) is at location WRITE lock bits in the CCB and PCCB. If you enable
2018H and can be programmed like any other EPROM the,READ and WRITE lock bits in'the CCB or the
location using auto, slave arid run-time programming. PCCB and then reset the device, the array may no long-
However, you can also use the Auto Configuration er be programmed or verified (see Figure 41 in Section
Byte Programming to program the CCB when no other "10.7.1). Therefore, you should program the buswidth,
locations need to be programmed. The CCB' is pro- READY control, and bus controls using the Auto Con-
grammed with the same value as the PCCB. figuration Byte Programming Mode. You should pro-
gram the READ and WRITE lock bits when all pro-
The Auto Configuration Byte Programming Mode is gramming is complete.
entered by following the power-up sequence described
in Section 10.1 with PMODE = ODH, Port 4 = If tb,e PCCB is not programmed, the CCR will be load-
OFFH, and Port 3 = the data to be programmed into ed with OFFFI:I when the device is in the Programming
the PCCB and CCB. When a 0 is placed on PALE, the Mode.
CCB and PCCB are automatically programmed with
the data on Port 3. After programming, PVER is driv- Specific requirements for CCB and PCCB program-
en high if the bytes programmed correctly and low if ming are included in the Auto, Slave, and Run-time
Programming sections.
Vee
BINARY
u '
SWITCH
PO'
PO.S PMOOE = ODH
PO.S
POA P2.2
vpo
r----+-IRESET
vREF 1--....- - - -...
..--~~-INMI SVoe
47 p.F
ANGNO Vee 1+-'---.
Vss l
Vss2 XTALl XTAL2 Pi.l Ho-+-+----+PALE
...........;.;.;r:;.;-....;.;.;:r;;:;.._...1
~PUSH TO
fVPROGRAM
270246-39
NOTES:
1. Tie Port 3 to the value desired to be programmed into CCS, and PCCS.
2. Make all necessary minimum connections for power, ground and clock.
2-35
8X9X HARDWARE DESIGN INFORMATION
10.4 Auto Programming Mode Auto Programming must be done ill 8·bir bus mode. -
For 68L devices you must tie the BUSWIDTH pin to
The Auto Programming Mode 'provides the ability to ground. You do not need to program the/buswidth se-
program the 879X EPROM without using an EPROM lection bit in the PCCB (PCCB.1).For '48L and 64L
programmer. For this mode follow the power-up se- devices there is no BUSWIDTH pin. You must pro-
quence described in Section lO.1 with PMODE = gram PCCB.I using the Auto ,Configuration Byte Pro-
OCH. When RESET rises, the 879XBH and 8798 devic- gramming Mode before programming the array.
es automatically program themselves with the' data
found' at external locations 4000H through 5FFFH. The data in the PCCB takes effect upon reset. If you
The 879XJF programs itself with tile data found at ex- enable either the READ or WRITE lock bits during
ternallocations 4000H through 7FFF. Figure 35 shows Auto Programming but do not reset the device, Auto
a minimum configuration for using an 8K x 8 EPROM , Programming will continue. If you enable either the
to program one 879X in the Auto Programming Mode. READ or WRITE lock bits and then reset the device,
the device will no longer program or verify. You should
The 879X reads a word from external memory, then program these bits when, no more programming will be
the Modified Quick-Pulse Programming™ Algorithm done.
(described later) is used to program the appropriate
EPROM location. Since the erased state of a byte is 10.4.2 GANG PROGRAMMING WITH THE AUTO
OFFH, the Auto Programming Mode will skip loca- PROGRAMMING MODE
tions where,the data to be programmed is OFFH. When
all 8K of the 879XBH and 8798 and all 16K of the An 879X in the Auto Programming Mode can also be
879XJF has been programmed, PACT goes high and used as a programmer for up to 15 other 879XBHs that
the devices outputs a 0 on Port 3.0 (PV AL) if it pro- are configured in the Slave Programming Mode.
grammed correctly and a I if it failed. The 879K acts as the master .. The master programs the
slaves witjl the same data the master is programming
10.4.1. AUTO PROGRAMMING MODE AND THE itself with. The master outputs the necessary slave com-
eeB/peeB mand/data pairs on Ports 3 and 4. It also provides the
Slave ALE (SALE) and Slave PROG (SPROG) signals
In the Auto Programming Mode the CCR is loaded to demultiplex the commands from the data. Figure 36
with the PCCB. The PCCB must correspond to the is a block diagram of a gang programming system using
memory system of the programming setup, including one 879XBH in the Auto Programming Mode. The
the READY and bus control selections. You can pro- Slave Programming Mode is described in the next sec-
gram the PC9B using the Auto c<;mfiguration Byte tion.
Programming Mode (see Section lO.3).
ADDRESS 15
Intel
ADDRESS 8" '15 2764A"2
PORT.
PO'~
po.s PNODE =OCH
PO.S AlE 1--_1--1
po••
+5V
8797BH
lOOK
...........--+--1 RESET
The master 879X reads a word from the external mem- commands b~ing given to the slaves after each pro-
ory controlled by ALE, RD and. WR. It then drives gramming pulse.
Ports 3 and 4 with a Data Program command using the
appropriate address and alerts the slaves with a falling When programming is complete PACT goes high and
edge on SALE. Next, the data to be programmed is Ports 3 and 4 are driven with all Is if all devices pro-
driven onto Ports 3 and 4 and slave programming be- grammed correctly. Individual bits of Port 3 and 4 will
gins with.a falling edge on SPROG. At the same time, be driven to 0 if the slave with that bit number as an
the master begins to program its own EPROM location SID did not program correctly. The 879X used as the
with the data read in. Intel's Modified 'Quick-Pulse master assigns itself an SID' of O.
Programming™ Algorithm is used, with DataYerify
r
r-----------.,
_1-
I _________ ., I
I I
I
I I
HSLSID = <OFH
i '_ ..I
I
HSLSID=2
HSLSID =I
intel
2764A-2
Vee
1'--------1 C
PO,
PO.4
U
PO.6 PMODE = OCH
PO.5
.
ALE
+5V'
EA 1-----012.75 Voe
8797BH Vpp 1-----012.75 Voe
lOOK
Vpo
VREF
RESET
P2.1
NMI'
BUSWIDTH' P2.2
ANGND
Vee
Vss
Vss
XTAL1 XTAL2
PVAL.O = 0 = PASS
PVAL.l }
,l. =0= FAIL
PVAL.15
270246-36
NOTES: .
'EA and VPP on slaves must be at + 12.75 Vdc. Each slave's PMODE must equal 05H. Ports 3 and 4 should have
pull ups to vee. Minimum configuration connections must also be made for slaves. A 10 MHz clock is recommended for
the slaves.
1..Allow RESET to rise after the voltages to Vee, EA, and VPP are stable.
Figure 36. Gang Programming with the Auto Programming Mode
2-37
inter 8X9X HARDWARE ,DESIGN INFORMATION
PALE
\ ...._~--I
PROG
2-38
inter 8X9X HARDWARE DESIGN INFORMATION
DATA VERIFY COMMAND-When the Data Verify giving each chip being programmed a unique SID. The
Command is sent, the slaves indicate correct or incor- master programmer can then issue a data verify com-
rect verification of the previous Data Program by driv- mand after the data program command. When a verify
ing one bit of Ports 3 and 4. A 1 indiclltes correct verifi- command is seen by the slaves, each will drive one pin
cation, while a 0 indicates incorrect verification. The of Port 3 or 4 with a 1 if the programming verified
SID (Slave ID Number) of each slave determines which correctly or a 0 if programming failed. The SID of each
bit of Ports 3 and 4 is driven. PROG from the program- slave determines which Port 3, 4 bit it is assigned. An
mer governs when the slaves drive the bus. Figure 38 879X in the Auto Programming Mode could be the
shows the relationship of Ports 3 and 4 to PALE and master programmer if 15 or fewer slaves need to be
PROG. programmed (see Gang Programming with the Auto
Programming Mode).
The data verify command is always preceded by a Data
Program Command in a programming system with as 10.5.3 SLAVE PROGRAMMING MODE AND THE
many as 16 slaves. Howev~r, a Data Verify Command CCB/PCCB
does not have to follow every Data Program Com-
mand. . Devices in the Slave Programmng Mode use Ports 3
and 4 as the command/data path. The data bus is not
. WORD DUMP COMMAND-When the Word used. Therefore, you do not need to program either the
Dump Command is issued, the 879X being pro- CCB or the PCCB before starting slave programming.
grammed adds 2000H to the address field of the com-
mand and places the value found at the new address on You can program the CCB during slave mode pro-
Ports 3 and 4. For example, when the slave receives the gramming like any other location. Data programmed
command#0100H, it will place the word found at lo- into the CCB takes effect upon reset. If you enable ei-
cation 2100H on Ports 3 and 4. PROG from the pro- ther the READ or WRITE lock bits in the CCB and do
grammer governs when the slave drives the bus. The not reset the device, slave programming will continue.
signals are the same as shown in Figure 22. If you enable either the READ or WRITE lock bits-
and do reset the device, the device will no longer pro-
Note that this command only works when a single slave gram or verify. You should program the READ and
is attached to the bus, and that there is no restriction on WRITE lock bits using slave programming when the
commands that precede or follow it Word Dump Com- array is fully programmed and verified.
mand.
10.6 Run-Time Programming
10.5.2 GANG PROGRAMMING WITH THE
SLAVE PROGRAMMING MODE Using Run-Time programming, the 879X can program
itself under software control. One byte or word can be
Gang programming of 879Xs can be done using the programmed instead of the whole array. The only addi-
Slave Programming Mode. There is no.879X based lim- tional requirements are that you apply a programming
it on the number of chips that may be hooked to the voltage to Vpp and have the ambient temperature at
same Port 31P0rt 4 data path for gang programming. 25°C. Run-time programming is done with EAat a
TTL high (internal memory enabled).
If more than 16 chips are being gang programmed, the
PVER and PDO outputs of each chip can be used for To run-time program the user writes a byte or word to.
verification. The master programmer can ·issue a' data the location to be programmed. The 879X will continu-
program command and then either watch every chip's ally program that location until another data read or
. error signals, or AND all the signals together to get a data write to the EPROM occurs. The user must con-
system PVER and PDO. o trol the duration of the programming pulse by imple-
menting the Modified Quick-Pulse Programming Algo-
If 16 or fewer 879Xs are to be gang programmed at
rithm (see Section 10.8) in software.
once, a more flexible form of verification is available by
2-39
I'
Figure 39 is an example of code for programming an EPROM. If the program is executing from external
EPROM location while the device is executing internal- memory no, program fetches or pre-fetches ,will occur
ly. Upon entering the PROGRAM routine, the device from internal memory.
retrieves the address and data from the STACK. A
software 'timer is set to expire after one programming
pulse. The 879X starts programming a location by writ- 10.6.1 RUN-TIME PROGRAMMING AND THE
ing to it. The device then goes into a "Jump to SelF' CCB/PCCB
loop while the location is programmed. ("Jump to SelF' For run-time programming, the CCR is loaded with the
is a two byte instruction which can be CALVed from CCB. Run-time programming is done with EA equal to
address 20IAH.) When the software timer interrupt oc- a TTL-high (internal execution) so the internal CCB
curs, the device escapes from the "Jump to SelF' loop, must correspond to the memory system of the applica-
ending the programming pulse. The minimum interrupt tion setup. You can use Auto Configuration Byte Pro-
service routine would remove the 20lAH return ad- gramming or a generic programmer, to program the
dress from the STACK and' return. CCB before using run-.time programming.
. Once you start programming a location, you should not The CCB can ~lso be programmed during Run-Time
perform any program fetches or pre-fetches from the Programming like any other EPROM iocation.
EPROM. The fetches will be done but programming
will stop. Using the "Jump to SelF' prevents this from
, . \ happening because addtess 20lAH is n~t part of the
PROGRAM:
POP temp ;take parameters from the
STACK
POP address_temp
POP data_temp
PUSH temp
POPF
RET
EiwtO_expired:
POP 0
RET
2-40
inter 8X9X HARDWARE DESIGN INFORMATION
Dllta programmed into the CCB hikes effect upon reset. on the 879XBH and the 8798 and locations 2000H-
If the WRITE lock bit of the CCB is enabled the array SFFFH on the 879XJF) from inadvertant or unautho-
can no longer be programmed. You should only pro- rized programming. It also prevents writes to the
gnim the WRITE lock bit when no further program- EPROM from upsetting program execution. If write
ming will be done to the array. If the READ lock bit is protection is not enabled, a data write to an internal
enabled the array can still be programmed using run- EPROM location will begin programming that loca-
time programming 1>ut data accesses will only be per- tion, and continue programming the location until a
formed when the program co.unter is between 2000H data access of the internal EPROM is executed. While
and 3FFFH on the 879XBH and the 8798 and between programming, instruction fetches from internal
2000H and SFFFH on the 879XJF. EPROM will not be successful and programming will
stop.
10.7 ROM/EPROM Program Lock READ protection is selected by causing the LOCI bit
in the CCR to take the value O. When READ protec-
Protection mechanisms have been provided on the tion is enabled, the bus controller will only perform a
ROM and EPROM versions of the 8X9X to inhibit data read from the address range 2020H-3FFFH ifthe
unauthorized accesses of internal program memory. slave program counter is' in the range 2000H-3FFFH
However, there must always be ,a way to allow autho- on the 879XBH and the 8798. The bus controller will
rized program memory dumps for testing purposes. only perform a data read from the address range
The following describes 8X9X lock features and the 2020H-SFFFH if the slave program counter is in the
mode provided for authorized memory dumps. range 2000H-SFFAH on 879XJF. Note that since the
slave PC can be many bytes ahead of the CPU program
counter, an instruction that is located after address
10.7.1 LOCK FEATURES
3FFAH may not be allowed to access protected memo-
Write protection is provided for EPROM devices while ry, even though the instruction is itself protected.
READ protection is provided for both ROM and
EPROM devices. ' If the bus controller receives a request to perform a
READ of protected memory, the READ sequence oc-
Write protection is enabled by causing the LOCO bit in curs with indeterminant data being returned to the
the CCR to take the value O. When WRITE protection CPU.
is selected, the bus controller will cycle through the
write sequence, but will not actually drive data to the Figure 41. shows the effects of enabling the READ and
EPROM and will not enable Vpp to the EPROM. This WRITE lock bits.
protects the enti,re EPROM (locations 2000H-3FFFH
Figure 41
2-41
8X9X HARDWARE DESIGN IN'FORMATION
Other enhancements were also made. to the 8X9X for Table 2. 8X9XBH Signature Words
program protection. For example, the value of EA :is
latched on reset so that the device cannot be switched . Device Signature Word
from external to internal execution mode .at run-time. 879XBH 896FH
In addition, if READ protection is selected, an NMI 839XBH 896EH
event will cause the device to switch to 'external ol)ly Undefined
809XBH
execution mode. Internal execution can only resume by
879XJF 896BH
resCltting the chip.
839XJF 896AH
809XJF Undefined
10.7.2 ROM DUMP MODE
You can use the security key and ROM dump mode to
. dump the internal ROM/EPROM for testing purposes.
10.10 Erasing the EPROM
Initially, and alter each erasure, all bits of the 879X are
The security key is a 16-byte number. The internal in the "1" statel Data is introduced by selectively pro-
ROM/EPROM must contain the security key at loca- gramming "Os" into the desired bit locations. Although .
tions 2020H-202FH. The user must place the same only "Os': will be programmed, both "Is" and "Os" can
secljrity key at external atldress 4020H -402FH. Before be present in the data w9rd. The only way to change a
doing ROM dump, the device checks that the keys "0" to a "1" is by ultraviolet light erasure.
match.
Erasing begins UpOI) exposure to light with wavelepgths
The ROM dump mode is entered by following the shorter than approximately 4000 Angstroms (A). It
power-up sequence described in Section. 10.1 with should be noted that sunlight and certain types of flu~
PMODE = 06H. The device first verifies the security rescent lamps have wavelengths in the 3000-4000 A
keys. If the security keys do not match, the device puts range. Constant exposure to room level fluorescent
itself into an endless loop of internal execution. If the lighting could erase the typical 879X in approximately
keys match, the device dumps data to external locations 3 years, while it would take approximately 1 week to
4OOOH-5FFFH and 9000H-91FFH on the 879XBH cause erasure when exposed to direct sunlight. If the
and the 8798 and to exte~nallocations 4000H - 7FFFH 879X is to be exposed to light for extended periods of
and 9OO0H-937FH on the 879XJF. The data starting time, opaque labels must be placed over the EPROM's
at location 9000H will be indeterminate. The data start- window to prevent unintentional erasure.
ing at location 4oo0H will contain the internal
ROM/EPROM, beginning with internal address The recommended erasure procedure for the 879X is
2oooH. exposure to shortwave ultraviolet light which has a
wavelength of 2537A. The integrated dose (i.e., UV in-
tensity X exposure time) for erasure should be a mini-
10.8 Modified Quick-Pulse mum of 15 Wsec/cm 2. The erasure time with this dos-
Programming™Algorithm age is approximately 15 to 20 minutes using an ultravi-
olet lamp with a 12000 /JoW/cm2 power rating. The
The Modified Quick-Pulse Programming Algorithm 879X should be placed within 1 inch of the lamp tubes
calls for each EPROM location to receive 25 separate during erasure. The maximum integrated dose an 879X
100 /Jos (±5 /Jos) program cycles. Verification of correct can be exposed to without damage is 7258 Wsec/cm2 (1
programming is done after the 25 pulses. If the location week @ 12000 /JoW/cm2). Exposure of.the 879X to high
verifies correctly, the next location is programmed. If intensity UV light for long periOds may cause perma-
the location fails to verify, the location has failed. nent damage.
Once all locations are programmed and verified, the
entire EPROM is again verified. 11.0 QUICK REFERENCE
Programming of 879X devices is done with Vpp -
12.75V ±0.25V and Vee = 5.0V ±0.5V. 11.1 Pin Description
On the 48-pin devices the following pins are not bonded
out: Portl, PortO (Analog In) bits 0-3, T2CLK (P2.3),
10.9 Signature Word T2RST (P2.4), P2.6, P2.7, CLKOUT, INST, NMI,
The' 8X9X contains a signature word at location BUSWIDTH. S-DIP packages do not have INST,
2070H. The word can be accessed in the slave mode by CLKOUT, BUSWIDTH or NMI.
. executing a word dump command (see Table 2).
2-42
inter 8X9X HARDWARE DESIGN INFORMATION
PIN DESCRIPTIONS
Symbol Name and Function
Vee Main supply voltage (SV).
Vss Digital circuit ground (OV). Two pins.
VPD RAM standby supply voltage (5V). This voltage must be present during normal operation. In
a Power Down condition (i.e. Vee drops to zero), if RESET is activated before Vee drops
below spec and VPD continues to be held within spec., the top 16 bytes in the Register File
will retain their contents. RESET must be held low during the Power Down and should not
be brought high until Vee is within spec and the oscillator has stabilized. See Section 2.3.
VREF Reference vOltage for the AID converter (5V). VREF is also·the supply voltage to the analog
portion of the AID converter and the logic used to read Port O. See Section 8.
ANGND Reference ground for the AID converter. Should be held at nominally the same potential as
Vss. See Section 8.
Vpp Programming voltage for the EPROM devices. It should be +12.75V when programming
and will float to SV otherwise. The pin should not be above Vee on ROM or GPU devices..
This pin must flo"at in the application circuit on EPROM devices.
XTAL1 Input of the oscillator inverter and of the internal clock generator. See Section 1.S.
XT~L2 Output of the.oscillator inverter. See Section 1.5.
GLKOUT Output of the internal clock generator. The frequency bf GLKOUT is % the oscillator
frequency. It has a.33% duty cycle. See Section 1.S
RESET Reset input to the chip. Input low for at least 10XTAL1 cycles to reset the chip. The
subsequent low-te-high transition re-synchronizes GLKOUT and commences a 10-state-
time sequence in which the PSW is cleared, a byte read from 2018H loads GGR, and a jump
to location 2080H is executed. Input high for normal operation. RESET has an internal
pullup. See Section 13. '.
BUSWIDTH Input for buswidth selection. If GGR bit 1 is a one, this pin selects the bus width for the bus
cycle in progress. If BUSWIDTH is a 1, a 16-bit bus cycle occurs. If BUSWIDTH is a 0 an
8-bit cycle occurs. If GGR bit 1 is a 0, the bus is always an 8-bit bus. If this pin is left
unconnected, itwillrise to Vee. See Sectron 2.7.
NMI A positive transition causes a vector to external memory location OOOOH. External memory
from OOH through OFFH is re$9rved for Intel development systems.
INST Output high during an external memory read indicates the read is an instruction fetch. INST
"
is valid throughout the bus cycle.
EA Input for memory select (External Access). EA equal to a TTL-high caus~s memory _
~ccesses to locations 2000H through 3FFFH to be directed to on-chip ROM/EPROM. EA
~al to a TTL-low causes accesses to these locations to be directed ,to off-chip memory.
EA = + 12.SV causes execution to begin in the Programming mode on EPROM devices.
EA has an internal pulldown, so it goes to 0 unless driven otherwise.
ALE/ADV Address Latch Enable or Address Valid output, as selected by GGA. Both pin options __
provide a latch to demultiplex the address from the address/data bus. When the pin is ADV,
it goes inactive high at the end of the bus cycle. ADV can be used as a chip select for
external memory. ALE/ ADV is activated only during external memory accesses. See
Section 2.7.
RD Read signal output to external memory. RD is activated only during external memory reads.
2-43
8X9XHARDWARE DESIGN INFORMATION
selects the bank of memory that is connected to the low byte of the data bus. Thus
accesses to a 16-bit wide memory can be to the low byte only (AO = 0, SHE = 1), to the
high byte only (AO = 1, 'SHE # = 0), or both bytes (AO = 0, SHE = 0). If the WRH function
is selected, the pin will go low if the bus cycle is writing to an odd memory location. See
Section 2.7.
READY Ready input to lengthen external memory cycles, for interfacing to slow ,or dynamic memory,
or for bus sharing. If the pin is high, CPU operation continues in a normal manner. If the pin
is low prior to the falling edge of CLKOUT, the Memory Controller goes into a wait mode
until the next positive transition in CLKOUT occurs with READY high. The bus cycle can be
lengthened by up to 1 ,""S. When the external memory is not. being used, READY has no
effect. Internal control of the number of wait states inserted into a bus cycle held not ready
is available through configuration of CCR. READY has a weak internal pullup, so it goes to 1
unless externally pulled low. See Section 2.7.
HSI Inputs to High Speed Input Unit. Four HSI pins are available: HSI.O, HSI.1 , HSI.2, and HSI.3.
Two of them (HSI.2 and HSI.3) are shared with the HSO Unit. The HSI pins are also used as
ihputs by EPROM devices in Programming mode. See Section 6.
HSO Outputs from High Speed Output Unit. Six HSO pins are available: HSO.O, HSO.1, HSO.2,
HSO.3, HSO.4, and HSO.5. Two of them (HSO.4 and HSO.5) are shared with the HSI Unit.
See Section 7.
Port 0 8-bit high impedance input-only port. These pins car be used as digital inputs and/or as
analog inputs to the on-chip AID converter: These pins are also a mqde input to EPROM
devices in the Programming mode. See Section 10.
Port 1 8-bit quasi-bidirectional 110 port. See Section 10.
Port 2 8-bit mUlti-functional port. Six of its pins are shared with other functions in the 8X9X, the
remaining 2 are quasi-bidirectional. These pins are also used to input and output control
signals on EPROM devices in Programming Mode. See Section 10.
Ports 3 and 4 8-bit bidirectional I/O ports with open drain outputs" These pins are shared with the
multiplexed address/ data bus which has strong internal pullups. Ports 3 and 4 are also u~ed
as a command, address and data path by EPROM devices operating in the programming
mode. See Sections 2.7 and 1 0 . ' .
2-44
inter 8X9X HARDWARE DESIGN INFORMATION
2-45
8X9X HARDWARE DESIGN INFORMATION
1'1.3 Packaging
The.MCS-96 products are available in 48-pin, 64-pin and 68-pin packages, with and without AID, and with and
without on-chip ROM or EPROM. The MCS-96 numbering system shown below this section shows the pinouts for
the 48- and 68-pin packages. The 48-pin version is offered in a Dual-In-Line package while the 68-pin versions come
in a Plastic Leaded Chip Carrier (PLCC), a Pin Grid Array (PGA) or a Type uB" Leadless Chip Carrier.
2-46
8X9X HARDWARE DESIGN INFORMATION
":
0
CD N 0
ci ci ci ci ci '" i5
RXO/P2.1 RESET
I~
TXO/P2.0 EXTINT/P2.2 ~~~~~~ ::i ~ ~ ~
'"~ ~ ~
% % % % %
~ ~ ~
HSIO VpD ~
u
~
u <> ~ 1;:1 > > x ~ :>
III 1&1
HSII VREr '" '" '"
HSI2/HS04 ANGNO
HSI3/HS05 ACH4/PO.4 ACH5Il'O.5 ADO/P3.0
HSOO ACH5/PO.5 ACH4/PO.4 AD1/P3.1
HSOI ACH7/PO.7 ANGND AD2/P3.:!
HS02 ACH6/PD.$ VREr AD3/P3.3
HS03 EA VPO 14 AD4/P3.4
MCS<R>-96
Vss Vee EXTINT/~2.2 68 PIN AD5/P3.5
Vpp Vss RffiT PLCC AD6/P3.6
PWM/P2.5 XTALI
RXD/P2.1 17 AD7/P3.7
WRL;WR XTAL2
TXD/P2.0 18 AD8/P4.0
WRH/SHE ALE/ADV TOP VIEW
P1.0 LOOKING DOWN ON AD9/P4.1
READY RD COMPONENT SIDE
~1.1 AD10/P4.2
ADI5/P4.7 ADO/P3.0 OF PC BOARD
P1.2 ADI1/P4.3
ADI4/P4.6 AD1/P3.1
P1.3 ADI2/P4.4
ADI3/P4.5 AD2/P3.2
ADI2/P4.4 AD3/P3.3 P1.4 ADI3/P4.5
270246-45
48-Pin Package
270246-46
270246-47 60 26
TOP VIEW
59 LOOKING DOWN ON 27
COMPONENT SIDE
S8-Pin Package 58
OF PC BOARD
28
270246-48
2-47
inter 8X9X HARDWARE DESIGN INFORMATION
270246-65
Shrink-DIP Package
2-48
intJ 8X9X HARDWARE DESIGN INFORMATION
OFFH ....- - - - - - - - - - - - - , 25 5
POWER-DOWN
OFOH RAM 2 40
OEFH
1-----------, INTERNAL
2
39
REGISTER FILE
(RAM) FFFFH
19H
STACK POINTER STACK POINTER
25 \ 6 OooH
EXTERNAL MEMORY OR I/O 5 FFFH
18H 24
(8X9XBH. 8X98)
17H PWM_CONTROL 23 INTERNAL PROGRAM STORAGE
16H 10Sl 10Cl 22 ROM/EPROM OR EXTERNAL
MEMORY OR I/O (8X9XJF) 4OOOH
15H 10SO lOCO 21
3FFFH
14H 20 INTERNAL PROGRAM
STORAGE ROM/EPROM
13H RESERVED RESERVED 19 OR
12H 18 EXTERNAL MEMORY
2080H
llH SP_STAT SP_CON 17
RESERVED 2030H-207FH
10H 10 PORT 2 10 PORT 2 6
SECURITY KEY 2020H- 202FH
OFH
OEH
10 PORT 1
10 PORT· 0
10 PORT 1
B"'UD_RATE
15
14
\ RESERVED 201CH- 201FH
SELF JUMP OPCOPE (27H FEH) 201AH- 2018H
ODH TlMER2 (HI) 13
RESERVED 2019H
OCH TlMER2 (LO) RESERVED 12
CHIP CONFIGURATION BYTE 2018H
OBH TIMERl (HI) 11
RESERVED 2012H-2017H
OAH
09H
TIMERl (LO)
INLPENDING
WATCHDOG
INLPENDING
10
9
\
INTERRUPT VECTORS
OSH INT_MASK INLMASK 8
2000H
07 H SBUF (RX) SBUF (TX) 7
PORT 4 lFFFH
06 H HSLSTATUS HSO_COMMAND 6
PORT 3 lFFEH
05 H HSLTIME (HI) HSO_TIME (HI) 5
04 H
03 H
HSLTIME (LO)
AD_RESULT (HI)
HSO_TIME (LO)
HSLMODE
4
3
L EXTERNAL MEMORY OR I/O (8X9XBH. 8X98)
XRAM (8X9XJF)
INTERNAL RAM
0100H
OOFFH
02 H AD_RESULT (LO) AD_COMMAND 2 REGISTER FILE
STACK POINTER
01 H RO (HI) RO (HI) 1 SPECIAL FUNCTION REGISTERS
(WHEN ACCESSED AS DATA MEMORY)
00 H RO (LO) RO (LO) 0 OOOOH
(WHEN READ) (WHEN WRITTEN)
270246-49
2-49
inter 8X9X HA~DWARE DESIGN IfI.IFORMATION
2-50
'.
"
Oper- " Flags
Mnemonic Operation (Note 1) Note.
ands Z N C V VT ST
,
JNE 1 JumpifZ = 0 - - ..... - - - 5
JGE 1 Jump if N = 0 - - - - - - 5
JlT 1 JumpifN = 1 - - - - - 5
JGT 1 Jump if N = OandZ = 0 - - - - - - 5
JLE 1 Jump If N = 1 or Z = 1 - - - - - 5
JH 1 JumpifC = 1 andZ = 0 - - - - - -
"
5
JNH 1 JumpifC = OorZ = 1 - - - - - - 5
JV 1 Jump if V = 1 - - - - - - 5
JNV 1 Jump if V = 0 - - - - - - 5
JVT 1 Jump if VT = 1; Clear VT - - - - 0 - 5
JNVT 1 Jump if VT = 0; Clear VT - - - - 0 - 5
JST 1 JumpifST = 1 - - - - - - 5
JNST 1 JumpifST = 0 -,
'- - - - - 5
JBS :3 Jun:tP'if Specified Bit = 1 - '- - - - - 5,6
JBC 3 Jump if Specified Bit = 0 - - - - - - 5,6
OJNZ 1 0 - 0 --1;ifO*Othen
PC - PC + 8-bit offset - - - ..... - - 5
OEC/OECB , 1 0-0-1 ~ ~ ~ ~ t -
NE-G/NEGB 1 0-0-0 ~ ~ ~ ~ t -
INC/INCB 1, 0 - 0+ 1 ~ ~ ~ ~ t -
EXT
EXTB
1
1
0 - p;O + 2 -
0 - 0;0 -Ir 1 -
Sign (0)
Sig'n(O)
~
~
~
~
0
0
0
0
-- -
-
2
3
NOT/NOTB
CLR/CLRB
1
1
o ,- Logical Not (0)
0-0
~
1
~
0
0
0
0
0
-- -
-
SHL/SHLB/SHLL 2 C - msb-----Isb - 0 ~ ? ~ ~ t - 7
SHR/SHRB/SHRL, 2 0 ' - msb-----Isb - C ~ ? -
~ 0 ~ 7
SHRAISHRAB/SHRAL 2 msb - msb--""':-":"'Isb ""'"+ C ~ ~ -
~ 0 ~ 7
SETC 0 C-1 - - 1 - - -
CLRC 9 C-O - -' 0 - - -
CLRVT,
RST
0
0
VT -
~ -
0
2080H
- - - - 0
0 0 0 0 0
-
0 8
01 0 disable All Interrupts (I - 0) - - - - - -
EI 0 Enable All Interrupts (I - 1) - - - - - -
NOP 0 PC-PC+1 - - - - - -
SKIP 0 PC-PC+2 - - - - - -
NORML 2 Le~ shift till msb = 1; 0 - shift count ~ ? 0 - - - 7
TRAP 0 SP - SP - 2; (SP) - PC
PC - (2010H) - - - - - - 9,
NOTES: ,
1. If the mnemonic' ends in "8", a, byte operation is performed, 'otherwise a word operation is done. Operands 0, ,9 and A
must conform to the alignment rules for the required operand type. 0 and 8 are locations in the Register File; A, can be
located anywhere In memory.
5. Offset is a 2's complement number.
6. Specified bit is one of the 2048 bits in the register file.'
7. The "L" (Long) suffix indicates double-word operation.
8. Initiates a Reset by pulling RESET low. Software should re-initialize all the necessary registers with 'code starting at
2080H.
9. The assembler will not accept this mnemonic.
2-51
, '
8X9X HARDWARE DESIGN INFORMATION " 'I' "
'8
Iz
:I
a
A.
0
III
8
~
0
U)
~
III ~I g5
III
Q U)
~fa
... lI
U)):
III
~ ~
0 III
aU)
I!: III
~! ~
III
aU)
~;
~):
111
Q
0,
~
0
U)
~; fa ~;
a@
!ell
_5 ~): 5 ~I=
ARITHMETIC INSTRUcnONS
ADD 2 64 3 4 65 4 5 66 3 6111 ~ ,7112 67 4 61115 7112
,
ADD 3 44 4 5 45 5 6 46 4 71\2 4 Sit 3 47 5 71\26 81\3
i\DDB 2 74 3 4 75 3 4 76 3 6111 3 71\2 77 4 6111 ' 5 7/12
ADDB 3 54 4 5 55 4 5 56 4 71\2 4 8113 57 5 7/12 6 81\3
ADOO 2 ..\4 3 4 AS 4 5 Ai> 3 6111 3 71\2 A7 4 6111 5 7/12
.::,~. ", ADDeB 2 B4 3 4 B5 3 4 B6 3 6111 3 71\2 'B7 4 6111 ' 5 71\2
" .,;"\','
SUB, 2 68 3 4 69 . 5 6A 3 6111 3 7112 6B 4 6111 5 7112
SUB j 48, 4 5 49 '5 6 4A 4 7112 4 8/13 4B 5 71\2 6 81\3
SUBB 2 ,78 3 4 79 j 4 7A 3 '6111 3 7/12 7B 4 6111 5 71\2
SUBB 3 58 4 5 59 4 5 SA 4 7/12 4 81\3 5B 5 71\2 6 81\3
SUBC 2 A8 3 4' A9 4 5 AA 3 6111 3 7/12 AB 4 6111 5 7/12
SUBCB 2 :B~ 3 4 B9 3 4 BA 3 6111 3 1112. BB 4: 6111 5 71\2
CMP 2 88 3 4 89 4 5 8A 3 6111 3 7112 8B 4 6111 5 7112
CMPB 2 98 3' 4 99 3 4 9A 3 6111 '3 '\7112 9B 4 6/11 5 7112
INDIRECT@) INDEXED@)
DIRECT' IMMEDIATE
NORMAL AUTo-INC. SHORT LONG
·z
W !
ere ere ~I ~I
III III III
I
.~
M
z
:I
II:
III
~
~~
0
~re
Ii)~ i~ ~re
Ii)~ I
LOGICAL INSTRUCTIONS
m ~:I m ~:I
III 1i)F= III 1i)F= III e~
m ~ ~~
AND 2 60 3 4 61 4 5 62 3 6111 3 7112.· 63 4 6111 5 7112
AND 3 40 4 5 41 . 5 . 6 42 4 7112 4 8/13 43 5 7112 6 8/13
AN DB ,2 70 3 4 71 3 4 72 3 6111 3 7/12 73 4 6111 5 7/12
ANDB 3 50 4 5 51 ,4 5 52 4 7/12 4 8/13 53 5 7/12 ·6 8113
OR 2 80 3 4 81 4 5 82 3 6111 3 7/12 83 4 6111 5 7/12
ORB 2 90 3 4 91 3 4 92 3 6111 3 7/12 93 4 6111 5 7/12
XOR 2 84 3 4 85 4 5 86 3 6111 3 7/12 87 4 6111 5 7/12
XORB 2 94 3 4 95 3 4 96 3 6111 3 7/12 97 4 6111 5 7/12
DATA TRANSFER INSTRUCTIONS
LD 2 AO 3 '4 AI 4 5 A2 3 6111 3 7/12 A3 4 ·6111 5 7112
LOB 2 BO 3 4 BI 3 4 B2 3 6/11 3 7/12 B3 4 6111 5 7/12
ST 2 CO 3 4 - - . ' - C2 3 7111 3 8/12 C3 4 7/11 5 8/12
STB 2 C4 3 4 - - - C6 3 7/11 3 8/12 C7 4 7111 5 81-12
LOBSE 2 BC 3 4 BD 3 4 BE 3 6111 3 7112 BF 4 6111 S 7112
LOBZE 2 AC 3 4 AD 3 4 AE 3 ~II 3 7/12 AF 4 6111 5 7112
STACK OPERATIONS (Internal stack)
PUSH I C8 2 8 C9 3 8 CA 2 11115 2 12116 CB 3 11i15 4 12116
POP 1 CC 2 12 - - - CE 2 14/18 2 14/18 CF 3 14/18 4 \4118
PUSHF 0 F2 1 ~
POPF 0 F3 I 9
\ STACK OPERATIONS (external stack)
PUSH I C8 2, 12 C9 3 12 CA 2 15119 2 16120 CB 3 15/19 4 16120
. POP 1 ~C 2 14 - - -CE 2 16120 2 16120 CF 3 16120 4 16120
PUSHF 0 F2 1 12 '
POPF 0 F3 I 13
2-53
8X9X HARDWARE DESIGN INFORMATION
CONDITIONAL JUMPS
All conditional jumps are 2 byte instructions. They require 8 state times if the jump is taken, 4 if it is nol,(8)
MNEMONIC OPCODE MNEMONIC OPCODE MNEMONIC OPCODE MNEMONIC OPCODE
JC OB JE OF dGE 06 JGT 02
JNC 03 JNE 07 JLT OE JLE OA
JH 09 JV 00 JVT OC JST 08
JNH 01 JNV 05 JNVT 04 JNST 00
LOOP CONTROL
SHIFT INSTRUCTIONS
INSTR WORD INSTR BYTE INSTR DBLWD
STATE TIMES(S)
MNEMONIC MNEMONIC MNEMONIC
OP B OP B OP B
SHL 09 .3 SHLB 19 3 SHLL 00 3 7 + 1 PER SHIFT(?)
SHR 011 3 SHRB 18 3 SHRL OC 3 7 + 1 PER SHIFT(?)
SHRA OA 3 SHRAB lA 3 SHRAL OE 3 7 + 1 PER SHIFT(?)
NORMALIZE
MNEMONIC STATE TIMES
NORML 11 + 1 PER SHIFT
NOTES:
6. This instruction takes 2 states to pull RESET low, then holds it low for at least one state time to initiate a reset. The reset
takes 13 states, at which time the program restarts at location 20aOH.
7. Execution will take at least 8 states, even for 0 shift.
8. State times shown for 16·bit bus.
2-54
8X9X HARDWARE DESIGN INFORMATION
:1
AID CHANNEL NUMBER
STATUS:
Rl.
3
1
2,
CHANNEL II SELECTS WHICH OF THE 8
ANALOG INPUT CHANNELS IS 1'0 BE
CONVERTED TO DIGITAL fORIA.
,
2-55
inter 8X9.X HARDWARI; DESIGN INFORMATION
lOCO (15H)
Vector Location
I
T2RST - 0 •. - IOCO.5 Vector (High (Low Priority
~~""----T2 RESET Byte) Byte)
, :·-IOCO.3
, ··-IOCO.O Software Trap 2011H 2010H Not Applicable
HSI.O :>'0------- HSI Extint 200FH 200EH 7 (Highest)
•• - IOCO.2 Serial Port 200DH 200CH 6
roO""'-0-'---- HSI Software 200BH 200AH 5
Timers
HSI.1 ~ TIMER2
T2CLK - 0 :. - IOCO.7 CLOCK
HSI.O 2009H 2008H 4
High Speed 2007H 2006H 3
;.- IOCO.4
Outputs
HSI.2 - 0 ""-0-------- HSI HSI Data 2005H 2004H 2
;. - IOCO.6 Available
HSI.3 - 0 '-'0------- HSI AID Conversion 2003H 2002H 1
270246-57 Complete
Timer Overflow 2001H 2000H o (Lowest)
10SO (15H)
IOS1 (16H)
HSO.O CURRENT STATE
HSO.1 CURRENT STATE SOFTWARE TIMER ,0 EXPIRED
HSO.2 CURRENT STATE SOFTWARE TIMER 1 EXPIRED
HSO.3 CURRENT STATE SOFTWARE TIMER 2 EXPIRED
HSO.4 CURRENT STATE
SOFTWARfTIMER 3 EXPIRED
HSO.5 CURRENT STATE TIMER 2 HAS OVERFLOW
CAM QB HOLOING REGISTER IS FULL TIMER 1 HAS OVERFLOW
HSO HOLDING REGISTER IS FULL HSI FIFO IS FULL
270246-58 HSI HOLDING REGISTER DATA AVAILABLE
270246-60
2-56
8X9X HARDWARE DESIGN INFORMATION
(LOCATION 09H)
Program Lock Modes
17161514131211101
LOC1 LOCO Protection
0
0
0
1
Read and Write Protected
Read Protected'
II t 1. 1
~~:,~~E,,,
HSO EVENT
0 Write Protected HSI BIT 0
1 No Protection SOFTWARE TIMERS
" - - - - - - - - - - - SERIAL I/O
~-------- EXTERNAL INTERRUPT
Programming Function PMODE Values 270246-62
PM ODE Programming Mode
0-4 Reserved
5 Slave Programming
6-0BH Reserved
OCH Auto Programming Mode
ODH Program Configuration Byte
OEH-OFH Reserved
2-57
MCS®-96
809XBH, 839XBH, 879XBH
ADVANCED 16-BIT MICROCONTROLLER
. WITH 8- .OR 16-BIT EXTERNAL BUS
• 879XBH: an 809XBH with 8 Kbytes of On-Chip EPROM
• 839XBH: an 809XBH with 8 Kbytes of On-Chip ROM
• Register-to~Register Architecture
• Full Duplex Serial Port
• 20 Interrupt Sources
• 6.25 J-ts 32/16 Divide
• ROM/EPROM Lock
• Four 16-Bit Software Timers
October 1990
2-58 Order Number: 270090-007
inter 8X9XBH ~OO~!bDrMlD~~OOW
OFfH 255,
POWER-DOWN
RAM
OFOH 240
OEFH 239
INTERNAL
REGISTER FILE
(RAM)
FFFFH
1AH 26
EXTERNAL MEMORY
OR I/O
19H 25
STACK POINTER STACK POINTER 4000H
1SH 24
17H PWM_CONTROL 23 ,INT£RNAL PROGRAM
STORAGE ROM/EPROM
16H IOS1 10Cl 22 OR
15H 10SO lOCO 21 EXTERNAL MEMORY
I
20S0H
14H 20
RESERVED 2072H - 297FH
13H RESERVED RESERVED 19
SIGNATURE WORD 2070H- 2071H
12H 1S
RESERVED 2030H - 206FH
11H SP_STAT SP_CON 17
SECURITY KEY 2020H - 202FH
10H 10 PORT 2 10 PORT 2 16
~ESERVED 201CH-201FH
OFH 10 PORT 1 10 PORT 1 15
SELF JUMP OPCODE (27H FEH) 201AH- 201BH
OEH 10 PORT 0 BAUD_RATE 14
RESERVED 2019H
ODH TIMER2 (HI) 13
CHIP CONFIGURATION BYTE 201SH
OCH TIMER2 (LO) RESERVED 12
RESERVED 2012H - 2017H
OBH TIMERl (HI) 11
OAH TIMER1 (LO) WATCHDOG 10
INTERRUPT VECTORS
09H INLPENDING INT_PENDING
OSH INLMASK INLMASK S 2000H
07H SBUF (RX) SBUF (TX) 7 PORT 4 1FFfH
06H HSLSTATUS HSO_COMMAND PORT 3 1fFEH
OSH HSLTIME (HI) HSO_TlME (HI) EXTERNAL MEMORY
04H
03H
HSLTIME (LO)
AD_RESULT (HI)
HSO_TIME (LO)
HSLMODE
4
L OR I/O
INTERNAL RAM
0100H
OOfFH
02H AD_RESULT (LO) AD_COMMAND REGISTER FILE
STACK POINTER
01H RO (HI) RO (HI) SPECIAL fUNCTION REGISTERS
(WHEN ACCESSED AS DATA MEMORY)
OOH RO (LO) RO (LO) 0 OOOOH
2-59
8X9XBH
PACKAGING
The 80968H is available in 48-pin, 64-pin, and 68-pin packages, with and without AID, and with arid without
on-chip ROM or EPROM. The 80968H numbering system is shown in Figure 3. Figures 4-9 show the pinouts
for the 48-, 64- and 68-pin packages. The 48-pin version is offered in a Dual-In-Line package while the 68-pin
versions come in a Plastic Leaded Chip Carrier (PLCC), a Pin Grid Array (PGA) or a Type "8" Leadless Chip
Carrier.
Description Description
1 EA 33 HSO.3
2 ACH3/PO.3 34 VSS
3 ACH1/PO.1 35 Vpp
4 ACHO/PO.O 36 P2.7
5 ACH2/PO.2 37 PWM/P2.51
6 ACH6/PO.6/PMOD.2 PDO/SPROG
7 ACH7 IPO. 7 IPMOD.3 38 WR/WRL
8 ACH5/PO.5/PMOD.1 39 SHE/WRH
9 ACH4/PO.4/PMOD.0 40 T2RST/P2.4
10 ANGND 41 READY
11 VREF 42 T2CLK/P2.3
12- VPD 43 AD15/P4.7
13 . EXINTIP2.2/PROG 44 AD14/P4.6
14 RESET 45 AD13/P4.5
15 RXD/P2.1/PALE 46 AD12/P4.4
16 TXD/P2.01 47 AD11/P4.3
PVERISALE 48 AD10/P4.2
17 P1.0 49 AD9/P4.1
18 P1.1 50 AD8/P4.0
19 P1.2 51 AD7/P3.7
20 P1.3 52 AD6/P3.6
21 P1.4 53 AD5/P3.5
22 HSI.O 54 AD4/P3.4
23 HSI.1 55 AD3/P3.3
24 HSO.4/HSI.2 56 AD2/P3.2
25 HSO.5/HSI.3 57 AD1/P3.1
26 . HSO.O 58 ADO/P3.0
27 HSO.1 59 RD 270090-56
28 P1.5 60 ALE/ADV
29 P1.6 61 XTAL2 Figure 5. Shrink-DIP Package
30 P1.7 62 XTAL1
31 P2.6 63 Vss
32 HSO.2 64 Vee
Figure 4b. Shrink-DIP Function Pinouts
2-61
inter 8X9XBH
270090-5
270090-3
Figure 8. 68-Pin Package (LCC - Top View)
Figure 6. 68-Pln Package (PLCC - Top View)
270090-2
PIN DESCRIPTIONS
Symbol Name and Function
Vcc Main supply voltage (5V).
Vss Digital circuit ground (OV). There are two Vss pins, both of which must be connected.
VPD RAM standby supply voltage (5V). This voltage must be present during normal operation. In a Power
Down condition (i.e. Vee drops to zero), if RESET is activated before Vee drops below spec and VPD
continues to be held within spec., the top 16 bytes in the Register File will retain their contents. RESET
must be held low during the Power Down and should not be brought high until Vee is within spec and
the oscillator has stabilized.
VREF Reference voltage for the AID converter (5\1). VREF is also the supply voltage to the analog portion of '
the AID converter. and the logic used to read Port O.
ANGND Reference ground for the AID converter. Must be held at nominally the same potential as Vss.
VPP Programming voltage for the EPROM devices. It should be + 12. 75V for programming and will float to
5V otherwise. The pin should not be above Vee for ROM and CPU devices. This pin must be left
floating in the application circuit for EPROM devices.
XTAL1 Input of the oscillator inverter and of the internal clock generator.
XTAL2 Output of the oscillator inverter:
. CLKOUT*t Output of the internal clock generator. The frequency of CLKOUT is Ya the oscillator frequency. It has a
33% duty cycle.
RESET Reset input to the chip. Input low for a minimum 10 XTAL 1 cycles to reset the chip. The subsequent
low-to-high transition re-synchronizes CLKOUr and commences a 10-state-time sequence in which the
PSW is cleared, a byte read from 2018H loads CCR, and a jump to location 2080H is executed. Input
high/or normal operation. RESET has an internal pullup.
BUSWIDTH*t Input for bus width selection. If CCR bit 1 is a one, this pin selects the bus width for the bus cycle in
progress. If BUSWIDTH is a 1, a 16-bit bus cycle occurs. If BUSWIDTH is a 0 an 8-bitcycle occurs. If
CCR bit 1 is a 0, the bus is always an 8-bit bus. If this pin is left unconnected, it will rise to Vee.
NMI*t A positive transition causes a vector to external memory location 0000f:t. I:xternal memory from OOH
through OFFH is reserved for Intel development systems.
INST*t Output high during an external memory read indicates the read is an instruction fetch. INST is valid
throughout the bus cycle.
EA Input for memory select (External Access). EA equal to a TTL-high causes memory accesses to
locations 2000H through 3FFFH to be directed to on-Chip ROM/EPROM. EA equal to a TTL-low caUses
accesses to these locations to be directed to off-chip memory. EA = + 12.75V causes execution to
, begin in the Programming Mode. EA has an internal pulldown, so it goes to 0 unless driven otherwise.
ALE/ADV Address Latch Enable or Address Valid output, as selected by CCA. Both pin options provide a latch to
demultiplex the address from the address/data bus. When the pin is ADV, it goes inactive high at the
end of the bus cycle. ADV can be used as a chip select for a single external RAM memory. ALE/ ADV is
activated only during external memory accesses.
AD Read signal output to external memory. RD is aqtivated only during external memory reads.
WR/WRI Write and Write Low output to external memory, as selected by the CCR. WR will go low for every
external write, while WRL will go low only for external writes where an even byte is being written.
WR/WRL is activated only during external memory writes. ,
BHE/WRH Bus High Enable or Write High output to external memory, as selected by the CCA. BHE = 0 selects
the bank of memory thatis connected to the high byte of the data bus. AO = 0 selects the bank of
memory that is connected to the low byte of the data bus. Thus accesses to a 16-bit wide memory can
be to the low byte only (AO = 0, BHE ~ 1), to the high byte only (AO = 1, BHE = 0), or both bytes
(AO = 0, BHE = 0). If the WRH function is selected, the pin will go low if the bus cycle is writing to an
odd memory location.
"Not available on Shrink· DIP package
tNot available on 48·pin device
2·63
intJ 8X9XBH
2-64
8X9XBH
~ 1 ,"~"a ""~'"
./0 II1
.
AID Command (02H)
r; I--
3
I-- x
0 = AID CURRENTLY 10LE
1 = CONVERSION IN PROCESS
BE INITIATED (GO = 1 MEANS START NOW,
GO = 0 MEANS THE CONVERSION IS TO BE
INITIATED BY THE HSO UNIT AT A SPECIFIED TIME).
~r-x 270090-24
"6}
.2. AID RESULT:
LEAST SIGNIFICANT 2 BITS
SPCON/SPSTAT (11H)
270090-21
W
O'} BIT!. BITO SPECIFY THE MODE
00 = MODE 0 IO=MODE 2
R .2. 01 = MODE 1 11 = MODE 3
HSLMode (03H) I 2 - PEN ENABLE THE PARITY FUNCTION
~ 3 - REN ENABLES THE RECEIVE FUNCTION
I 7 61 s 41 3 21' 10 1 4 -TB8 PROGRAMS THE 9TH DATA BIT
L HSI.O ~ODE
5 -TI
S-RI
IS THE TRANSMIT INTERRUPT FLAG
IS THE RECEIVE INTERRUPT FLAG
HSI.l ~ODE
"7 -RBB
HSI.2
HSI.3
~ODE
~ODE
- RPE
IS THE 9TH DATA RECEIVED
(IF NOT PARITY)
IS THE PARITY ERROR INDICATOR
(IF PARITY ACTIVE)
WHERE EACH 2 - BIT MODE CONTROL FIELD 270090-26
DEFINES ONE OF 4 POSSIBLE MODES:
00 8 POSITIVE TRANSITIONS
01 EACH POSITIVE TRANSITION
10 EACH NEGATIVE TRANSITION Baud Rate Calculations
II EVERY TRANSITION UBlng XTAL 1:
(POSITIVE AND NEGATIVE) Mod 0: 8aud ~ XTAL 1 frequency. 8 ,. 0
.' e Rate 4"(8 + 1) •
270090-22
Oth . Baud ~ XTAL IIrequency
erB. Rate 64" (8 + 1)
UBlng T2CLK:
HSO Command (06H) M do O' 8aud ~ T2CLK frequency. 8 " 0
o • Rate B '
CHANNEL: • Baud _ T2CLK froquoncy . 8
Ot
o-s HSO.O - HSO.S hera. Rat~ - 16.8 ,"* 0
. BIT: 0]6 HSO.O AND HSO.l
Note that 8 cannot equal 0, except when u81ng XTAL 1 In other
7 HSO.2 AND HSO.3
than Mode O.
8-B SOFTWARE TI~ERS
2 E R£SET TIMER2
3 F START AID CONVERSION
2-65
inter 8X9XBH
17161514131211101
11 1 .
11 ~::,;~::~2E"
HSO EVENT
HSI BIT 0
SOFTWARE TIMERS
c--_ _ _ _ _ _ _ _ SERIAL I/O
' - - - - - - - - - - - EXTERNAL INTERRUPT
270090-55
PSW Register
r
~~'-----T2 RESET
EXTERNAL INTERRUPT ACH7 / EXTINT
• - - IOCO.3
• - - IOCO.O TIMER 1 OVERFLOW INTERRUPt ENABLE / DISABLE
HSI.O ~_------- HSI TIMER 2 OVERFLOW INTERRUPT ENABLE / DISABLE
. • - - IOCO.2 HSO.4 OUTPUT ENABLE / DISABLE
~)-------- HSI
HSI.1 ~ TIMER2
SELECT TXD / SELECT P2.0
HSO.5 OUTPUT ENABLE / DISABLE
T2CLK - - 0 :--IOCO.7 CLOCK
• - - IOCO.4 HSI INTERRUPT
""'-0_-----'---..... HSI
HSI.2 - - 0
FIFO FU LL /uHO;-'L:O:D"'INU'G"R"'E"GI;<'ST"'E'iiR'L"O;;:;AD"'E'liD
• -- IOCO.6
""'-0--------- HSI
HSI.3 - - 0
270090-31
270090-29
2-66
8X9XBH
2-67
8X9XBH
OPERATING CONDITIONS
(All characteristics in this data sheet apply to these operating conditions unless otherwise noted.)
Symbol Parameter Min Max Units
TA Ambient Temperature Under Bias 0 +70 °C
Vee Digital Supply Voltage 4.50 5.50 V
VREF Analog Supply Voltage 4.50 5.50 V
lose Oscillator Frequency 6.0 12 MHz !
NOTE:
ANGND and Vss should be nominally at the same potential.
D.C. CHARACTERISTICS
Symbol Parameter Min Max Units Test Conditions
Icc Vee Supply Current (O'C ,;; TA ,;; 70'C) 240 mA All Outputs
Vee Supply Current (TA = 70'C) 185 mA Disconnected.
lee1
Ipo VPD Supply Current 1 mA Normal operation
and Power· Down.
IREF VREF Supply Current 8 mA
Vil Input Low Voltage -0.3 +0.8 V
VIH Input High Voltage (Except RESET, NMI, XTAL 1) 2.0 Vee +0.5 V
VIH1 Input High Voltage, RESET Rising 2.4 Vee +0.5 V
VIH2 Input High Voltage, RESET Falling (Hysteresis) 2.1 Vee +0.5 V
VIH3 Input High Voltage, NMI, XTAL 1 2.2 Vee +0.5 V
III Input Leakage Current to each pin 01 HSI, P3, P4, and to P2.1. ±10 p.A Vin = oto Vee ,
Ill1 D.C. Input Leakage Current to each pin 01 PO +3 p.A Yin = oto Vee
IIH Input High Current to EA 100 p.A VIH = 2.4V
IlL Input Low Current to each pin 01 P1, -125 p.A Vil = 0.45V
and to P2.6, P2.7.
IIL1 Input Low Current to RESET -0.25 -2 mA Vil = 0.45V
IIL2 Input Low Current P2.2, P2.3, P2.4, READY, BUSWIDTH -50 p.A Vil = 0.45V
VOL Output Low Voltage on Quasi·Bidirectional 0.45 V 1m = 0.8mA
port pins and P3, P4 when used as ports (Note 1)
VOL1 Output Low Voltage on Quasi·Bidirectional 0.75 V IOl = 2.0 mA
port pins and P3, P4 when used as ports (Notes 1, 2, 3)
,
VOl2 Output Low Voltage on Standard Output 0.45 V IOl = 2.0mA
pins, RESET and Bus/Control Pins (Notes 1, 2, 3)
2-68
intJ 8X9XBH
NOTES:
1. Quasi-bidirectional pins include those on P1, for P2.6 and P2.7. Standard Output Pins include TXD, RXD (Mode 0 only),
PWM, and HSO pins. Bus/Control pins include CLKOUT, ALE, BHE, RD, WR, INSTand ADO-15.
2. Maximum curtent per pin must be externally limited to the following values if VOL is held above 0.45V.
IOl on quasi-bidirectional pins and Ports 3 and 4 when used as ports: 4.0 mA
IOl on standard output pins and RESET: 8.0 mA
IOL on Bus/Control pins: 2.0 mA
3. During normal (non-transient) operation the following limits apply:
Total. IOL on Port 1 must not exceed 8.0 mAo
TotaiiOL on P2.0, P2.6, RESET and all HSO pins must not exceed 15 mA
Total IOl on Port 3 must not exceed 10 mAo
Total IOL on P2.5, P2.7, and Port 4 must not exceed 20 mAo
2-69
8X9XBH
NOTES:
1. Pins not bonded out on 64-pin devices.
2. If more than' one wait state is desired, add 3Tosc for each additional wait state.
3. CLKOUT is directly generated as a divide by 3 of the oscillator. The period will be 3Tosc ± 10 ns if Tosc is constant and
the rise and fall times on XTAL 1 are less than 10 ns.'
4. CLKOUT, INST, and BHE pins not bonded out on 4S-pin and 64-pin devices.
5. Max spec applies only to ALE. Min spec applies to both ALE and ADV.
6. The term "Address Valid" applies to ADO-15, BRE and INST.
7. The term" Address" in this definition applies to ADO-7 for S-bit cycles, and ADO-15 for 16-bit cycles.
'/
2-70
an+_r
' III-e- 8X9XBH
WAVEFORM
XTALI
CLOCKOUT
READY
.'. -_ .. -. --_.
AD -------<t~~~~~¢:~::::~~~~~::~~.:-:-:-:-:-:-:-:-:-~.~--
. ,
BHE,INST
~-- ...~--~------~--------~--~~-------------.
TAVLL.J ~I'---TWLWH~
AD8-15 -~(~IL)----<t::::::::::::::V~A~L~IDC:::::::::::~~·E·:-:-:-:-:-:-~-~-~-~-~-:-::-.
.. _----------- ...
270090-47
NOTES:
(1) 8-bit bus only.
(2) 8-bit or 16-bit bus and wrjte strcibe mode selected.
(3) When ADV selected.
(4) 8- or 16-bit bus and no write strobe mode selected.
WAVEFORM-BUSWIDTH PIN*
XTALt
CLKOUT
BUSWIDTH -~-----+----~''f-----;''''--''-------------------------
ALE/ ADV ____"
ADDRESS/DATA------1tJA~D~D~R~O~U~T:>-------_(~D~AT~A~IN~--------
270090-35
2-71
8X9XBH
,
- __ Power Supply Rise Time
r - 5 •5V OC
i - - 4 •5V OC
Vce
9m'iw'~"~'i";m,m'~'~ii"ii'~~i~,~;~,m,,m;,~' ,~
.......
XTAL 0 ••" .
"-
270090-57
2-72
8X9XBH
RXD--"',~~J--",J~~J--",J~~J--"~~,--"~"--'r~"--'r~'r--\r~\r
(IN)
270090-36
270090-4B
Ar) external oscillator may encounter as much as a 100 pF load at XTAl 1 when it starts up. This is due to interaction
between the amplifier and its feedback capacitance. Once the external signal meets the VIL and VIH specifications the
capacitance will not exceed 20 pF. '
270090-51
270090-49 For Timing Purposes a Port Pin is no Longer Floating when a
A.C. Testing inputs are driven at 2.4V for a Logic "1" and 0.45V 200 mV change from Load Voltage Occurs, and Begins to Float
for a Logic "0". Timing measurements are made at 2.0V for a when a 200 mV change from the Loaded VOHIVOL Level occurs
Logie "1" and O.BV for a Logie "0". IOLIiOH ;;, ± 15 mAo
2-73
inter 8X9XBH
47 p,r 47 p,r
270090-52 270090-53
2-74
8X9XBH
2-75
•
inter 8X9XBH
EPROM SPECIFICATIONS
Run-time Programming Operating Conditions: Fose = 6.0 MHz to 12.0 MHz. Vee. VPD. VREF = 5V ± 0.5V.
TA = 25°C to ±5°C and Vpp = 12.75V ± 0.25V. For run-time prpgramming over a full operating range.
contact the factory.
Symbol Parameter Min Max Units
TAVLL ADDRESS/COMMAND Valid to PALE Low 0 Tose
TLLAX ADDRESS/COMMAND Hold After PALE Low 80 Tose
TDVPL Output Data Setup Before PROG Low 0 Tose
TpLDX Data Hold After PROG Falling 80 Tose
TLLLH ' PALE Pulse Width 180 Tose '
TpLPH PROG Pulse Width 250 Tose 100).LS +
144 Tose
TLHPL PALE High to PROG Low 250 Tose
TpHLL PROG High to Next PALE Low 600 Tose
TpHDX· Data Hold After PROG High 30 Tose
TpHVV PROG High to PVER/PDO Valid 500 Tose
TLLVH PALE Low to PVER/PDO High 100 Tose
TpLDV PROG Low to VERIFICATION/DUMP Data Valid 100 Tose
TSHLL RESET High to First PALE Low (not shown) 2000 Tose
NOTE:
Vpp must be within tV of Vee while Vee < 4.5V. Vpp must not have a low impedance path to ground or Vss while
Vee> 4.5V.
/
2-76
8X9XBH
WAVEFORM-EPROM PROGRAMMING
r,..vLL
PORTS 3,4
PALE--_
8X9XBH ERRATA Allowing more than seven FIFO entries to occur be·
tween cleared conditions will result in incorrect
Devices covered by this data sheet (see Revision status information for either the eighth or ninth con·
History) have the following errata. secutive entry. This effectively limits the total nUl\"
ber of records to seven.
1. INDEXED, 3 OPERAND MULTIPLY There is one exception that will allow the FIFO to
correctly record eight events. If the first two ,events
The displacement portion of an indexed, three oper·
of a cleared FIFO are separated by greater than 16
and (byte or word) multiply, may not be in the range
state times, the overflow conditions will always
of 200H thru 17FFH inclusive. If you must use these
cause the ninth event to be recorded with incorrect
displacements, execute an indexed, two operand
status information. This is true even if- the event fol·
multiply and a move if necessary.
lowing the first two were only separated by eight
states.
2. HIGH SPEED INPUT FIFO OPERATION
To ensure proper operation (no overflow) of the High 3. RESET AND THE QUASI BIDIRECTIONAL
Speed Input FIFO, it is imperative that any seven PORTS
consecutive FIFO entries be completely cleared be· Because RESET is asynchronous, it is possible to
fore further events occur at the pins. To clear the
apply RESET during writes to the quasi·bidirectional
FIFO, some repetitive variation of the following in·
port pins. If this occurs, the low impedance pullup
structions may be used ...
may not turn on, and only the high impedance pullup
READ.HSI.TASK: 01 : NO INTERRUPTS is turned on. This causes the quasi·bidirectional pins
RELOAD.HREG: JBC IOSI,7,RELOAD.HREG :, WAIT FOR to go to their RESET state (logical one) but will not
: HOLDING do so before expiration of TRLPV max.
: REGISTER TO
: LOAD
STB HSI.STAT, [PTR) + : READ THE
4. SOFTWARE RESET TIMING
: STATUS
The RESET pin will pull down for at least one state
ST HSI.TIME, [PTR) + : 'READ TIME TAG
time. if a software reset instruction executes or the
watchdog timer overflows. Earlier documentation in·
dicated two state times.
2·77
8X9XBH
5. USING T2CLK AS THE SOURCE FOR TIMER2 Dif,ferences ,between -006 and -005 data sheets.
1. All EPROM programming mode information has
TIMER2 has two selectable clock sources, the been deleted and moved to the 16-Bit Handbook,
T2CLK or HSI.1 pins, selectable by bit IOCO.3. When Hardware Design Information chapter.
using T2CLK as the clock for TIMER2, writing to
lOCO may cause TIMER2 to ,increment. The user , 2. Shrink-DIP package information has been added.
should only write to lOCO once during ir;litializ~tion, , 3. A new RESET timing specification has been add-
and then immediately clear TIMER2 using the HSO ed for olarity.
. command OEH. Effectively, the customer cannot re- 4. Software Reset pin timing information has been
set TIMER2 with bit IOCO.1, and can only use the added.
external reset sources or the HSO command when
using T2CLK as the clock source. 5. HSO IOl specifications have been improved so
that all HSO pins have the same drive capability.
If the HSI.1 pin is the source for TIMER2, only the 6. Port 3 and Port 4 pin descriptions were clarified,
first write to lOCO may cause TIMER2 to increment, indicating the necessity of pullup if the pins are
further writes will not increment TIMER2. used as ports.
7. HSI FIFO overflow description added.
6. RESERVED LOCATION 2019H
Differences between the -005 and the -004 data
The 1990 Architectural Overview recommendeq that sheets.
address 2019H be loaded with OFFH. The recom- 1. The -005 data sheet corresponds to devices
mendation is now 20H. marked with a "0" at the end of the topside
tracking number. The -004 data sheet corre-
sponded to devices which are not marked with a
DATA SHEET REVISION REVIEW "0".
This data sheet (270090-007) is valid for devices 2. Much of the description of device functionality
marked with a "D" at the end of the topside tracking has been deleted. All of this information is al-
number: Data sheets are changed as new device ready in the Embedded controller handbooks in
information becomes available. Verify with your local the MCS-96 8096BH Architectural Overview
Intel sales office that you have the latest version Chapter.
before finalizing a design or ordering devices. 3. The A/D converter specification for Differential
Non-linearity has been changed to be a minimum
The following differences exist between this data of > -1 Isbs to a maximum of +'2 LSBs.
sheet and the previous version (-006). 4. 8X9XBH errata Section. The JBS and JBC on
1. T CCLH changed from Min = - 20 ns, Max = Port 0 errata has been fixed on the latest device
'+25 ns to Min = -30 ns, Max = + 15 ns. stepping.
2. TXHQX changed from Min = 2Tosc - 50 ns to -5. 8X9XBH errata Section. The errata for the 48-pin
Min = 2Tosc - 70 ns. devices has been fixed on the latest device step-
3. TOLOX changed from Min = 25 ns to Min = ping.This errata caused the upper 8 bits on the
30 ns, Address/Data bus to be latched when resetting
into an, 8-bit external memory system.
4. An errata was added changing the recommenda-
tipn for address 2019H from OFFH to 20H. 6. 8X9XBH errata section. An errata existed which
caused the device to be held in RESET for ex-
5. The power supply sequencing section has been tended periods of time with the internal RESET
deleted. The information is in the Hardware De- pin pulled down internally. The condition oc-
sign Information. curred when the XTAL inputs were driven before
6. The method of identifying the clirrent change in- Vcc was stable and within the data sheet specifi-
dicator was added to the differences between the cation. The condition was worse at cold. This er-
~005 and -004 data sheets. rata was not documented in the -004 data sheet.
7. A bug was not documented in the -004 data It has been fixed on the latest device stepping.
, sheet and was fixed before the -005 data. sheet. 7. 8X9XBH errata Section. Errata, 3 and 4 have
Information on the bug was added to the differ- been added to the errata list. These errata exist
ence between the -005 and -004 data sheets: for all steppings of the device.
2·78
8X9XBH
Differences between the -004 and the -003 data 8. The EPROM programming section figures were
sheets. " corrected to indicate the correct interface to a
1. The bus control figures and bus timing diagrams 2764A-2. A reset circuit was added to these fig-
were modified to more accurately describe their ures and the signal PVAL (Port 3.X and Port 4.X)
operation. In particular the 8-bit bus modes now is now identified as the valid signal for program
reflect the use of Write Strobe Mode. verification in the Auto Programming Mode. Text
was added to this section to reference the re-
2. Additional text was added to the Analog/Digital quirement of using the Auto CQnfiguration Byte
description of the conversion process to clarify Programming Mode for 48-lead devices. Figure
its operation and usefulness. 22A was edited for corrections to the text, and
3. Text was added to the interrupt description sec- now indicates PVER (Port 2.0). The EPROM cir-
tion to indicate the maximum transition speed of cuits were cQrrected to show 6 MHz operation
the input signal relative to the CPU's state tim- for programming devices from internal micro-
ing. A figure was included to graphically demon- code. "
strate the interrupt response timing. 9. The protected memory section was edited to in-
4. The pin descriptions were modified to indicate dicate that the CPU will enter a "JUMP ON
that Vpp must normally float in the application. SELF" condition when ROM/EPROM dump
5. The input low voltage specification (VIU) was mode is complete.
deleted and is covered by the VIL specification. 10. An 8X9XBH ERRATA section was added.
6. A suggested minimum configuration circuit was 11. This REVISION REVIEW was added.
added to the material.
7. The AID Converter Specifications for Differen-
tial Non-Linearity has been corrected to be a
maximum of + 2 LSB's.
2-79
MCS®-96
809XBH/839XBH/879XBH
EXPRESS
• Extended Temperature Range • Burn-In
( ~. 40°C to + 85°C)
The Intel EXPRESS system offers enhancements to the operational specifications of the MCS®-96 family of
microcontroliers. These EXPRESS products are designed to meet the needs of those applications whose
operating requirements exceed commercial standards.
The EXPRESS program includes the commercial standard temperature range with burn-in, and an extended
temperature range with or without burn-in.
With the commercial standard temperature range operational characteristics are guaranteed over the temper-
ature range of O°C to + 70°C. With the extended temperature range option, operational characteristics are
guaranteed over the range of -40°C to + 85°C.
The optionaL burn-in is dynamic, for a minimum time of 160 hours at 125°C with Vee 0= 5.5V ± 0.5V, following
guidelines in MIL-STD-883, Method 1015.
Package types and EXPRESS versions are identified by a one- or two-letter prefix to the device number. The
prefixes are list~d in Table 1.
This data sheet specifies the parameters which deviate from the commercial temperature range option. The
commercial temperature range data sheets are applicable otherwise. .
October 1990
2-80 Order Number: 270433-003
8X9XBH EXPRESS
OPERATING CONDITIONS
Symbol Parameter Min Max Units
Ambient Temperature Under Bias -40 +85 °C
D.C. CHARACTERISTICS
Symbol Parameter Min Max Units Test Conditions
Icc Vcc Supply Current ( - 40°C S; T A S; + 85°C) 270 mA All Outputs
Disconnected.
ICC1 Vcc Supply Current (TA =. + 85°C) 185 mA
IlL Input Low Current to each pin of P1 , -150 p.A VIL = 0.45V
and to P2.6, P2.7.
A.C. CHARACTERISTICS
Symbol Parameter Max Units
AD or WR Low to Address Float 25 ns
PACKAGING
Factory Masked User Programmable
CPU
ROM-
EPROM OTP
68 Pin 64 Pin 48 Pin 68 Pin 64 Pin 48 Pin 68 Pin 64 Pin 48 Pin 68 Pin 64 Pin 48 Pin
ANALOG 8397BH 8397BH 8395BH B097BH 8097BH 8095BH 8797BH 8795BH 8797BH 8797BH
NO ANALOG 8396BH 8096BH
48,pln deVIces have four Analog Input pIns.
64-pin devices have all 48'pin device featur!,s plus the following:
Four additional Analog input channels
One additional quasi·bidirectional 8-bit parallel port
Four additional port 2 pins with multiplexed features
Timer 2 clock source pIn
Timer 2 reset pin
Two additional quasi·bidirectional port pins
68,pln devices have all 48-' and 64-pin features plus the following:
Oynamic buswidth sizing (8. or t 6-bit bus)
Dedicated System Clock Output (CLKOUT)
INST pin for memory expansion
Non·Maskable interrupt for debugging
Package DeSIgnators:
N=PLCC
C = CeramIc DIP
A=Ceramlc Pin Grid Array
P = Plastic DIP
R = Ceramic LCC
U = Shrink DIP
Prefix Designators: •
T = Extended temperature
L = Extended temperature with 160 hours burn·in
2·81
irltef 8X9XBH EXPRESS
2-82
MCS®-96
809XJF,839XJF,879XJF
ADVANCED 16-BIT MICROCONTROLLER·
.WITH 8- OR 16-BIT EXTERNAL BUS
• 879XJF: an 809XJF with 16 Kbytes of On-Chip EPROM
• 839XJF: an 809XJF with 16 Kbytes of On-Chip ROM
• 20 Interrupt Sources
• 6.25 J.Ls 32/16 Divide
• ROM/EPROM Lock
• Four 16-Bit Software Timers
The CPU supports bit, byte, and word operations. Thirty-two bit double-words are supported for a subset of the,
instruction set. With a 12 MHz input frequency the 8097 JF can do a i6-bit addition in 1.0 p.s and a16 x 16-bit
multiply or 32/16 divide in 6.25 p.s. Instruction execution times average 1 to 2 p.s in typical applications.
Four high-speed trigger inputs are provi,ded to record the times at which external events occur. Six high-speed
pulse generator outputs are provided to trigger external events at preset times. The high-speed output unit can
simultaneously perform software timer functions. Up to four 16-bit software timers can be in operation at once.
The on-chip AID converter includes a Sample and Hold, and converts up to 8 multiplexed analog input
channels to 10-bit digital values. With a 12 MHz crystal, each conversion takes 22 p.s.
Also provided on-chip are a serial port, a Watchdog Timer, and a pulse-width modulated output Signal.
POWER
VREF ANGND
•.-- -- --------- .
CONTROL
SIGNALS
,~-~/
l ~~~:
BUS
: PORT 4
I
,
I
November 1990
2-83 Order Number. 270795-003
8X9XJF
OFFH 255,
POWER-DOWN
RAt.!
OFOH 240
OEFH 239
INTERNAL FFFFH
REGISTER rilE
(RAM) EXTERNAL MEMORY
OR I/o
lAH 26 6000H
5FFFH
19H 25 INTERNAL PROGRAM
STACK POINTER STACK POINTER STORAGE ROM/EPROM
18H 24 OR
17H PWM_CONTROL 23 EXTERNAL MEMORY
2080H
ISH 1051 lOCI 22
RE~ERVED 2072H - 207FH
ISH 1050 lOCO 21
SIGNATURE WORD 2070H - 2071H
14H 2Q
RESERVED 2030H - 20SFH
13H RESERVED RESERVED 19
SECURITY KEY 2020H - 202FH
12H 18
RESERVED 201CH - 201FH
llH SP_STAT SP_CON 17
SELF JUMP OPCODE (27H FEH) 201AH - 201BH
10H 10 PORT 2 10 PORT 2 IS
RESERVED 2019H
OFH , 10 PORT 1 10 PORT 1 15
CHIP CONFIGURATION BYTE 2018H
OEH 10 PORT 0 BAUD_RATE 14'
RESERVED 2012H - 2017H
ODH TlMER2 (HI) 13
2-84
inter 8X9XJF
PACKAGING
The 8097JF is available in 64·pin and 68·pin packages, with and without on·chip ROM or EPROM. The 8097JF
numbering system is shown in Figure 3. Figures 4-6 show the pinouts for the 64· and 68·pin packages. The
64·pin version is offered in a Shrink·DIP package while the 68·pin versions come in a Plastic Leaded Chip
Carrier (PLCC).
Package Designators:
N = PLeC
C = Ceramic DIP
A = Ceramic Pin Grid Array
P = Plastic DIP
R = Ceramic LCC
U = Shrink DIP
Figure 3. The 809XJF Family Nomenclature
2·85
8X9XJF
987.5.32 l~D~~M~~~
LOOKING DOWN ON
.
Pl.!
COMPONENT SIDE
OF PC BOARD " AOI3/P4.S
A014/P4.6
270795-3
270795-4
2-86
inter 8X9XJF
PIN DESCRIPTtONS
Symbol Name and Function
Vee Main supply voltage' (5V).
Vss DiQital circuit ground (OV). There are two Vss pins, both of which must be connected.
VPD RAM standby supply voltage (5V). This voltage must be present during normal operation.
In a Power Down condition (i.e. Vee drops to zero), if RESET is activate,d before Vee drops
below spec and V PD continues to be held within spec., the top 16 bytes in the Register File
will retain their contents. RESET must be held low during the Power Down and should not
be brought high until Vee is within spec and the oscillator has stabilized.
VREF Reference vQltage for' the A/D converter (5V). VREF is also the supply voltage to the
analog portion of the AID converter and the logic used to re~d Port O.
ANGND Reference ground for the AID converter. Must be held at nominally the same potential as
Vss·
Vpp , Programming voltage for the EPROM pevices. It should be + 12. 75V for programming and
will float to 5V otherwise. It should not be above Vee for ROM or CPU devices. This pin
must be left floating in the application circuit for EPROM devices.
XTAL1 Input of .the oscillator inverter and of the internal clock generator.
XTAL2 Output of the oscillator inverter.
CLKOUT* Output of. the internal clock generator. The frequency of CLKOUT is % the oscillator
frequency. It has a 33% duty cycle.
RESET Reset inPut to the chip. Input low for a minimum of 10 XTAL 1 cycles to reset the chip. The
subsequent low-to-high transition re-synchronizes CLKOUT and commences a 10-state-
time sequence in which the PSW is cleared, a byte read from 2018H .Ioads CCR, and a
jump to location 20BOH is executed. Input high for normal operati.on. RESET has an
internal pull up.
BUSWIDTH* Input for bus width selection. If CCR bit 1 is a one, this pin selects the bus width for the bus
cycle in progress. If BUSWIDTH is a 1, a 16-bit bus cycle occurs. If BUSWIDTH is a 0 an 8-
bit cycle occurs. If CCR bit 1 is a 0, the bus is always an B-bit bus. If this pin is left
unconnected, it will rise to Vee.
NMI* A positive transition causes a vector to external memory location OOOOH. External memory
from OOH through OFFH is reserved for Intel development systems.
INST* Output high during an external memory read indicates the read is an instruction fetch. INST
is valid throughout the bus cycle.
EA Input for memory select (External Access). EA equal to a TTL-high causes memory
accesses to locations 2000H through 5FFF to be directed to on-chip ROM/EPROM. EA .
equal to a TTL-low causes accesses to these locations to be directed to off-chip memory.
EA == + 12.75V causes execution to begin in the Programming Mode. EA has an internal
. pulldown, so it goes to 0 unless driven otherwise. . ,
ALE/ADV Address Latch Enable or Address Valid output, as selected by CCA. Both pin options
a
provide latch to demultiplex the address from the address/data bus. When the pin is
ADV, it goes inactive high at the end of the bus cycle. ADV can be used as a chip select for
a single external RAM memory. ALE/ ADV is activated only during external memory
accesses.
'Not avaIlable on Shrink-DIP package
2-B7
8X9XJF
2-88
8X9XJF
+::
-
3 -
STATUS:
0 = A/O CURRENTLY IDLE
1 = CONVERSION IN PROCESS
: GO INDICATES WHEN THE CONVERSION IS TO
BE INITIATED(GO = 1 MEANS START NOW,
GO = 0 MEANS THE CONVERSION IS TO BE
INITIATED BY THE HSO UNIT AT A SPECIFIED TIME).
270795-9
-_6 } A/O RESULT:
7 LEAST SIGNIFICANT 2 BITS
270795-5
SPCON/SPSTAT(11H)
';} BIT1, BITO SPECIFY THE NODE
W OO=MODEO 10=MODE2
. HSI_Mode (03H)
R r2- 01 = MODE 1 11 = MODE 3
I 2 - PEN ENABLE THE PARITY FUNCTION
4 INTERRUPT / NO INTERRUPT
5 SET /CLEAR
Chip Configuration
6 TIMER 2/TIMER 1 1.rl1.r-l""'~""''''..t.,.I0 CHIP CONfiGURATION REGISTER
7 X RESERVED (Set to 1 for
compatibility with future
. 270795-7 ports)
BUS WIDTH SELECT
(16-BIT Bus/s-BIT BUS)
WRITE STROBE MODE SELECT
HSLStatus (06H) (ViR AND I am: m
AND Wlrn)
ADDRESS VALID STROBE SELECT
(ALEi ADV)
2-89
intJ 8X9XJF
17161514131211101
II i ..
I I ~:Z!~~::S~:E"
HSO EVEN;
HSI BIT 0
SOFTWARE TIMERS
L -_ _ _ _ _ _ _ SERIAL I/O
' - - - - - - - - - - - EXTERNAL INTERRUPT
270795-12
P5W Register
I
T2RST - - 0 • - . IOCO.5 SELECT PWM / SELECT P2.5
~~---- T2 RESET
EXTERNAL INTERRUPT ACH7 / EXTINT
. • -.10. CO.3
; _. 10CO.O TIMER 1 OVERFLOW INTERRUPT ENABLE / DISABLE
HSI.O ~------- HSI TIMER 2 OVERFLOW INTERRUPT ENABLE / DISABLE
• _. IOCO.2 HSO.4 OUTPUT ENABLE / DISABLE
..c~------- HSI SELECT TXO / SELECT P2.0
HSI.l ~ m.4ER2
T2CLK - - 0 . -. IOCO.7 CLOCK HSO.5 OUTPUT ENABLE / DISABLE
~------- HSI
FIFO FULL / "'HO"'L""O"'"IN""G'""'R"'E""GI""ST""E""R-;L""'O";";AO""'E"'O
HSI.2 - - 0
270795-16
• -. IOCO.6
HSI;3 - - 0 ~-------- HSI
270795-14
2-90
inter 8X9XJF
Vector Location
IOS1'(16H)
Vector Priority
(High (Low
Byte) Byte) SOFTWARE TIMER 0 EXPIRED
2-91
inter 8X9XJF
OPERATING CONDITIONS
(All characteristics specified in this data sheet apply to these operating conditions unless otherwise noted.)
NOTE:
ANGND and Vss should be nominally at the same potential.
D.C. CHARACTERISTICS
Symbol Parameter Min Max Units Test Conditions
lee Vee Supply Current (O'C ,,; TA ,,; 70'C) 300 mA All Outputs
Disconnected.
lecl Vee Supply Current (TA = 70'C) 245 mA
IpD VPD Supply Current 1 mA Normal operation
and Power-Down.
IREF VREF Supply Current 8 mA
VIL Input Low Voltage -0.3 +0.8 V
VIH Input High Voltage (Except RESET, NMI, XTAL 1) 2.0 Vee +0.5 V
VIHl Input High Voltage, RESET Rising 2.4 Vee +0.5 V
VIH2 Input High Voltage, RESET Falling (Hysteresis) 2.1 Vee +0.5 V
VIH3 Input High Voltage, NMI(4), XTAL 1 2.2 Vee +0.5 V
lu Input Leakage Current to each pin 01 HSI, P3, P4, and to P2.1. ±10 p.A Yin = OtoVec
IUl D.C. Input Leakage Current to each pin 01 PO +3 p.A Yin = OtoVee
IIH Input High Current to EA 100 p.A VIH = 2.4V
IlL Input Low Current to each pin 01 P1, -125 p.A VIL = 0.45V
and to P2.6, P2.7.
IILl Input Low Current to RESET -0.25 -2 mA Vil = 0.45V
IIl2 Input Low Current P2.2, P2.3, P2.4, READY, BUSWIDTH -50 p.A Vil = 0.45V
VOL o ' Output Low Voltage on Quasi-Bidirectional 0.45 V IOL = 0.8 mA
port pins and P3, P4 when used as ports (Note 1)
.vOll Output Low Voltage on Quasi-Bidirectional 0.75 V IOL = 2.0 mA
port pins and P3, P4 when used as ports (Notes 1, 2, 3)
VOL2 Output Low Voltage on Standard Output 0.45 V IOL'= 2.0 mA
pins, RESET and Bus/Control Pins (Notes 1, 2, 3)
2-92
8X9XJF
NOTES:
1. Quasi-bidirectional pins include those on P1, for P2.6 and P2.7. Standard Output Pins include TXD, RXD (Mode 0 only),
PWM, and HSO pins. Bus/Control pins include CLKOUT, ALE, BHE, RD, WR, INST and ADO-15.
2. Maximum current per pin must be externally limited to the following values if VOL is held above 0.45V.
IOL on quasi-bidirectional pins and Ports 3 and 4 when used as ports: 4.0 mA
IOL on standard output pins and RESET: 8.0 mA
IOL 6n Bus/Control pins: 2.0 mA
3.During normal (non-transient) operation the following limits apply:
TOlaiioL on Port 1 must not exceed 8.0 mAo
Total IOL on P2.0, P2.6, RESET and all HSO pins must not exceed 15 mAo
TotalloL on Port 3 must not exceed 10 mA.
TotaiiOL on P2.5, P2.7, and Port 4 must not exceed 20 mA.
A.C. CHARACTERISTICS
Test Conditions: Load Capacitance on Output Pins = 80 pF
NOTES:
1. If the 64-pin device is being used then this timing can be generated by assuming that the CLKOUT falling edge has
occurred at 2Tosc+55 (TLLCH(max) + TCHCL(max)) after the falling edge of ALE.
2. The term "Address Valid" applies to ADO-15, BHE and INST.
3. Pins not bonded out on 64-pin devices.
4. If wait states are used, add 3Tosc • N where N = number of wait states.
inter 8X9XJF
NOTES:
1.lf more than one wait state is desired, add 3Tosc for each additional wait state. ,
2. CLKOUT is directly generated as a divide by 3 of the oscillator. The period will be 3Tosc ± 10 ns if Tosc is constant and
the rise and fall times on XTAL 1 are less tnan 10 ns.
3. CLKOUT, INST, and SHE pins not bonded out on 64·lead package.
4. Max spec applies only to ALE. Min spec applies to both ALE and ADV.
5. The term "Address Valid" applies to ADO-15, SHE and INST.
6. The term" Address" in this specification applies to ADO-7 for a·bit cycles, and ADO-15 for 16·bit cycles.
2·94
inter 8X9XJF
WAVEFORM
XTAL1
CLOCKOUT·
READY
,
'.. _--------
,
'~-.
BHE. INST·
~----~--~~----~----------~--~~----------.--.
TAVLL.J ~I.---TWLWH ~
AD8-15 ~(~1L)----<t::::::~::::::V~A~L~IDc:::::::::::~~:E:::::::::::::~:~:~:~:~:::::::
270795-18
NOTES:
(1) 8·bit bus only.
(2) 8·bit or 16·bit bus and write strobe mode selected.
(3) When ADV selected.
(4) /3. or 16·bit bus and no write strobe mode selected.
WAVEFORM--BUSWIDTH PIN*
XTAL1
CLKOUT·
BUSWIDTH· ------+---~~~~~
ALE /ADV _____"
ADDRESS /DATA -------~t~~~J-----------<JD~A~TA~INy-------------
270795-19
2·95
:SX9XJF'
- _
_S.SVoe
Power Supply Rls. Time
_4.SVOC
Vee -
XTAL
- r- Stort Time from Po~er Supply Rise to External Output Low
I11111111 11111111111111111111111111111111111111111111111111111111111111111111111111111111111
Ie-----
RESET )I ---1 I-- Release
External to Internal
HSO.O-HSO.3,
P2 .0,P2.5
-- Time
10 STATE TIMES
PORT3&c4
WITH PULLUPS I ADDRESS DATA ADDRESS I
I' - 201BH CCB 20BOH
FIRST BUS FETCH CYCLE PROGRAM
TRLPV = 10XTAL CYCLES START
ExternoI RESET Low to
Port Va lid Time RESET fUNCTION REGISTERS
I
TOTAL 8X9XJF RESET TIME
270795-20
r-TXLXl.-j'
TXD - - -U- .. -U- ---U- _··U ---U- _. -U- _. -U- _.-U-
TQVXH-j 1-.. TXLXH..J r' , TXHOV ~ ..J r-TXHOX \. TXHQZ..J I
(O~;)-<~x:::r=x 2 X 3 X 4 X 5 X 6 X 7" >-
TOVXH-j
RXD --""CCC-.-:::"T-- -
I- -I
-".c,-:--:::",r---"",:-:--::", .
r-TXHOX \
----,.rc: -.C"'.I -----'L": .-.-
(IN) ~_--''\.::.=.:'''' _ _~'''-:. :.C:__'-"'L __ --' "~_:C':::I"" ___ ~'''''--~·''-- ... _---''.~:=CI'- __ ~. 'L:.==r ...__-"c=CI .... ---.J·'L.::::.::I ...~ __
270795-21
2-96
8X9XJF
270795-22
.An external oscillator may encounter. as much as a 100 pF load at XTAL 1 when it starts-up. This is due to
interaction between the amplifier and its feedback capacitance. Once the external signal meets the VIL and
VIH specifications the capacitance will not exceed 20 pF.
270795-25 270795-26
2-97
8X9XJF
NOTES:
• These values are expected for most devices at 25°C.
•• An "LSB", as used here, is defined in the glossary which follows and has a value of approximately 5 mV.
1. DC to 100 KHz.
2. For starting the AID with an HSO Command.
3. Multiplexer Break-Belore-Make Guaranteed.
2-98
intJ 8X9XJF
Run-time Operating Conditions: Fose = 6.0 MHz to 12.0 MHz, Vee, Vpo, VREF = 5V ± 0.5V, TA = 25°C to
± 5°C and Vpp = 12.75V ± 0.25V. For run·time programming over a full operating range, contact the factory.
Symbol Parameter , Min Max Units
TAVLL ADDRESS/COMMAND Valid to PALE Low. 0, Tose
TLLAX ADDRESS/COMMAND Hold After PALE Low 80 Tose
TOVPL Output Data Setup Before PROG Low 0 Tose
TpLOX Data Hold After PROG Falling 80 Tose
TLLLH PALE PulseWid,th 180 Tose
TpLPH PROG Pulse Width 250 T08e 100}-tS +
144 Tose
TLHPL PALE High to 'P'ROO Low 250 .- Tose
TpHLL PROG High to Next PALE Low 600 Tose
TpHOX Data Hold After PROG High 30 Tose
TpHVV PROG High to PVER/PDO Valid 500 Tose
TLLVH PAtE Ldwto PVER/PDO High 100 Tose
TpLOY PROG Low to VERIFICATION/DUMP Data Valid 100 Tose
TSHLL RESET High to First PALE Low (not shown) 2000 Tose
NOTE:
Vpp must b~ within.1V of Vee while Vee < 4.5V. Vpp must not have a low impedance path to ground (or Vss) while
Vee> 4,5V.
2-99
8X9X.:JF
PORTS 3,4
PALE--_
PROG ---+---..;;;.;;.;..~
PVER VALID
__ _..I VALID
PDO VALID
__ _..I VALID
270795-27
2·100
inter 8X9XJF
A. The eight state HSI resolution changes to nine C. The HSI pins. are sampled during an internal
states. Events occurring on the same pin more timing phase. This phase, after some propaga-
frequently than once every nine state times tion time, appears externally as CLKOUT. If
may be lost. Selecting the Eight Positive Tran- the first event to be recorded into an empty
sition Mode limits the resolution to no more FIFO occurs during this CLKOUT period, and
than eight positive transitions per sixteen state the second event' occurs after that period, the
times. Transitions may n6t occur more quickly events will be entered separately with time-
than once per state time. This means tran- tags at least one count apart. If the second
sitions in one state time must stabilize and event enters the FIFO coincident with the
hold a logic level for at least one state time "skipped" time-tag situation (see item 2
before any further transitions occur. above) the time-tags will be at least two
B. A mismatch between the nine state HSI reso- counts apart. If both events occur within the
lution and the eight state hardware timer caus- period of this internal phase, there will be only
es one time-tag value to be skipped every nine one entry recording both events on one time-
timer counts. The effect on FIFO entries is to tag.
receive l:! time tag one count later than expect- 3. RESERVED LOCATION 2019H
ed every nine counts. The 1990 Architectural Overview recommends
that reserved location 2019H be filled with hex
value FFH. The recommendation is now to fill
2019H with hElx value 20H.
2-101
infel®
MCS®-96
809XJF/839XJF1879XJF
Express
• Extended Temperature Range • Burn-In
(-40°C.to +8$OC)
The Intel EXPRESS system offers enhancements to the operational specifications of the MCS®-96 family of
microcontrollers. These EXPRESS products are designed to meet the needs of those applications whose
operating requirements exceed commercial standards.
The EXPRESS program includesthe commercial standard temperature range with burn-in, and an extended
temperature range with or without burn-in.
With the commercial standard temperature range operational 9haracteristics are guaranteed over the temper-
ature range of O°C to +70°C. With the extended temperature range option, operational characteristics are
guaranteed over the range of - 40°C to· + 85°C.
The optional burn-in is dynamic, for a minimum time of 160 hours at 125°C with Vee = 5.5V ± 0.5V, following
guidelines in MIL-STD-883, Method 1015 ..
Package types and EXPRESS versi9ns are identified by a one- or two-letter prefix to the device number. The
prefixes are listed in Table 1.
This data sheet specifies the parameters for the extended temperature rangEl option. The commercial temper-
ature range data sheets are applicable otherwise.
POWER
VREF ANGND
CONTROL
SIGNALS
------
16
.. ---
PORTO PORT 1 PORT 2 HSI HSO
ALT FUNCTIONS
270796-1
MCS®-96 Block Diagram
October 1989
2-102 Order Number: 270796-001
8X9XJF EXPRESS
OPERATING CONDITIONS
Symbol Parameter Min . Max Units
TA Ambient Temperature Under Bias -40 +85 °C
Vee Digital Supply Voltage 4.50 5.50 V
,
VREF Analog Supply Voltage 4.50 5.50 V
fose Oscillator Frequeno;;y 6.0 12 MHz
VPO Power-Down Supply Voltage 4.50 5.50 V
NOTE:
ANGND and Vss should be nominally at the same potential.
2-103
intJ 8X9XJF EXPRESS
NOTES:
1. Quasi-bidirectional pins include ,those on P1, for P2.6 and P2. 7. Standard Output Pins include TXD, RXD (Mode 0 only),
PWM, and HSO pins. Bus/Control pins include CLKOUT, ALE, BHE, RD, WR, INST and ADO-15.
2. Maximum current per pin must be externally limited to the following values if VOL is held above 0.45V.
IOl on quasi-bidirectional pins and Ports 3 and 4 when used as ports: 4.0 mA
IOl on standard output pins and RESET: 8.0 mA .
tOl on Bus/Control pins: 2.0 mA
3.During normal (non-transient) operation the following limits apply:
Total IOl on Port 1 must not exceed 8.0.rnA.
TotallOl on P2.0, P2.6, RESET and allHSO pins must not exceed 15 mA.
Total IOl on Port 3 must not exceed 10 mA. .
Total IOl on P2.5, P27, and Port 4 must not exceed 20 mA.
TYLYH ~
Non-Ready Time 1000 ns
TAVDV(2) Address Valid to Input Data Valid 5Tosc-120 ns
NOTES:, ., .
1, If the 48-pin device is being used then this timing can be generated by assuming that the CLKOUT falling edge has
occurred at 2Tosc+55 (TLLCH(max) + TCHCL(max)) after the falling edge of ALE.
2. The term "Address Valid" applies to ADO-15, BHE and IN~n.
3. Pins not bonded out on 64-pin devices.
2-104
8X9XJF EXPRESS
NOTES:
1. If more than one wait state is desired, add 3Tosc for each additional wait state.
2. CLKOUT is directly generated as a divide by 3 of the oscillator. The period will be 3Tosc ± 10 ns if Tosc is constant and
the rise and fall times on XTAL 1 are less than 10 ns.
3. Pins not bonded out on 48-pin devices.
4. Max spec applies only to ALE. Min spec applies to both ALE and ADV.
5. The term "Address Valid" applies to ADO-15, BHE and INST.
6. The term" Address" in this definition applies to ADO- 7 for 8-bit cycles, and ADO-15 for 16-bit cycles.
2-105
·SX9XJF EXPRESS
PACKAGE DESIGNATORS:
N = PLCC
C = Ceramic DIP
A =;Ceramic Pin Grid Array
P = Plastic DIP
R = Ceramic LCC
U = Shrink DIP
REVISION HISTORY
This is the first data sheet for the 8X9XJF Express devices.
2-106
EV8097BH fEATURES
• Zero Wait-State 12 MHz Execution Speed
• 24K Bytes of ROMsim
• Flexible Wait-State, Buswidth, Chip-Select Controller
• Concurrent Interrogation of Memory and Registers
• Sixteen Software Breakpoints
.'Two Single-Step Modes
• High-Level Language Support
• Symbolic Debug
• RS-232-C Communication Link
EVALUATION TOOL
Intel's EV8097BH evaluation board provides a hardware environment for code execution and
software debugging at a relatively low cost. The board features the 8097BH 16-bit microcontroller
from the industry standard MCS®-96 family, The board allows you to
take full advantage of the power of the MCS-96, The EV8097BH provides zero wait-state, 12 MHz
execution of a user's code. Plus, its memory (ROMsim) can be reconfigured to match your planned
memory system, allowing for exact analysis of code execution speeds in a particular application.
**IBM pc, XT, AT and DOS are regIstered trademarks of Interndtional Busmess CorporatIOn.
-n+_I®
111'e'-_-
Intel CorporatIon assumes no respopslblhty for the use of any circUitry other than CIrcUItry embodIed In an Intel product. No other ClfCUIt patent
lIcenses are ImplIed InformatlOn con tamed herem supercedes prevlOusly published specifIcations on these deVIces from Intel.
MARCH 1989
© Intel Corporation 1989 Order number: 270739-001
2-107
, < ' .
Popular features such as'a symb~lic d~bug, sin~le-line assembier, disassembler, single-step program
execution, and sixteen software breakpoints are standard on the EV8097BH. Intel provides a
complete code development environment using assembler (ASM-96) as well as high-level languages
such as Intel's iC;96 or PL/M-96 to accelerate development schedules.
The evaluation board is hosted on an IBM PC~ or BrOS-compatible clone, already a standard
development solution in most of today's engineering environments. The source code for the on-
board monitor (written in ASM-96)is public domain. The program is about lK, and can be\!asily
modified to be included in your t'lrget hardware. In this way, the provided PC ho!\t software can be
used throughout the development phase.
2-108
HIGH LEVEL LANGUAGE SUPPORT
The host software for the EV8097BH board is able to load absolute object code generated by ASM-96,
iC-96, PL/M-96 or RL-96, all of which are available from Intel.
SYMBOLIC DEBUG
The host has a Single-Line Assembler, and a Disassmbler that recognize symbolics generated by
Intel software tools.
POWER REQUIREMENTS
The EV8097BH board requirs 5 volts at 450 rnA. If the on-board LED's are disabled, the current
drops to 300 rnA. The board also requires + / - 12 volts at 25 rnA. .
P1
.
RS-232 CHIP SELECT
BUFFERS
BUSWlDTH
READY
CPU
LOGIC
P2
Txd ~
Rxd ADDRESS
82510
810321< 810321< 810321<
ANALOG INPUT
ANALOG
DIGITAL
PortO DATA
x16
RAM6'ROM
x16
RAM6'ROM
x8
RAM£PROM
UART
,
-
DIGITAL 110 110 CONTROL
Port 1,2 '---
~ HSO,HSI
MCS·96 MACRO ASSEMBLER USER'S GUIDE wreg. A word register in the internal register file. When
Order Number 122048 (Intel systems) confusion could exist as to whether this field refers to a
Order Number 122351 (DOS systems) source register or a ~estination register it will be pre-
fixed with an "S" or a "0".
MCS·96 UTILITIES USER'S GUIDE waop. A word operand which is addressed by any of the
Order Number 122049 (Intel systems)
address modes.
Order Number 122356 (DOS systems)
Lreg. A 32-bit register in the internal register file.
PL/M·96 USER'S GUIDE
Order Number 122134 (Intel systems) caddo An address in the program code.
Order Number 122361 (DOS systems)
Flag Settings. The modification to the flag setting is
C·96 USER'S GUIDE shown for each instruction. A checkmark (,..,) means
Order Number 167632 that the flag is set or cleared as appropriate. A hyphen
means that the flag is not modified. A one or zero (1) or
80C196KC USER'S GUIDE (0) indicates that the flag wiJI be in that stat!! after the
Order Number 270704 instruction. An up arrow (t) indicates that the in-
struction may set' the flag if it is appropriate but wiJI
80C196KB USER'S GUIDE not clear the flag. A down arrow ( J, ) indicates that the
Order Number 270651 flag can be cleared but not set by the instruction. A
question mark (?) indicates that the flag will be left in
MCS·96 ARCHITECTURAL OVERVIEW an indeterminant state after the operation.
Order Number 270250
Generic Jumps and Calls. The assembler for the
The instruction set descriptions in the following sec- MCS-96 family provides for generic jumps and calls.
tions do not always show the effect on the program For all of the conditional jump instructions a "B" can
counter (PC). Unless -otherwise specified, all instruc- be substituted for the "J" and the assembler wiJI gener-
tions increment the PC by the number of bytes in the ate a code sequence which is logically equivalent but
instruction. can reach anywhere in the memory. A JH can only
jump about 128 locations from the current program
A set of acronyms are used to make the instruction set counter; a BH can jump anywhere in memory. In a like
descriptions easier to read, their definitions are listed manner a BR will cause a SJMP or LJMP to be gener-
below: ated as appropriate and a CALL wiJI cause a SCALL
or LCALL to be generated. The assembler user's guide
aa. A two bit field within an opcode which selects the should be consulted for the algorithms used by the as-
basic addressing mode user. This field is only present in sembler to convert these generic instructions into actual
those opcodes which allow address mode options. The machine instructions.
encoding of the field is as follows:
Indirect Shifts. The indirect shift operations use regis-
ters 24 through 255 (l8H-OFFH), since 0-15 are di-
aa Addressing mode
rect operators and registers 16 through 23 are Special
00 Register direct Function Registers. Note that indirect shifts through
SFRs are illegal operations.
01 Immediate
10 Indirect The maximum shift count is 31 (IFH). Count values
above this wiJI be truncated to the 5 least significant
11 Indexed bits.
3-1
MCS®-96 INSTRUCTION SET
Operation: The sum of the two word operands is stored into the destination' (leftmost)
operand.
(DESTj" - (DESn + (SRC)
""'1"'" 1""'1""'1 i 1 -
Operation: The Sum of the second and third word operands is stored into the destination
(leftmost) operand.
(DEST) - (SRC1) + (SRC2)
ST
3-2
Mcs/fij..gs INSTRuctiON SEt
Operation: Thesum"of the two byte 'operands is stored into the 'destination (leftmost)
operand. .
(DEST) +- (DES'F) + (SRC)
ST
Operation: The sum of tilesebond and'third byte operands is stored into the destination
(leftmost) operand,' ,
(DEST) +- (SRC1) + (SRC2),
ST
3-3
inter MCS~.$6 INST~UCTION,SET
Operation: The sum of the two word operands and the carry flag (0 or 1) is stored into the
destination (leftmost) operand.
(DEST) - (DEST) + (SAC) + C
Assembly Language Format: DST SAC
ADDC wreg, waop
Flags Affected
Z INlclvlvrlsT
J.1 .... j .... I .... l t l -
Operation: The sum .of the two byte operands and the carry flag (0 or 1) is stored into the
destination (leftmost) operand.
(DEST) - (DEST) + (SAC) + C
Flags Affected.
Z NlclvlvTlsT
J. .... 1 .... 1 .... 1 t 1 -
inter MCS®·96 INSTRUCTION SET
Operation: . The two word operands are ANDed,. the result having a 1 only in those bit
positions where both operands had a 1, with zeroes in all other bit positions.
The result is stored into the destination (leftmost) operand.
(DEST) - (DEST) AND (SRC)
ST
Operation: The second and third word operands are ANDed, the result having a 1 only in
those bit positions where both operands had a 1, with zeroes in all other bit
positions. The result is stored into the destination (leftmost) operand.
(DEST) - (SRC1) AND (SRC2)
ST
3-5
MCS®~96INSTRUCTION SET
Operation: The two byte operands are ANDed, the result having a 1 only in those bit
positions where both operands had a 1, with zeroes in all other bit positions.
The result is stored into the destination (leftmost) operand.
(DEST) ..... (DEST) AND (SRC)
ST
Operation: The second and third byte operands are ANDed, the result having a 1 only in
those bit positions where both operands had a 1, with zeroes in all other bit
positions. The result is stored into the destination (leftmost) operand.
(DEST) ..... (SRC1) AND (SRC2)
3-6 •
inter MCS®·96 INSTRUCTION SET
Operation:' This instruction is used to move a block of word data from one location in
memory to another. The source and destination addresses are calculated
using the indirect with auto-increment addressing modes. A long register ad-
dresses the source and destination pointers which are stored in adjacent word
registers. The number Of transfers Is specified by a word register. The blocks
of data can reside anywhere'in memory, but should not overlap.
COUNT - (CNTREG)
LOOP; SRCPTR - (PTRS)
DSTPTR - (PTRS + 2)
(DSTPTR) - (SACPTR)
(PTRS) - SRCPTR + 2
(PTRS) + 2) - DSTPTR + 2
COUNT - COUNT - 1
if COUNT < > 0 then go to LOOP
PTRSCNTREG
Assembly Language Format: BMOV Lreg, wreg
Z ST
NOTES:
1. CNTREG does not get decremented during the instruction.
2. It is easy to unintentionally create a very long un-interruptable operation
with this instruction ..
To provide an interruptable version of the BMOV for large blocks, the BMOV
instruction can be used with the DJNZ instruction. This is possible because
the pointers are modified, but CNTREG is not. Consider the example:
3-7 .
MCS@·96 INSTRUCTION SET
Operation: This instruction is used to move a block of word :data from one location in
memory to another and is interruptable. The source and destination addresses
are calculated using the indirect with auto-increment addressing modes. A
long register addresses the source and destination pointers which are stored
in adjacent word registers. The number of transfers is specified by a word
register. The blocks of data can reside a,)ywhere in memory, but should not
overlap.
PTRSCNTREG
Assembly Language Format: BMOVI Lreg, wreg
z ST
NOTES:
1. CNTREG does not get decremented during the instruction. However, if the
BMOVi is interrupted, CNTREG will be updated. Therefore, CNTREG must
be reloaded before starting a BMOVi.
inter MCS®·96 INSTRUCTION SET
Operation: The execution continues at the address specified in the operand word regis-
ter.
PC .-- (DEST)
z ST
3-9
MCS®'·96' INStfRI:JCTION SET
Flags Affected
Z I N I C I vi VT r st
- I - I .0 ·1 - I - I -
3-10
inter MCS®·96 INSTRUCTION SET
z ST
Operation: The source (rightmost) word operand is subtracted from' the destination (Ieft~
most) word operand. The flags are altered but the operands remain unaffect-
ed. The carry flag is set as complement of borrow.
. (DEST) - (SRC)
ST
3-11
MCS®·961NSTRUCTION SET
Operation: The source (rightmost) byte operand is subtracted from the destination (left·
most) byte operand. The flags are altered but the operands remain unaffected.
"The carry flag is set as complement of borrow.
(DEST) - (SRC)
Flags Affected
zlNICIVIVTIST
",1"'1"'1"'1 t 1-
Operation: This instruction is used to compare the magnitudes of two double word (long)
operands. The operands are specified using the direct addressing mode. Five
PSW flags are set following this operation, but the operands are not affected.
DST·SRC
DST SRC
Assembly Language Format: CMPL Lreg, Lreg
ST
3·12
MCS®·96 INSTRUCTION SET.
ST
Operation: Interrupts are disabled. Interrupt-calls will not occur after this instruction.
Interrupt Enable (PSW.9) +- 0
Flags Affected
ZINlclvlvTlsT
-1-1-1-1-1-
3-13
inter MCS®·96INSTRUCrIQN . SET
Flags Affected
Z N C V VT ST
- - - ? i - 8096BH
- - - ~ i - 80C196KB, 80C196KC
3-14
MCSIB>-96 INSTRUCTION SET
Operation: This instruction divides the content of the destination DOUBLE-WOAD oper-
and by the contents of the source WOAD operand, using unsigned arithmetic.
The low order word will contain the quotient; the high,order WOAD will contain
the remainder.
(low word DEST) - (DEST) / (SAC)
(high word DEST) - (DEST) MOD (SAC)
The above two statements are performed concurrently.
(
z ST
Operation: This instruction' divides the contents of the destination WOAD operand by ·the
contents of the source BYTE operand, using unsigned arithmetic. The low
order byte of the destination, (Le., the byte with the lower address) will contain
the quotient; the high order byte will contain the remainder.
(lOW byte DEST) - (DEST) I (SAC)
(high byte DEST) - (DEST) MOD (SRC)
The above two statements are performed concurrently.
z ST
3-15
MCS®·96INSTRUCTION.SET
Operation: The value of the .byte operand is decremented by 1.lf the result is not equal to
0, the distance ,from the end of this instruction to the target label is added to
. the program counter, effecting the jump. The offset from the end of this in-
struction to the target label must be in the range of - 128 to + 127. If the
result of the decrement is zero then c(;mtrol passes to the next sequential
instruction.
(COUNT) ~ (COUNT) ~ 1
if (COUNT) < > 0 then
PC ~ PC + disp (sign-extended to 16 bits)
end_if
-1-1-1-1-1-
29. DJNZW - DECREMENT AND JUMP IF NOT ZERO WORD (80C196KB and
80C196KC only)
Operation: This instruction is the same as the DJNZ except that the count is a word
operand.: A counter word is decremented; if the result is not zero the jump is
taken. The range of the jump is -128 to + 127.
COUNT ~ COUNT ~ - 1
if COUNT < > 0 then
PC ~ PC + disp (sign extended)
Z ST
3-16
MCS@·96 INSTRUCTION SET
'" ,~. .
Assembly Language Format: OPTS
z ST
OperaJlon: 'Interrupts are erlsbled following the execution of'the next statement. Interrupt-
calls cannot occur immediately folloWing this ,instruction.
Interrupt Enable (PSW.9) +- 1
z ST
-3-17
inter MCS~·96INSTRUCT:ION.SE:r .
z ST
),.',,: "
Op~ratlon: The lo~; Qrder wQrd of the operand is sign-extended throughout the high order
," , worQ ophe operand. " , , ."
if (low word DEST) < BOOOH then
(high word DEST) +- 0
else
(high word DEST) .,...: OFFFFH
enc:Lif
Flags Affected
ZINlclvlVTlsT
~ 1~ 10 10 1- I -
MCS®·96 INSTRUCTION SET
Operation: The low order byte of the operand is sign-extended throughout the high order"
byte of the operand.
if (low byte DEST) < SOH then
(high byte DEST) +- 0
else
(high byte DEST) +- OFFH
end_if
3-19
MCS®-96 INSTRUCTION SET
ST
Flags Affected
Z N V VT C x I ST
Legal Key:
Illegal Key:
- - -
0 0 0
-
0
-0 X
X
-
0
-
0
( - = Unchanged)
3-20
inter MCS®·96 INStRUCTION SET
Operation: The specified bit is tested. If it is clear (Le., 0), the distance from the end of this
instruction to the target label is added to the program counter, effecting,the
jump. The offset from the end of this instruction to the target label must be in
the range of -128 to + 127. If the bit is set (Le., 1), control passes to the next
sequential instruction.
if (specified bit) = 0 then
PC +- PC + disp (sign-extened to 16 bits)
z ST
3-21
MC$®-.96 INSTRUCTION SET
Operation: The specified bit is tested. If it is set (i.e., 1),Jhe distance from the end of this
instruction to the target label is added to the program counter, effecting the
jump. The offset from the end of this instruction to the target I.abel must be in
the range of -128 to + 127. If the bit is clear (i.e., 0), control passes to the
next sequential instruction.
if (specified bit) = 1 then
PC +- PC +disp (sign-extended to 16 bits)
z ST
Operation: If the carry flag is set (i.e., 1), the distance from the end of this instruction to
the target label is added to the program counter, effecting the jump. The offset
from the end of this instruction to the target label must be in the range of
-128 to + 127. If the carry flag is clear (i.e., 0), control passes to the next
sequential instruction.
if C = 1 then
PC +- PC + disp (sign-extended to 16 bits)
ST
3-22
MCS®·96 INSTRUCTION SET
Operation: If the zero flag is set (i.e., 1), the distance from the' end of this instruction to the
target label is added to the program counter, effecting the Jump. The offset
from the end of this instruction to the target label must be in the range of
-128 to + 127. If the zero flag is clear (i.e., 0), control passes to the next
,sequential instruction.
ifZ=1then
PC +- PC + qisp (sign-extended to 16 bits)
Z ST
Operation: If the negative flag is clear (i.e., 0), the distance from the end of this instruction
, to the target label is added to the program counter, effecting the jump. The
offset from the end of this instruction to the target label must be in the range
of --:,128 to + 127. If the negative flag is set (Le., 1), control passes to the next
. sequential instruction.
ifN = o then
PC +- PC +- disp (sign-extended to 16 bits)
Z ST
('
3·23
MCS®·96 INSTRUCTION:SET
Operation: If both the negative flag and the zero flag are clear (Le., 0), the distarice from
the end of this instruction to the target label is added to the program counter,
effecting the jump. The offset from the end of this instruction to the target
label must be in the range of - 128 to + 127. If either the negative flag or the
zero flag are set (Le., 1,) control passes to the next sequential instruction.
if N = 0 AND Z = 0 then
PC ~ PC + disp (sign-extended to 16 bits)
.2 ST
'-
Operation: If the carry flag is set (Le., 1), but the zero flag is not, the distance from the end
of this instruction to the target label is added to the program counter, effecting
the jump. The offset from the end of this instruction to the target label must be
in the range of -128 to + 127. If either the carry flag is clear or the zero flag is
set, control passes to the next sequential instruction.
if C = 1 AND Z = 0 then
PC ~ PC + disp (sign-extended to 16 bits)
Z ST
3-24
MCS®·96 INSTRUCTION SET
Operation: If either the negative flag or the zero flag are set (Le., 1), the distance from the
end of this instruction to' the target label is added to the program counter,
effecting the jump. The offset from the end of this instruction to the target
label must be in the range of - 128 to + 127. If both the negative flag and the
zero flag are clear (Le., 0), control passes to the next sequential instruction.
if N = 1 OR Z = 1 then
PC +,- PC + disp (sign-extended to 16 bits)
Operation: If the negative flag is set (Le.; 1), the distance from the end of this instruction
to the target label is added to th.e program counter, effecting the jump. The
offset from the end of this instruction to the target label must be in the range
of -128 to+ 127. If the nl'lgative flag is clear (Le., 0), control passes to the
next sequential instruction.
ifN=1then
PC -- PC + disp (sign-extended to 16 bits)
3-25
MCS®·96 INSTRUCTION SET
Operation: If the carry flag is clear (i.e., 0), the distance from the end of this instruction to
the target label is added to the program counter, effecting the jump. The offset
from the end of this instruction to the target label must be in the range of
-128 to + 127. If the carry flag is set (Le., 1), control passes to the next
sequential instructiQn. .
if C = 0 then
PC - PC + disp (sign-extended to 16 bits)
-1-1-1-1-1-
Operation: If the zero flag is clear (i.e., 0), the distance from the end of this instruction to
the target label is added to the program counter, effecting the jump. The offset
from the end of this instruction to the target label must be in the range of
-128 to + 127. If tbe zero flag is set (Le., 1), control passes to the next
sequential instruction.
if Z = 0 then
PC - PC + disp (sign-extended to 16 bits)
? . ST
3-26
inter MCS®-96 INSTRUCTION SET
Operation: If either the carry flag is clear (i.e., 0), or the zero flag is set (Le., 1), the
distance from the end of this instruction to the target label is added to program
counter, effecting the jump. The offset from the end of this instruction to the
target label must be in the range of - 128 to + 127. If the carry flag is set (Le.,
1) and the zero flag is not, control passes to the next sequential instruction.
if C = 0 OR Z = 1 then
PC +- PC + disp(sign-extended to 16 bits)
Assembly Language Format: JNH cadd
Z ST
Operation: If the sticky bit flag is clear (Le., 0), the distance from the end of this instruction
to the target label is added to the program counter, effecting the jump. The
offset from the end of this instruction to the target label must be in the range
of -128 to + 127. If the sticky bit flag is set (Le., 1), control passes to the next
sequential instruction.
if ST = 0 then
PC +- PC + disp (sign-extended to 16 bits)
Z ST
3-27
MCS®·96 INSTRUCTION SET
Operation: If the overflow flag is clear (Le., 0), the distance from the end of this instruction
to the target label is added to the program counter, effecting the jump. The
offset from the end of this instruction to the target label must be in the range
of -128 to +127. If the overflow flag is set (Le., 1), control passes to next
sequential instruction.
ifV=Othen
PC -- PC + disp (sign-extended to 16 bits)
Flags Affected
zlNlclvlVTlsT
-1-1-1-1-1-
Operation: If the overflow trap flag is clear (Le., 0), the distance from the end of this
instruction to the target label is added to the program counter, effecting the
jump. The offset from the end of this instruction to the.target label must be in
the range of -128 to +127. if the overflow trap flag is set (Le., 1), control
passes to the next sequential instruction. The VT flag is cleared.
if VT = 0 then
PC -- PC + disp (sign-extended to 16 bits)
ST
3-26
MCS®·96 INSTRUCTION SE.T
Operation: If the sticky bit flag is set (Le., 1), the distance from the end of this instruction
to the target label is added to the program counter, effecting the jump. The
offset from the erid of this instruction to the target label must be in the range
of -128 to + 127. If the sticky bit flag is clear (i,e., 0), control passes to the
next sequential instruction.
if ST= 1 then
PC +- PC + disp (sign-extended to 16 bits)
z ST
Operation: If the overflow is set (Le., 1), the distance from the end of this instruction to the
target label is added to the. program counter, effecting the jump. The offset
from the end of this instruction to the target label must be in the range of
-128 to + 127. If the overflow flag is clear (Le., 0), control passes to the next
sequential instruction.
if V = 1 then
PC +- PC + disp (sign-extended to. 16 bits)
z ST
3-29
MCS®~96 INStRUCtiON SET
Operation: If the overflow trap flag is set (Le., 1), the distance from the end of this instruc-
tion to the target label is added to the program counter, effecting the jump.
The offset from the end of this instruction to the target label must be in the
range of -128 to + 127. If the overflow trap flag is clear (Le., 0), control
passes to the next sequential instruction. The VT flag is cleared.
if VT = 1 then
PC - PC + disp (sign-extended to 16 bits)
Operation: The contents of the program counter (the return address) is pushed onto the
stack. Then the distance from the end of this instruction to the target label is
added to the program counter, effecting the call. The operand may be any
address in the entire address space.
SP - SP - 2
(SP) - PC
Pc. - PC + disp
3-30
MCS®-96 INSTRUCTION SET
Operation: The value of the source (rightmost) word operand is stored into the destination
(leftmost) operand.
(OEST) - (SRC)
z ST
Operation: The value of the source (rightmost) byte operand is stored into the destination
(leftmost) operand.
(OEST) - (SRC)
3·31
MCS®-96 INSTRUCTIONS!:T j
,~
Operation: The value of the source (rightmost) byte operand is sign-extended and stored
into the destination (leftmost) word operand.
(low byte DEST) +- (SAC)
if (SAC) < 80H then
(high byte DEST) +- 0
else
(high byte DEST) +- OFFH
end_if
Flags Affected
Z1N 1c 1V 1VT 1ST
-1-1-1-1-1-
Operation: The value of the source (rightmost) byte operand is zero-exte,nded and stored
into the destination (leftmost) word operand.
(low byte DEST) +- (SAC)
(high byte DEST) +- 0
3-32
MCS®-96 INSTRUCTION SET
Operation: The distance from the end of this instruction to the target label is added to the
program counter, effecting the jump. The operand may be any address in the
.entire address space.
PC::: - PC+ disp
z ST
Operation: The two INTEGER operands are multiplied using signed arithmetic and the 32-
bit result is stored into the destin/!,tion (leftmost) LONG·INTEGER operand.
The sticky bit flag is undefined after the instruction is executed.
(DEST) - (DEST)· (SRC)
z ST
?
3-33
inter MCS®·96 INSTRUCTION SET
Operation: The second and third INTEGERoperands are multiplied. using Signed arithme-
tic and the 32-bit result is stored into the destination (leftmost) LONG INTE-
GER operand. The sticky bit flag is undefined after the instruction is executed.
(DEST) - (SRC1) • (SRC2)
z ST
?
.
64. MULB (Two Operands) - MULTIPLY SHORT-INTEGERS
Operation: The two SHORT-INTEGER operands are multiplied using signed arithmetic
and the 16-bit result is stored into the destination (leftmost) INTEGER oper-
and. The sticky bit flag is undefined after the instruction is executed.
(DEST) - (DEST)' (SRC)
z ST
?
3-34
inter MCS®·96 INSTRUCTION SET
Operation: The second and third SHORT-INTEGER operands are multiplied using signed
arithmetic and the 16-bit result is stored into the destination (leftmost) INTE-
GER operand. The sticky bit flag is undefined after the instruction is executed.
(DEST) +- (SRC1)· (SRC2)
z ST
?
Operation: The two WORD operands are multiplied using unsigned arithmetic and the 32-
bit result is stored into the destination (leftmost) DOUBLE-WORD operand.
The sticky bit flag is undefined after the instruction is executed.
(DEST) +- (DEST)' (SRC)
Operation: The second and third WOAD operands are multiplied using unsigned arithme-
tic and the 32-bit result is stored into the destination (leftmost) DOUBLE-
WOAD operand. The sticky bit flag is undefined after the instruction is execut-
ed.
(DEST) ~ (SAC1) • (SAC2)
Operation: The two BYTE operands are multiplied using unsigned arithmetic and the
. WORD result is stored into the destination (leftmost) operand. The sticky bit
flag is undefined after the instruction is executed.
(DEST) ~ (DEST)' (SAC)
z ST
?
3-36
inter MCS®-96 INSTRUCTION SET
Operation: The second and third BYTE operands are multiplied using unsigned arithmetic
and the WORD result is stored into the destination (leftmost) operand. The
sticky bit flag is undefined after the instruction is executed.
(DEST) +- (SRC1)' (SRC2)
z ST
?
3·37
,
MCS®·96 INSTRUCTION SET
ST
z ST
inter MCS@·96 INSTRUCTION SET
. Operation: The LONG-INTEGER operand is normalized; i.e., it is shifted to the left until its
most significant bit is 1. If the most significant bit is still 0 after 31 shifts, the
process stops and the zero flag is set. The number of shifts actually performed
is stored in the second operand.
(COUNT) +- 0
do while (MSB(DEST) = 0) AND ((COUNT) < 31)
(DEST) +- (DEST) • 2
(COUNT) +- (COUNT) + 1
end_while
Operation: The value of the WORD operand is complemented: each 1 is replaced with a
0, and each 0 with a 1.
(DEST) +- NOT (DEST)
ST
3-39
Mc:S@-96 INSTRUCr.ON SET
Operation: The vaule of the BYTE operand is complemented: ~ach 1 is replaced with a 0,
and each 0 with a 1.
. (DEST) ..- .NOT (DEST)
ST
Operation: The sc;>urce (rightmost) WORD is ORed with the destination (leftmost) WORD
operand. Each bit is set to 1 if the corresponding bit in either the source
operand or the destination operand is 1. The result replaces the original desti-
nation operand.
(DJ:ST) ..- (DEST) OR (SRC)
ST
3-40
inter MCS®-96 INSTRUCTION SET
Operation: The source (rightmost) BYTE operand is ORed with the destination (leftmost)
BYTE operand. Each bit is set to 1 if the corresponding bit in either the source
operand or the destination operand was 1. The result replaces the original
destination operand.
(DEST) - (DEST) OR (SRC)
Operatlo~: The word on top of the stack is popped and placed at the destination operand.
(DEST) - (SP)
SP - SP + 2
z ST
3-41
intJ MCS®-96 INSTRUCTION SET
Operation: This instruction is used instead of POPF to support the 8 additional interrupts.
It is similar to POPF, but pops two words instead of one. The first word is
popped into the INT...,.MASK1/WSR register pair, while the second word is
popped into the PSW/INT_MASK register pair. As a result of this instruction
the SP is incremented by 4. Interrupts cannot occur between this instruction
. and the one following it.
INT_MASK1 IWSR +- (SP)
SP +- SP + 2
PSW/INT_MASK +- (SP)
SP +- SP + 2
(", = changed)
Operation: The word on top of the stack is popped and placed in the PSW. Interrupt calls
cannot occur immediately following this instrl,lction.
(PSW) +- (SP)
SP +- SP + 2
Flags Affected
z I N I c I V I VT I ST
", I ", I ", I ", I ", I ",
3-42
MCS®·9E$ INSTRUCTION SET
z ST
Operation: This instruction is used instead of PUSHF to support the 8 additional inter-
.rupts. It is similar to PUSHF, but pushes two words instead of one. The first
word pushed is the same as for the PUSHF instruction, PSW/INT_MASK.
The second word pushed is formed by the INT_MASK1/WSR register pair.
As a result of this instruction the PSW, INT_MASK, and INT_MASK1 regis-
ters are cleared, and the SP is decremented by 4. Interrupts are disabled in
two ways by this instruction since both PSW.9 and the interrupt masks are
cleared. Interrupts cannot occur between this instruction and the one following
it.
SP +- SP - 2
(SP) +- PSW/INT_MASK
PSW/INT_MASK +- 0
SP +- SP - 2
(SP) +- INT_MASK1/WSR
INT_MASK1 +- 0
z ST
o o
3-43
inter MCS®·96 INSTRUCTION SET
Operation: The PSW is pushed on top of the stack, and then set to aU zeroes. This implies
that all interrupts are disabled. Interrupt-calls cannot occur immediately follow-
ing this instruction.
SP ~ SP - 2
(SP) ~ PSW
PSW ~ 0
z ST
.0 o
z ST
3-44
inter MCS®-96 INSTRUCTION SET
Operation: The PSW is initialized to zero, and the PC is initialized to 2080H. The 1/0
registers are set to their initial value. Executing this i,nstruction will cause a
pulse to appear on the reset pin.
PSW +- 0
PC' +- 2080H
Operation: The contents of the program counter (the return address) is pushed onto the
stack. Then the distance from the end of this instruction to the target label is
added to the program counter, effecting the call. The offset from .the end of
this instruction to the target label must be in the range of -1024 to + 1023
inclusive.
SP +- SP - 2
(SP) +- PC
PC +- PC + disp (sign-extended to 16 bits)
z ST
3-45
inter MC~®·96 I~STRUqT'ON SET
z ST
Operation: The destination (leftmost) word operand is shifted left as many times as speci-
fied by the count (rightmost) operand. The count may be specified either as an
immediate value in the range of 0 to 15 (OFH) inclusive, or as the content of
any register above 15H. Details on indirect shifts can be found in the Over-
view. The right bits of the result are filled with zeroes. The last bit shifted out is
saved in the carry flag.'
Temp _ (COUNT)
do while Temp < > 0
C - High order bit of (DEST)
(DEST) - (DEST) • 2
. Temp - Temp-1
end_while
3-46
inter MCS®-96 INSTRUCTION SET
Operation: The destination (leftmost) byte operand is shifted left as many times as speci-
fied by the count (rightmost) operand. The count may be specified either as an
immediate value in the range of 0 to 15 (OFH) inclusive, or as the content of
any register above 15H. Details on indirect shifts can be found in the Over-
view. The right bits of the result are filled with zeroes. The last bit shifted out is
saved in the carry flag.
Temp +- (COUNT)
do while Temp < > 0
C +- High order bit of (DESn
(DEST) +- (DEST) • 2
TEMP +- Temp - 1
end_while
ST
3-47
MC$@~96 fNSTRUCTION SET
Operation: The destination (leftmost) double-word' operand is Shifted left as many times
as specified by the count (rightmost) operand. The count may be specified
either as an immediate value in the range of 0 to 15 (OFH) inclusive, or as the
content of any register above 15H. Details on indirect shifts can be found in
the Overview. The right bits of the result are filled with zeroes. The last bit
shifted out is saved in the carry flag.
Temp - (COUNT)
do while Temp < > 0
C - High order bit of (DEST)
(DEST) - (DEST)' ,2
Temp - Temp - 1
end_while
ST
;3-48
MCS®·96 INSTRUCTION SET
Operation: The destination (leftmost) word operand is shifted right as many times as
specified by the count (rightmost) operand. The count may be specified either
as an immediate value in the range of 0 to 15 (OFH) inclusive, or as the
content of any register above 15H. Details on indirect shifts can be found in
the OVerview. The left bits of the result are filled with zeroes. The last bit
shifted out is saved to the carry. The sticky bit flag is cleared at the beginning
of the instruction, and set if at any time during the shift a 1 is shifted first into
the carry flag, and a further shift cycle occurs.
Temp - (COUNT)
do while Temp < > 0
C - Low order bit of (DEST)
(DEST) - (DEST) / 2 where / is unsigned division
Temp - Temp - l'
end_while
3-49
,. " v
MCS~-96 INSTRUCTION SET
Operation: The destination (leftmost) word operand is shifted right as many times as
. specified by the count (rightmost) operand. The count may be specified either
as an immediate value' in the range ·of o· to 15 (OFH) inclusive, or as the
content of any register above 15H. Details on indirect shifts can be found in
the Overview: If the original high order bit value was 0, zeroes are shifted in. If
the value was 1, ones are shifted in. The last bit shifted out is saved in the
carry. The sticky bit flag is cleared at the beginning of the instruction, and set if
at any time during the shift a 1 is shifted first into the carry flag, and a further
shift cycle occurs.
Temp ..- (COUNT)
do while Temp < > 0
C ..- Low order bit of (DEST)
(DEST) ..- (DEST) / 2 where / is signed division
Temp ..- Temp - 1
end_while
3-50
intJ MCS®·96 INSTRUCTION SET
Operation: The destination (leftmost) byte operand is shifted right as many times as spec-
ified by the count (rightmost) operand. The count may be specified either as
an immerliate vdlue in the range of 0 to 15 (OFH) inclusive, or as the content of
any register above 15H. Details on indirect shifts can be found in the Over-
. view. If the original high order bit value was 0, zeroes are shifted in. If that
value was 1, ones are shifted in. The last bit shifted out is saved in the carry.
The sticky bit flag is cleared at the beginning of the instruction, and set if at
anytime during the shift a 1 is shifted first into the carry flag, and a further shift
cycle occurs.
Temp - (COUNT)
do while Temp < > 0
C, = Low order bit of (DEST)
(DEST) - (DEST) / 2 where / is signed division
Temp - Temp - 1
end_while
3-51
MCS®·96 INSTRUCTION SET
Operation: The destination (leftmost) double-word operand is shifted right as many times
as specified by the count (rightmost) operand. The count may be specified
either as an immediate value in the range of 0 to 15 (OFH) inclusive, or as the
content of any register above 15H. Details on indirect shifts can be found in
the Overview. If the original high order bit value was 0, zeroes are shifted in. If
the value was 1, ones are shifted in. The sticky bit is cleared at the beginning
of the instruction, and set if at any time during the shift a 1 is shifted first into
the carry flag, and a further shift cycle occurs.
Temp+- (COUNT)
do while Temp < > 0
C +- Low order bit of (DEST)
(DEST) +- (DEST) I 2 where I is signed division
Temp +- Temp - 1
end_while
3-52
inter MCS®·96 INSTRUCTION SET
Operation: . The destination (leftmost) byte operand is shifted right as many times as spec-
ified by the count (rightmost) operand, The count may be specified either as
an immediate value 'in the range of 0 to 15 (OFH) inclusive, or as the content of
any register above 15H. Details on indirect shifts can be found in the Over-
view. The left bits of the result are filled with zeroes. The last bit shifted out is
saved in the carry. The sticky bit flag is cleared at the beginning of the instruc-
tion, and set if at any time during the shift a 1 is shifted first into the carry flag,
and a further shift cycle occurs.
Temp +- (COUNT)
do while Temp < > 0
C +- Low order bit of (DEST)
(DEST) +- (DEST) / 2 where / is unsigned division
Temp +- Temp - 1
end_while
3-53
inter MCS®·96 INSTRUCTION SET
Operation: The destination (leftmost) double-word operand is shifted right as many times
as specified by the count (rightmost) operand .. The count may be specified
either. as an immediate value lin the range of 0 to 15 (OFH) inclusive, or as the
content.of any register above 15H. Details on indirect shifts can be found in
the Overview. The .left· ;bits of the, result are filled with zeroes. The last bit
shifted out is saved in the c<\rry. The sticky bit flag is cleared at the beginning
of the instruction, and set if at any time during the shift a 1 is shifted first into
the carry flag, and a .further shift cycle occurs. .
Temp . - (COUNT)
do while Temp < > 0
C . - Low order bit of (DEST)
(DSET) . - (DEST) I 2 where I is unsigned division
Temp . - Temp - 1
end_while
Flags Affected
zlNlclvlvTIST
..-101..-101-1..-
3-54
intJ MCS®·96 INSTRUCTION SET
Operation: The distance from the end of this instruction to the target label is added to the
program counter, effecting the jump. The offset from the end of this instruction
to the label must be in the range of -1024 to + 1023 inclusive.
PC ~ PC + disp (sign-extended to 16 bits)
Flags Affected
z 1 N 1 C 1 V 1VT 1ST
-1-1-1-1-1-
Operation: Nothing is done. This is actually a two-byte NOP where the second byte can
b~ any value, and is simply ignored. Control passes to the next sequential
instruction.
z ST
3-55
MCS®~96 INSTRUCTION SET
Operation: The value of the leftmost word operand is stored into the rightmost operand.
(DEST) - (SRC)
z ST
Operation: The value of the leftmost byte operand is stored into the rightmost operand.
(DEST) - (SRC)
z ST
3·56
1
MCS®·96 INSTRUCTION SET
Operation: The source (rightmost) word operand is subtracted from the destination (left-
most) wOrd operand, and the result is stored in the destination. The carry flag
is set as complement of borrow.
(DEST) - (DEST) - (SRC)
ST
Operation: The source (rightmost) word operand is subtracted from the second word
operand, and the result is stored in the destination (the leftmost operand). The
carry flag is set as complement of borrow.
(DEST) - (SRC1) - (SRC2)
ST
3-57
inter MCS®·96 INSTRUCTION SET
Operation: The source (rightmost) byte is subtracted from the destination (leftmost) byte
operand, and the result is stored in the destination. The carry flag is set as
complement of borrow.
(DEST) +- (DEST) - (SRC)
Operation: The source (rightmost) byte operand.is subtracted from the second byte oper-
and. and the result is stored in the destination (the leftmost operand). The
carry flag is set as complement of borrow.
(DEST) +- (SRC1) - (SRC2)
ST
3-58
inter MCS®-96 INSTRUCTION SET
Operation: 'The source (rightmost) word operand is subtracted from the destination (Ieft-
, most) word operand. If the carry flag was clear, 1 is subtracted from the above
result. The result replaces the orignal destination operand. The carry flag is
set as complement of borrow.
(DEST) +- (DEST) - (SRC) - (1-C)
Operation: The source (rightmost) byte operand is subtracted from the destination (left-
most) byte operand. If the carry flag was clear, 1 is subtracted from the above
result. The result replaces the original destination operand. The carry flag is
set as complement of borrow.
(DEST) +- (DEST) - (SRC) - (1-C)
ST
3-59
inter MCS®·96 INSTRUCTION SET
z ST
3-S0
intJ MCS®·96 INSTRUCTION SET
Assembly Language Format: This instruction is not supported by revision 1.2 of the 8096 assembly lan-
guage.
z ST
Operation: The source (rightmost) word operand is XORed with the destination (leftmost)
word operand. Each bit is set to 1 if the corresponding bit. in either the source
operand or the destination operand was 1, but not both. The result replaces
the original destination operand.
(OEST) +- (OEST) XOR (SRC)
3-61
inter MCS®·96 INSTRUCTION SET
Operation: The value of the source (rightmost) word operand is exchanged with the desti-
'nation (leftmost) operand.
(DEST) - (SRC)
Operation: The value of the source (rightmost) byte operand is exchanged with the desti-
nation (leftmost) operand. .
(DEST) - (SRC)
3-62
intJ MCS®·96 INSTRUCTION SET
Operation: The source (rightmost) byte operand is XORed with the destination (leftmost)
byte operand. Each bit is set to 1 if the corresponding bit in either the source
operand or the destination operand was 1, but not both. The result replaces
the original destination operand.
(DEST) ~ (DEST) XOR (SRC)
ST
3·63
80C196KB User's Guide 4
and Data Sheets
November 1990
80C196KB
User's Guide
1.0 CPU OPERATION .................... 4-4 '6.0 Pulse Width Modulation Output
1.1 Memory Controller ................. 4-5 (D/A) ................................. 4-36
1.2 CPU Control ....................... 4-5 6.1 Analog Outputs ................... 4-38
1.3 InternalTiming ..................... 4-5 7.0 TIMERS . ............................ 4-39
2.0 MEMORY SPACE .................... 4-7 7.1 Timer1 ........................... 4-39
2.1 Register File ....................... 4-7 7.2 Timer2 ........................... 4-39
2.2 Special Function Registers ......... 4-7 7.3 Sampling on External Timer
Pins ............................... 4-39
2.3 Reserved Memory Spaces ........ 4-11
7.4 Timer Interrupts .................. 4-40
2.4 Internal ROM and EPROM ........ 4-11
2.5 System Bus ...................... 4-12 8.0 HIGH SPEED INPUTS., ............. 4-41
8.1 HSI Modes ....................... 4-42
3.0 SOFTWARE OVERViEW ............ 4-12
8.2 HSI Status ........................ 4-42
3.1 Operand Types ................... 4-12
8.3 HSI Interrupts ..................... 4-43
3.2 Operand Addressing .............. 4-13
8.4 HSllnput Sampling ............... 4-43
3.3 Program Status Word ............. 4-15
8.5 Initializing the HSI ................. 4-43
3.4 Instruction Set .................... 4-17
3.5 80C196KB Instruction Set 9.0 HIGH SPEED OUTPUTS ............ 4-43
Additions and Differences .......... 4-25 9.1 HSO Interrupts and Software
3.6 Software Standards and Timers ............................. 4-44
Conventions ....................... 4~25 9.2 HSO CAM ........................ 4-45
3.7 Software Protection Hints ......... 4-26 9.3 HSO Status ....................... 4-46
4.0 PERIPHERAL OVERVIEW .......... 4-26 9.4 Clearing the HSO and Locked
Entries ............................. 4-46
4.1 Pulse Width Modulation Output
(D/A) .............................. 4-27 9.5 HSO Precautions ....... " ........ 4-47
4.2 Timers ........................... 4-27 9.6 PWM USing the HSO, ............. 4-47
4.3 High Speed Inputs (HSI) .......... 4-27 9.7 HSO Output Timing ............... 4-48
4.4 High Speed Outputs (HSO) ....... 4-27 10.0 SERIAL PORT ..................... 4-48
4.5 Serial Port ........................ 4-27 10.1 Serial Port Status and Control ... 4-50
4.6 AID Converter .................... 4-29 10.2 Serial Port Interrupts ............. 4-52
4.7110 Ports ......................... 4-29 10.3 Serial Port Modes ............... 4-52
4.8 Watchdog Timer .................. 4-29 10.4 Multiprocessor
Communications ................... 4-54
5.0 INTERRUPTS ....................... 4-30
5.1 Interrupt Control .................. 4-32 11.0 AID CONVERTER ................. 4-54
5.2 Interrupt Priorities ................. 4-32 , 11.1 AID Conversion Process ........ 4-56
5.3 Critical Regions ................... 4-34 11.2 AID Interface Suggestions ...... 4-56
5.4 Interrupt Timing ................... 4-34 11.3 The AID Transfer Function ...... 4-57
5.5 Interrupt Summary ....... , ........ 4-35 11.4 AID Glossary of Terms .......... 4-61
4-2
80C196KB USER'S GUIDE
CONTENTS PAGE CONTENT~ PAGE
12.0110 PORTS ........................ 4-63 15.0 EXTERNAL MEMORY
12.,1 Input Ports ...... : ................4-63 INTERFACING ....................... 4-74
12.2 Quasi-Bidirectional Ports ........ 4-63 15.1 Bus Operation ................... 4-74 ,
12.3 Output Por~s ............' ......... 4-65 15.2 Chip Configuration Register ...... 4-75
12.4 Ports 3 and 4/ ADG-15 .......... 4-66 " 15.3 Bus Width ................... , .. , 4-78
15.4 HOLD/HLDA Protocol ....... ,., .4-79
13.0 MINIMUM HARDWARE 15.5 AC Timing Explanations ..... ·.... 4-81
CONSiDERATIONS ...... , ............ 4-67
15.6 Memory System Examples ...... 4-86
13.1 Power Supply ................... 4-67
15.7 I/O Port Reconstruction ......... 4-88
13.2 Noise Protection Tips ............ 4-67
13.3 Oscillator and Internal Timings ... 4-67 16.0 USING THE EPROM ... , ........... 4-88
13.4 Reset and Reset Status ......... 4-68 16.1 Power-Up and Power-Down ..... 4-88
13.5 Minimum Hardware 16.2 Reserved Locations ............. 4-89
Connections ....................... 4-71 16.3 Programming Pulse Width
Register (PPW) ..........' ...... , ... 4-90
14.0 SPECIAL MODES OF
OPERATION ..... , ................... 4-72 16.4 Auto Configuration Byte
Programming Mode ................ 4-91
14.1 Idle Mode ....................... 4-72
16.5 Auto Progr.amming Mode ........ 4-91
14.2 Powerdown Mode .... ~ .......... 4-72
16.6 Slave Programming Mode ....... 4-93
14.3 ONCE and Test Modes .......... 4-73
16.7 Run-Time Programming ......... 4-95
16.8 ROM/EPROM Memory Protection
Options ............................ 4-96
16.9 Algorithms ..................... , 4-97
4-3
80C196KB USER'S GUIDE
The 80C196KB family is a CHMOS branch of the , There ,are many members of the 80C196KB family, so
MCS@-96 family. Other members of the MCS~96 fami- , to provide easier reading this manual will refer to the
ly. incljlde the 8096BH and 8098. All of.. the MCS-96 80C196KB family generically as the 8OC196KB.
components share a common instruction set and ~rchi Where information applies only to specific components
tecture. However the CHMOS components have en- it will be clearly indicated.
hancements to provide higher performance at lower
power consumptions. To further decrease power usage, The 80CI96KB can be separated into four sections for
these parts can be placed into idle and powerdown the, purpose of des~ribing its oper~tion. A block dia-
I!loi;les. gram is shown in Figure I-I. There is the CPU and
architecture, the instruction set, the peripherals and the
MCS-96 family members are all high-performance mi- bus unit. Each of the sections will be sub-divided as the
crocontrollers with a 16-bit CPU and at least 230 bytes discussion progresses. Let us first examine the CPU.
of on-chip RAM. They are register-to-register ma-
chines, so no accumulator is needed, and most opera-
tions can be quickly performed from or to any of the 1.0 CPU OPERATION
registers. In addition, the register operations can con-
trol the many peripherals which are available on the' The major components of the CPU on the 80C196KB
chips. These peripherals include a serial port, A/D con- are the Register File and the Register/Arithmetic Log-
verter, PWM output, up to 48 I/O lines and a High- ic Unit (RALU). Communication with the outside
Speed I/O subsystem which has 2 16·bit timer/coun- world is done through either the Special Function Reg-
ters, an 8-level input capture FIFO and an 8-entry pro- isters (SFRs) or the Memory Controller. The RALU
grammable output generator. does not use an accumulator. Instead, it operates di-
rectly on the 256-byte register space made up of the
Typical applications for MCS-96 products are closed- Register File and the SFRs. Efficient 110 operations
loop control and mid-range digital signal processing. are possible by directly controlling the I/O through the
Mc;S-96 products are being ,used in moderns, motor SFRs. The main benefits of this structure are the ability
controls, printers, engine controls, photocopiers, anti- to quickly change context, absence of accumulator bot-
lock brakes, air conditioner temperature controls, disk tleneck, and fast throughput and I/O times.
drives, and medical instrumentation.
v EF ANGND
.--------------------.
....._-_
r-~--~~ :CrPU______•
,
... ,:,
,,,
, CONTROL
SIGNALS
PORT 3
l ~f~:
BUS
'--- ....
/
PORT 4
1+---1--
AID ALTERNATE
FUNCTIONS HSO
270651-1
4-4
80C196KB USER'S GUIDE
The CPU on the 80C196KB is 16 bits wide and con- REGISTERI ALU (RALU)
nects to the interrupt controller and the memory con-
troller by a 16-bit bus. In addition, there is an 8-bit bus Most calculations performed by the 80C196KB take
which transfers instruction bytes from the memory con- place in the RALU. The RALU, shown in Figure 1-2,
.troller to the CPU. An extension of the 16-bit bus con- contains a 17-bit ALU, the Program Status Word
nects the CPU to the peripheral devices. (PSW), the Program Counter (PC), a loop counter, and
three temporary registers. All of the registers are 16-
bits or 17-bits (16+ sign extension) wide. Some of the
1.1 Memory Controller registers have the ability to perform simple operations
to off-load the ALU. .
The RALU talks to the memory, except for the loca-
tions in the register file and SFR space, throug1). the A separate incrementor is used for the Program Coun-
memory controller. Within the memory controller is a ter (PC) as it accesses operands. However, PC changes
bus controller, a four byte queue and a Slave Program due to jump,s, calls, returns and inrerrupts must be han-
Counter (Slave PC). Both the internal ROMIEPROM dled through the ALU. Two of the temporary registers
bus and the external·memory bus are driven by the bus have their own shift logic. These registers are used for
controller. Memory access requests to the bus control- the operations which require logical shifts, including
ler can come from either the RALU or the· queue, with Normalize, Multiply, and Divide. The "Lower Word"
queue accesses having priority. Requests from the and "Upper Word" are used together for the 32-bit
queue are always for instruction at the address in the instructions and as temporary registers for many in-
slave PC. structions. Repetitive shifts are counted by the 6-bit
"Loop Counter".
By having program fetches from memory referenced to
the slave PC, the processor saves time as addresses sel- A third temporary register stores the second operand of
dom have to be sent to the memory controller. If the two operand instructions. This includes the multiplier
address sequence changes because of a jump, interrupt, during multiplications and the divisor during divisions.
call or return, the slave PC is loaded with a new value, To perform subtractions, the outp~t of this register can
the queue· is flushed, and· processing continues. be complemented before being placed into the "B" in-
put of the ALU.
Execution speed is increased by using a queue since it
usually keeps the next instruction byte available. The Several constants, such as 0, 1 and 2 are stored in the
instruction execution times shown in Section 3 show RALU to speed. up certain calculations. (e.g. making a
the normal execution times with no wait states added 2's complement number or performing an increment or
and the 16-bit bus selected. Reloading the slave PC and decrement instruction.) In addition, single bit masks for
fetching the first byte of the new instruction stream bit test instructions ate generated in the constant regis-
takes 4 state times. This is reflected in the jump taken! ter based on the 3-bit Bit Select register.
not-taken times shown in the table.
When debugging code using a logic analyzer, one must 1.3 Internal Timing
be aware of the queue. It is not possible to determine
when an instruction will begin executing by simply The 80C196KB requires an input clock on XTALI to
watching when it is fetched, since the queue is filled in function. Since XTALI and XTAL2 are the input and
advance of instruction execution. output of an inverter a crystal can be used to generate
the clock. Details of the circuit and suggestions for its
use can be found in Section 13:
1.2 CPU Control
Internal operation of the 80C196KB is based on the
A microcode engine controls the CPU, allowing it to crystal or external oscillator frequency divided by 2.
perform operations with any byte, word or double word Every 2 oscillator periods is referred to as one "state
in the 256 byte register space. Instructions to the CPU time", the basic time measurement for all 80C196KB
are taken from the queue and stored temporarily in the operations. With a 12 MHz oscillator, a state time is
instruction register. The microcode engine decodes the 167 nanoseconds. With an 8 MHz oscillator, a state
instructions .and generates the correct sequence of time is 250 nanoseconds, the same as an 8096BH run-
events to have the RALU p~rform the desired function. ning with a 12 MHz oscillator. Since the 80C196KB
Figure 1-2 shows the memory controller, RALU, in- will be run at many frequencies, the times given
struction register and the control unit. throughout this chapter will be in state times or
"states", unless otherwise specified. A clock out
4-5
l
Memory
"TI
Bus
C
;1
!"
H
Upper word
register
w/shifter
~I
Lower word
DI
:::I
H register
w/shifter
CD
o
...o
Do i;:IIi;
IH
Register Processor
i: Status
CD File OJ
3 Word
.j>. c:
m -<0 and U)
rn
0 Special ::D
0
:::J
Function cii
::::
0
Registers
c;)
.
~ M
CPU
i' E
~ Control
and Status
o
rn
CD
6" ALU Signals
n
~
C
..
iii"
CD
DI
3
16
CPU BUSES
8
270651-2
inter 80C196KB USER'S GUIDE
4-7
80C196KB USER'S GUIDE
Listed registers
are present in
all three windows
19H 19H
STACK POINTER STACK POINTER
18H 18H
17H 'IOS2 17H PWM_CONTROL
16H 10Sl 16H 10Cl
15H 10SO 15H lOCO
14H 'WSR 14H 'WSR
13H 'INT MASK 1 13H 'INT MASK 1
12H 'INT PEND 1 12H 'INT PEND 1
llH 'SP_STAT llH 'SP_CON
10H PORT2 10H PORT2 10H RESERVED"
OFH PORTl OFH PORn OFH RESERVED"
OEH PORTO OEH BAUD RATE OEH RESERVED"
ODH TIMER2 (HI) ODH TIMER2(HI) ODH 'T2 CAPTURE (HI)
OCH TIMER2 (LO) OCH TIMER2 (LO) OCH 'T2 CAPTURE (LO)
OBH TIMERl (HI) OBH 'IOC2
WSR ~ 15
OAH TIMERl (LO) OAH WATCHDOG
09H INT_PEND 09H INT_PEND OTHER SFRS IN WSR 15 BECOME
08H INT MASK OSH INT MASK READABLE IF THEY WERE WRITABLE
IN WSR ~ 0, AND WRITABLE IF THEY
07H SBUF(RX) 07H SBUF(TX) WERE READABLE IN WSR ~ 0
06H HSI STATUS 06H HSO COMMAND
05H HSI TIME (HI) 05H HSO TIME (HI)
04H HSI_TIME (LO) 04H HSO TIME (LO) 04H PPW
03H AD_RESULT (HI) 03H HSI_MODE WSR ~ 14
02H AD_RESULT (LO) 02H AD_COMMAND
01H ZERO REG (HI) 01H ZERO REG (HI) 'NEW OR CHANG~D REGISTER
OOH ZERO REG (LO) ,OOH ZERO REG (LO) FUNCTION FROM S096BH
"RESERVED REGISTERS SHOULD NOT
WHEN READ WHEN WRITTEN
WSR ~ 0 BE WRITTEN OR READ
4-8
inter 80C196KB USER'S GUIDE
Register Description
RO Zero Register - Always ~eads as a zero, useful for a base when indexing and as a
constant for calculations and compares.
AD_RESULT AID Result Hi/low - low and high order results of the AID converter
AD_COMMAND AID Command Register - Controls the AID
HSI_MODE HSI Mode Register - Sets the mode of the High Speed Input unit.
HSI TIME HSI Time Hillo - Contains the time at which the High Speed Input unit was triggered.
HSO_TIME HSO Time Hi/lo - Sets the time or count for the High Speed Output to execute the
command in the Command Register.
HSO_COMMAND HSO Command Register - Determines what will happen at the. time loaded into the
HSO Time registers. '
HSI_STATUS HSI Status Registers - Indicates which HSI pins were detected at the time in the HSI
Time registers and the current state of the pins. In Window 15 - Writes to pin
detected bits, but not current state bits.
SBUF(TX) Transmit buffer for the serial port, holds contents to be outputted. last written value
is readable in Window 15.
SBUF(RX) Receive buffer for the serial port, holds the byte just received by the serial port.
Writable in Window 15.
INT_MASK Interrupt Mask Register - Enables or disables the individual interrupts.
INT_PEND Interrupt Pending Register - Indicates that an interrupt signal has occurred on one of
the sources and has not been serviced. (also INT_PENDING)
WATCHDOG Watchdog Ti,mer Register - Written periodically to hold off automatic reset every 64K
state times. Returns upper byte of WDT counter in Window 15.
TIMER1 Timer 1 Hi/lo - Timer1 high arid low bytes.
TIMER2 Timer 2 Hillo - Timer2 high and low bytes.
10PORTO Port 0 Register - levels on pins of Port O. Reserved in Window 15.
BAUD_RATE Register which determines the baud rate, this register is loaded sequentially.
Reserved in Window 15.
IOPORT1 Port 1 Register - Used to read or write to Port 1. Reserved in Window 15
IOPORT2 Port 2 Register - Used to read or write to Port 2. Reserved in Window 15
SP_STAT Serial Port Status - Indicates the status of the serial port.
SP_CON Serial Port Control - Used to set the mode of the serial port.
10SO 1/0 Status Register 0 - Contains information on the HSO status. Writes to HSO pins
in Window ,15.
IOS1 1/0 Status Register 1 - Contains information on the status of the timers and of the'
HSI.
lOCO I/O Control Register 0 - Controls alternate functions of HSI pins, Timer 2 reset
sources and Timer 2 clock sources.
IOC1 1/0 Control Register 1 - Controls alternate functions of Port 2 pins, timer interrupts
and HSI interrupts.
PWM CONTROL Pulse Width Modulation Control Register - Sets the duration of the PWM pulse.
INT_PEND1 Interrupt Pending register for the 8 new interrupt vectors (also INT_PENDING1)
INT MASK1 Interrupt Mask register for the 8 new interrupt vectors
IOC2 1/0 Control Register 2 - Controls new 80C196KB features
IOS2 I/O Status Register 2 - Contains information on HSO events
WSR Window Select Register - Selects register window
Figure 2-4. Special Function Register Description
4-9
inter 80C196KB USER'S GUIDE
Programming control and test operations are done in in Window IS. (Timer2 was read-only on the 8096.)
Window 14. Registers in this window that are not la- Registers which can be read and written in Window 0
beled should be considered reserved and should not be can also be read and written in Window IS.
either read or written.
Figure 2-4 contains brief descriptions of the SFR regis-
In register Window IS (WSR= IS), the operation of ters. Detailed descriptions are contained in the section
the SFRs is changed, so that those which were read- which discusses the peripheral controlled by the regis-
only in Window 0 space are write-only and vice versa. ter. Figure 2-5 contain.s a description of the alternate
The only major exception to this is that Timer2 is read/ function in Window IS.
write in Window 0, and T2 Capture is read/write
4-10
80C196KBUSER'S GUIDE
Within the SFR space are several registers and bit loca- change the contents of this location. Refer to Section
tions labeled "RESERVED". These locations should 15.2 for more information about bus contention during
never be written or read. A reserved bit location should CCB fetch.
always be written with 0 to maintain compatibility with
future parts. Values read from these locations may
change from part to part or over temperature and volt- FFFFH
EXTERNAL MEMORY
age. Registers and bits which are not labeled should be ORIIO
treated as reserved registers and bits. Note that the de- 4000H
fault state of internal registers is 0, while that for exter- INTERNAL PROGRAM
nal memory is 1. This is because SFR functions are STORAGE ROMIEPROM
typically disabled with a zero, while external memory is OR
EXTERNAL MEMORY 20BOH
typically erased to all Is.
RESERVED 2074H-207FH
VOLTAGE LEVELS 2072H-2073H
Caution must be taken when using the SFRs as sources
of operations or as base or index registers for indirect or SIGNATURE WORD 2070H-2071H
sults, since external events can change SFRs and some INTERRUPT VECTORS 2030H-203FH
SFRs clear when read. The potential for an SFR to SECURITY KEY 2020H-202FH
~hange value must be taken into account when operat- RESERVED 2019H-201 FH
mg on these registers. This is particularly important CHIP CONFIGURATION BYTE 201BH
when high level languages are used as they may not RESERVED 2015H-2017H
always make allowances for SFR-type registers. SFRs PPW 2014H
can be operated on as bytes or words unless otherwise INTERRUPT VECTORS 2000H-2013H
specified.
Figure 2·6. Reserved Memory Spaces
2.3 Reserved Memory Spaces Resetting the 80CI96KB causes instructions to be
Locations IFFEH and IFFFH are used for Ports 3 and fetched starting from location 2080H. This location was
4 respectively, allowing easy reconstruction of these chosen to allow a system to have up to 8K of RAM
ports if external memory is used. Ari example of recon- continuous with the register file. Further information
structing the I/O ports is given in Section 15. If ports 3 on reset can be found in Section 13.
and 4 are not going to be reconstructed and internal
ROM/EPROM is not used, these locations can be
treated as any other external memory location. 2.4 Internal ROM and EPROM
When a ROM part is ordered, or an EPROM part is
Many reserved and special locations are in the memory
programmed, the internal memory locations 2080H
area between 2000H and 2080H. In this area the 18
through 3FFFH are user specified, as are the interrupt
interrupt vectors, chip configuration byte, and security
vectors, Chip Configuration Register and Security Key
key are located. Figure 2-6 shows the locations and
in locations 2000H through 207FH. Location 2014H
functions of these registers. The interrupts, chip config-
contains the PPW (Programming Pulse Width) regis-
uration, and security key registers are discussed in Sec-
ter. The PPW is used solely to program 87CI96KB
tions 5: 16, and 17 respectively. With one exception, all
EPROM devices and is a reserved location on ROM
unspecified addresses in locations 2000H through
and ROMless devices.
207FH, including those marked "Reserved" are re-
served by Intel for use in testing or future products.
Instruction and data fetches from the internal ROM or
They must be filled with the Hex value FFH to insure
EPROM occur only if the part has ROM or EPROM
compatibility with future devices. Location 2019H
EA is tied high, and the address is between 2000H and
should contain 20H to prevent possible bus contention
3FFFH. At all other times data is accessed from either
during the CCB fetch cycle. NOTE: 1. This exception
the internal RAM space or external memory and in-
applies only to systems with a 16-bit bus and external
structions are fetched from external memory. The EA
program memory. 2. Previously designed systems
pin is latched on RESET rising. Information on pro-
which do not experience bus contention don't need to
gramming EPROMs can be found in Section 16.
4-11
80C196KB USER'S GUIDE
The 80CI96KB provides a ROM/EPROM lopk feature These are the same as the names for the general. data
to allow the program to be locked against reading registers used in the 8086. It is important to note that in.
and/or writing the internal program memory. In order the 80C 196KB these are not dedicated registers but
to maintain security, code can not be executed out of merely the symbolic names assigned by the program-
the last three locations of internal ROM/EPROM if mer to an eight byte region within the on-board register
the lock is enabled. Details on this feature are in Sec- file.
tion 17.
This section provides information on writing programs ,WORDS are unsigned 16-bit variables which can take
to execute in the 80C196KB. Additional information on the values between 0 and 65535 .. Arithmetic al).d
can be found in the following documents: relational operators can be applied to WORD operands
but the result must be interpreted modulo 65536. Logi-
MCS®-96 MACRO ASSEMBLER USER'S GUIDE cal operations on WORDS are applied bitwise.. Bits
Order Number 122048 (Intel Systems) within wor,ds are labeled from 0 to 15 with 0 being the
Order Number 122351 (DOS Systems) least significant bit. WORDS must be aligned at even
byte boundaries in the MCS-96 address space. The least
MCS®-96 UTILITIES USER'S GUIDE significant byte of the WORD is in the even byte ad-
Order Number 122049 (Intel Systems) dress and the most significant byte is in the next higher
Order Number 122356 (DOS Systems) (odd) address. The address of a word is the address of
its least significant byte. Word operations to odd ad-
PL/M-96 USER'S GUIDE dresses are not guaranteed to operate in a consistent
Order Number 122134 (Intel Systems) manner.
Order Number 122361 (DOS Systems)
4-12
inter 8OC196KB USER'S GUIDE
INDIRECT REFERENCES
The indirect mode is used to access an operand by plac- file. The register which contains the indirect address is
ing its address in a WORD variable in the register file. selected by an eightbiffield within the instruction. An
The calculated address must conform to the alignment instruction can contain only one indirect reference and
rules for the operand type. Note that the indirect ad- the remainil!g operands of the instruction (if any) must
dress can refer to an operand anywhere within the ad- be register-direct ,references.
dress space of the 80C196KB, including the register
Examples
LD AX, [AX] AX:=MEM_WORD(AX)
ADDB AL,BL, [CX] AL:=BL+MEM_BYTE(CX)
POP [AX] MEM_WORD(AX) :=MEM_WORD(SP) ; SP:=SP+2
This addressing mode is the same as the indirect mode SHORT-INTEGERS the indirect address variable will
except that the WORD variable which contains the In- be incremented by one'. If the instruction operates on
direct address is incremented after it is used to address WORDS or INTEGERS the indirect address ,variable
the operand. If the instruction oper~tes, on BYTES or will be incremented by two.
Examples
LD AX, [BX]+ AX:=MEM_WORD(BX) ; BX:=BX+2
ADDB AL,BL,[CX]+ AL:=BL+MEM_BYTE(CX) ; CX:=CX+1.
PUSH [AX]+ SP:=SP-2 ;
MEM_WORD(SP) :=MEM~WORD(AX)
AX:=AX+2
IMMEDIATE REFERENCES
This addressing mode allows an operand to be taken INTEGER operands the field is 16 bits wide. An in-
directly from ,a field in the instruction. For operations struction can contain only one immediate 'reference and
on BYTE or SHORT-INTEGER operands this field is the remaining operand(s) must be register-direct refer-
eight bits wide. For operations on WORD or ences.
Examples
ADD AX,#340 AX:=AX+340
PUSH #1234H SP:=SP-2; MEM_WORD(SP) :=1234H
DIVB AX,#lO AL:=AX/10; AH:=AX MOD 10
SHORT-INDEXED REFERENCES
In this addressing mode an eight bit field in the instruc- Sil1.ce the eight bit field ~ign-extended,theeffective
is
tion selects a WORD variable in the register file which address can be up to 128 bytes before the address in the
contains an address. A second eight bit field in the in- WORD variable and up to 127 bytes after it. An in-
struction stream is sign-extended and summed with the struction can contain only one short-indexed reference
WORD variable to form the address of the operand and the remaining operand(s) must be register-direct
which will take part in the calculation. references.
Examples
LD AX,12[BX] AX:=MEM_WORD(BX+12)
MULB AX,BL,3[CX] AX:=BL*MEM_BYTE(CX+3)
4-14
80C196KB USER'S GUIDE
LONG-INDEXED REFERENCES
This addressing mode is like the short-indexed mode struction can contain only one long-indexed reference
except that a 16-bit field is taken from the instruction and the remaining operand(s) must be register-direct
and added to the WORD variable to form the address references.
of the operand. No sign extension is necessary. An in-
Examples
AND AX,BX,TABLE[CX] AX:=BX AND MEM_WORD(TABLE+CX)
ST AX, TABLE [BX] MEM_WORD(TABLE+BX) :=AX
ADDB AL,BL,LOOKUP[CX] AL:=BL+MEM_BYTE(LOOKUP+CX)
The first two bytes in the register file are fixed at zero variable in a long-indexed reference. This combination
by the 80CI96KB hardware. In addition to providing a of register selection and address mode allows any loca-
fixed source of the constant zero for calculations and tion in memory to be addressed directly.
comparisons, this register can be used as the WORD
Examples
ADD AX,1234[0] AX:=AX+MEM_WORD(1234)
POP 5678[0] MEM_WORD(5678) :=MEM_WORD(SP)
SP:=SP+2
The system stack pointer in the 80CI96KB is accessed accessed by using the stack pointer as the WORD vari-
as register 18H of the internal register file. In addition able in an indirect reference. In a similar fashion, the
to providing for convenient manipulation of the stack stack pointer can be used in the short-indexed mode to
pointer, this also facilitates the accessing of operands in access data wi thin the stack.
the stack. The top of the stack, for example, can be
Examples
PUSH [SP] DUPLICATE TOP_OF_STACK
LD AX,2!SP] AX:=NEXT_TO_TOP
ASSEMBLY LANGUAGE ADDRESSING MODES These features of the assembly language simplify the
programming task and should be used wherever possi-
The MCS-96 assembly language simplifies the choice of ble.
addressing modes to be used in several respects:
Direct Addressing. The assembly language will choose
between register-direct addressing and long-indexed 3.3 Program Status Word
with the ZERO register depending on where the oper-
and is in memory. The user can simply refer to an oper- The program status word (PSW) is a collection of Boo-
and by its symboliq name: if the operand is in the regis- lean flags which retain information concerning the state
ter file, a register-direct reference will be used, if the of the user's program. There are two bytes in the PSW;
operand is elsewhere in memory, a long-indexed refer- the actual status word and the low byte of the interrupt
ence will be generated. mask. Figure 3-1 shows the status bits of the PSW. The
P8W can be saved in the system stack with a single
Indexed Addressing. The assembly language will operation (PUSHF) .and restored in a like manner
choose between short and long indexing depending on (POPF). Only the interrupt section of the PSW can be
the value of the index expression. If the value can be accessed directly. There is no SFR for the PSW status
expressed in eight bits then short indexing will be used, bits.
if it cannot be expressed in eight bits then long indexing
will be used.
4-15
intJ 80C196KB USER'S GUIDE
CONDITION FLAGS VT: The oVerflow Trap (lag is set when the V flag is
set, but it is only cleared by the CLRVT, JVT and
The PSW bits on the 80CI96KB are set as follows: JNVT instructions. The operation of the VT flag
allows for the testing for a possible overflow con-
dition at the end of a sequence of related arithme-
tic operations. This is normally more efficient
than testing the V flag after each instruction.
Figure 3·1. PSW Register C: The Carry flag is set to indicate the state of the
arithmetic carry from the most significant bit of
Z: The Z (Zero) flag is set to indicate that the opera- the ALU for an arithmetic operation, or the state
tion generated a result equal to zero. For the add-
of the last bit shifted out of an operand for a shift.
with-carry (ADDC) and subtract-with-borrow
Arithmetic Borrow after a subtract operation is
(SUBC) operations the Z flag is cleared if the re-
the complement of the C flag (i.e. if the operation
sult is non-zero but is never set. These two in- generated a borrow then C=O.)
structions are normally used in conjunction with
the ADD and SUB instructions to perform multi- X: Reserved. Should always be cleared when writing
ple precision arithmetic. The operation of the Z to the PSW for compatibility with future prod-
flag for these instructions leaves it indicating the ucts.
proper result for the entire multiple precision cal- I: The global Interrupt disable bit disables all inter-
culation. rupts when cleared except NMI, TRAP, and un-
N: The Negative flag is set to indicate that the opera- implemented opcode.
tion generated a negative result. Note that the N ST: The ST (STicky bit) flag is set to indicate that
flag will be in the algebraically correct state even during a right .shift a 1 has been shifted first into
if an overflow occurs. For shift operations, includ- the C flag and then. been shifted out. The ST flag
ing the normalize operation and all three forms is undefined after a multiply operation. The ST
(SHL, SHR, SHRA) of byte, word and double flag can be used along with the C flag to control
word shifts, the N flag will be set to the same rounding after a right shift. Consider multiplying
value as the most significant bit of the result. This two eight bit quantities and then scaling the result
will be true even if the shift count is O. down to 12 bits:
V: The oVerflow flag is set to indicate that the opera-
tion generated a result which is outside the range MULUB AX,CL,DL ;AX:=CL*DL
for the destination data type. For the SHL, SHLB SHR AX,#4 ;Shift right 4
and SHLL instructions, the V flag will be set if the places
most significant bit of the operand changes at any
time during the shift. For divide operations, the If the C flag is set after the shift, it indicates that the
following conditions are used to determine if the V - bits shifted off the end of the operand were greater-than
flag is set: or equal-to one half the least significant bit (LSB) of the
result. If the C flag is clear after the shift, it indicates
For the that the bits shifted off the end of the operand were less
operation: V is set if Quotient is:
than half the LSB of the result. Without the ST flag,
UNSIGNED the rounding decision must be made on the basis of the
BYTE DIVIDE> 255 (OFFH) C flag alone. (Normally the result would be rounded up
if the C flag is set.) The ST flag allows a finer resolution
UNSIGNED in the rounding decision: .
WORD DIVIDE> 65535 (OFFFFH)
4-16
inter 80C196KB USER'S GUIDE
The MCS-96 instruction set contains a full set of arith- The execution times for the instruction set are given in
metic and logical operations for the 8-bit data types Figure 3-3. These times are given for a 16-bit bus with
BYTE and SHORT INTEGER and for the 16-bit data no wait states. On-chip EPROM/ROM space is a 16-
types WORD and INTEGER. The DOUBLE-WORD bit, zero wait state bus. When executing from an 8-bit
and LONG data types (32 bits) are supported for the external memory system or adding wait states, the CPU
products of 16-by-16 multiplies and the dividends of becomes bus limited and must solt)etimes wait for the
32-by~ 16 divides, for shift operations, and for 32-bit prefetch queue. The performance penalty for an 8-bit
compares. The remaining operations on 32-bit variables external bus is difficult to measure, but has shown to be
can be implemented by combinations of 16-bit opera- between 10 and 30 percent based on the instruction
tions .. As an example the sequence: mix. The best way to measure code performance is to
actually benchmark the code and time it using an emu-
ADD AX,CX lator or with TIMER!.
ADDC BX,DX
The indirect and indexed instruction timings are given
performs a 32-bit addition, and the sequence for two memory spaces: SFR/Internal RAM space (0-
OFFH), and a memory controller reference (IOOH-
SUB AX,CX OFFFFH). Any instruction that uses an operand that is
SUBC BX,DX referenced through the memory controller (ex. Add
rl,5000H(01) takes 2-3 states longer than if the oper-
performs a 32-bit subtraction. Operations on REAL and was in the SFRIInternal RAM space. Any data
(i.e. floating point) variables are not supported directly access to on-chip ROM/EPROM is considered to be a
by the hardware but are supported by the floating point memory _controller reference.
library for the 80Cl96KB (FPAL-96) which imple-
ments a single precision subset of draft 10 of the IEEE Flag Settings. The modification to the flag setting is
standard for floating point arithmetic. The performance shown for each instruction. A checkmark (,....) means
of this software is significantly improved by the that the flag is set or cleared as appropriate. A hyphen
80CI96KB NORML instruction which normalizes a means that the flag is not modified. A one or zero (I) or
32-bit variable and by the existence of the ST flag in the (0) indicates'that the flag will be in that state after the
PSW. instruction. An up arrow (t) indicates that the in-
struction may set the flag if it is appropriate but will
In addition to the operations on the various data types, not clear the flag. A down arrow ( ,J, ) indicates that the
the 80CI96KB supports conversions between these flag can be cleared but not set by the instruction. A
types. LDBZE (load byte zero extended) converts a question mark (?) indicates that the flag will be left in
BYTE to a WORD and LDBSE (load byte sign extend- an indeterminant state after the operation.
ed) converts a SHORT-INTEGER into an INTEGER.
4-17
80C196KB USER'S GUIDE
4-18
intJ 80C196KB USER'S GUIDE
INC/INCB 1 D - D + 1
,.. ,.. ,.. ,.. i -
EXT 1 D - D; D + 2 - Sign (D)
,.. ,.. 0 0 - - 2
EXTB 1 D - D; D + 1 - Sign (D)
,.. ,.. 0 0 - - 3
NOTINOTB 1 D - Logical Not (D) ,.. ,.. 0 0 - -
CLR/CLRB 1 D-O 1 0 0 0 - -
SHL/SHLB/SHLL 2 C - msb - - - - - Isb - 0
,.. ,.. ,.. ,.. i - 7
SHRISHRB/SHRL 2 o- msb - - - - - Isb - C
,.. ,.. ,.. 0 - ,.. 7
SHRA/SHRAB/SHRAL 2 msb - msb - - - - - Isb - C
,.. ,.. ,.. 0 - ,.. 7
SETC 0 C-1 - - 1 - - -
CLRC 0 C-O - - 0 - - -
4-19
80C196KB USER'S GUIDE
Nap 0 PC-PC+1 - - - ,- - -
SKIP 0 PC-PC+2 - - - - - -
NORML 2 Left shift till msb = 1; D - shift count ~ ~ 0 - - - 7
TRAP 0 SP- SP - 2; - - - - - - 9
, (SP) - PC; PC - (2010H)
PUSHA 1 SP - SP-2; (SP) - PSW; 0 0 0 0 0 0
PSW - OOOOH; SP - SP-2;
(SP) - IMASK1/WSR; IMASK1 - OOH
paPA 1 IMASK1/WSR - (SP); SP - SP+2 ~ ~ ~ ~ ~, ~
NOTES: '
1. If the mnemonic ends in "B" a byte operation is performed, otherwise a word operation is done. Operands D, B, and A
must conform to the alignment rules for the required operand type. D and B are locations in the Register File; A can be
located arlywhere in memory.
2. D,D + 2 are consecutive WORDS in memory; D is DOUBLE-WORD aligned.
3. D,D + 1 are consecutive BYTES in memory; D is WORD aligned.
4. Changes a byte to word.
5. Offset is a 2's complement number.
6. Specified bit is one of the 2048 bits in the register file.
7. The "L" (Long) suffix indicates double-word operation. .
8. Initiates a Reset by pulling RESET low. Software should re-initialize all the necessary registers with code starting at
2080H.
9. The assembler will not accept this mnemonic.
10. The DJNZW instruction is not guaranteed to work. See Functional Deviations section.
4-20
intJ 80C196KB USER'S GUIDE
NOTES:
1. Indirect and indirect + share the same opcodes, as do short and long indexed opcodes. If the second byte is even, use
indirect or short indexed. If odd, use indirect or long indexed.
2. The opcodes for signed multiply and divide are the unsigned opcode with an "FE" prefix.
4-21
inter 80C196KB USER'S GUIDE
4·22
80C196KB USER'S GUIDE
NOTE:
1. Execution times for memory controller references may be one to two states higher depending on the number of bytes in
the prefetch queue. Internal stack is 200H-1FFH and external stack is 200H-OFFFFH.
4-23
80C196KB.USER'S GUIDE
NOTE:
1. The DJNZW instruction is not guaranteed to work. See Functional Deviations section.
4-24
inter 80C196KB USER'S GUIDE
3.5 80C196KB Instruction Set language and PLM-96 environment and it offers com-
patibility between these environments. Another advan-
Addl~ions and Differences
tage is that it allows the user access to the same floating
For users already familiar with the 8096BH, there are point arithmetics library that PLM-96 uses to operate
six instructions added to the standard MCS-96 instruc- on REAL variables.
tion set to form the 80C 196KB instruction set. All of
the former instructions perform the same function, ex- REGISTER UTILIZATION
cept as indicated in the next section. The new instruc-
tions and their descriptions are listed below: The MCS-96 architecture provides a 256 byte register
PUSHA - PUSHes the PSW, INT_MASK, file. Some of these registers are used to control register-
IMASK1, and WSR mapped I/O devices and for other special functions
POPA - POPs the PSW, INT_MASK, IMASK1, such as the ZERO register and the stack pointer. The
and WSR remaining bytes in the register file, some 230 of them,
are available for allocation by the programmer. If these
IDLPD - Sets the part into IDLE or Powerdown registers are to be used effectively, some overall strategy
mode for their aUocation must be adopted. PLM-96 adopts
CMPL , - Compare 2 long direct values the simple and effective strategy of allocating the eight
BMOV - Block move using 2 auto-incrementing bytes between addresses lCH and 23H as temporary
storage. The starting address of this region is caUed
pointers and a counter
PLMREG. The remaining area in the register file is
DJNZW - Decrement Jump Not Zero using a Word treated as a segment of memory which is allocated as
counter (Not functional on current step- required.
ping.)·
4-25
inter 80C196KB USER'S GUIDE
When this procedure is entered at run time the stack It is recommended that unused areas. of code be filled
will contain the parameters. in. the following order: with NOPs and periodiC jumpst!J an error routine or
RST (reset chip) instructions. This is particularly im-
portant in the code around lookup tables, since if look-
?????? : param1 up tables are executed uncj.esired results will occur.
high word of param2 Wherever space allows, el;lch table should be surround-
ed by 7 NOPs (the longest 80Cl96KB instruction has 7
low word of param2 bytes) and a RST or jump to error routine instruction.
param3 Since RST is a one-byte instruction, the NOPs are not
needed if RSTs are used instead of jumps to an error
return address +- Staci<.::...pointer routine. This will help to ensure a speedy recovery
Figure 3-5. Stack Image should the processor have a glitch in the program flow.
If a procedure returns a value to the calling code (as The Watchdog Timer (WDT) further protects against
opposed to modifying more global variables) then the software and hardware errors. W:hen using the WDT to
result is returned in the variable PLMREG. PLMREG protect software it is desirable to reset it from only one
is viewed as either an 8-, 16- or 32-bit variable depend- place in code, lessening the chance of an undesired
ing on the type of the procedure. WDT reset. The section of code that resets the WDT
should monitor the other code sections for proper oper-
The standard calling convention adopted by PLM-96 ation. This can be done by checking variables to make
has several key features: sure they are within reasonable values. Simpl'y using a
software timer to reset the WDT every 10 milliseconds
a) Procedures can always assume that the eight bytes of , will provide protection only for catastrophic failures.
register file memory starting at PLMREG can be
used as temporaries within the body of the proce-
dure. 4.0 PERIPHERAL OVERVIEW
b) Code which calls a procedure must assume that the
eight bytes of register file memory starting at There are five major peripherals on the 80C196KB: the
PLMREG are modified by the procedure. pulse-width-modulated output· (PWM), Timer! and
.c) The Program Status Word (PSW-see Section 3.3) is Timer2, High Speed I/O Unit, Serial Port and A/D
not saved and restored by procedures so the calling Converter. With the exception of the high speed I/O
code must assume that the condition flags (Z, N, V, unit (HSIO), each of the peripherals is a single unit that
VT, C, and ST) are modified by the procedure. can be discussed without further separation.
d) Function results from procedures are always re: Four individual sections make up the HSIOand work
turned in the variable PLMREG. together to form a very flexible' timer/counter based
I/O system. Included in the HSIO are a 16-bit timer
PLM-96 allows the definition of INTERRUPT proce- (Timer!), a 16-bit up/down counter (Timer2), a pro-
dures which are executed when a predefined interrupt grammable high speed input unit (HSI), and a pro-
occurs. These procedures do not conform to the rules of grammable high speed output unit (HSO). With very
a normal procedure. Parameters cannot be passed to little CPU overhead the HSIO can measure pulse
these procedures and they cannot return results. Since widths, generate waveforms, and create periodic inter-
they can execute essentially at any time (hence the term rupts. Depending on the application, it can perform the
interrupt), these procedures must save the PSW and work of up to 18· timer/counters and capture/compare
PLMREG when they are entered and restore these val- registers.
ues before they exit.
A brief'description of the peripheral functions and in-
terractions is included in this section. It provides over-
3.7 Software Protection Hints view information prior to the detailed discussions in the
following sections. All of the details on control bits and
Several features to assist in recovery from hardware precautions are in the individual sections for each pe-
and software errors are available on the 80C196KB. ripheral starting with Section 5.
Protection is also provided against executing unimple-
mented opcodes by the unimplemented opcode inter-
rupt. In addition, the hardware reset instruction (RST)
can cause a reset if the program counter goes out of
bounds. This instruction· has an opcode of OFFH, so if
the processor reads in bus lines which have been pulled
high it will reset itself.
4-26
inter 80C196KB USER'S GUIDE
4.1 Pulse Width Modulation Output HSI_TIME register. When the time register is read
(D/A) , the next FIFO location is loaded into the holding regis-
ter.
Digital to analog conversion can be done with the Pulse
Width Modulation output. The output waveform is a Three forms of HSI interrupts can be generated: when a
variable duty cycle pulse which repeats every 256 state value moves from the FIFO into the holding register;
times or 512 state times if the prescaler is enabled. when the FIFO (independent of the holding register)
Changes in the duty cycle are made by writing to the has 4 or more events stored; and when the FIFO has 6
PWM register. There are several types of motors which or more events stored. This flexibility allows optimiza-
require a PWM waveform for most efficient operation. tion of the HSI for the' expected frequency of interrupts.
Additionally, if this waveform is integrated it will pro-
duce a DC level which can' be changed in 256 steps by Independent of the HSI operation, the state of the HSI
varying the duty cycle. Details on the PWM are in Sec- pins is indicated by 4 bits of the HSI_STATUS regis-
tion 6. ter. Also independent of the HSI operation is the HSI.O
pin interrupt, which can be used as an extra external
interrupt even if the pin is not enabled to the HSI unit.
4.2 Timers
Two 16-bit timers are available for use on the 4.4 High Speed Outputs (HSO)
80C 196KB. The first is designated "Timer!", the sec-
ond "Timer2". Timer! is used to synchronize events to The High Speed Output (HSO) unit can generate events
real time, while Timer2 is clocked externally and syn- at specified times or counts based on Timer! or Timer2
chronizes events to external occurrences. The timers with minimal CPU overhead. A block diagram of the
are the time bases for the High Speed Input (HSI) and HSO unit is shown in Figure 4-4. Up to 8 pending
High Speed Output (HSO) units and can be considered events can be stored in the CAM (Content Addressable
an integral part of the HSI/O. Details on the timers are Memory) of the HSO unit at one time. Commands are
in Section 7. placed into the HSO unit by first writing to HSO_
COMMAND with the event to occur, and then to
Timer! is a free-running timer 'which is incremented HSO_TIME with the timer match value.
every eight state times, just as it is on the 8096BH.
Timer! can cause an interrupt when it overflows. Fourteen different types of events can be triggered by
the HSO: 8 external and 6 internal. There are two inter-
Timer2 counts transitions, both positive and negative, rupt vectors associated with the HSO, one for external
on its input which can be either the T2CLK pin or the events, and one for internal events. External events con:
HSI.I pin. Timer2 can be read and written and can be sist of switching one or more of the 6 HSO pins
reset by hardware, software or the HSO unit. It can be (HSO.O-HSO.5). Internal events include setting up 4
used as an up/down counter based on Port 2.6 and it's Software Timers, resetting Timer2, and starting an A/
value can be captured into the T2CAPture register. In- D conversion. The software timers are flags that can be
terrupts can be generated on capture events and if set by the HSO and optionally cause interrupts. Details
Timer2 crosses the OFFFFH/OOOOH boundary or the on the HSO Unit are in Section 9.
7FFFH/8000H boundary in either direction.
4-27
inter 80C196KB USER'S GUIDE
~ HITO~O
INTERRUPT
CONTROL
Be LOGIC 11 6l l
TI ER
I
-r- LOTOHI 4 7x20 BIT
FIFO
-IH'iOR."LOl-
I I
J1I1J1.I1.IUUUU
EVERY EIGHTH POSITIVE
TRANSITION
270651 ~18
270651-19
16-BIT 16-BIT
• T2RST
XTAL1/16
(P2.4)
CONTROL
LOGIC
~----~--24--------~
-..------16 - - - . I
16
270651-8
4·28
inter 80C196KB USER'S GUIDE
4-29
inter 80C196KBUSER'S GUI~E
Twenty-eight (28) sources 'of interrupts are available on Three special interrupts are available on the
the 80C196KB. These sources are gathered into 15 vec- 80C196KB: NMI, TRAP and Unimplemented opcode.
tors plus special vectors for NMI, the TRAP instruc- The external NMI pin generates an unmaskable inter-
tion, and Unimplemented Opcodes. Figure 5-1 shows rupt for implementation of critical interrupt routines.
the routing of the interrupt sources into their vectors as The TRAP instruction is useful in the development of
well as the control bits which enable some of the custom software debuggers or generation of software
sources. interrupts. The unimplemented opcode interrupt gener-
ates an interrupt when unimplemented opcodes are exe-
SOURCES VECTORS
NON - MASKABLE INTERRUPT - - - - - - - - - NMI
4-30
inter 80C196KB USER'S GUIDE
cuted. This provides software recovery from random The programmer must initialize the interrupt vector ta-
execution during hardware and software failures. Al- ble with the starting addresses of the appropriate inter-
though available for customer use, these interrupts may rupt service routines. It is suggested that any unused
be used in Intel development tools or evaluation boards. interrupts be vectored to an error handling routine. In a
debug environment, it may be desirable to have the rou-
tine lock into a jump to self loop which would be easily
NMI traceable with emulation tools. More sophisticated rou-
NMI, the external Non-Maskable Interrupt, is the tines may be appropriate for production code recover-
ies. "
highest priority interrupt. It vectors indirectly through
location 203EH. For design symmetry, a mask bit ex-
ists in INT_MASKI for the NM[ To prevent acci-
INTERRUPT SOURCES
dental masking of an NMI, the bit does not function
arid will not stop an NMI from occurring. For future
compatibility, the NMI mask bit must be set to zero.
.4-31
80C196KB USER'S GUIDE
5.1 Interrupt Control format of these registers-is the same as that of the Inter-
rupt Pending Register shown in Figure 5-3;'
Interrupt Pending Register The INT_MASKand INT--,MASKI registers can be
read or written as byte registers. A one in any bit posi-
When the hardware detects one of the sixteen inter- tion will enable the corresponding interrupt source and
rupts it sets the corresp~mding bit in one o( two pending a zero will disable the source. The hardware will save
interrupt registers (INT_PEND-09H and INT_ any interrupts that occur by setting bits in the pending'
PENDl-12H). When the interrupt vector is taken, the register, even if t,he interrupt mask bit is cleared. The
pending bit is cleared. These registers, the formats of INT-,-MASK register is the lower eight hits of the
which are shown in Figure 5-3, can be read or modified PSW so the PUSHF and POPF instructions save and
as byte registers. They can ,be read to determine which restore the INT_MASK register as well as the global
of the interrupts are pending at any given time or modi- interrupt lockout and .the, arithmetic flags. Both the
fied to either clear pending interrupts or generate inter- INT_MASK and INT_MASKI registers can be
rupts under software control. Any software which saved with the PUSHA and POPA Instructions.
modifies the INT_PEND registers should ensure that
the entire operation is inseparable. The easiest way to
do this is to use the logical instructions in the two or Global Disable
three operand format, for example:
The processing of all interrupts except the NMI, TRAP
ANDB INT_PEND,#llllllOlB and unimplemented opcode interrupts can be disabled
; Clears the AID Interrupt by clearing the I bit in the PSW. Setting the I bit will
ORB INT_PEND,#OOOOOOlOB enable interrupts that have mask register bits which are
; Sets the AID Interrupt set. The I bit is controlled by the EI (Enable Interrupts)
and DI (Disable Interrupts) instructions. Note that the
Caution must be used when writing to the pending reg- I bit only controls the actual servicing of interrupts.
ister to' clear interrupts. If the interrupt has 'already Interrupts that occur during periods of lockout will be
been acknowledged when the bit is cleared, a 5 state held in the pending register and serviced on a: priori-
time "partial" interrupt cycle will occur. This is be- tized basis when the lockout period ends.
cause the 80CI96KB will have to fetch the next instruc-
tion of the normal instructionflQw, instead of proceed-
ing with the interrupt processing. The effect on the pro- 5.2 Interrupt Priorities
gram will be essentially that of an extra two NOP~
This can be prevented by clearing the bits using a 2 The priority encoder looks at all of the interrupts which
operand immediate logical, as the SOC196KB holds off are both pending and enabled, and selects the one with
acknowledging interrupts during these "read/modify/ the highest priority. The priorities are shown in Figure
write" instructions. 5-4 (IS is highest, 0 is lowest). The interrupt generator
then forces a call to the location in the indicated vector
location. This location would be the starting location of
Interrupt Mask Register the Interrupt Service Routine (ISR).
Individual interrupts can be enabled or disabled by set-
ting or clearing bits in the interrupt mask registers
(INT_MASK-OSH and INT_MASKl-I3H). The
7 6 5 4 3 2 1 0
12H IPEND1: FIFO EXT T2 T2
NMI HSI4 RI TI
13H IMASK1: FULL INT1 OVF CAP
7 6 5 4 3 2 1 0
09H IPEND: EXT SER SOFT HSI.O HSO HSI AID TIMER
08H IMASK: INT PORT TIMER PIN PIN DATA DONE OVF
Figure 5-3. Interrupt Mask and Pending Registers
4-32
inter 80C196KB USER'S GUIDE
serial_io_isr:
'PUSHA ; Save the PSW, INT_MASK
; INT_MASKl,' and WSR
LDB INT_MASK,#OOOOOIOOB
I
EI ; Enable interrupts again
S,rvi" th,int,rrupt
POPA Restore
RET
4-33
80C196KB' USER,'S GUIDE
Notice that the "preamble" and exit code for the inter- if interrupts are disabled. Depending on system config-
rupt service routine does not include any code for sav- urations, several other SFRs might also need to be
ing or restoring registers. This is because it has been changed in a! single instruction for the same reason.
assumed that the interrupt service routine has been al-
located its own private set of registers from the on- When variables must be modified without interruption"
board register file. The availability of some 230 bytes of and a single instruction can not be used, the program-
register storage makes this quite practical. mer must create what is termed a critical region in
which it is safe to modify the variable. One way to do
this is to simply disable interrupts with a D I instruc'
5.3 Critical Regions tion, perform the modification, and then re-enable in-
terrupts with an EI instruction. The problem with this
Interrupt service routines must sometimes share data approach is that it leaves the interrupts enabled even if
with other routines. Whenever the programmer is cod- they were not enabled at the start. A better solution is
ing those sections of code which access these shared to enter the critical region with a PUSHF instruction
pieces of data, great care must be taken to ensure that which saves the PSW and also clears the interrupt en-
the integrity of the data is maintained. Consider clear- able flags. The region can then be terminated with a
ing a bit in the interrupt pending register as part of a POPF instruction whic\I returns the interrupt enable to
non-interrupt routine: the state it was in before the code sequence. It should be
noted that some system configurations might require
LDB AL, INT _PEND more protection to form a critical region. An example
ANDB AL,#blLmask is a system in which more than one processor has ac-
STB AL,INT_PEND cess to a common resource such as memory or external
I/O devices.
This code works if no other routines are operating con-
currently, but will cause occasional but serious prob-
lems if used in, a concurrent environment. (All pro- 5.4 Interrupt Timing
grams which make use of interrupts must be considered
to be part of a concurrent environment.) To demon- The 80Cl96KB can be interrupted from four different
strate this problem, assume that the INT_PEND reg- external sources; NMI, P2.2, HSI.O an!i PO.7. All exter-
ister contains OOOOlll1B and bit 3 (HSO event inter- nal interrupts are sampled during PHI or CLKOUT
rupt pending) is to be reset. The code does work for this low and are latched internally. Holding levels on exter-
data pattern but what happens if an HSI interrupt oc- nal interrupts for at least one state, time will ensure
curs somewhere between the LDB and the STB instruc- recognition of the interrupts.
tions? Before the LDB instruction INT_PEND con-
tains 00001111B and after the LDB instruction so does The external interrupts on the 80C196KB, although
AL. If the HSI interrupt service routine executes at this sampled during PHI, are edge triggered interrupts as
point then INT_PEND will change to OOOOIOI1B. opposed to level triggered. Edge triggered interrupts
The ANDB changes AL to 00OO0l11B and the STB will generate only one interrupt if the input is held
changes INT_PEND to OOOOOIIIB. It should be high. On the other hand, level triggered interrupts will
OOOOOOIIB. This code sequence has managed to gener- generate multiple interrupts when held high.'
ate a false HSI interrupt The same basic process can
generate an amazing assortment of problems and head- Interrupts are not always acknowledged immediately.
aches. These problems can be avoided by assuring mu- If the interrupt signal does not, occur prior to 4 state-
tual exclusion which basically means that if more than times before the end of an instruction, the interrupt
one routine can change a variable, then the program- may not be acknowledged until after the next instruc.
mer must ensure exclusive access to the variable during tionhas been executed. This.is because an instruction is
the entire operation on the variable. fetched and prepared for execlltion a few state times
before it is actually executed.
In many cases the instruction set of the 80Cl96KB al-
lows the variable to be modified with a single instruc- There are 6 instructions which always inhibit interrupts
tion. The code in the above example can be implement- from being acknowledged until after the next instruc-
ed with a single instruction. tion has been executed. These instructions are:
EI, DI - Enabkand disable all interrupts by tog-
ANDB gling the global disable bit (PSW.9).
Instructions are indivisible so mutual exclusion is en- PUSHF - PUSH Flags pushes the PSW/IN:r_
sured in this case. Changes to the INT_PEND or MASK pair then clears it, leaving both
INT_PENDI register must be made as a single in- INT_MASK and PSW.9 clear.
struction, since bits can be changed in'this register even
4-34
inter 80C196KB USER'S GUIDE
POPF - POP Flags pops the PSW lINT_MASK following EI. The 01, PUSHF, POPF, PUSHA, POPA
pair off the stack and TRAP instructions will also cause the same situa-
PUSHA - PUSH All does a PUSHF, then pushes tion. Typically these instructions would only effect la-
, the INT_MASK l/WSR pair and clears' tency when one interrupt routine is already in process"
INT_MASKl as these instructions are seldom used at other times.
POPA - POP All pops the INT_MASKl/WSR
pair and then does a POPF
5.5 Interrupt Summary
Interrupts can also not occur immediately after execu- Many of the interrupt vectors on the 8096BH were
tion of: shared by multiple interrupts. The interrupts which
Unimplemented Opcodes were shared on the 8096BH are: Transmit Interrupt,
TRAP - The software trap instruction Receive Interrupt, HSI FIFO Full, Timer2 Overflow
and EXTINT. On the 80C196KB, each of these inter-
SIGND - The signed prefix for multiply and divide rupts have their own interrupt vectors. The source of
instructions the interrupt vectors are typically programmed through
control registers. These registers can be read in Win-
When an interrupt is acknowledged the interrupt pend- dow 15 to determine the source of any interrupt. Inter-
ing bit is cleared, and a call is forced to the location rupt sources with two possible interrupt vectors, serial
indicated by the specified interrupt vector. This call oc- receive interrupt sharing serial port and receive inter-
curs after the completion of the instruction in process, rupt vectors for example, should be configured for only
except as noted above. The procedure of getting the one interrupt vector.
vector and forcing the call requires 16 state times. If the
stack is in external RAM an additional 2 state times are Interrupts with separate vectors include: NMI, TRAP,
required. Unimplemented Opcode, Timer2 Capture, 4th Entry
into HSI FIFO, Software timer, HSI.O Pin, High Speed
The maximum number of state times required from the Outputs, and AID conversion Complete. The NMI,
time an interrupt is generated (not acknowledged) until TRAP and Unimplemented Opcode interrupts were
the 80CI96KB begins executing code at the desired lo- covered in section 5.0.
cation is the time of the longest instruction, NORML
(Normalize - 39 state times), plus the 4 state times
prior to the end of the previous instruction, plus the EXTINT and PO.7
response time (16(internal stack) or 18(external stack)
state tillles). Therefore, the maximum response time is The 80CI96KB has two external interrupt vectors;
61 (39 + 4 + 18) state times. This does not include the EXTINT (200EH) and EXTINTI (203AH). The
10 state times' required for PUSHF if it is used as the EXTINT vector has two alternate sources selectable by
first instruction in the interrupt routine or additional IOCI.I, the external interrupt pin (Port 2.2) and Port
latency caused by having the interrupt masked or dis- 0.7, The external interrupt pin is the only source for the
abled. Refer to Figure 5-5, Interrupt Response Time, to EXTINTI interrupt vector. The external interrupt pin
visualize an example of worst case scenario. should not be programmed to interrupt through both
vectors. Both external interrupt sources are rising edge
Interrupt latency time can be reduced by careful selec- triggered,
tion of instructions in areas of code where interrupts
are expected. Using 'El'followed immediately by a
long instruction (e.g. MUL, NORML, etc.) will in-
crease the maximum latency by 4 state times, as an
interrupt cannot occur between EI and the instruction
EXECUTION 'PUSHF' ~
INTERRUPT ROUTINE
EXTINT~
PENDING
BIT
..J SET
RESPONSE TIME f-I.---------
270651-11
Serial Port Interrupts are individually enabled by setting bits 2 and 3 oflOC1:
bit 2 for Timer!, and bit 3 for Timer2. Which timer
The serial port generates one of three possible inter- actually caused the interrupt can be determined by bits
rupts: Transmit interrupt TI(2030H), Receive Interrupt 4 and 5 of 10SI: bit 4 for Timer2 and 5 for Timer!. On
RI(2032H) and SERIAL(200CH). Refer to section 10 the 80CI96KB Timer2 overflow(OH or 8000H) has a
for information on the serial port interrupts. The separate interrupt vector through location 2038H.
8096BH shared the TI and RI interrupts on the SERI-
AL interrupt vector. On the 80C196KB, these inter-
rupts share both the serial interrupt vector and have Timer2 Capture
their own interrupt vectors. Ideally, the transmit and The 80CI96KB can generate an interrupt in response
receive interrupts should be programmed as separate to a Timer2 capture triggered by a rising edge on P2.7.
interrUpt vectors while disabling the SERIAL inter- Timer2 Capture vectors through location 2036H.
rupt. For 8096BH compatibility, the interrupts can still
use the SERIAL interrupt vector.
High Speed Outputs
HSI FIFO FULL and HSI DATA AVAILABLE The High Speed Outputs interrupt can be generated in
response to a programmed HSO command which caus-
HSI FIFO FULL and HSI DATA AVAILABLE in-
es an external event. HSO commands which set or clear
terrupts shared the HSI DATA AVAILABLE inter- the High Speed Output pins are considered external
rupt vector on the 8096BH. The source of the HS,I events. Status Register IOS2 indicates which HSO
DATA AVAILABLE interrupt is controlled by the
events have occured and can be used to arbitrate which
setting of 1/0 Control Register I ,(IOC 1.7). Setting HSO command caused the interrupt. The High Speed
IOC1.7 to zero will generate an interrupt when a time Output 'interrupt vectors indirectly through location
value is loaded into the holding register. Setting the bit 2006H. For more information on High Speed Outputs,
to one generates an interrupt when the FIFO, indepen-
refer to Section 9.
dent of the holding register, has six entries in it.
4-36
intJ 80C196KB USER'S GUIDE
10% 25
~~Jl~____~n~____~n~_____
HI
50% 128
LO
90% 230 HI
LO
-1 u u
HI
99.6% 255
LO
270651-13
4-37
80C196KB USER~S GUIDE
BUFFER
'80C196KB TO MAKE FILTER
(PASSIVE POWER
HSO OUTPUT
OR SWING
OR
ACnVE)
AMP I---- ANALOG
OUTPUT
PWM RAIL (OpnONAL)
TO (OPnONAL)
RAIL
270651-14
Vcc
* 1/2 VQ3001 P
6
270' 7 S.1K
PWM----~VV~---- __ . .____~~__--~t-----ANALOG
8 OUT
270651-15
80C196KB
HSO R HIGH ANALOG
OR ~_----"'Nw----_----_IIMPEDANCE .....- - - OUTPUT
PWM AMP
c
270651-16
4-38
80C196KB USER'S GUIDE
4-39
80C196KB USER'S GUIDE
[J~[J+--------:--P2.7
....---P2.6
1+---T2CLK
1+---HSI.l
'----------T2RST
270651-5
Bit = 1 Bit = 0
IOCO.1 Reset Timer2 each write No action
IOCO.3 Enable external reset Disable
IOCO.5 HSI.O is ext. reset source T2RST is reset source
lOCO.? HSI.1 is T2 clock source T2CLK is clock source
IOC1.3 Enable Timer2 overflow int. Disable overflow interrupt
IOC2.0 Enable fast increment Disable fast increment
IOC2.1 Enable downcount feature Disable downcount
P2.6 Count down if IOC2.1 = 1 Count up
IOC2.5 Interrupt on ?FFFH/SOOOH Interrupt on OFFFFH/OOOOH
P2.? Capture Timer2 into
T2CAPture on rising edge
Figure 7-2. Timer2 Configuration and Control Pins
7.4 Timer Interrupts
Both Timer! and Timer2 can trigger a timer overflow
interrupt and set a flag in the I/O Status Register I
(lOS I). Timerl overflow is controlled oy setting
IOC1.2 and the interrupt status is indicated in IOSI.5.
The TIMER OVERFLOW interrupt is enabled by set-
ting INT_MASK.O.
A Timer2 overflow condition interrupts through loca-
tion 2000H by setting IOCI.3 and setting INT_
MASK.O. Alternatively, Timer2 overflow can interrupt
through location 2038H by setting INT_MASKI.3.
The status of the. Timer2 overflow interrupt is indicated
in IOSI.4.
IOCO.5 270651-17
Interrupts can be generated if Timer2 crosses the
OFFFFH/OOOOH boundary or the 7FFFH/8000H
Figure 7-3. Timer2 Clock and Reset Options boundary in either direction. Byhaving two interrupt
points it is possible to have 'interrupts enabled even if
4-40
80C196KB USER'S GUIDE
Timer2 is counting up and down centered around one timer interrupts are controlled by the Interrupt Mask
of the interrupt points. The boundaries used to control Register bit O. In all cases, setting a bit enables a func-
the Timer2 interrupt is determined by the setting of tion, while clearing a bit disables it.
IOC2.5. When set, Timer2 will interrupt on the
7FFFH/8000H boundary, otherwise, the OFFFFH/
OOOOH boundary interrupts. 8.0 HIGH SPEED INPUTS
A T2CAPTURE interrupt is enabled by setting INT_ The High Speed Input Unit (HSI) can record the time
MASK 1.3. The interrupt will vector through location an event occurs with respect to Timer!. There are 4
2036H. lines (HSI.O through HSI.3) which can be used in this
mode and up to a total of 8 events can be recorded.
Caution must be used when examining the flags, as any HSI.2 and HSI.3 are bidirectional pins which can also
access (including Compare and Jump on Bit) of 10SI be used as HSO.4 and HSO.5. The I/O Control Regis-
clears bits 0 through 5 including the software timer ters (lOCO and lOCI) determine the functions of these
flags. It is, therefore, recommended to copy the byte to pins. The values programmed into lOCO and lOCI can
a temporary register before testing bits. Writing to be read in Window IS. A block diagram of the HSI unit
10SI in Window 15 will set the status bits but not cause is shown in Figure 8-1.
interrupts. The general enabling and disabling of the
FIFO
~ HITOLO
-r- LOTOHI
INTERRUPT
CONTROL
& LOGIC 111 T
sliR I
--IHiOR L'Ol-
I I 4 7x20 BIT
..n.nn.n.n.n.n.
EVERY EIGHTH POSITIVE
FIFO
TRANSITION
270651-19
17 6 15 4 I 3 I 2 I 1 I 0 I 06H '
I C HSI.O STATUS
HSI.l STATUS
HSI.2 STATUS
HSI.3 STATUS
WHERE FOR EACH 2 - BIT STATUS FIELD THE LOWER
BIT (STATUS BIT) INDICATES WHETHER OR NOT AN EVENT
HAS OCCURED ON THIS PIN AND THE UPPER BIT (INPUT BIT)
INDICATES THE CURRENT INPUT LEVEL OF THE PIN.
270651-22
4-41
80C196KB USER'S GUIDE
I
recorded events associated with that time tag. There- ~~""'----T2 RESET
fore, if multiple pins are being used as HSI inputs, soft- • - - IOCO.3
ware must check each status bits when processing on • - - IOCO.O
HSI event. MuItiplepins can recognize events with the HSI.O ~_------HSI
same time tag. It can take up to 8 state times for this ••• IOCO.2
information to reach the holding register. For this rea-
son, 8 state times must elapse between consecutive ro~-------HSI
reads of HSI_TIME. When the FIFO is full, one addi- HSI.l .~ TIMER2
tional event, for a total of 8 events, can be stored by T2CLK - - 0 ,l_ - IOCO.7 CLOCK
considering the holding register part of the FIFO. If the .-- IOCO.4
FIFO and holding register are full, any additional
events will not be recorded.
HSI.2 - - 0 "-0------- HSI
• - - IOCO.6
HSI.3 ~"-o------- HSI
8.1 HSI Modes 270651-21
There are 4 possible modes of operation for each of the Figure 8·4. lOCO Control of HSI Pin Functions
HSI pins. The HSI_MODE register at location 03H
controls which pins wiIllook for what type of events. In 8.2 HSI Status
Window 15, reading the register will read back the pro-
grammed HSI mode. The 8-bit register is set up as Bits 6 and 7 of the I/O Status Register 1 (lOS I-see
shown in Figure 8-3. Figure 8-5) indicate the status of the HSI FIFO. If bit 7
is set, the HSI holding-register is loaded. The FIFO
mayor may not contain 1-5 events. If bit 6 is set, the
03H
FIFO contains 6 entries. If the FIFO fills, future events
will not be recorded. Reading 10SI clears bits 0-5, so
keep an image of the register and test the image to
retain all 6 bits.
The HSI pins can be individually enabled and disabled TIMER 1 HAS OVERFLOW
using bits in lOCO as shown in Figure 8-4. If the pin is HSI FIFO IS FULL
disabled, transitions are not entered in the FIFO. How-
HSI HOLDING REGISTER DATA AVAILABLE
ever, the input bits of the HSI_STATUS register (Fig-
ure 8-2) are always valid regardless of whether the pin 16H
is enabled to the FIFO. This allows the HSI pins to be 270651-23
used as general purpose input pins.
Figure 8·5. 110 Status Register 1
4-42
80C196Ka USER'S GUIDE
If the HSI_TIME register is read without the holding The HSI.O pin can g~nerate an interrupt on the rising
register being loaded, the returned value will be indeter- edge even if its not enabled to the HSI FIFO. An inter-
minate. Under the same conditions, the four bits in rupt generated by this pin vectors through location
HSI_STATUS indicating which events have occurred 2008H.
will also be indeterminate. The four HSI_STATUS
bits which indicate the current state of the pins will
always return the correct value. 8.4 HSI Input Sampling
It should be noted that many of the Status register con- The HSI pins are sampled internally once each state
ditions are changed by a reset, see section 13. Writing time. Any value on these pins must remain stable for at
to HSI_TIME in window 15 will write to the HSI least 1 ful1 state time to guarantee that it is recognized:
FIFO holding register. Writing to HSI_STATUS in The actual sampling occurs during PHI or during
Window 15 will set the status bits but will not affect the CLKOUT low. The HSI inputs should be valid at least
input bits. 30 nsec before the rising of CLKOUT. Otherwise, the
HSI input may be sampled in the next CLKOUT.
Therefore, if information is to be synchronized to the
8.3 HSI Interrupts HSI it should be latched on the rising edge of
CLKOUT.
Interrupts can be generated by the HSI unit in three
ways: when a value moves from the FIFO into the
holding register; when the FIFO (independent of the 8.5 Initializing the HSI
holding register) has 4 or more event stored; when the
FIFO has 6 or more events. To start the HSI, the fol1owing steps and the sequence
must be observed; 1) flush the FIFO, 2) enable the HSI
The HSI DATA AVAILABLE and HSI FIFO FULL interrupts, and 3) initialize and enable the HSI pins.
interrupts are shared on the 8096BH. The source for The following section of code can be used to flush the
the HSI DATA AVAILABLE interrupt is controlled FIFO:
by IOC1.7. When IOC1.7 is cleared, the HSI will gen-
erate an interrupt when the holding register is loaded. reflush: 1d 0, HSLT1ME ;c1ear an event
The interrupt indicates at least one HSI event has oc- skipO ;wai t 8 state times
curred and is ready to be processed. The interrupt vec- skipO
tors through location 2004H. The interrupt is enabled j bs 10S1, 7, reflush
by setting INT_MASK.2. The generation of a HSI
DATA AVAILABLE interrupt will set IOS1.7. The Enabling the HSI pins before enabling the interrupts
HSI FIFO FULL interrupt will vector through HSI can cause a FIFO lockout condition. For example, if
DATA AVAILABLE if IOC1.7 is set. On the the HSI pins were enabled first, an event could get
80C196KB, the HSI FIFO FULL has a separate inter- loaded into the holding register before the HS1_
rupt vector at location 203CH. DAT A~VAILABLE interrupt is enabled. If this
happens, no HSI_DA TA_A VAILABLE interrupts
A HSI FIFO FULL interrupt occurs when the HSI will ever occur.
FIFO has six or more entries loaded independent of the
holding register. Since all interrupts are rising edge trig-
gered, the processor will not be reinterrupted until the 9.0 HIGH SPEED OUTPUTS
FIFO first contains 5 or less records, then contains six
or more. The HSI FIFO FULL interrupt mask bit is The High Speed Output unit (HSO) trigger events at
INT_MASK1.6. The occurrence of a HSI FIFO specific times with minimal CPU overhead. Events are
FULL interrupt is indicated by IOS1.6. Earlier warning generated by writing commands to the HSO_COM-
of a impending FIFO ful1 condition can be achieved by MAND register and the relative time at which the
the HSI FIFO 4th Entry interrupt. events are to occur into the HSO_TIME register. In
Window IS, these registers will read the last value pro-
The HSI_FIFO_4 interrupt generates an interrupt grammed in the holding register. The programmable
when four or more events are stored in the HSI FIFO events include: starting an AID conversion, resetting
independent of the holding register. The interrupt is Timer2, setting 4 software flags, and switching 6 output
enabled by setting INT_MASK 1.2. The HSI_ lines (HSO.O through HSO.5). The focinat of the
FIFO_4 vectors indirectly through location 2034H. HSO_COMMAND register is.shown in Figure 9-1.
There is no status flag associated with the HSI_ Commands OCH and ODH are reserved for use on fu-
FIFO_4 interrupt since it has its own independent in- ture products. Up to eight events can be pending\at one
terrupt vector.. time and interrupts can be generated whenever any of
these events are triggered. HSO.4 and HSO.5 are bi-
4-43
80C196KB USER'S.GUIDE
7 6 5 4 3 I 2 I 1 I 0
HSO_ CAM TMR2/ SET/ INT/
CHANNEL 06H
COMMAND LOCK TMR1 CLEAR lNT
directional pins which are multiplexed with HSI.2 and HSO Interrupt Status
HSI.3 respectively. Bits 4 and 6 of 110 Control Regis-
ter 1 (IOC1.4, IOC1.6) enable HSO.4 and HSO.5 as Register IOS2 at location 17H displays the HSO events
outputs. The Control Registers can be read in Window which have occurred. IOS2 is shown in Figure 9-2. The
15 to determine the programmed modes for the HSO. events displayed are HSO.O through HSO.5, Timer2
However, the IOC2.7(CAM CLEAR) bit is not latched Reset and start of an A/D conversion. IOS2 is cleared
and will read as a one. Entries can be locked in the when accessed, therefore, the register should be saved
CAM to generate periodic events or waveforms. in an image register if more than one bit is being tested.
The status register is useful in determining which
events have caused an HSO generated interrupt. Writ-
9.1 HSO Interrupts and Software ing to this regIster in Window 15 will set the status bits
Timers but not cause interrupts. In Window 15, writing to
IOS2 can set the High Speed Output lines to an initial
The IISO unit can generate two types of interrupts. The value. Refer to Section 2.2 for more information on
High Speed Output execution interrupt can be generat- Window 15.
ed (if enabled) for HSO commands which change one
or more of the six output pins. The other HSO inter-
rupt is the interrupt which can be generated by any
other HSO command, (e.g. triggering the A/D, reset-
ting Timer2 or generating a software time delay).
IOS2: 7 6 5 4 3 2 1 0
START T2
HSO.5 HSO.4 HSO.3 HSO.2 HSO.1 HSO.O
AID RESET
17H
read Indicates which HSO event occcured
START A/D: HSO_CMD 15, start A/D
T2RESET: HSO_CMD 14, Timer2 Reset
HSO.0-5: Output pins HSO.O through HSO.5
4-44
80C196KB USER'S GUIDE
LDB HSO_COMMAND,#what_to_do
ADD HSO_TIME,Timerl.#when_to_do_it
16-81T 16-81T
XTAL1/16
CONTROL
LOGIC
16
4-:45
80C196KB USER'S GUIDE
16H
HSO.O CURRENT STATE SOFTWARE TIMER a EXPIRED
HSO.l CURRENT STATE SOFTWARE TIMER 1 EXPIRED
HSO.2 CURRENT STATE SOFTWARE TIMER 2 EXPI~ED
Figure 9·4. 1/0 Status Register 0 Figure 9·5.110 Status Register 1 (IOS1) ,
Writing the time value loads the HSO Holding Register this register in Window 15. The format for 1/0 Status
with both the time and the last written command tag. Register 0 is shown in Figure 9-4.
The command does not actually enter the CAM file
until an empty CAM register becomes available. The expiration of software timer 0 through 4, and the
overflow of Timerl and Timer2 are indicated in 10S1.
Commands in the holding register will not execute even The status bits can be set in Window 15 but not cause
if their time tag is reached. Commands must be in the interrupts .. The register is shown in Figure 9-5.
CAM to execute. Commands in the holding register
can also be overwritten. Since it can take up to 8 state Whenever the processor reads this register all of the
times for a command to move from the holding register time-related flags (bits 5 through 0) are cleared. This
to the CAM, 8 states must be allowed between succes· applies not only to explicit reads such as:
sive writes to the CAM.
LDB AL,IOSl
To provide proper synchronization, the minimum time
that should be loaded to Timerl is Timerl + 2. Small- but also to implicit reads such as:
er values may cause the Timer match to occur 65,636
counts later than expected. A similar restriction applies JBS IOSl,3,somewhere_else
if Timer2 is used.
which jumps to somewhere_else if bit 3 of lOS I is set.
Care must be taken when writing the command tag for In most cases this situation can best be handled by hav-
the HSO, because an interrupt can occur between writ- ing a byte in the register file which maintains an image
ing the command tag and loading the time value. If the of the register. Any time a hardware timer interrupt or
interrupt service routine writes to the HSO, t,he com- a HSO, software timer interrupt occurs the byte can be
mand tag used in the interrupt routine will overwrite updated:
the command tag from the main routine. One way of
avoiding this problem would be to disable interrupts ORB IOSl_image,IOSl
when writing to the HSO unit.
leaving lOS I_image containing all the flags that were
set before plus all the new flags that were read and
9.3 HSO Status cleared from 10S1. Any other routine which needs to
sample the flags can safely check lOS I_image. Note
Before writing to the HSO, it is desirable to ensure that , that if these routines need to clear the flags that they
the Holding Register is empty. If it is not, writing to the have acted Qn, then the modification of IOSI_image
HSO will overwrite the value in the Holding Register. must be done from inside a critical region.
I/O Status Register 0 (IOSO) bits 6 and 7 indicate the
status of the HSO unit. If IOSO.6 equals 0, the holding
register is empty and at least one CAM register is emp- 9.4 Clearing the HSO and Locked
ty. If IOSO.7 equals 0, the holding register is empty. Entries
The programmer should carefully decide which of these
two flags is the best to use for each application. This All 8 CAM locations of the HSO are compared before
register also shows the current status of the HSO.O any action is taken. This allows a pending external
through HSO.5. The HSO pins can be set by writing to
4-46
inter 80C196KB USER'S GUIDE
event to be cancelled by simply writing the opposite be carefully done. The user should ensure writing to
event to the CAM. However, onc.e an entry is placed in Timer! will not cause programmed HSO events to be
the CAM, it cannot be removed until e.ither the speci- missed or occur in the wrong order. rhe same precau-
fied timer matches the written value , a chip reset oc- tion applies' to Timer2.
curs or IOC2.7 is set. IOC2.7 is the CAM clear bit
which clears all entries in the CAM. The HSO'requires at least eight state times to compare
each entry in the CAM. Therefore, the fast increment
Internal events cannot be cleared by writing an oppo- mode for Timer2 cannot be used as a reference for the
site event. This includes events on HSO channels 8 HSO if transitions occur faster then once every eight
through F. The only method for clearing these events state times.
are by a reset or setting IOC2.7.
Referencing events when Timer2 is being us~d as an
up/down counter could cause events to occur m oppo-
HSO LOCKED ENTRIES site order or be missed entirely. Additionally, locked
The CAM Lock bit (HSO_Command.7) can be set to entries could possibly occur several times if Timer2 is
keep commands in the CAM, otherwise the commands oscillating around the time tag for an entry.
will clear from the CAM as soon as they cause an
event. This feature allows for generation periodic events When using Timer2 as the HSO reference, caution
based on Timer2 and must be enabled by setting must be taken that Timer2 is not reset prior to the
IOC2.6. To clear locked events from the CAM, the en- highest value for a Timer2 match in. the C~M. If t?at
tire CAM can be cleared by writing a one to the CAM match is never reached, the event will remam pendmg
clear bit IOC2. 7. A chip reset will also clear the CAM. in the CAM until the part is reset or CAM is cleared.
4-47
inter 80C196KB USER'S GUIDE
reprogrammed in addition to the Timer2 reset com· er changes every eight state times during Phase!. From
mand. This method provides for up to four PWM's an external perspective the HSO pin should change just
with no software overhead except when reprogramming prior to the falling edge of CLKOUT and be stable by
the duty cycle of any particular PWM. The code to its rising edge. Information from the HSO, can be
generate these PWMs is shown in Figure 9·6. latched on the CLKOUT rising edge. Internal events
also occur when the reference timer increments. '
9.7 HSO Output Timing
Changes in the HSO lines are synchronized to either 10.0 SERIAL PC>EtT
Timerl or Timer2. All of the external HSO lines due to
change at a certain value of a timer will change just The serial port on the 80C196KB has one synchronous
after the incrementing of the timer. Internally, the tim· and 3 asynchronous modes. The asynchronous modes
$include (reg196.inc)
**********************************************************
*
·, * GENERATION OF FOUR PWM'S USING LOCKED ENTRIES *
*
·,, * Timer2 is used as a reference and is clocked
externally by T2CLK. The High Speed outputs are
*
· * *
; * used as PWMs by programming each individual *
; * PWM(low) and PWM(High) time as a locked entry. *
·, * The period of the PWM is programmed by resetting *
; * timer2 and setting all the HSO lines high at the *
; * same time. The PWMs are reprogrammed by *
·,, * clearing the HSO CAM and reloading new values
for the PWM period and duty cycle.
*
· * *
*
**********************************************************
RSEG at 60h
pwmOtiml: dsw 1
pwmltiml: dsw 1
pwm2timl: dsw 1
pwm3timl: dsw 1
PWM_period: dsw 1
temp: dsw 1
cseg at 2080h
ld sp.#OdOh initialize stack pointer
Id PWM_period.#OfOOOh intialize pwm period
ld pwmOtiml.#2000h initialize pwm 0-3 duty cycle
ld pwmltiml.#4000h
Id pwm2timl.#6000h
Id pwm3timl.#8000h
Idb ioc2.#40h Enable locked entries
Idb iocO.#Oh Enable t2clk for timer2 clock,
source
'call pwm_program program pwm's on CAM
here: sjmp here loop forever
4·48
80C196KB USER'S GUIDE
pwm_program:
Idb ioc2,#OcOh flush entire cam
Idb hso_command,#Oceh program timer2 reset time
Id hso_time,PWM_period
nop delay eight state times before
nop next load
nop'
nop
Idb hso_command,#Oe6h HSO OIl high, locked, timer2 as
reference
Id hso_time,PWM_period set hso_high on t2rst
nop
nop
nop
nop
Idb hso_command,#Oe7h ; HSO 2/3 high, locked, timer2
; as referenoe
Id hso_time,PWM_period ;'set hso_high on t2rst
nop
nop
nop
nop
Idb hso_command,#OcOh set HSO.O low. locked, timer2
as reference
Id hso_time,pwmOtiml HSO.O time low
nop
nop
nop
nop
Idb hso_cbmmand,#Oclh set HSO.l low, locked, timer2
reference
Id hso_time,pwmltiml HSO.l time low
nop
nop
nop
nop
Idb hso_command,#Oc2h set HSO.2 low, 10cked,timer2
as refe,rence
Id hso_time,pwm2timl HSO.2 time low
nop
nop
nop
nop
Idb hso_command,#Oc3h set HSO.3 low, 10oked,timer2
as reference
Id hso_time,pwm3timl HSO.3 time low
ret
end
4·49
80C196KBUSER'SGUIDE
are full duplex, meaning they can transmit and receive reading it accesses SP_STAT. The upper 3 bits of
at the same time. The receiv~r is double buffered so that SP_CON must be written as Os for future compatibil-
the reception of a second byte can begin before the first ity. On the SOCI96KB the SP_STAT register contains
byte has been read. The transmitter on the SOCI96KB new bits to indicate receive Overrun Error (OE), Fram-
is also double buffered allowing continuous transmis- ing Error (FE), and Transmitter Empty (TXE). The
sions. The port is functionally compatible with the seri- bits which were also present on the S096BH are the
al port on the MCS-51 family of microcontrollers, al- Transmit Interrupt (TI) bit, the Receive Interrupt (RI)
though the software controlling the ports is different. bit, and the Received Bit. S (RBS) or Receive Parity
Error (RPE) bit. SP_STAT is read-only in Window 0
Data to and from the serial port is transferred th~ough and is shown in Figure 10-1.
SBUF(RX) and SBUF(TX), both located at 07H.
SBUF(TX) holds data ready for transmission and In all modes, the RI flag is set after the last data bit is
SBUF(RX) contains data received by the serial port. sampled, approximately in the middle of a bit time.
SBUF(TX) and SBUF(RX) can be read and can be Data is held in the receive shift register until the last
written in Window 15. data bit is received, then the data byte is loaded into
SBUF (RX). The receiver on the SOCI96KB also
Mode 0, the synchronous shift register mode, is de- checks Jor a valid stop bit. If a stop bit is not found
signed to expand I/O over a serial line. Mode I is the within the appropriate time, the Framing Error (FE)
standard S bit data asynchronous mode used for normal bit is set.
serial communications. Modes 2 and 3 are 9 bit data
asynchronous modes typically used for interprocessor Since the receiver is double-buffered, reception on a
communications. Mode 2 provides monitoring of a second data byte can begin before the first byte is read.
communication line for a I in the 9th bit position before However, if data in the shift register is loaded into
causing an interrupt. Mode 3 causes interrupts indepen- SBUF (RX) before the previous byte is read, the Over-
dant of the 9th bit value. flow Error (OE) bit is set. Regardless, the data in SBUF
(RX) will always be the latest byte received; it will nev-
er be a combination of the two bytes. The RI, FE, and
10.1 Serial Port Status and Control OE flags are cleared when SP_STAT is read. Howev-
er, RI does not have to be cleared for the serial port to
Control of the serial port is done through the Serial receive data.
Port Control (SP_CON) register shown in Figure 10-
J. Writing to location llH accesses SP....,.CON while
~-:--~-:--~-:--~T-:-8-+I-R-:-N-+-P-:-N-+--~-2-+--;-1~1 11H
TBS - Sets the ninth data bit for transmission. Cleared after each transmission. Not valid
if parity is enabled.
REN . - Enables the receiver
PEN - Enables the Parity function (even ~arity)
M2, MI - Sets the mode. ModeO = 00, Model = 01, Mode2 = 10, Mode3 = 11
7 6 5 4 3 2 1 0
RBS/ RI TI FE TXE OE X X 11H
RPE
RB8 - Set if the 9th data bit is high on reception (parity disabled)
Rf'E - Set if parity is enabled and a parity error occurred
RI - Set after the last data bit is sampled
TI - Set at the beginning of'the STOP bit transmission
FE - Set if no STOP bit is found at the end of a reception
TXE - Set if two bytes can be transmitted
OE .:..-. Set if the receiver buffer is overwritten
4·50
inter 80C196KB USER'S GUIDE
The Transmitter Empty (TXE) bit is set if the transmit BAUD RATES
buffer is empty and ready to take up to two characters.
TXE gets cleared as soon as a byte is written to SBUF. Baud rates are generated based on either the T2CLK
Two bytes may be written consecutively to SBUF if pin or XT AL 1 pin. The values used are different than
TXE is set. One byte may be written if TI alone is set. those used for the S096BH because the 80C196KB uses
By definition, if TXE has just been set, a transmission a divide-by-2 clock instead of a divide-by-3 clock to
has completed and TI will be set. The TI bit is reset generate the internal timings. Baud rates are calculated
when the CPU reads the SP_STAT registers. using the following formulas where BAUD_REG is
the value loaded into the baud rate register:
The TBS bit is cleared after each transmission and both
TI and RI are cleared when SP_STAT reacj. The RI Asynchronous Modes 1, 2 and 3:
and TI status bits can be set by writing to SP_STAT in
window 15 but they will not cause an interrupt. Read- BAUD_REG = XTAL1 -lOR T2CLK
ing of SP_CON in Window 15 will read the last value Baud Rate * 16 Baud Rate' 8
written. Whenever the TXD pin is used for the serial
port it must be enabled by setting IOp.5 to a 1. I/O
control register 1 can be read in window 15 to deter- Synchronous Mode 0:
mine the setting.
BAUD_REG = B XT;L 1, - 1 OR T2CLK
aud ate' 2 Baud Rate
STARTING TRANSMISSIONS AND RECEPTIONS
In Mode 0, if REN = 0, writing to SBUF (TX) will The most significant bit in the baud register value is set
start a transmission. Causing a rising edge on REN, or to a one to select XT AL 1 as the source. If it is a zero
clearing RI with REN = 1, will start a reception. Set- the T2CLK pin becomes the source. The following ta-
ting REN = 0 will stop a reception in progress and ble shows some typical baud rate values.
inhibit further receptions. To avoid a partial or com-
plete undesired reception, REN must be set to zero be- BAUD RATES AND BAUD REGISTER VALUES
fore RI is cleared. This can be handled in an interrupt
environment by using software flags or in straight-line Baud XTAL 1 Frequency
code by using the Interrupt Pending register to signal Rate
8.0 MHz 10.0 MHz 12.0 MHz
the completion of a reception.
300 1666/ -0.02 2082/0.02 2499/0.00
In the asynchronous modes, writing to SBUF (TX) 1200 416/ -0.08 520/-0.03 624/0.00
starts a transmission. A falling edge on RXD will begin 2400 207/0.16 259/0.16 312/-0.16
a reception if REN is set to 1. New data placed in , 4800 103/0.16 129/0.16 155/0.16
SBUF (TX) is held and will not be transmitted until the 9600 51 /0.16 64/0.16 77 / 0.16
end of the stop bit has been sent. 19.2K 25/0.16 32/1.40 38/0.16
In all modes, the RI flag is set after the last data bit is Baud Register Value I % Error
sampled approximately in the middle of the bit time.
Also fdr all modes, the TI flag is set after the last data A maximum baud rate of 750 Kbaud is available in the
bit (either 8th or 9th) is sent, also in the middle of the asynchronous modes with 12 MHz on XTAL). The
bit time. The flags clear when SP_STAT is read, but synchronous mode has a maximum rate of 3.0 Mbaud
do not have to be clear for the port to receive or trans- with a 12 MHz clock. Location OEH is the Baud Regis-
mit. The serial port mterrupt bit is set as a logical OR ter. It is loaded sequentially in two bytes, with the low
of the RI and TI bits. Note that changing modes will byte being loaded first. This register may not be loaded
reset the Serial Port and abort any transmission or re- with zero in serial port Mode O.
ception in progress on the channel. '
4-51
inter 80C196KBUSER'S GUIDE
10.2 Serial Port Interrupts mode the TXD pin outputs a set of 8 pulses while the
RXP pin either transmits or .receivesdata. Data is
TlJe. serial port generates one of three possible inter- transferred 8 bits at a time with the LSB first. A dia-
rupts: Transmit Interrupt TI(2030H), Receive Inter- gram··of the relative timing.of these signals is shown in
rupt RI(2032H) and SERIAL(200CH). When the RI Figure 10-2. Note that this is the only. mode which uses
bit gets set an interrupt is generated through either RXD as an output.
200CH or 2032H depending on which interrupt is en-
abled. INT_MASK 1.1 controls the serial port receive
interrupt through location 2032H and INT_MASK.6 Mode 0 Timings
controls serial port interrupts through location 200CH. In Mode 0, the TXD pin sends but a clock train, while
The 8096BH shared the TI and RI interrupts on the the RXD pin transmits or receives the data. Figure 10-
SERIAL interrupt vector. On the 80C196KB, these in- 2 shows the waveforms and timing.
terrupts share both the serial interrupt vector and have
their own interrupt vectors. In this mode the serial port expands the I/O capability
of the 80C196KB by simply adding shift registers. A
When the TI bit is set it can cause an interrupt through schematic of a typical circuit is shown in Figure 10-3.
the vectors at locations 200CH or 2030. Interrupt This circuit inverts the data coming in, so it must be
through location 2030 is determined by INT_ reinverted in software.
MASK 1.0. Interrupts through the serial interrupt is
controlled by the same bit as the RI interrupt(INT_
MASK.6). The user should not mask off the serial port MODE 1
interrupt when using the double-buffered feature of the
transmitter, .as it could cause a missed count in the Mode 1 is the standard asynchronous communications
number of bytes being transmitted. mode. The data frame used in this mode is shown in
Figure 10-4. It consists of 10 bits; a start bit (0), 8 data
bits (LSB first), and a stop bit (l). If parity is enabled
10.3 Serial Port Modes by setting SPCON.2, an even parity bit is sent instead
of the 8th data bit and parity is checked on reception.
MODE 0
Mode 0 is a synchronous mode which is commonly
used for shift register based I/O expansion. In this
EXPANDED:
DO 01
RXO(IN) ~r-1---IDI--....,f:rr-:--
270651-28
4-52
inter 80C196KB USER'S GUIDE
CLOCK 1NHI8IT
..-------=-----4 PX.X
DATA
~_""'-"""-----4 RXD
CLOCK
1.----+----.....-..;...--1 TXD
INPUTS
OUTPUTS .80C196KB
SERIAL IN A
ENABLE
a>-----I PX.X
270651-29
·.STOP
270651-30
STOP
The transmit and receive functions are controlled by port will holt! off transmission until the stop bit is com-
separate shift clocks. The transmit shift clock starts plete. RI is set when 8 data bits are received, not when
when the baud rate generator is initialized, the receive the stop bit is received. Note that when the serial port
shift clock is reset when a 'I to 0' transition (start bit) is status register is read both TI and RI are cleared.
received. The transmit clock may therefore not be in
sync with the receive clock, although they will both be Caution should be. used when using the serial port to
at the same frequency. connect more than two devices in half-duplex, (i.e. one
wire for transmit and receive). If the receiving proces-
The TI (Transmit Interrupt) and RI (Receive Inter· sor does not wait for one bit time after RI is set before
rupt) flags are set to indicate when operations are' com· starting to transmit, the stop bit on the link could be
plete. TI,is set when the last data bit of the message has corrupted. This could cause a problem for other devices
been sent, not when the stop bit is sent. If an attempt to listening on the link. .
send another byte is made before the stop bit is sent the
4·53
inter 80C196KB USER'S GUIDE
MODE 2 bit is set. Two types of frames are used: address frames
which have the 9th bit set and data frames which have
Mode 2 is the asynchronous 9th bit recognition mode. the 9th bit cleared. When the master processor wants to
This mode is commonly used with Mode 3 for multi- transmit a block of data to one of several slaves, it first
processor communications. Figure 10-4 shows the data sends out an address frame which identifies the target
frame used in this mode. It consists of a start bit (0), 9 slave. Slaves in Mode 2 will not be interrupted by a data
data bits (LSB first), and a stop bit (I). When transmit- frame, but an address frame will interrupt all slaves.
ting, the 9th bit can be set to a one by setting the TB8 Each slave can examine, the received byte and see if it is
bit in the control register before writing to SBUF (TX). being addressed. The addressed slave switches to Mode
The TB8 bit is cleared on every transmission, so it must 3 to receive the coming data frames, while the slaves
be set prior to writing to SBUF (TX). During recep- that were not addressed stay in Mode 2 continue exe-
tion, the serial port interrupt and the Receive Interrupt cuting.
will not occur unless the 9th bit being received is set.
This provides an easy way to have selective reception
on a data link. Parity cannot be enabled in this Il'\ode. 11;0 AID CONVERTER
Analog Inputs to the 80CI96KB System are handled
MODE 3 by the AID converter System. As shown in Figure
11-4, the converter system has an 8 channel multiplex-
Mode 3 is the asynchronous 9th bit mode. The data er, a sample-and-hold, and a 10 bit successive approxi-
frame for this mode is identical to that of Mode 2. The mation AID converter. Conversions can be performed
transmission differences between Mode 3 and Mode 2 on one of eight channels, the inputs of which share pins
are that parity can be enabled (PEN = I) and cause the with port O. A conversion can be done in as little as 91
9th data bit to take the even parity value. The TB8 bit state t.irites.
can still be used if parity is not enabled (PEN = 0).
When in Mode 3, a reception always causes an inter- Conversions are started by loading the AD_COM-
rupt, regardless of the state of the 9th bit. The 9th bit is MAND register at location 02H with the channel num-
stored if PEN = 0 and can be read in bit RB8. If ber. The conversion can be started immediately by set-
PEN = I then RBS becomes the Receive Parity Error ting the GO bit to a one. If it is cleared the conversion
(RPE) flag. will start when the HSO unit triggers it. The AID com-
mand register must be written to for each conversion,
Mode 2 and 3 Timings even if the HSO is used as the trigger. The result of
the conversion is read in the AD_RESULT(High)
Modes 2 and 3 operate in a manner similar to that of and AD_RESULT(Low) registers. The AD_RE-
Mode 1. The only difference is that 'the data is now SULT(High) contains the most significant eight bits of
made up of 9 bits, so II-bit packages are transmitted the conversion. The AD_RESULT(Low) register con-
and received. This means that 1'1 and RI,will be set on tains the remaining two bits and the AID channel num-
the 9th data bit rather than the 8th. T.he 9th bit' can be ber and AID status. The format for the AD_COM-
used for parity or multiple processor communications. MAND register is shown in Figure 11-1. In Window
15, reading the AD_COMMAND register will read
the last command written. Writing to the AD_RE-
10.4 Multiprocessor Communications SULT register will write a value into the result register.
4~54
inter 80C196KB USER'S GUIDE
The AID converter can cause an interrupt through the started. The upper byte of the result register contains
vector at location 2002H when 'it completes a conver- the most significant 8 bits of the conversion. The lower
sion. It is also possible to use a polling method by b~te format is shown in Figure 11-2.
checking the Status (S) bit in the lower byte of the
AD_RESULT register, also at location 02H. The At high crystal frequencies, more time is needed to al-
status bit will be a 1 while a conversion is in progress. It low the comparator to settle. For this reason IOC2.4 is
takes 8 state times to set this bit after a conversion is provided to adjust the speed of the AID conversion by
disablinglenabling a clock prescaler.
'vREF
8 TO 1 SAMPLE
ANALOG AND
MULTIPLEXER HOLD
CHANNEL
START
CONVE~SION
HSO COMMAND "F"
270651-34
4-55
; :,
80C196KB USER'S GUIDE \,' :
11.1 AID Conversion Process The total number of state times required for a 'conver-
sion is determil'led,by the setting of IOC2.4' clock pre-
The conversion process is initiated by the execution of scaler bit. With the bit set the conversion time is 91
HSO command OFH, or by writing a one to the GO Bit states and 158 states when'the bit is cleared.
in'the AID Control Register. Either activity causes a
start conversion signal to be sent to the 'AID converter
control logic. If an HSO Command was used, the con- 11.2 AID Interface Suggestions
version process will begin when Timer! 'increments. (
This aids applications attempting to approach spectral- The external interface circuitry to an analog input is
ly pure -sampling, since successive samples spaced by highly dependent upon the application, and can impact
equal Timerl' delays will occur with a variance of about converter characteristics. In the external circuit's de-
±50 ns (assuming a stable clock on XTALI). Howev- sign, important factors such as input pin leakage, sam-
er, conversions initiated by writing a one to the AD- ple capacitor size and multiplexer series resistance from
CON register GO Bit will start within three state times the input pin to the sample capacitor must bel consid-
after the instruction has completed, execution resulting ered.
in a variance of about 0.50 p.s (XTALI = 12 MHz).
For the 80C196KB, these factors are idealized in Fig-
Once the A/D unit receives a start conversion signal, ure 11-5. The external input circuit mllst be able to
there is a one state time delay before sampling (Sample charge a sample capacitor (Cs) t.hrough a ,series resist-
Delay) while the successive approximation register is ance (RI) to an accurate voltage -given a D.C. leakage
reset and tlte proper multiplexer channel is selected. (IL)' On the 80C196KB; Cs is around 2 pF, RI is
After the sample delay, the mUltiplexer output is con- around 5 Kn. and IL is specmed as 3 p.A maximum. In
nected to the sample capacitor and remains connected determining the necessary source impedance Rs, the
for 8 state times in fast mode or 15 state times for slow value of VBIAS is not ,important.
mode (Sample Time). After this 8/15 state time "sam-
ple window" closes, the input to the sample capacitor is
~~
disconnected from the multiplexer so that changes on
the input pin will not alter the stored charge while the
conversion is in progress. The comparator is then auto-
zeroed and the conversion begins. The sample delay
and sample time uncertainties are each approximately
± 50 ns, independent of clock speed.
VB1A!i.
To perform the actual analog-to-digital conversion the
80CI96KB implements a successive approximation al- 270651-35
gorithm. The converter hardware consists of a 256-re-
sistor ladder, a comparator, coupling capacitors and a Figure 11 ~5. Idealized AID Sampling Circuitry
lO-bit successive approximation register (SAR) with
logic that guides the process. The resistor ladder pro- External circuits with source impedances of I Kn. or
vides 20 mV steps (VREF = 5.12V), while capacitive Jess will be able to maintaln an input voltage within a
coupling creates 5 m V steps within the 20 m V ladder tolerance of about ±0.61 LSB (1.0 Kn. X 3.0 p.A=
voltages. Therefore, 1024 internal reference voltages are 3.0 mY) given the D.C. leakage. Source impedances
available for comparison' against the analog input to above 2 Kn. can result in an external error 'of at least
generate a lO-bit conversion result. one LSB due, to the voltage drop caused by the 3 p.A
leakagll. I.!l addition, source impedances above 25 Kn.
A successive approximation conv~i!>n is performed by may degrade converter accuracy, as a result of the inter-
comparing a sequence of reference voltages, to the ana- nal'sample capacitor not being-fully charged during the
log input, in a binary search for the reference 'Voltage I p.s (12 MHz clock) sample window.,
that most clo.sely matches the input. The 'I. full scale
reference voltage is the rtrst tested. This corresponds to If large source impedances degrade converter accUracy
a 1O.bit 'result where the most signmcant bit is zero, because the sample capacitor'is not charged during the
and all other bits are one~ (Oll1.l1ll.11b). If the ana- sample time, an external capacitor connected to the pin
log input was'less than the test voltage, bit 10 of the compensates for this. Since the sample capacitor is
SAR is left it zero, and a new test v<i\tage, of 1/4 full scal~ 2 pF, a 0;005, p.F ~pacitor (2048* 2 pF) will charge
(00 I I.l111.11 b) is tried. If this test voltage was lower the sample capacitor ~ an a~urate input voltage of
than the analog input, bit 9 of the SAR is set and bit 8 ±O.5 LSB. An external capacitor does not compensate
is cleared for the Jilext test (010 1.1111.11 b). This binary for the voltage drop across the 'source resistance, but
search continues until 10 tests have occurred, at which charges the sample, capacitor fully during the sample
time the valid IO-bit conversion result resides in the time.' "
SAR where it ~an be read by software.
4-56
80C196KB USER'S GUIDE
,Placing an external capacitor on each analog input will ANGND must be connected even if the AID converter
- also reduce the sensitivity to noise, as the capacitor is not being used. Remember that Port 0 receives its
combines with series resistance in the external circuit to power from the VREF and ANGND pins even when it
form a low-pass filter, In practice, one should include a is used as digital 1/0.
small series resistance prior to the external capacitor on
the analog input pin and choose the largest capacitor
value practical, given the frequency of the signal being 11.3 The AID Transfer Function
converted, This provides a low-pass filter on the input,
while the resistor will also limit input current during The conversion result is a to-bit ratiometric representa-
over-voltage conditions. tion of the input voltage, so the numerical value ob-
tained from the conversion will be:
Figure 11-6 shows a simple analog interface, circUit
based upon the discussion above. The circuit in the fig- INT [1023 x (VIN - ANGND)/(VREF - ANGND)l.
ure also provides limited protection against over-volt-
age conditions on the analog input. Should the input This produces a stair-stepped transfer function when
voltage inappropriately drop significantly below the output code is plotted versus input voltage (see Fig-
ground, diode D2 will forward bias at about 0.8 DCV. ure 11-7). The resulting digital codes can be taken as '
Since the specification of the' pin has an absolute maxi- simple ratiometric information, or they provide infor-
mum low voltage of -0.3V, this will leave about O.SV , mation about absolute voltages or relative voltage
across the 2700 resistor, or about 2 mA of current. changes on the inputs, The more demanding the appli-
This should limit the current to a safe amount. cation is on the AID converter, the more important it
is to fully understand the converter's operation, For
However, before any circuit is used in an actual applica- simple applications, kpowing the absolute error of the
tion, it should be thoroughly analyzed for applicability to converter is sufficient. However, closing a servo-loop
the specific problem at hand. with' analog inputs necessitates a detailed understand-
ing of an AID converter's operation apd errors.
4-57
7
."
..
ci
r::
CD
CD
0
.... 4 ....0
~ ~
0: Q ;:J!:
CD THE VOLTAGE CHANGE ID
oj>. !!!. BETWEEN ADJACENT CODE c:
Q, » TRANSITIONS (THE "CODE (J)
m
<X> '-
c .3 WIDTH") IS= 1 LSB •
:lJ
0 ene;)
..
:::r
1»-
..
I»
()
CD
::l. 2
c:
6
m
til
:::!:
()
H .
FIRST CODE TRANSITION OCCURSJ
WHEN THE APPLIED VOLTAGE IS
- EQUAL TO 1/2 LSB.
------------------
O~--J---_r------_,--------,_------_r--------r_------_.--~--_,--------,
1/2 2 .3 4 5 6 61/2 7 8
5 ABSOLUTE ERROR
'TI
c"
c:
~ ACTUAL
CD CHARACTERISTIC
.... 01)
•
90
Q
o....
)0
4
n CD
0)
i: Q
~~
Q,
!!!.
I»
:::I
0-
"c:
OJ
UI
'" ii 3 m
CD ~
!!!. en
0 C)
:::r c:
II)
..
~
II)
n
CD
~
2
is
m
in
g
In
ACTUAL
:!!
5-1
---- I CHARACTERISTIC
.....
(Q
c
CD
TERMINAL BASED
CHARACTERISTIC
...{It !0
~
... Q
4
-
U)
c»
~
3
S'
!!.
"c
UI
fI)
cD UI
0 1ft
DI 3 :If
(II
CD
a. rij
....
Cl
:z
....
DI
C)'
CD
:::!.
2
NON-LINEARITY
Ii)
C
a
1ft
!.
cr
scale 'reference minus L5 LSB; and it's code widths are Undesired signals come from three main sources, First,
all exactly one LSR Th~se' qualities result in a digitiza- noise on V cc-Vcc Rejection, Second, input signal
tion without offset, full-scale or linearity errors, In oth- changes on the channel being converted after the sam-
er words, a perfect conversion. ple window has closed-Feed through, Third, signals
applied to' channels not selected by the multiplexer-
Figure 11-8 shows an Actual Characteristic of a hypo- Off-Isolation.
thetical 3-bit converter, which is not perfect, When the
Ideal Characteristic is overlaid with the imperfect char- Finally, multiplexer on-channel resistances differ slight-
acteristic, the actual converter is seen to exhibit errors ly from one channel to the next causing Channel-to-
in the location of the first and final code transitions and Channel Matching errors, and random noise in general
cod~ widths, The deviation of the first code transition results in Repeatability errors,
from ideal is called "zero offset", and the deviation of
the final code transition from ideal is "full-scale error".
The deviation of the code widths from ideal causes two 1'1.4 AID Glossary of Terms
types of errors. Differential Non-Linearity and Non-
Linearity. Differential Non-Linearity is a local linearity Figures 11-7, 11-8, and 11-9 display many of these
error measurement, whereas Non-Linearity is an over- terms, Refer to AP-406 'MCS-96 Analog Acquisition
all linearity error measure, Primer' for additional information on the AID terms.
Differential Non-Linearity is the degree to which actual ABSOLUTE ERROR-The maximum difference be-
code widths differ from the ideal one LSB width, It tween corresponding actual and ideal code transitions,
gives the user a measure of how' much the input voltage Absolute Error accounts for all deviations of an actual
may have changed in order to produce a one count converter from an ideal converter,
change in the conversion result, Non-Linearity is the
worst case deviation of code transitions from the corre- ACTUAL CHARACTERISTIC-The characteristic of
sponding code transitions of the Ideal Characteristic, an actual converter. The characteristic of a given con-
Non-Linearity describes how much Differential Non- verter may vary over temperature, supply voltage, and
Linearities could add up to produce an overall maxi- frequency conditions, An Actual Characteristic rarely
mum departure from a linear eharacteristic. If the Dif- has ideal first and last transition locations or ideal code
ferential Non-Linearity errors are too large, it is possi- widths, It may even vary over multiple conversion un-
ble for an AID converter to miss codes or exhibit non- der the same conditions,
monotonicity, Neither behavior is desirable in a closed-
loop system, A converter has no missed codes if there BREAK-BEFORE-MAKE-The property of a multi-
exists for each output code a unique input voltage range plexer which guarantees' that a previously selected
that produces that code only. A converter is monotonic channel will be deselected befdre a new channel is se-
if every subsequent code change represents an input lected. (e,g, the converter will not short inputs
voltage change in the same direction, ' together,)
IDEAL CHARACTERISTIC-A characteristic with SAMPLE TIME-The time that the sample window is
its first code transition at VIN = 0.5 LSB, its last code open.
transition at VIN (= (VREF 1.5 LSB) and all code
widths equal to one LSB. SAMPLE TIME UNCERTAINTY-The variation in
the sample time.
INPUT RESISTANCE-The effective series resistance
from the analog input pin to the sample capacitor. SAMPLE WINDOW-Begins when the sample capac-
-itor is attached to a selected channel and ends when the
LSB-LEAST SIGNIFICANT BIT: The voltage value sample capacitor is disconnected from the selected
corresponding to the full scale voltage divided by 2n , channel.
where n is the number of bits of resolution of the con-
verter. For a lO-bit converter with a reference voltage SUCCESSIVE APPROXIMATION-An AID con-
of 5.12 volts, one LSB is 5.0 mY. Note that this is version methOd which uses a binary search to arrive at
different than digital LSBs, since an uncertainty of two the best digital representation of an analog input.
LSBs, when referring to an AID converter, equals
10 mY. (This has been confused with an uncertainty of TEMPERATURE COEFFICIENTS-Change in the
two digital bits, which would mean four counts, or stated variable per degree centigrade temperature
20 mV.) . change. Temperature coefficients are added to the typi-
cal values of a specification to see the effect of tempera-
MONOTONIC-The property of successive approxi- ture drift.
mation converters which guarantees that increasing in-
put voltages produce adjacent codes of increasing value, TERMINAL BASED CHARACTERISTIC-An Ac-
and that decreasing input voltages produce adjacent tual Characteristic which has been rotated and translat-
codes of decreasing value. ed to remove zero offset and full-scale error.
NO MISSED CODES-For each and every output Vee REJECTION-Attenuation of noise on the Vee
code, there exists a unique input voltage range which line to the AID converter. .
produces that code only. ,
ZERO OFFSET-The difference between the expected
NON-LINEARITY-The maximum deviation of code and actual input voltage corresponding to the first code
transitions of the terminal based characteristic from the transition.
corresponding code transitions of the ideal characteris-
tics.
4-62
intJ 80C196KB USER'S GUIDE
12.0 1/0 PORTS In addition to acting as a digital input, each line of Port
o can be selected to be the input of the A/D converter
There are five 8-bit I/O ports on the 80C196KB. Some as .discussed in Section 11. The capacitance on these
of these ports, are input only, some are output only, pins is approximately 1 pF and will instantaneously in-
some are bidirectional and some have alternate func- crease by around 2 pF when the pin is being sampled by
tions. in addition to these ports, the HSI/O unit pro- the A/D converter.
vides extra I/O lines if the timer related features of
these lines are not needed. Port 0 pins are special in that they may individually be
used as digital inputs and analog inputs at the same
Port 0 is an input port which is also used as the analog time. A Port 0 pin being used as a digital input acts as
input for the A/D converter. Port 0 is read at location the high impedance input ports just described. Howev-
OEH. Port 1 is a quasi-bidirectional port and is read or er, Port 0 pins being used as analog inputs are 'required
written to through location OFH. The three most signif- to provide current to the internal sample capacitor
icant bits of Port 1 are the control signals for .'the when a conversion begins. This means that the input
HOLD/HLDA bus port pins. Polt 2 contains three characteristics of .a pin will change if a conversion is
types of port lines: quasi-bidirectional, input and out- being done on that pin. In either case, if Port 0 is to be
put. Port2 is read or written from location IOH. The used as analog or digital I/O, it will be necessary to
ports cannot be read or written in Window 15. The provide power to this port through the VREF pin and
input and output lines are shared with other functions ANGNDpins.
in the 80C196KB as shown in Figure 12-1. Ports 3 and
4 are open-drain bidirectional ports which share their Port 0 is only sampled when the SFR is read to reduce
pins with the address/data bus. On EPROM and ROM the noise in the A/D converter. The data must be stable
parts, Port 3 and 4 are read and written through loca- one state time before the SFR is read.
tion IFFEH.
ALTERNATE CONTROL
PIN FUNC.
FUNCTION REG.
2.0 Output TXO (Serial Port Transmit) IOC1.S
2.1 Input RXO (Serial Port Receive) SPCON.3
P2.2 Input EXTINT IOC1.1
2.3. Input T2CLK (Timer2 Clock & Saud) lOCO.?
2.4 Input T2RST (Timer2 Reset) IOCO.S
2.5 Output PWM Output IOC1.0 BUS
2.6 OBO' Timer2 up/down select IOC2.1
2.? OBb' Timer2 Capture N/A
'OBO = Quasi-bidirectional,
Figure 12-1. Port 2 Multiple Functions
SAMPLE
270651-76
While discussing the characteristics of the I/O pins
some approximate current or voltage specifications will NOTE:
be given. The exact specifications are available in the '01 and 02 are ESO Protection Devices
latest version of the data sheet that corresponds to the
part being used. Figure 12·2. Input Port Structure
, Q
FROMPORTc;>-~----------------'-----~-1t-~~
LATCH
INPUT .....::r--~X
DATA~
READ
PORT PIN u--~
270651-40
CHMOS Configuration. pFET 1 is turned on for 2 ose. periods after Q makes a O-to-1 transition. During this time, pFET 1
also turns on pFET 3 through the inverter to form a lateh which holds the 1. pFET 2 is also on.
the low impedance pullup will remain on for one state turns on for two oscillator periods. P2 remains on until
time after the change. a zero is written to the pin. P3 is used as a latch, so it is
turned on whenever the pin is above the threshold value
Port I, Port 2.6 and· Port 2.7 are quasi-bidirectional (around 2 volts). '
ports. When the processor writes to the pins of a quasi-
bidirectional port it actually writes into a register which To reduce the amount of cutrent which flows when the
in turn drives the port pin. When the processor reads pin is externally pulled low, P3 is turned off when the
these ports, it senses the status of the pin directly. If a pin voltage drops below the threshold. The current re-
port pin is to be used as an input then the software quired to pull the pin from a high to a low is at its
should write a one to its associated SFR bit, this will maximum just prior to the pull-up turning off. An ex-
cause the low-impedance pull-down device to turn off ternal driver'can switch these pins easily. The maxi-
and leave the pin pulled up with a relatively high im- mum current required occurs at the threshold voltage
pedance pullup deviCe which can be easily driven down and is approximately 700 microamps.
,by the device driving the input.
When the Port 1 pins are used as their alternate func-
If some pins of a port are to be used as inputs and some tions (HOLD, HLDA, and BREQ), the pins act like a
are to be used as outputs the programmer should be standard output port.
careful when writing to the port.
Particular care should be exercised when using XOR HARDWARE CONNECTION HINTS
opcodes or any opcode which is a read-modify-write
When using the quasi-bidirectional ports as inputs tied
instruction. It is possible for a Quasi-Bidirectional Pin to switches, series resistors may be needed if the ports
to be written as a one, but read back as a zero if an
will be written to internally after the part is initialized.
external device (i.e., a transistor base) is pulling the pin
The amount of current sourced to ground from each
below VIH. pin is typically 7 rnA or more. Therefore, if all 8 pins
are tied to ground, 56 rnA will be sourced. This is
Quasi-bidirectional pins can be used as input and out- equivalent to instantaneously doubling the power used
put pins without the need for a data di,rection register.
by the chip and may cause noise in some applications.
They output a strong low value and a weak high value.
The weak high value can be externally pulled low pro-
This potential problem can be solved in hardware or
viding an input function. Figure 12-3 shows the config-
software. In software, never write a zero to a pin being
uration of a CHMOS quasi-bidirectional port. '- usee! as an input.
Outputting a 0 on a quasi-bidirectional. pin turns on the In hardware, a LK resistor in series with each pin will
strong pull-down and turns off all of th,e pull-ups.
limit current to a reasonable value without impeding
When a 1 is output the pull-down is turned off and 3 the ability to override the high impedance p).llll,lp. If all
pull-ups (strong-PI, weak-P3, very weak-P2) are turned
8 pins are tied together a 1200 resistor would be rea-
on. Each time, a, pin switches from 0 to 1 transistor PI
sonable. The problem is not quite as severe when the
4-64
infef 80C196KB USER'S GUIDE
inputs are tied to electronic devices instead of switches, the voltage present on the port pin. The second case can
as most external pulldowns will not hold 20 rnA to 0.0 be taken care of in the software fairly easily:
volts.
LDB AL, IOPORTl
Writing to a Quasi-Bidirectional Port with electronic XORB AL, #OlOB
devices attached to' the pins requires special attention. ORB AL, #OOlB
Consider using P1.0 as an input and trying to toggle STB AL, IOPORTl
P 1.1 as an output:
A software solution to both cases is to keep a byte in
ORB IOPORT1, #OOOOOOOlB Set PLO RAM as an image of the data to be output to the port;
for input any time the software wants to modify the data on the
XORB IOPORT1, #OOOOOOlOB Complement port it can then modify the image byte and copy it to
Pl.l the port.
The first instruction will work as expected but two If a switch is used on a long line connected to a quasi-
problems can occur when the second instruction exe- bidirectional pin, a pullup resistor is recommended to
cutes. The first is that even though P 1.1 is being driven reduce the possibility of noise glitches and to decrease
high by the 80C 196KB it is possible that it is being held the rise time of the line. On extremely long lines that
low externally. This typically happens when the port are handling slow signals, a capacitor may be helpful in
pin drives the base of an NPN transistor which in turn addition to the resistor to reduce noise.
drives whatever there is in the outside world which
needs to be toggled. The base of the transistor will
clamp the port pin to the transistor's Vbe above 12.3 Output Ports
ground, typically 0.7V. The 80C196KB will input this
value asa zero even if a one has been written to the port Output pins include the bus control lines, the HSO
pin. When this happens the XORB instruction will al- lines, and some of Port 2. These pins can only be used
ways write a one to the port pin's SFR and the pin will as outputs as there are no input buffers connected to
not toggle. them. The output pins are output before the rising edge
of PHI and is valid some time during PHI. Externally,
The second problem, which is related to the first, is that PHI corresponds to CLKOUT low. It is not possible to
if P1.0 happens to be driven to a zero when Port 1 is use immediate logical instructions such as XOR to tog-
read by the XORB instruction, then the XORB will gle these pins.
write a zero to P1.0 and it will no longer be useable as
an input. The control outputs and HSO pins have output buffers
with the same output characteristics as those of the bus
The first situation can best be solved by the external pins. Included in the category of control outputs are:
driver design. A series resistor between the port pin and TXD, RXD (in Mode 0), PWM, CLKOUT, ALE~
the base of the transistor often works by bringing up BHE, RD, and WR. The bus pins have 3 states: output
high, output low, and high impedance. Figure 12-4
shows the internal configuration of an output pin.
BUS o Q
LATCH
IE
ALT. - - - 4 - - - - - 1
FUNCT.
4-65
/ilOC196KB USER'S GUIDE
12;4 Ports 3 and 4/ADO-15 be used as inputs. Reading Port 3 and 4 from a previ-
ously written zero condition is as follows ...
These pins have two functions. They are either bidirec-
tional ports with open-drain outputs or System Bus LD intregA, #OFFFFH setup port
pins which the memory controller uses when it is ac- change mode
cessing off-chip memory. If the EA line is low, the pins pattern
always act as the System Bus. Otherwise they act as bus
pins only during a memory access. If these pins are ST intregA, lFFEH register -+
being used ·as ports and bus pins, ones must be written ., Port 3' and 4
to them prior to bus operations. LD II: ST not
needed if
Accessing Port 3 and 4 as I/O is easily done from inter- previously
nal registers. Since the LD and ST instructions require written as ones
the use of internal registers, it may be necessary to first
move the port information .into an internal location be- LD intr,egB, lFFEH register +-
fore utilizing the data. If the data is already internal, ,Port 3 and 4
the LD is unnecessary. For instance, to write a word
value to Port 3 and 4 ... Note that while the format of the LD and ST instruc-
tions are sirrtilar, the source and destination directions
LD intreg, portdata ,register +- change.
data
not needed if When acting as the system bus the pins have strong
already drivers to both Vee and V ss. These drivers are used
internal whenever data is being output on the system bus.and
are not used when data is being output by Ports 3 and
ST intreg, IFFEH register -+ 4. The pins, external input buffers and pulldowns are
Port 3 and 4 shared between the bus and the ports. The ports use
different output buffers which are configured as open-
To read Port 3 and 4 requires that "ones" be written to drain, and require external pull up resistors. (open-drain
the port registers to first setup the input port configura- is the MOS version of open-collector.) The port pins
tion circuit. Note that the ports are reset to this input and their system bus functions are shown in Figure
condition, but if zeroes have been written to the port, 12-5.
then ones must be re-written to any pins which are to
BUS D Q
P3/4
LATCH
IE
ADDR~__~______~
DATA
PIN--+--+--+-+---__I-CI<
PORT BUS SAMPLE RESET
BUS PORT FCN SELECT
270651-41
Ports 3 and 4 on the 80CI96KB are open drain ports. follow good design and board layout techniques to keep
There is no pullup when these pins are used as I/O noise to a minimum. Liberal use of decoupling caps,
ports. A diagram of the output buffers connected to Vee and ground planes, and transient absorbers can all
Ports 3 and 4 and the bus pins is shown in Figure 12-5. be of great help. It is much easier to design a board
with these features then to search for random noise on
When Ports 3 and 4 are to be used as inputs, or as bus a poorly designed PC board. For more information on
pins, they must first be written with a 'I'. This will put noise, refer to Applications Note AP-125, 'Designing
the ports in a high impedance mode. When they are Microcontroller Systems for Noisy Environments' in
used as outputs, a pullup resistor must be used external- the Embedded Control Application Handbook.
ly. A 15K pullup resistor will source a maximum of
0.33 milliamps, so it would be a reasonable value to
choose if no other circuits with pullups were connected 13.3 Oscillator arid Internal Timings
to the pin.
ON-CHIP OSCILLATOR
Ports 3 and 4, are addressed as off-chip memory-
m;:tpped I/O. The port pins will change state shortly The on-chip oscillator circuitry for the 80C196KB, as
after the falling edge ofCLKOUT. When these pins are shown in Figure 13.1, consists of a crystal-controlled,
used as Ports 3 and 4 they are open drains, their struc- positive reactance oscillator. In this application, the
ture is different when they are used as part of the bus. crystal is operated in its fundamental response mode as
an inductive reactance in parallel resonance with capac-
Port 3 and 4 can be reconstructed as I/O ports from the itance external to the crystal.
Address/Data bus. Refer to Section 15.7 for details. I
4-67
intJ 80Ct96KB USER'S GUIDE
INTERNAL TIMINGS
270651-78
4·68
l
8OC196KB Reset Sequence
RESET
PIN /.l1l
CASE I.
"II PHI 00
C)
~
...r::
....CD
CASE II.
o...
PHI ~
Cf
~
?'
::D INTERNAL
RESET I
\.
;\_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _
"c:
m
-
Q) CD UJ
<D- III
CD
0+-- ----, m
eCDn
.D
ALE /117 'I n~ ___ ::D
cii
C)
r::
S
CD
:I
n
CD
~ 1- .r C
m.
COli FIG. > 2081H
D~~! ( 2018H >---C) ( 2080H >--CJ( OR >---C)
PHASES AND RESET BYTE 2082H
SYNCHRONISED
270651-45
80C196KB USER'S GUIDE
4-70
80C196KB USER'S GUIDE
RESET CIRCUITS is only asserted for four state times. If this is done, it is
possible for the 80CI96KB to start running before oth-
The si~plest way to reset an 80CI96KB is to insert a er chips in the system are out of reset. Software must
capacitor between the RESET pin and Vss. The take this condition into account. A capacitor cannot be
80CI96KB has an internal pullup which has a value connected directly to RESET if it is to drive the reset
between 6K and 50K ohms. A 5 uF or greater capaci- pins of other chips in the circuit. The capacitor may
tor should provide sufficient reset time as long as Vcc keep the voltage on the pin from going below guaran-
rises quickly. teed VIL for circuits connected to the RESET pin. Fig-
ure 13-8 shows an example of a system reset circuit.
, Figure 13-7 shows what the RESET pin looks like in-
ternally. The RESET pin functions' as an input and as
an output to reset an entire system with a watchdog 13.5 Minimum Hardware Connections
timer overflow, or by executing a RST instruction. For
a system reset application, the reset circuit should be a Figure 13-9 shows the minimum connections needed to
one-shot with an open collector output. The reset pulse get the 80CI96KB up and running. It is important to
may have to be lengthened and buffered since RESET tie all unused inputs to Vee or V ss. If these pins are
WATCHDOG TIMER
OVERFLOW
RESET INSTRUCTION
(OFFH)
270651-46
80C196KB
OPTIONAL OTHER
CIRCUITRY
Vee RESET 1-......-1 ONE-SHOT
74LS123
(1 ) ,
270651-47
NOTE:
. 1. The diode will provide a faster eycle time repetitive power-on-resets.
4-71
80C196KB USER'S GUIDE
r
20pF 20pF
q,
"5V +5V
vee VREF
1 p.F
VSS1 ANGND
VSS2
VSS3
.. BUSWIDTH
+5V
READY
Vpp
RESET
5p.F .l: BUS
CONTROL
RXD ADO-AD15
EXTINT
T2CLK PO.O- PO.7
T2RST
HSI.O- HSI.3 EA
NMI
80C196KB
270651-48
NOTE:
'Must be driven high or low.
"VSS3 was formerly the CDE pin. The CDE function is no longer available. This pin must be connectd to V$s.
left floating, they can float to a mid voltage level and the CPU out of the Idle Mode, the CPU vectors to the
draw excessive current. Some pins such as NMI or corresponding interrupt service routine and begins exe~
EXTINT may generate spurious interrupts if left un- cuting. The CPU returns from the interrupt service
connected. routine to the next instruction following the 'IDLPD
# l' instruction that put the CPU in the Idle Mode.,
14.0 SPECIAL MODES OF In the Idle Mode, the system bus control pins (ALE,
OPERATION RD, WR, INST, and BHE), go to their inactive states.
Ports 3 and 4 will retain the value present in their data
The 80C196KB has Idle and Powerdown Modes to re- latches if being used as I/O ports. If these ports are the
duce the amount of current consumed by the chip. The ADDR/DATA bus, the pins will float.
80CI96KB also has an ONCE (ON-Circuit-Emulation)
Mode to isolate itself from the rest of the components It is important to note the Watchdog Timer continues
in the system. to run in the Idle Mode if it is enabled. So the chip
must be awakened every 64K state times to clear the
14.1 Idle Mode Watchdog or the chip will reset.
4-72
inter 80C196KB USER'S GUIDE
XTAL1
CLKOUT
PHl
,,
INTERNAL'
POWERDOWN :
i---+--;"--;~S ------;.-+--i
r-I
SIGNAL ;"1--;---i---i---i---'
Vpp :
In Powerdown, the bus control pins go to their Inactive If the external interrupt brings the chip Qut of Power-
states. All of the"output pins will assume the value in down, the corresponding bit will be set in the interrupt
their data latches. Ports 3 and 4 will continue to act as pending register. If the interrupt is unmasked, the part
ports in the .single chip mode or will float if acting as will immediately execute the interrupt service routine,
the ADDR/DATA bus. and return to the instruction following the IDLPD in-
struction that put the 'chip into Powerdown. If the in-
To pr~vent accidental entry into the Powerdown Mode, terrupt is masked, the chip will start at the instruction
this feature may be' disabled at reset by clearing bit 0 of following the IDLPD in~truction. The bit in the pend-
the CCR (Chip Configuration Register). Since the de- ing registe~ will remain set, however.
fault value of the CCR bit 0 is 1, the Powerdown Mode
is normally enabled. All peripherals should be in an inactive state before
entering Powerdown. If the AID converter is in the
The Powerdown Mode can be exited by a chip reset or middle of a conversion, it is aborted. If the chip comes
a high level on the external interrupt pin. If the RESET out of Powerdown by an external interrupt, the serial
pin is used, it must be asserted long enough for the port will continue where it left off. Make sure that the
oscillator to stabilize. serial port is done transmitting or receiving before en-
tering Powerdown. The SFRs associated with the AID
Whim exiting Powerdown with an external interrupt, a and the serial port may also contain incorrect informa-
positive level on the pin mapped to INT7 (either tion when returning from Powerdown.
EXTINT or portO.7) will bring the chip out of Power-
down Mo<Je. The interrupt does not have to be un· When the chip is in Powerdown, it is impossible for the
masked to exit Powerdown. An internal timing circuit watchdog timer to time out because its clock has
ensures that the oscillator has time to stabilize before stopped. Systems which must use the Watchdog and
turning on the internal clocks. Figure 14-1 shows the Powerdown, should clear the Watchdog right before
power down and power up sequence using an external entering Powerdown. This will keep the Watchdog
interrupt. from timing out when the oscillator is stabilizing after
leaving Powerdown.
D~ring normal operation, before entering Powerdown
Mode, the Vpp pin will rise to Vee through an internal 14.3, ONCETM and Test Modes
.' pullup. The user must connect a capacitor between Vpp
aIld Vss. A positive level on the external interrupt pin Test Modes can be entered on the 80C196KB by hold-
starts to discharge this capacitor. The internal current ing ALE, INST or RD in their active state on the rising
source that discharges the capacitor can sink approxi- edge of RESET. The only Test Mode not reserved for
mately 100 uA. When the voltage goes below about 1 use by Intel is the ONCE, or ON-Circuit-Emulation
volt on the Vpp pin, the chip begins executing code. A Mode.
1uF capacitor would take about 4 ms to discharge to 1
volt.
4-73
80C196KB USER'S GUIDE
ONCE is entered by driving ALE high, INST low and Address Latch" Enable (ALE) provides' a strobe to
RD low on the rising edge of RESET. All pins except transparent latches (74AC373s) to demultiplex the bus.
XTALl and XTAL2 are floated. Some of the pins are To avoid confusion, the latched address signals will be
not truly high im'pedance as they have weak pullups or, called MAO-MAI5 and the data signals will be named
pulldowns. The ONCE Mode is useful in electrically MDO-MDI5.
removing the 80C 196KB from the rest of the system. A
typical application of the ONCE Mode would be to The data returned from external memory must be on'
program discrete EPROMs onboard without removing the bus and stable for a specified setlip time before the
the 80CI96KB from its socket. rising edge of RD (read). The rising edge of RD signals
the end of the sampling window. Writing to ·external
ALE, INST, and RD are weakly pulled high or low memory is controlled with the WR (write) ~ Data is
during reset. It is important that a circuit does not in- valid on MDO-MD 15 on the'rising edge of WR. At this
advertantly drive these signals during reset, or a Test time data must be latched by the external system. The
Mode could be entered by accident. 80C 196KB has ample setup and hold' times for writes.
XTAL1
CLKOUT
ALE~~ ______________________
READY
BUS WIDTH
R~D------------~~
WRITE - - - - -......----""'\~
270651-50
4-74
80C196KB USER'S GUIDE
CLKOUT drives ALE inactive. The next falling edge Mode. Before the CCB fetch, if the program memory is
of CLKOUT asserts RD (read) and floats the bus for a external, the CPU assumes that the bus is configured as
read cycle. During a WR (write) cycle, this edge asserts an 8-bit bus. In the 8-bit bus mode, during the CCB
WR and drives valid data on the bus. On the last rising fetch, address lines 8-15 use only the weak drivers.
edge of CLKOUT, data is latched into the 80CI96KB However, in a 16-bit bus system, the external memory
for a read cycle, or data is valid for a write cycle. device will be driving the high byte of the bus while
outputting the CCB. This could cause bus contention if
location 2019H contains FFH: A value 20H in location
READY Pin 2019H will help prevent the contention.
The READY pin can insert wait states into the bus
cycle for interfacing to slow memory or peripherals. A
wait state is 2 Tosc in length. Since the bus is synchro- CHIP CONFIGURATION REGISTER
nized to CLKOUT, it can only be held for an integral """rLT¥rLT¥r'
ENABLE POWERDOWN FEATURE
number ofwaitstates. Because the 80Cl96KB is a com-
pletely static part, the number of waitstates that can be BUS WIDTH SELECT
(16 - BIT BUS /';-8-"'B"'"IT"'B"'U"'S)
inserted into a bus cycle is unbounded. Refer to the
next section for information on internally controlling WRITE STROBE MODE SELECT
(WR AND BHE/WRL AND WRH)
the number of waitstates inserted into a bus cycle.
......--ADDRESS VALID STROBE SELECT
There are several setup and hold times associated with (ALE/ ADV)
the READY signal. If these timings are not met, the (lRCO) } INTERNAL READY
part may insert the incorrect number of waitstates. '------(IRC1) CONTROL MODE
4-75
80C1961{B USER'S GUIDE
This feature gives very simple and flexible ready con- hardware. The ALE, WR,; and BHE. pins serve dual
trol. For example, every slow memory chip select line functions. Bits 2 and 3 of the CCR specify the functiqn
could be ORed together and connected to the READY performed by these control lines.
pip with Internal Ready Control programmed to insert
the desired number of waitstates into the bus cycle.
Standard Bus Control
If the READY pin is pulled low during the CCR fetch, If CCR bits 2 and 3 are Is, the standard bus control
the bus controller will automatically insert 3 waitstates signals ALE, WR, and BHE are generated as show.n in
into the CCR bus cycle. This al10ws the CCR fetch to Figure 15-4. ALE rises as the address starts to be driv-
come from slow memory without having to assert the en, and falls to externally latch the address. WR is driv-
READY pin. en for every write. BHE and MAO can be combined to
form WRL and WRH for even and odd byte writes.
Bus Control
Using the CCR, the 80Cl96KB can generate several
types of control signals designed to reduce external
ALE ALE
u u
VALID ADO-7 ~ADDR LOwl DATA OUT ~
BHE ---..-<Jr"""""l
WRITE HIGH
WRITE LOW
MAO
270651-79
4·76
inter 80C196KB USER'S GUIDE
J,,4f,',r· ... :1
,,~,' .
Figure 15·5 is an example of external circuitry to de· Address Valid Strobe Mode
code WRL and WRH.
Address Valid strobe replaces ALE if CCR bit 3 is O.
When Address valid Strobe mode is selected, ADV will
Write Strobe Mode be asserted after an external address is setup. It will
The Write Strobe Mode eliminates the need to external· stay asserted until the end of the bus cycle as shown in
ly decode for odd and even byte writes. If CCR bit 2 is Figure 15·7. ADV can be used as a simple chip select
0, and the bus is a 16·bit cycle, WRL and WRH are for external memory. ADV looks exactly like ALE for
generated in place of WR and BHE. WRL is asserted back to back bus cycles. The only difference is ADV
for all byte writes to' an even address and all word will be inactive when the external bus is idle.
writes. WItH is asserted for all byte writes to odd ad·
dresses and all word writes. The Write Strobe mode is Address Valid with Write Strobe
shown in Figure 15·6.
If CCR bits 2 and 3 are 0, the Address Valid with Write
In the eight bit mode, WRL and WRH are asserted for Strobe mode is enabled. Figure 15·8 shows the signals.,
both even and odd addresses.
ALE ALE
VALID
'--__. .'r
.
WRITE
·u
BHE VALID ADO-7 ---1ADDR LOwl DATA OUT ~
ADO -15 ---1 ADDR 'DATA OUT ~ AD8-15 ---1 ADDRESS OUT HIGH' ~
270651-57 270651-58
16·BII Bus Cycle 8·BII Bus Cycle
4·77
inter 80C196KB USER'S GUIDE
15.3 Bus Width During 16 bit bus cycles, Ports 3 and 4 .contain the
address multiplexed with data using ALE to latch the
The SOC196KB external bus width can be run-time address. In 8-bit bus cycles, Port 3 is multiplexed with
conFigured to operate as a 16 bit multiplexed address/ address/data but Port 4 only outputs the upper & ad-
data bus, or as an MCS-51 style multiplexed 16 bit ad- dress bits. The Addresses on Port 4 are valid through-
dress/8 bit data bus. out the entire bus cycle. Figure .15-9 shows the two bus
width options.
80C196KB 80C196KB
8-BIT
PORT 4 LATCHED
ADDRESS HIGH
PORT 4
PORT 3
PORT 3
270651-61 270651-62
(a) 16-Blt Bus (b) 8-Blt Bus
4-78
intJ 80C196KB USER'S GUIDE
The external bus width can be changed every bus cycle protocol consists of three signals, HOLD, HLDA, and
if a I was loaded into bit CCR.I at reset. The bus width BREQ. HOLD is an input asserted by a device which
is changed on ,the fly by using the BUSWIDTH pin. If requests the 80CI96KB bus. Figure 15-10 shows the
the BUSWIDTH pin is a I, the bus cycle is 16-bits. For timing for HOLD/HLDA. The 80C196KB responds
an 8-bit bus cycle, the BUSWIDTH pin is a zero. The by releasing the bus and asserting HLDA. When the
BUSWIDTH is sampled by the 8OCl96KB after the device is done accessing the 8OCl96KB memory, it re-
address is on the bus. The BUSWIDTH pin has about linquishes the bus by deactivating the HOLD pin. The
the same timing as the READY pin. 8OCl96KB will remove its HDLA and assume control
of the bus. The third signal, BREQ, is asserted by the
Applications for the BUSWIDTH pin are numerous. 80CI96KB during the hold sequence when it has a
For example, a system could have code fetched from 16 pending external bus cycle. The 80CI96KB deactivates
bit memory, while data would come from ,8 bit memo- BREQ at the same time it deactivates HDLA.
ry. This saves the C,ost of using two 8 bit static RAMS if
only tlle capacity of one is needed. This system could be The HOLD, HLDA, and BREQ pins are multiplexed
easily implemented by tying the chip select input of the with Pl.7, PI.6,and PI.5, respectively. To enable
8-bit memory to the BUSWIDTH pin. HOLD, HLDA and BREQ, the HLDEN bit (WSR.7)
must be 1. HLDEN is cleared during reset. Once this
If CCR bit I is a 0, the 8OC196KB is locked into the 8 bit is set, the port I pins cannot be returned to being
bit mode and the BUSWIDTH pin is ignored. quasi-bidirectional pins until the device is reset, but can
still be read. The HOLD/HLDA feature, however, can
When executing code from a 8-bit bus, some perform- be disabled by clearing the HLDEN bit.
ance degradation is to be expected. Theprefetch queue
cannot be kept full under all conditions from an 8-bit The HOLD is sampled on phase I, or when CLKOUT
bus. Also, word reads and writes to external memory is low.
will take an extra bus cycle for the extra byte.
When the 80CI96KB acknowledges the hold re~,
the output buffers for the addr/data bus, RD, WR,
15.4 HOLD/HLDA Protocol BHE and INST are floated. Although the strong pullup
and pulldown on ALEIADV are disabled, a weak pull-
The 80CI96KB supports a bus exchange protocol, al. down is turned on. This provides the option to wire OR
lowing other, devices, to gain control of the bus. The ALE with other bus masters. The request to hold laten-
cy is dependent on the state of the bus controller.
CLKOUT
HOLD
Hold Lot.no
HLDA
BREQ
\~--------~--~;-
ADDR/DATA _ _ _ _ _ _ _ _..JX~______.;..Floe.;.;;,;;,t.d;...._ _ _ _ _ _....X
ALE ____________________,,~______________
w._a_kl~Y_D_m_.n______________ _J1'
270651-63
4-79
80Ct96KB USER'S GUIDE
The time between HOLD being asserted and HLDA There is no delay from the time the 80C196KB re-
being driven is known as Hold Latency. After recogniz- moves HLDA to the time·it takes control of the bus.
ing HOLD, the 80CI96KB waits for any current bus After HOLD is removed, the 80CI96KB drops HLDA
cy,cle to finish, and then asserts HLDA. There are 3 in the following state and resumes control of the bus.
types bus cycles; 8-bit external cycle, 16-bit external
cycle, .and an idle bus. Accessing. on-chip BREQ is asserted when the part is in hold and needs to
ROM/EPROM is an idle bus. perform an external memory cycle. An external memo-
ry cycle can be a ¢ita access or a request from the
HOLD is an asynchronous input. There are two differ- prefetch queue for a code request. A request comes
ent system configurations for asserting HOLD. The from the queue when it contains two bytes or less. Once
80C196KB will recognize HOLD internally on the next asserted, it remains asserted until HOLD is removed.
clock edge if the system meets Thvch (HOLD valid to At the earliest, BREQ can be asserted with HLDA.
CLKOUT high). If Thvch is not met (HOLD applied
asynchronously), HOLD may be recognized one clock Hold requests do not freeze the 80C196KB when exe-
later (see Figure 15-12). Consult the latest 80C196KB cuting out of internal memory. The part continues exe-
data sheet for the Thvch specification. cuting as long as the resources it needs are located in-
ternal to the 80C196KB. As soon as the part needs to
Figure 15-12 shows the 80C196KB entering HOLD access external memory, it asse.rts BREQ and waits for
when the bus is idle. This is the minimum hold latency the HOLD to be removed. At this time, the part cannot
for both the synchronous and asynchronous cases. If respond to any interrupt requests until HOLD is re-
Thvch is met, HLDA is asserted about on the next moved.
falling edge of CLKOUT. See the data sheet for Tclhal
(CLKOUT low to HLDA low) specification. For this When executing out of external memory during a
case, the minimum 40ld latency =. Thvcl + 0.5 states HOLD, the 80C196KB keeps running until the queue
+ TclhiLl. is empty or it needs to perform an external data cycle.
The 80CI96KB cannot service any interrupts until
If HOLD is asserted asynchronously, the mlmmum HOLD is reIl).oved.
hold latency increases by one state time and = Thvcl
+ 1.5 states + Tclhal. The 80C196KB will also respond to hold requests in
the Idle Mode. The latency for entering bus hold from
Figure 15-11 summarizes the additional hold latency the Idle Mode is the same as when executing out of
added to the minimum latency for the 3 types of bus internal memory.
cycles. When accessing external memory, add one state
for each waitstate inserted into the bus cycle. For an Special consideration must be given to the bus arbiter
8-bit bus, worst case hold latency is for word reads or design if the 80C196KB can be reset while in HOLD.
writes. For this case, the bus controller must access the For example, a CPU part would try and fetch the CCR
bus twice, which increases latency by two states. from external memory after RESET is brought high.
Now there would be two parts attempting to access
For exiting Hold, the minimum hold latency times ap- 80C196KB memory. Also, if another bus l;I1aster is di-
ply for when the 80C196KB will deassert HLDA in rectiy driving ALE, RD, and INST, the ONCE mode
response to HOLD being removed. or another test mode could be entered. The simplest
solution is to make the RESET pin ofthe80C196KB a
Idle Bus Min •system reset. This way the other bus master would also
16-bit External Access Min + 1 state be reset. Examples of system reset circuits are given in
Section 13.
8-bit External Access Min + 3 states
Min ~ Thvcl + 0.5 slales + Tclhallf Thvclls mel
~ Thvcl + 1.5 states + Tclhal for asynchronous HOLD
Figure 15-11. Maximum Hold Latency
4-S0
80C196KB USER'S GUIDE
270651-82
CLKOUT
r-
270651-83
DI disable interrupts
ANDB WSR, #OEFH disable hold request
WAIT: JBC PORT1, 6, WAIT; Check the HLDA pin
• If set, execute
• protected instructions
•
ORB WSR,#80h enable HOLD requests
EI enable interrupts
NOTE:
Interrupts should be disabled to prevent code interruption
XTALl
CLKOUT
ALE
BUS
~ tRHBX...
I
I
tWHBX
BHE,INST VALID
~ tRHAX ...
tWHAX
AD8-15 ADDRESS OUT
270651-80
4-82
inter 80C196KB USER'S GUIDE
XTAL1
CLKOUT
ALE
READY
~1;:·:::::-t-QVW-H-+-2-To-s-c-~
BUS I
--<:::::AD:D:RE:SS:O:U:T ::::>X( _ _ _ _ _ _ _ _ _ _ X
~I
DATA OUT
J~ ______
ADDRESS _
270651-81
XTAL1
~ ,~:J ~~:'. )
CLKOUT
ALE
BUSWIDTH ~----------------
--:'1-'- - -tAVGV
- -~1 I
BUS
--<~--------~~~----)~---------- 270651-84
4·83
80C196KB USER'S GUIDE
TIMINGS THE MEMORY SYSTEM MUST MEET: TCLDV - CLKOUT Low to Input Data Valid:
Maximum time the memory system has
TAVYV - ADDRESS Valid to READY Setup: to output valid data'after. the CtKOUT
Maximum time the memory system has falls.
to decode READY after ADDRESS is - RD High to Input Data Float: Time af-
output by the 80C196KB to guarantee at ter RD is inactive until the memory sys-
least one-wait state will occur. tem must flbat the bus. If this timing is
TLLYV - ALE Low to READY Setup: Maximum not met, bus contention will occur.
time the memory system has to decode - Data Hold after RD Inactive: Time after
READY after ALE falls to guarantee at RD is inactive that the memory system
least one wait state will occur. qlUst hold Data on the bus. Always 0 ns
TYLYH - READY Low to READY HIGH: on the 80C196KB.
Maximum amount of nonREADY time
or the maximum number of wait states
that can be inserted into a bus cycle. TIMINGS THE 80C196KB WILL PROVIDE:
Since the 80C196KB is a completely FXTAL
- Frequency on XTALl: Frequency ofsig-
static part, T YLYH is unbounded. nal input into the 80C196KB. The
80C196KB runs internally at 1/2 FXTAL.
TCLYX - READY Hold after CLKOUT Low:
Minimum time the level on the READY Tosc -l/FxTAL: All A.C. Timings are refer-
pin must be valid after CLKOUT falls. enced to T osc.
The minimum hold time is always 0 ns. TXHCH - XTALl High to CLKOUT High or
If maximum value is exceeded, addition- Low: Needed in systems where the sig-
al wait states will occur. nal driving XTALl is also a clock for
TLLYX - READY Hold AFTER ALE Low: external devices.
Minimum time the level on the READY TCLCL - CLKOUT Cycle Time: Nominally 2
pin must be valid after ALE falls. If Tosc·
maximum value is exceeded, additional TCHCL - CLKOUT High Period: Needed in sys-
wait states will occur. tems which use CLKOUT as clock for
ITAVGV - ADDRESS Valid to BUSWIDTH Val- external devices,
id: Maximum' time the memory system
has to decode BUSWIDTH after AD- TCLLH - CLKOUT Falling Edge to ALE/ADV
Rising: A help in deriving other timings.
DRESS is output by the 80C196KB. If
exceeded, it is not guaranteed the - ALE/ADV Falling Edge to CLKOUT
80C196KB will respond with an 8- or Rising: A help in deriving other timings.
16-bit bus cycle. - ALE Cycle Time: Time between ALE
TLLGV - ALE Low to BUSWIDTH Valid: pulses.
Maximum time after ALE/ADV falls TiHLL - ALE/ ADV High Period:' Useful in de-
until BUSWIDTH must be valid. If ex- termining ALE/ADV rising edge to
ceeded, it is not guaranteed the ADDRESS valid. External latches must
80C196KB will respond with an 8- or also meet this spec.
16-bit bus cycle.
- ADDRESS Setup to ALE/ADV Falling
T CLGX - BUSWIDTH Hold after CLKOUT Edge: Length of time ADDRESS is val-
Low: Minimum time BUSWIDTH must id before ALE/ADV falls. External
be held valid after CLKOUT falls. Al- latches must meet this spec.
ways 0 ns of the 80C I 96KB. - ADDRESS Hold after ALE/ADV Fail-
TAVDV - ADDRESS Valid to Input Data Valid: ing Edge: Length of Time ADDRESS is
Maximum time the memory system has valid after ALE/ADV falls. External
to output valid data after the 80C196KB. latches must meet this spec.
outputs a valid address.
- ALE/ADV Low to RD Low: Len~ of
TRLDV - RD Low to Input Data Valid: Maximum time after ALE/ADV falls before RD is
time the memory system has to output asserted. Could be needed to insure
valid data after the 80C 196KB asserts proper memory decoding takes place be-
RD. fore a device is enabled.
4-84
80C196KB USER'S GUIDE
TRLCL - RD Low to CLKOUT Falling Edge: TWLWH - WR Low to WR High: WR pulse width.
Length of time from RD asserted to Memory devices must meet this spec.
CLKOUT falling edge: Useful for sys- TWHQX - Data Hold after WR Rising Edge:
tems based on CLKOUT. Amount of time data is valid on the bus
TRLRH - RD Low to RDHigh: RD pulse width. after WR going inactive. Memory devic-
- RD.High to ALE/ADV Asserted: Time es must meet this spec.
between RD going inactive and next TWHLH - WR Rising Edge to ALE/ADV Rising
ALE/ADV, also used to calculate time Edge: Time between WR goirig inactive
between inactive and next ADDRESS and next ALE/ADV. Also used to cal-
valid. culate WR inactive and next ADDRESS
- RD Low to ADDRESS Float: Us~d to valid.
calculate when the 80C196KB stops TWHBX - BHE, INST, Hold after WR Rising
driving ADDRESS on the bus. Edge: Minimum time these signals wiil
- ALE/ADV Low Edge to WR Low: be valid after WR inactive.
Length of time ALE/ADV falls before TRHBX - BHE, INST HOLD after RD Rising
WR is asserted. Could be needed to en- Edge: Minimum time these signals will
sure proper memory decoding takes be valid after RD inactive.
place before a device is enabled. TWHAX - ADS-IS Hold after WR Rising Edge:
TCLWL - CLKOUTFalling Edge to WR Low: Minimum time the high byte of the ad-
Time between CLKOUT going low and dress in 8-bit mode will be valid after
WR being asserted. Useful in systems WR inactive.
based on CLKOUT. TRHAX - ADS-IS Hold after RD Rising Edge:
- Data Valid to WR Rising Edge: Time Minimum time the high byte of the ad-
between data being valid on the bus and dress in 8-bit mode will be valid after
WR going inactive. Memory devices RD inactive.
must meet this spec.
TCHWH - CLKOUT High to WR Rising Edge:
Time between CLKOUT going high and
WR going inactive. Useful in systems
based on CLKOUT.
Ri5 i5E
AD8-15 HIGH ADDRESS
80C196KB
I -74AC
DATA
EPROM
ADO-7 373 LOW ADDRESS
ADV
-y-~ cs
\
OPTIONAL IF
LATCHED EPROM
IS USED
270651-66
4-85
inter 80C196KB USER'S GUIDE
15.6 Memory System Examples ed in the lower half of memory,and the RAM in the
upper half.
External memory systems for the 80C196KB can be set
ull in many different ways. Figure 15-16 shows a simille Figure 15-18 shows a 16 bit system with 2 EPROMs.
8 bit system with a single EPROM. The ADV Mode Again, ADV is used to chip select the memory. Figure
can be selected to Ilrovide a chill select to the memory. 15-19 shows a system with dynamic bus width. Code is
By setting bit CCR.I to 0, the system is locked into the executed from the two EPROMs and data is stored in
eight bit mode. An eight bit system with EPROM and the single RAM .. Note the Chip Select of the RAM also
RAM is shown in Figure 15-17. The EPROM is decod- is input to the BUSWIDTH pin to select an eight bit
cycle.
AD15
ADV 1------1
~ ~--------4--------I
WR ~----------------------~
270651-67
cs CS
HIGH ADDRESS HIGH ADDRESS
EPROM EPROM
80C196KB
~ ~ ____________-+__________-J
270651-68
4-86
80C196KB USER'S GUIDE
EPROM RAM
LOW ADDRESS
DE
R5 ~ ____________ ~~ __________ ~ ____________-J
WR ~--------------------------------------------~
270651-69
WRL----------q--,P-______________~
MDO-MD7 P3
WRH
74LS
8 8 74LS
MD8-MD15 04 P4
(x11Az) 273
CLR
RESET INPUT
ADDR = P3, P4
RD
ADO-AD7
AD8-AD15
270651-70
4-87
inter 80C196KB USER'S GUIDE
15.7 1/0 Port Reconstruction The Run-Time Programming Mode allows individu-
al EPROM'locations to be programmed at run-time
When a single-chip system is being designed using a under complete software control. (Run-Time Pro-
multiple chip system as a prototype, it may be neces- gramming is done with EA = 5V.)
sary to reconstruct I/O Ports 3 and 4 using a memory
mapped I/O technique. The circuit to reconstruct the In the Programming Mode some I/O pins have new
Ports is shown in Figure 15-20. It can be attached to a functions. These pins determine the programming func-
80C196KB system which has the required address de- tion, provide programming control signals and slave ID
coding and bus demultiplexing. numbers, and pass error information. Figure 16-1
shows how the pins are renamed. Figure 16-2 describes
The output circuitry is a latch that operates when each new pin function.
IFFEH or IFFFH are placed on the MA lines. The
inverters surrounding the latch create an open-collector PMODE sf;!lects the programming mode (see Figure
output to emulate~n-drain output found on the 16-3). The 87C196KB does not need to be in the Pro-
80C196KB. The RESET line sets the ports to all Is gramming Mode to do run-time programming; it can be
when the chip is reset. The voltage and current specifi- done at any time.
cations of the port will be different from the
80C196KB, but the functionality will be the same. When an 87C196KB EPROM device is not being
erased the window must be covered with an opaque
The input circuitry is a bus transceiver that is addressed label. This prevents ftmctional degradation and data
at IFFEH and IFFFH. If the ports are going to be loss from the array.
either inputs or outputs, but not both, some of the cir-
cuitry may be eliminated.
16.1 Power-Up and Power-Down
16.0 USING THE EPROM To avoid damaging devices during programming, fol-
low these rules:
the 87CI96KB contains 8 Kbytes of ultraviolet Eras- RULE # 1 Vpp must be within IV of Vee while Vee
able and electrically Programmable Read Only Memo- is below 4.5V.
ry (EPROM). When EA is a TTL high, the EPROM is
located at memory locations 2000H through 3FFFH. RULE #2 Vpp can not be higher than 5.0V until Vee
is above 4.5V.
Applying + 12.75V to EA when the chip is reset places RULE #3 Vpp must not have a low impedance path
the 87C196KB device in the EPROM Programming to ground when Vee is above 4.5V.
Mode. The Programming Mode supports EPROM pro- RULE #4 EA must be brought to 12.75V before Vpp
gramming and verification. The following is a brief de- is brought to 12.75V (not needed for run-
scription of each of the programming modes: time programming).
The Auto Configuration Byte Programming Mode RULE # 5 The PMODE and SID pins must be in
programs the Programming Chip Configuration Byte their desired state before RESET rises.
and the Chip Configuration Byte. RULE #,6 All voltages must be within tolerance and
the oscillator stable before RESET rises.
The Auto Programming Mode enables an RULE #7 The supplies to Vee, Vpp, EA and RE-
87C196KB to program itself without using an SET must be well regulated and free of
EPROM programmer. spikes and glitches.
The Slave Programming Mode provides a standard To adhere to these rules you can use the following pow-
interface for programming any number of er-up and power-down sequences:
87C196KB's by a master device such as an EPROM
programmer.
4-88
inter 80C196KB USER'S GUIDE
POWER-UP EA = 5V
PALE = PROG = SID = PMODE = PORT3,4 =
RESET = OV OV
Vee = vpp = EA = 5V Vee = Vpp = EA = OV
CLOCK on (if using an external clock instead of the CLOCK OFF
internal oscillator)
PALE = PROG = PORT3,4 = VIH(1) NOTES:
SID and PMODE valid ' 1. VIH = logical "I" (2.4V minimum)
EA = 12.75V(2) 2. The same power supply can be used for EA and
Vpp = 12.75V(3) Vpp. However, the EA pin must be powered up before
WAIT (wait for supplies and clock to settle) Vpp is powered up. Also, EA should be protected
RESET = 5V from noise to prevent damage to it.
WAIT Tshll (RESET high to first PALE low) 3. Exceeding the maximum limit on Vpp for any
BEGIN amount of time could damage the device permanently.
The Vpp source must be well regulated and free of
glitches.
POWER-DOWN
RESET = OV
Vpp"" 5V 16.2 Reserved Locations
All Intel Reserved locations except address 2019H,
when mapped internally or externally, must be loaded
with OFFH to ensure compatibility with future devices.
Address 2019H must be loaded with 20H.
PROGRAMMING VOLTAGE
ADDRESS
P2.1 PALE
P2.2 PROG
HSI.O
~.".SI",.D-"\IHSI.1 P2.0 PVER
~--"rIHSI.2
HSI.3 P2.4 AINC
87C196KB
270651-71
4-89
80C196KB .USER'S GUIDE
16.4 Auto Configuration Byte or WRITE lock bits are enabled, some programming
Programming Mode modes will require security key verification before exe-
cuting and some modes will not execute. See Figure
The Programming Chip Configuration Byte (PCCB) is 16-10 and the sections on each programming mode for
a non-memory mapped EPROM location. It gets load- details of the effects of enabling the lock bits.
ed into the CCR during reset for auto and slave pro-
gramming. The Auto Configuration Byte Programming If the PCCB is not programmed, the CCR will be load-
Mode programs the PCCB. ed with OFFFH when the device is iii the Programming
Mode.
The Chip Configuration Byte (CCB) is at location
2018H and can be programmed like any other EPROM
location using Auto, Slave, or Run-Time Programming. 16.5 Auto Programming Mode
However, you can also use Auto Configuration Byte
Programming to program the CCB when no other loca- The Auto Programming Mode provides the ability to
tions need to be programmed. The CCB is programmed program the 87C196KB EPROM without using an
with the same value as the PCCB. EPROM programmer. For this mode follow the power-
up sequence described in Section 16,1 with PMODE =
The Auto Configuration Byte Programming Mode is OCH. External location 4014H must contain the PPW.
entered by following the power-up sequence described When RESET rises, the 87CI96KB automatically pro-
in 'Section 16.1 with PMODE = ODH, Port 4 = grams itself with the data found at external locations
OFFH, and Port J = the data to be programmed into 4000H through SFFFH.
the PCCB and CCB. When a 0 is placed on PALE the
CCB and PCCB are automatically programmed with The 87CI96KB begins progral)1ming by setting PACT
the data on Port 3. After programming, PVER is driv- low. Then it reads a word from external memory, The
en high if the bytes programmed correctly 'and low if Modified Quick-Pulse Programming Algorithm (de-
they did not. scribed later) programs the corresponding EPROM lo-
cation. Since the erased state of a byte is OFFH, the
Once the PCCB and CCB are programmed, all pro- Auto Programming Mode will skip locations with
gramming activities and bus operations use the selected OFFH for data. When all 8K have been programmed,
bus width, READY control, bus controls, and READ/ PACT goes high and the device outputs a 0 on PV AL
WRITE protection until you erase the device. You (P3.0) if it programmed correctly and a 1 ,if it failed.
must be careful whsm programming the READ and Figure 16-4 shows a minimum configuration using an
WRITE lock bits in the peCB and CCB. If the READ 8K X 8 EPROM to program an 87CI96KB in the
Auto Programming Mode.
The data in the PCCB takes effect upon reset. 'If you
enable the READ and WRITE lock bits during Auto
Programming but do not reset the device,' Auto Pro-
gramming will continue. If you enable either the
270651-73 READ or WRITE lock bits in the CCB using Auto
NOTES: Configuration Byte Programming and then reset the
Tie Port 3 to the value desired to be programmed into 87C196KB for Auto Programming, the device does a
CCS and PCCS. security key verification. The same security keys that
Make all necessary minimum connections for power, reside at internal addresses 2020H-202FH must reside
ground and clock, at external locations 4020H-402FH. If the keys match,
auto programming continues. If the keys do not match,
Figure 16·5. The PCCB Programming Mode the device enters an endless loop of internal execution.
4-91
80Ct96KB USER'S GUIDE
0.1-1.0,uF
+5V
Rii
lOOK AD8-AD15
RESET
HSI.0-HSI.3 74LS AO-A7
373
RXD ADO-AD7
T2CLK ALE
2764
T2RST +5V
EXTINT READY
NMI BUSWIDTH
EA
+5V
+5V
+12.75V
Vpp PO.7
+12.75V PO.6
PO.S
POA
PACT
87C196KB
27065~ -72
NOTES:
~Inputs !pust be driven high or'low. _
"Allow RESET to rise after the voltages to Vee. EA. and Vpp are stable.
4-92
inter 80C196KB USER'S GUIDE
16.6 Slave Programming Mode The 87C196KB receives an input signal, PALE, to in·
dicate a valid command is present. PROG causes the
Any number of 87C196KBs can be programmed by a 87C196KB to read in or output a data word. PVER
master programmer through the Slave Programming indicates if the programming was successful. AINC au·
Mode. There is no 87C196KB dependent limit to the tomatically increments the address for the Data Pro-
number of devices that can be programmed. gram and Word Dump commands.
PORTS
3/4 --< ADDR/COMMAND :>-----<:,___ --I:>-----<:
D_A_TA__ ADDR/COMMAND
!
\'--_-J!
\\.....---J! 270651-74
4-93
inter 80C196KB USER'S GUIDE
PVER is a I if the data program was successful. PVER mand and plac~s the value at the new address on Ports
is a 0 if the data program was unsuccessful. Figure 16-7 3 and 4. For example, when the slave receives the ~om
shows the relationship of PALE, PROG, and PVER to mand OlOOH, it will place the' word at internal address
the Command/Data path on Ports 3 and 4 for the Data 2100H on Ports 3 and 4. PROG governs when the slave
Program Command. drives the bus. The Timings are the same as s'lOwnin
Figure 16-7.
Data Verify Command Note that the Word Dump Command only works when
When the Data Verify Command is sent, the slaves in- a single slave is attached to the bus. Also, there is no
dicate correct or incorrect verification of the previous restriction on commands that precede or follow a Word
Data Program Command by driving one bit of Ports 3 Dump Command.
and 4. A I indicates a correct verification, and a 0 indi-
cates incorrect verification. The SID (Slave I.D) of each Gang Programming With the Slave
slave determines which bit of Ports 3 and 4 will be Programming Mode
driven. For example, a SID of 0001 would drive Port
3.1. PROG governs when the slaves drive the bus. Fig- Gang Programming of 87CI96KBs can be done using
ure 16-8 shows the relationship of ports 3 and 4 to the Slave Programming Mode. There is no 87CI96KB
PALE and PROG. based limit on the number of devices that may be
hooked to the same Port 3 and 4 data path for gang
A Data Verify Command is always preceded by a Data programming.
Program Command in a programming system with as
many as 16 slaves. However, a Data Verify Command If more than 16 devices are being gang programmed,
does not have to follow every Data Program Com- the PVER outputs of each chip can be used for verifica-
mand. tion. The master programmer can issue a Data Pro-
gram Command, then either watch every device's error
signal, or AND all the signals together to form a sys-
Word Dump Command tem PVER.
When the Word Dump Command is issued, the
87C 196KB adds 2000H to the address field of the com-
ADDR ADDR+ 2
PORTS
ADDR/COMMAND VER BITS/WD DUMP VER BITS/WD DUMP
3/4
\~_---JI
\~_--.-JI
\~---------------------- 270651-75
4-94
inter 80C196KB USER'S GUIDE
4-95
inter 80C196KB USER'S GUIDE
NOTE:
'Substantial effort has been made to provide an excel-
lent program protection scheme. However, Intel can-
not and does not guarantee that these protection
methods will always prevent unauthorized access.
4-96
80C196KB USER'S GUIDE
Programming of 87CI96KB EPROMs is done with The recommended erasure procedure for the
Vpp = 12.75V ±0.25V and Vee = 5.0V ±0.5V. 87C196KB is exposure to ultraviolet light which has a
wavelength of 2537 Angstroms. The integrated dose
(UV intensity * exposure time) should be a minimum of
Signature Word
IS Wsec/cm 2. The total time for erasure is about IS to
The 87CI96KB contains a signature word at location 20 minutes at this level of exposure. The 87CI96KB
2070H. The word can be accessed in the Slave Mode by should be placed within 1 inch of the lamp during expo-
executing a Word Dump Command. The programming sure. The maximum integrated dose an 87C196KB can
voltages are determined by reading the test ROM at be exposed to without damage is 7258 Wsec/cm 2 (1
locations 2072H and 2073H. The voltages are calculat- week @ 12000 uW /cm 2). Exposure to UV light greater
ed by using the following equation. than this can cause permanent damage. -
The values for the signature word and voltage levels are
shown in Figure 16-10.
4·97
~(ffi[§[!"OIr1l000~(ffiW
87C196KB/83C196KB/80C196KB
16-BIT HIGH PERFORMANCE CHMOS
MICROCONTROLLER
87C196KB - 8 Kbytes of On-Chip EPROM
83C196KB - 8 Kbytes of Factory Mask-Programmed ROM
80C196KB - ROMless
• Register-to-Register Architecture
• 16-Bit Timer
270918-1
Figure 1. 80C196KB Block Diagram
MCS"'-96 is a registered trademark of Intel Corporation.
October 1990
4-98 Order Number: 270918-001
inter 87C196KB/83C196KB/80C196KB
ARCHITECTURE
The 80C196KB is a member of the MCS(8)-96 family, and as such has the same architecture and uses the
same instruction set as ~he 8096BH. Many new features have been added on the 80C196KB including:
CPU FEATURES
Divide by 2 instead of divide by 3 clock for 1.5X performance
2.33 '""S 16 x 16 multiply with 12 MHz clock (was 6.25 ,""S on t~e 8096BH)
Faster interrupt response (almost twice as fast as 8096BH)
PERIPHERAL FEATURES
SFR Window switching allows read-only registers to be written and vice-versa
New Baud Rate values are n~eded for serial port, higher speeds possible in.all modes
PACKAGING
The S7C196KB is available in a 68-pin LCC (windowed) package and a 68-pin PLCC (One Time Programma-
ble) package.
The 80C196KB and S3C196KB are available in a 68~pin PLCC package and an SO-pin QFP package, In
addition, the 80C196KB is available in a 68-pin PGA package. Contact your local sales office to determine the
exact ordering code for the part desired.
4-99
87C196KB/83C196KB/80C196KB'
NOTE:
1. This pin was formerly the Clock Detect Enable pin. This function is not guaranteed to work. This pin rnust be directly
connected to Vss.
Figure 2. Pin Definitions
1 2 3 4 5 6 7 8 9 ,1011 121314151617
68 18
67 19
66 20
65 21
64 MCS®-96 22
63 68 PIN 23
62 LEADLESS CHIP CARRIER 24
61 TYPE "8" 25
60 26
59 27
TOP VIEW
58 28
LOOKING DOWN ON
57 COMPONENT SIDE 29
56 OF PC 80ARD 30
55 31
54 32
53 33
H Y
51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35
270918-6
4-100
inter 87C196KB/83C196KB/80C196KB
171513 11 9 7 5 3 1 "
18 19 16 14 12 10 8 6 4 2 68
2021 67 66
MCS(ffi-96
2223 6564
68 PIN
2425 GRID ARRAY 6362
2627 61 60
TOP VIEW 5958
2829
LOOKING DOWN ON
3031 COMPONENT SIDE 5756
OF PC BOARD 5554
3233
34 36 38 40 42 44 46 48 50 53 52
3537394143'45474951
270918-2
.." . ..'" . . .
0
U>
0 0 0 0
0 "1
0
...........................................
" CD NO,.... to') .... ~
.... '"b
::>
0
I~
~ .........
...'" ...'" '"~ ...'" ...'" ...'"
CJ CJ CJ CJ CJ
~ I~ >tl ~:! j:!
> x x
~ ::>
CJ ., ~ ~I~
9 8 7 6 5 4 3 2 1 68 67 66 65 64 63 6261
ACH5/PO.5 ADO/PM
ACH4/PO.4 AD1/P3.1
ANGND AD2/P3.2
VREF AD3/P3.3
MCS®-96 AD4/P3.4
Vss
EXTINT/P2.2 68 PIN AD5/PM
RESET 16 PLCC AD6/P3.6
RXD/P2.1 AD7/P3.7
TXD/P2.0 AD8/P4.0
P1.0 19 AD9/P4.1
PLI TOP VIEW AD10/P4.2
PL2 ADll/P4.3
LOOKING DOWN ON
PL3 ADI2/P4.4
PL4
COMPONENT SIDE ADI3/P4.5
HSIO OF PC BOARD ADI4/P4.6
HSII ADI5/P4.7
HSI2/HS04 T2CLK/P2.3
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
270918-3
4-101
inter 87C196KB/83C196KB/80C196KB
64 64
41 24 24 41
40 25 25 40
270918-4
Top View
1111111111111111
64 T2CLK/P2.3
A01/P3.1
63 VSS
ADD/P3.0 62 READY
Rii 61 T2RST/P2.4
ALE/AOV
60 BHE/WRH
INST
59 WR/WRL
BUSWIOTH
58 PWM/P2.5
CLKOUT
57 P2.7/T2CAPTURE
XTAL2 .,--
56 Vpp
XTALI
55 VSS
VSS 10
54 VSS
Vss 11
53 HSO.3
Vee 12
52 Vee
Vee 13
51 Vss
EA 14
50 HSO.2
NMI 15
49 P2.6/T2UP/ON
ACH3/PO.3 16
48 PI.7
ACH1/PO.l 17
47 PI.6
ACHO/pO.O 18 Pl.5
46
ACH2/PO.2 19 45 HSO.l
ACH6/PO.6 20 44 HSO.O
ACH7/PO.7 21 43 HSO.5/HSI.3
N.C. 22 42 Vss
ACH5/PO.5 23
41 HSO.4/HSI.2
ACH4/PO.4
1111111111111111
270918-5
4·102
Thermal Characteristics
Package
Type Bja. BJc
4-103
87C196KB/83C196KB/80C196KB
4-104
inter 87C 196KB/83C196KB/80C 196KB
NEW INSTRUCTIONS
The following five instructions have been added to the 8096BH instruction set for the 80C196KB.
4-105
87C 196KB/83C196KB/80C 196KB
SFR OP1:RATION
All of the registers that were present on the 8096BH work the same way as they did, except that the baud rate
value is different. The new registers shown in the memory map control new functions. The most important new
register is the Window Select Register (WSR) which allows reading of the formerly write-only registers and
vice-versa. '
On the 80C196KB only Window 0 and Window 15 are active. Window 0 is a true superset of the standard
8096BH SFR space, while Window 15 allows the read-only registers to be written and write-only registers to be
read, The only major exception to this is the Timer2 register which is the Timer2 capture register in Window 15,
The writeable register for Timer2 is in Window O. There are also some minor changes and cautions. The
descriptions of the registers which have different functions in Window 15 than in Window 0 are listed below:
AD_COMMAND (02H) - Read the last written command
AD_RESULT (02H, 03H) - Write a value into the result register
HSLMODE (03H) - Read the value in HSLMODE
HSI_TIME (04H,05H) - Write to FIFO Holding register
HSO_TIME (04H,05H) - Read the last value placed in the holding register
HSLSTATUS (06H) - Write to status bits but not to HSI pin bits. (Pin bits are 1,3,5,7).
HSO_COMMAND (06H) - Read the last value placed in the holding register
SBUF(RX) (07H) - Write a value into the receive buffer
SBUF(TX) (07H) - Read the last value written to the transmit buffer
WATCHDOG(OAH) - Read the value in the upper byte of the WDT
TIMER1 (OAH,OBH) - Write a value to Timer1
TIMER2 (OCH,ODH) .- Read/Write the Timer2 capture register.
Note that Timer2 read/write is done with WSR = O.
IOC2(OBI-j) - Last written value is readable, except bit 7 (note 1)
BAUDRATE (OEH) - No function, cannot be read
PQRTO (OEH) - No function, no output drivers on the pins. Register reserved.
PORT1 - IOPORT1 cannot be read or written in Window 15. Register reserved.
SP_STAT (11H) - Set the status bits, TI and RI can be set, but it will not cause an interrupt
SP_CON (11 H) - Read the current control byte
10SO (15H) - Writing to this register controls the HSO pins. Bits 6 and 7 are inactive for writes.
lOCO (15H) - Last written value is readable, except bit 1 (note 1)
IOS1 (16H) - Writing to this register will set the status bits, but not cause interrupts. Bits 6 and
7 are not functional
IOC1 (16H) - Last written value is readable
IOS2 (17H) - Writing to this register will set the status bits, but not cause interrupts.
PWM_CONTROL (17H) - Read the duty cycle value written to PWM_CONTROL
NOTE:
1. IOC2.7 (CAM CLEAR) and IOCO.1 (T2RST) are not latched and will read as a 1 (precharged bus).
Being able to write to the read-only registers and vice-versa provides a lot of flexibility. One of the most useful
advantages is the ability to set the timers and HSO lines for initial conditions other than zero.
Reserved registers may be used for testing or for future features. Do not write to these registers. Reads from
reserved registers will return indeterminate values.
4-106
inter 87C196KB/83C196KB/80C196KB
19H 19H
STACK POINTER STACK POINTER
18H 18H
17H 'IOS2 17H PWM CONTROL
16H IOS1 16H IOC1
15H 10SO 15H lOCO
14H 'WSR 14H 'WSR
13H 'INT_MASK1 13H 'INT_MASK1
12H 'INT PEND 1 12H 'INT PEND 1
11H 'SP STAT 11H 'SP CON
10H PORT2 10H PORT2 RESERVED (1)
OFH PORn OFH PORn OFH RESERVED (1)
OEH PORTO OEH BAUD RATE OEH RESERVED (1)
ODH TIMER2(HI) ODH TIMER2(HI) ODH 'T2 CAPTURE (HI)
OCH TIMER2 (LO) OCH TIMER2(LO) OCH 'T2 CAPTURE (LO)
OBH TIMER1 (HI) OBH 'IOC2
WSR ~ 15
OAH TIMER1 (LO) OAH WATCHDOG
09H INT_PENDING 09H INTJENDING OTHER SFRS IN WSR
08H INT_MASK 08H INT_MASK 15 BECOME READABLE
IF THEY WERE WRITABLE
07H SBUF(RX) 07H SBUF(TX) IN WSR ~ 0 AND WRITABLE
06H HSI_STATUS 06H HSO_COMMAND IF THEY WERE READABLE
INWSR ~ 0
05H HSLTIME(HI) 05H HSO_TIME (HI)
04H HSI TIME (LO) 04H HSO TIME (LO)
03H AD RESULT (HI) 03H HSI MODE
02H AD RESULT (LO) 02H AD COMMAND 'NEW OR CHANGED
01H ZERO REG (HI) 01H ZERO REG (HI) REGISTER FUNCTION FROM B096BH
4-107
intJ 87C196KB/83C196KB/80C196KB
STATUS:
X
.
0;; A/D CURRENTLY IDLE
=
1 CONVERSION IN PROCESS
Il
I--
X
CHANNEL # SELECTS WHICH OF THE 8
ANALOG INPUT CHANNELS IS TO BE
<;:ONVERTED TO DIGITAL FORM.
270918-7 270918-8
I
Chip Configuration (2018H) WSR (14H)
270918-9
4-10.8
87C196KB/83C196KB/80C196KB
SP_CON(11H)
BIT. 1, BIT.O SPECIFY THE MODE
0.0 = MODE 0 1.0 = MODE 2 X
0.1 = MODE 1 1. 1 = MODE 3 X
270918-15 270918-16
4-109
87C 196KB/83C,196KS/80C196KB
4·110
87C196KB/83C196KB/80C196KB
Operating Conditions
Symbol Description Min Max Units
TA Ambient Temperature Under Bias 0 +70 °C
NOTE:
ANGND and Vss should be nominally at the same potential.
VIH Input High Voltage (Note 1) 0.2 Vee + 0.9 Vee + 0.5 V
NOTES:
1. All pins except RESET and XTAL 1.
2. Holding these pins below VIH in Reset may cause the part to enter test modes.
3. Not guaranteed for the 87C196KB.
4-111
inter 87C196KB/83C196KB/80C196KB
NOTES:
(Notes apply to all specifications)
1. QBD (Quasi-bidirectional) pinS Include Port 1, P2.6 and P2.7.
2. Standard Outputs include ADO-15, RD, WR, ALE, SHE, INST, HSO pins, PWM/P2.5, CLKOUT, RESET, Ports 3 and 4,
TXD/P2.0, and RXD (in serial mode 0). The VOH specification is not valid for RESET. Ports 3 and 4 are open-drain outputs.
3. Standard Inputs include HSI pins, CDE, EA, READY, SUSWIDTH, NMI, RXD/P2.1, EXTINT/P2.2, T2CLK/P2.3, and
T2RST IP2.4. '
4. Maximum current per pin must be externally limited to the following values if VOL is held above 0.45V or VOH is held
below Vee - 0,7V: /
IOl on Output pins: 10 mA
IOH on quasi-bidirectional Pins: self limiting
IOH on Standard Output pins: lOrnA
5. Maximum current per bus pin (data and control) during normal operation is ± 3.2 rnA.
6. During normal (non-transient) conditions the following total current limits apply:
Port 1, P2.6 IOl: 29 mA IOH is self limiting
HSO, P2.0, RXD, RESET IOl: 29 mA IOH: 26 rnA
P2.5, P2,7, WR, SHE IOl: 13 mA IOH: 11 mA
ADO-AD15 IOl: 52 mA IOH: 52 mA
RD, ALE, INST-CLKOUT IOl: 13 rnA IOH: 13 mA
7, Typicals are based on a limited number of samples and are not guaranteed. The values listed are at room temperature
and VREF = Vee = 5V,
60r-----,------,-----,
50
ICC 30 I-----+-----;,~____:.....'---__t
rnA
4-112
87C196KB/83C196KB/SOC196KB
A.C. Characteristics
For use over specified operating conditions
Test Conditions: Capacitive load on ali pins = 100 pF, Rise and fali times = 10 ns, fosc = 12'MHz
The system must meet 'these specifications to work with the 80C196KB: (Note 1)
NOTES:
1. Customers whose applications require an 83C1'96KB to meet the 80C196KB specifications listed above should contlict an
Inte.l Field Sales Representative,
2. If max is exceeded, additional wait states will occur.
3. When using wait states, add 2TOSC x n, where n = number of wait states.
4-113
87C196KB/83C196KB/80C196KB
A.C. Characteristics
For use over specified operating conditions
Test Conditions: Capacitive load on all pins = 100 pF, Rise and f~1I times ~ 10 ns, fosc = 12 MHz
The 80~196KB will meet these specifications: (Note 1)
Symbol Description Min Max Units Notes
FXTAL Frequency on XTAL1
87C196KB10/83C196KB10 3.5 10 MHz (Note 2)
87C196KB12/83C196KB12/80C196KB 3.5 12 MHz (Note 2)
Tosc II FXTAL
87C196KB10/83C196KB10 100 286 ns
87C196KB12/83C196KB12/80C196KB 83 286 ns
TXHCH XTAL 1 High to CLKOUT High or Low 40 110 ns (Note 3)
TCLCL CLKOUT Cycle Time 2Tosc ns
TCHCL CLKOUT High Period Tosc - 10 Tosc+ 10 ns
TCLLH CLKOUT Falling Edge to ALE Rising -5 15 ,ns
TLLCH ALE Falling Edge to CLKOUT Rising -15 15 ns
TLHLH' ALE Cycle Time 4Tosc ns (Note 5)
TLHLL. ALE High Period Tosc - 10 Tosc+ 10 ns
TAVLL Address Setup to ALE Falling Edge Tosc - 20
TLLAX Address Hold after ALE Falling Edge Tosc - 40 ns
TLLRL ALE Falling Edge to RD Falling Edge
80C196KB Tosc - 30 ns
87C196KS/83C196KS Tosc - 40, ns
TRLCL RD Low to CLKOUT Falling Edge 5 30 ns
TRLRH RD Low Period Tosc - 5 Tosc + 25 ns (Note 5)
TRHLH RD Rising Edge to ALE ,Rising Edge Tosc Tosc + 25 ns (Note 4)
TRLAZ RD Low to Address Float 10 ns
TLLWL ALE Falling Edge to WR Falling Edge Tosc - 10 ns
TCLWL CLKOUT Low to WR Falling Edge 0 25 ns
TQVWH Data Stable to WR Rising Edge
87C196KB10/83C196KB10 Tosc - 30 ns (Note 5)
87C196KB12/83C196KB12/80C196KB Tosc - 23 ns
TCHWH CLKOUT High to WR Rising Edge -10 10 ns
TWLWH WR Low Period Tosc - 30 Tosc +5 ns . (Note 5)
NOTES:
Tosc = 83.3 ns at 12 MHz; Tosc = 100 ns at 10 MHz. " .
1. Customers whose applications require an 83C196KB to meet the 80C196KB specifications listed above should contact an
Intel Field Sales Representative.
2. Testing performed at 3.5 MHz. However. the part is static by design and will typically operate below 1 Hz.
3. Typical specification, not guaranteed.
4. Assumingback-to-back "bus cycles.
5. When using wait states, add 2Tosc x n, where n = number of wait states,
4.114
inter 87C 196KB/83C 196KB/80C196KB
XTAL1
CLKOUT
ALE
BUS
BHE.INST VALID
270918-25
4-115
87C196KB/83C196KB/80C196KB
XTAL1
CLKOUT
ALE
READY
_~~~~~~~~~~~~~~~~
r l~.---
~:.:~~-----tW-L-W-H
....
~
...+-2-T-os-e-4
tQVWH + 2Tose
~--A-D-DR-E-SS-·-OU-T--.u~~(~------D-AT-A-O-U-T-----~X~__A_DD_R_ES_S__
I
270918-26
Buswidth Timings
XTAL1
4-116
inter 87C196KB/83C196KB/80C196KB
HOLD/HLDA TIMINGS
Symbol Descrlptl~n Min Max Units Notes
THVCH HOLD Setup 1
80C196KB 75 ns.
87C196KB/83C196KB 85
TCLHAL CLKOUT Low to HLDA Low . -15 15 ns
TCLBRL CLKOUT Low to BREQ Low -15 15 ns
THALAZ HLDA Low to Address Float
80C196KB 15 ns
87C196KB/83C196KB 20
THALBZ HLDA Low to BHE, INST, RD, WR Float ns
TCLHAH CLKOUT Low to HLDA High -15 15 ns
TCLBRH CLKOUT Low to BREQ High -15 15 ns
THAHAX HLDA High to Address No Longer Float -5 ns
THAHBV HLDA High to BHE, INST, RD, WR Valid -20 ns
TCLLH CLKOUT Low to ALE High -5 15 ns
NOTE:
1. To guarantee recognition at next clock.
,ACE r---\.
.-' ~!-I----~.II
!-_ _ _tC_LL_H 1.~
~.~
. "'-_____
270918-28
4-117
inter 87C196KB/83C196KB/80C196KB
270918-29
, An external oscillator may encounter as much as a 100 pF load at XTAL 1 when it starts-up. This is due to
interaction between the amplifier and its feedback capacitance. Once the external Signal meets the VIL and
VIH specifications the capacitance will not exceed 20 pF.
0.45
2 . 4 = X 2.0"
0.8
;> TEST POINTS < 2.0
0.8
>C
270918-30
A.C. Testing inputs are driven at 2,4V for a Logic "I" and 0,45V , 270918-31
for a LogIc "0" Tlmlng'measurements are made at 2.0V for a For TImIng Purposes a Port Pin is no Longer Floating when a
Logic "I" and 0,8V for a Logic "0" 100 mV change from Load Voltage Occurs and Begins to Float
when a 100 mV change from the Loaded VOHIVOL Level occurs
IOLIiOH = ±15 mAo
EXPLANATION OF AC SYMBOLS
Each symbol is two pairs of letters prefixed by "T" for time. The characters in a pair indicate a signal and its
condition, respectively. Symbols represent the time between the two signal/condition points.
Conditions: Signals:
H '" High A - Address HA - Rti5A
L ~Low B -~ L - ALE/ADV
V - Valid BR - BREO Q - DATA OUT
x - No Longer Valid C ,- CLKOUT R - RD
Z - Floating D - DATA IN W - Wi=i/WRH/'fRL
G - Buswidth X - XTAL1
( H - HOiJj \ Y - READY
. 4-118
87C196KB/83C196KB/80C196KB
EPROM SPECIFICATIONS
NOTE:
1. Run Time Programming is, <;lone with Fosc = 6.0 MHz to 12.0 MHz, VREF =: 5V ± 0.65V. TA = + 25'e to ±5'e and
Vpp = j'2.75V. For run-time programming over a full operating range, contact the factory. '
NOTE:
Vpp must be within 1V of Vee while Vee < 4.5V. Vpp must not have a low impedance path to ground or \ISS while
Vee> 4.5V.
4·119
intJ· \ 81C196KB/83C196KB/80C196KB.
StAVE PROGRAMMING MODE DATA PROGRAM MODE WITH SINGLE PROGRAM PULSE
PORTS
3/4 --t--~~~~~~
PVER
270918-32
\
SLAVE PROGRAM MODE IN WORD ,DUMP OR DATA VERIFY MODE WITH AUTO INCREMENT·
, ~', .
''
270918-33
SLAVE PROGRAMMiNG MODE TIMING IN DATA PROGRAM MODE WITH REPEATED PROG PULSE
AND AUTO INCREMENT
pbRTS
3/4 ( ACOR/COMMAND >--< ADDR
DATA )>--------«
AODR+ 2
DATA >--
PVER
tPHIL
270918-34
4-120
inter 87C196KB/83C196KB/80C196KB
TXHQX Output Data Hold after Clock Rising Edge 2 Tose ~50 ns
TXHQV Next Output Data Valid after Clock Rising Edge 2 Tosc +50 ns
270918-35
4-121
87C196KB/83C196,KB/80C196KB
NOTES:
·An "LSB", as used here, has a value ot approxh:nately 5 mV. '
1. Typical values are expect~d tor most devices at 25°e but are not tested or guaranteed.
2. De to 100 KHz.
3. Multiplexer Break-Betore-Make Guaranteed.
4. One state = 167 ns at 12 MHz, 250 ns at 8 MHz.
, 4-122
inter 87C196KB/83C196KB/80C196KB
FULL SCALE ERROR-The difference between the Vee REJECTION-Attenuation of noise on the Vee
expected and actual input voltage corresponding to line to the AID converter.
the full scale code transition.
ZERO OFFSET-The difference between the ex-
pected and actual input voltage corresponding to
the first code transition. .
4-123
87C 196KB/83C196KB/80C196KB
4-124
87C196KB/83C196KB/80C196KB
This is a new data sheet that integrates the 87C196KB (order number 270590-003) and the 83C196KBI
80C196KB (order number 270634-003) data sheets.
The following differences exist between this data sheet (-001) and each of the above mentioned data sheets.
1. The status of the data ,sheet was upgraded from ADVANCE INFORMATION to PRELIMINARY.
2. The warning about the ABSOLUTE MAXIMUM RATINGS was reworded and a notice of disclaimer was
added to the electrical specific,<!tions section.
3. VIH2 was increased from2.2V to 2.6V.
4. IlL 1 was increased from - 950 p.A to -'-1.2 mA. This change was documented in the previous revision of the
data sheets but the D.C. Characteristics table did not reflect the change. ' ,
5. Maximum Ipo specification was added to the D.C. table and Ipo note was deleted.
4-125
87C196KB16
16-BIT HIGH PERFORMANCE CHMOS
MICROCONTROLLER
• 8232KBytes of On-Chip EPRO,M
• Dynamically Configurable 8-Bit or
16-Bil Buswidth
• Register-to-Register
Byte Register File
• Full
• 28 Interrupt Sources/16 Arch.itecture Duplex Serial Port
• Pulse-Width-Modulated
16-Bit Up/Down Counter with Capture
Bit, byte, word and some 32-bit operations are available on the 87C196KB. With a 16 MHz oscillator a i6-bit
addition takes 0.50 ,...,S, and the instruction times average 0.37 ,...,S to 1.1 ,...,S in typical applications.
Four high-speed capture inputs are provided to record times when.events occur. Six high-speed outputs are
available for pulse or waveform generation. The high-speed output can also generate four software timers or
start an AID conversion. Events can be based on the timer or upldown counter.
AI:;;o provided on-chip are an AID converter, serial port, watchdog timer, and a pulse-width-modulated output
signal.
V Ef ANGND
CONTROL
SIGNALS
} ~~f:
BUS
PORT 4
~
HSO
270909-1 '
Figure 1. 87C196KB Block Diagram
November 1990
4-126 Order Number: 270909-001
inter 87C196KB16
ARCHITECTURE
The 87C196KB is a member of the MCS®·96 family, and as such has the same architecture and uses the
same instruction set as the 8096BH. Many new features 'have been added on the 87C196KB including:
CPU FEATURES
1.75 ""S 16 x 16 multiply with 16 MHz clock (6.25 ""S on the 8096BH)
Faster interrupt response (almost twice as fast as 8096BH)
PERIPHERAL FEATURES
SFR Window switching allows read·only registers to' be written and vice-versa
New Baud Rate values are needed for serial port, higher speeds possible in all modes
4-127
inter 87C196KB16
.---~-- -------_.---_...
PACKAGING
The 87C196KB is available in a 68-pin PLCC (One-Time Programmable) package, Contact your local sales
office to determine the exact ordering code for the part desired: .
4-128
87C196KB16
8 7 6 5 4 3 2 1 68 67 66 65 64 63 62 61
ACH5/PO.5 / ADO/P3.0
~--------~-------
ACH4/PO.4 AD1/P3.1
ANGND AD2/P3.2
V REF 13 AD3/P3.3
VSS 14
MCS®-96 AD4/P3.4
EXTINT/P2.2 15 68 PIN A05/P3.5
RESET 16 PLCC AD6/P3.6
RXD/P2.1 17 AD7/P3.7
TXO/P2.0 18 A08/P4.0
P1.0 51 AD9/P4.1
P1.1 TOP VIEW AD10/P4.2
P1.2 ADI1/P4.3
LOOKING DOWN ON
P1.3 ADI2/P4.4
P1.4
COMPONENT SIDE ADI3/P4.5
HSIO OF PC BOARD AOI4/P4.6
HSII ADI5/P4.7
HSI2/HS04 26 T2CLK/P2.3
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
5 '"0 >'"
......
o ..
~ I~I~,"-~ ~
." 0 f'; Col
0 0 0 '" .. 0:
> ~
,!2
III
x x
III
~~~~cL III
x x
III
"-
< 'Iii!
.:'i
~ ~ ~ 'In
IX
"- 0:
Thermal Characteristics
4-129
intef " 87C196KB16
PIN DESCRIPTIONS
I
Symbol Name and,Function
Vee Main supply voltage (5V). ~
Vss Digital circuit ground (OV). There are three Vss pins, all of them must be connected.
VREF Reference voltage for the AID converter (5V). VREF is also the supply voltage to the analog
portion of the AID converter and the logic used to read Port O. Must be connected for AID
and Port 0 to function.
ANGND Reference ground for the AID converter. Must be held at nominally the same potential as
Vss·
Vpp Programming voltage. Also timing pin for the return from power down circuit. Connect this pin
with a 1 /LF capacitor to Vss. If this function is not used, connect to Vee.
XTAL1 Input of the oscillator inverter and of the internal clock generator.
XTAL2 Output of the oscillator inverter.
CLKOUT Output of the internal clock generator. The frequency of CLKOUT is% the oscillator
frequency. It has a 50% duty cycle.
RESET Reset input to the chip. Input low for at least 4 state times to reset the chip. The subsequent
low-to-high transition re- synchronizes CLKOUT and commences a 10-state-time sequence in
which the PSW is cleared, a byte read from 2018H loads CCR, and a jump to location 2080H
is executed. Input high for normal operation. RESET has an internal pullup.
BUSWIDTH Input for buswidth selection. If CCR bit 1 is a one, this pin selects the bus width for the bus
cycle in progress. If BUSWIDTH is ai, a 16-bit bus cycle occurs. If BUSWIDTH is a 0 an 8-bit
cycle occurs. If CCR bit 1 is a 0, the bus is always an 8-bit bus.
NMI A positive transition causes a vector through 203EH.
INST Output high during an external memory read indicates the read is an instruction fetch and
output low indicates a data fetch. INST is valid throughout the bus cycle. INST is activated
only during external memory accesses.
EA Input for memory select (External Access). EA equal to a TIL-high causes memory accesses
to locations 2000H through 3FFFH to be directed to on-chip ROM/EPROM. EA equal to a
TTL-low causes accesses to these locations to be directed to off-chip memory.
ALE/ADV Address Latch Enable or Address Valid output, as selected by CCA. Both pin options provide
a latch to demultiplex the address from the address/data ,bus. When the pin is ADV, it goes
inactive high at the end of the bus cycle. ADV can be used as a chip select for external
memory. ALE/ ADV is activated only during external memory accesses.
RD Read signal output to external memory. RD is activated only during external memory reads.
WR/WRL Write and Write Low output to external memory, as selected by the CCA. WR will go low for
every external write, while WRL will go low only for external writes where an even byte is
being written. WR/WRL is activated only during external memory writes.
BHE/WRH Bus High Enable or Write High output to external memory, as selected by the CCR. BHE = 0
selects the bank of memory that is connected to the high byte of th,e data bus. AO = 0
selects the bank of memory that is connected to the low byte of the data bus. Thus accesses
to a i6-bit wide memory can be to the low byte only (AO = 0, BHE = 1), to the high byte only
(AO = 1, BHE = 0), or both bytes (AO = 0, BHE = 0). If the WRH function is selected, the
pin will go low if the bus cycle is writing to an odd memory location. BHE/WRH is valid only
during 16-bit external memory write cycles.
4-130
infef 87C196KB16
4-131
inter, 87C1'96KB16 '
T2CAP A rising edge on P2.7 will capture the value of Timer2 in the T2CAPTURE register (location
OCH in Window 15). ' ,
PMODE Programming Mode Select. Determines the EPROM programming algorithm that is
performed. PMqDE is sampled after a chip reset and should be static while the part is
operating.
SID Slave 10 Number. Used to assign each slave a pin of Port 3 or 4 to use for passing
programming verification acknowledgement. For example, if gang programming in the Slave
Programming Mode, the slave with SID = 001 will use Port 3.1 to signal correct or incorrect
program verification.
pALE ' Programming ALE Input. Accepted by the 87C196KB when it is in SI~lVe Programming Mode.
Used to indicate that Ports 3 and 4 oontain a command/address. '
~ Programming. Falling edge indicates valid data on PBUS and the beginning of progfamming.
Rising edge indicates end of programming.
PACT Programming Active. Used in the Auto Programming Mode to indicate when programming
activity is complete.
1", "
PVAL Program Valid. This signal indicates the success or failure of programming in the Auto
I, Programming Mode. A zero indicates successful programming.
PVER Program Verification. Used in Slave Programming and Auto CLB Programming Modes. Signal
is low after rising edge of PROG if the programming was not successful.
AING Auto Increment. Active low signal indicates that the auto increment mode is enabled. Auto
Increment will allow reading or writing of sequential EPROM locations without address
transactions across the PBUS for each read or write.
PORTS Address/CommandlData Bus. Used to pass commands, addresses, and data to and from
slave mode 87C196KBs. Used by chips in Auto Programming Mode to pass command,
addresses and data to slaves. Also used in the Auto Programming Mode as a regular system
bus to access external memory. Should have pull ups to Vee (15 kO).
4-132
inter 87C196KB16
NEW INSTRUCTIONS
The following five instructions have been added to the 8096BH instruction set for the 87C196KB.
4-133
inter 87C196KB16
On the 87C196KB only Window 0, Window 14 and Window 15 are active. Window 0 is a true superset of the
standard 8096EiH SFR space, while Window 15 allows the read-only registers to be written and write-only
registers to be read. The only major exception to this is the Timer2 register which is the Timer2 capture register
in Window 15. The writeable register for Timer2 is in Window O. There are also some minor changes and
cautions. Window 14 contains the Programmable Pulse Width register (PPW) at location 14H. The descriptions
of the registers which have different functions in Window 15 than in Window 0 are listed below,:
AD_COMMAND (02H) - Read the last written command
AD_RESULT (02H, 03H) - Write a value into the result register
HSI_MODE (03H) - Read the value in HSLMODE
HSI_TIME (04H,05H) - Write'to FIFO Holding register
HSO_TIME (04H,05H) - Read the last value placed in the holding register
HSI_STATUS (06H) - Write to status bits but not to HSI pin bits. (Pin bits are 1,3,5,7).
HSO_COMMAND (06H) - Read the last value placed in the holding register
SBUF(RX) (07H) - Write a value into the receive buffer
SBUF(TX) (07H) - Read the last value written to the transmit buffer
WATCHDOG(OAH) - Read the value in the upper byte of the WDT
TIMER1 (OAH,OBH) - Write a value to Timer1
, TIMER2 (OCH,ODH) - Read/Write the Timer2 capture register.
Note that Timer2 read/write is done with WSR = o.
IOC2 (OBH) - Last written value is readable, except bit 7 (note 1)
BAUDRATE (OEH) - No function, cannot be read
PORTO (OEH) - No function, no output drivers on the pins. Registers reserved.
PORT1 (OFH) - IOPORT1 cannot be read or written in Window 15. Register reserved.
SP_STAT (11 H) - 8et the status bits, TI and RI can be set, but it will not cause an interrupt
SP_CON (11 H) - Read the current control byte
1080 (15H) - Writing to this register controls the HSO pins. Bits 6 and 7 are inactive for writes.
lOCO (15H) - Last written value is readable, except bit 1 (note 1)
IOS1 (16H) - Writing to this register will set the status bits, but not cause interrupts. Bits 6 and
7 are, not functional' .
IOC1 (16H) - Last written value is readable
1082 (17H) - Writing to this register will set the status bits, but not cause interrupts.
PWM_CONTROL (17H) - Read the duty cycle value written to PWM_CONTROL
NOTE:
1. IOC2.7 (CAM CLEAR) and IOCO.1 (T2RST) are not latched and will read as a 1 (precharged bus) .
Being able to write to the read-only registers and vice-versa provides a lot of flexibility. One of the most useful
advantages is the ability to set the timers and HSO lines for initial conditions other than ,zero.
Reserved registers may be used for testing or future features. Do not write to these registers. Reads from
reserved registers will return indeterminate values.
4-134
inter 87C196KB16
19H
STACK POINTER 19H STACK POINTER
ISH ISH
17H 'IOS2 17H PWM_CONTROL
16H 10SI 16H lOCI
15H 10SO 15H lOCO
14H 'WSR 14H 'WSR
13H 'INT_MASKI 13H 'INT_MASKI
12H 'INT_PENDI 12H 'INT_PENDI
llH 'SP~STAT llH 'SP_CON
10H PORT2 10H PORT2 10H RESERVED(1)
OFH PORTI OFH PORT1 OFH RESERVED(1 )
OEH PORTO OEH BAUD RATE OEH RESERVED(1)
ODH TIMER2(HI) ODH TIMER2(HI) ODH 'T2 CAPTURE (HI)
OCH TIMER2 (LO) OCH TIMER2 (LO) OCH 'T2 CAPTURE (LO)
OBH TIMER 1 (HI) OBH 'IOC2 /
WSR ~ 15
OAH TIMER 1 (LO) OAH WATCHDOG
09H INT_PEND 09H INT PEND ,OTHER SFRS IN WSR 15 BECOME
INT_MASK OSH INT MASK READABLE.
OSH
IF THEY WERE WRITABLE
07H SBUF(RX) 07H SBUF(TX) IN WSR ~ OANDWRITABLE IFTHEY
06H HSI STATUS 06H HSO COMMAND WERE READABLE IN WSR ~ 0
05H HSI TIME (HI) 05H HSO_TIME (HI)
04H HSI TIME (LO) 04H HSO_TIME (LO) 4H I PPW I
03H AD_RESULT (HI) 03H HSLMODE WSR ~ 14
02H AD_RESULT (LO) 02H AD_COMMAND
01H ZERO REG (HI) 01H ZERO REG (HI) 'NEW OR CHANGED REGISTER
ZERO REG (LO) OOH ZERO REG (LO) FUNCTION FROM S096BH
OOH
NOTE:
WHEN READ WHENWRITIEN
WSR ~O 1. RESERVED REGISTERS SHOULD
Nor BE WRITIEN
4-135
inter 87C196KB16
~l-
CHANNEL # SELECTS WHICH OF THE 8
A/D CHANNEL NUMBER ANALOG INPUT CHANNELS IS TO BE
CONVERTED TO DIGITAL FORM.
STATUS:
0= A/D CURRENTLY ID.LE 3 - GO INDICATES WHEN THE CONVERSION IS TO
1 = CONVERSION IN PROCESS - BE INITIATED (GO = 1 MEANS START NOW,
x X GO = 0 MEANS THE CONVERSION IS TO BE
X INITIATED BY THE HSO UNIT AT A SPECIFIED TIME).
X
A/D RESULT:
- X SET UPPER FOUR BITS TO ZERO
\ LEAST SIGNIFICANT 2 BITS -
270909-4
- X
270909-5
270909-6
HSI_STATUS {OSH}
I7 sI5 41 3 12 I 1 I 0 I
I L HSI.O STATUS
HSI.1 STATUS.
' - - - - - - - - H S I . 2 MODE HSI.2 STATUS
' - - - - - - - - - - H S I . 3 MODE HSI.3 STATUS
WHERE EACH 2 - BIT MODE CONTROL FIELD WHERE FOR EACH 2 - BIT STATUS .FIELD THE LOWER
DEFINES ONE OF 4 POSSIBLE MODES: BIT INDICATES WHETHER OR NOT AN EVENT HAS
. OCCURED ON THIS PIN AND THE UPPER BIT INDICATES
00 8 POSITIVE TRANSITIONS THE CURRENT STATUS OF THE PIN.
01 EACH POSITIVE TRANSITION 270909-9
10 EACH NEGATIVE TRANSITION
11 EVERY TRANSITION
(POSITIVE AND NEGATIVE)
270909-8.
4-136
87C196KB16
4-137
87C196KB16
SP_STAT(11H)
BIT.1, BIT.O SPECIFY THE MODE
o O.O=MODEO 1.0=MODE2
O. r = MODE 1 1.1 = MODE 3
270909-18 270909-19
HSO_COMMAND (06H)
CHANNEL: 0-5 HSO.O - HSO.5 INDIVIDUALLY
4-138
inter 87C196KB16
Operating Conditions
Symbol Description Min Max Units
TA Ambient Temperature Under Bias 0 +70 °C
Vee Digital Supply Voltage 4.50 5.50 V
NOTE:
ANGND and Vss should be nominally at the same potential.
VIH Input High Voltage (Note 1) 0.2 Vee + 0.9 Vee + 0.5 V
NOTES:
1. All pins except RESET and XTAL 1.
2. Holding these pins below VIH in Reset may cause the P!lrt to enter test modes.
4-139
87C196KB16
NOTES:
(Notes apply to all specifications)
1. QBD (Quasi-bidirectional) pins include Port 1, P2.6 and P2.7.
2. Standard Outputs include ADO-15, RD, WR, ALE, SHE, INST, HSO pins, PWM/P2.5, CLKOUT, RESET, Ports 3 and 4,
TXD/P2.0, and RXD (in serial mode 0). The VQjj specification is' not valid for RESET. Ports 3 and 4 are open-drain outputs.
3. Standard Inputs include HSI pins, CDE, EA, READY, BUSWIDTH, NMI, RXD/P2.1, EXTINT/P2.2, T2CLK/P2.3, and
T2RST IP2.4.
4. Maximum current per pin must be externally limited to the following values if VOL is held above 0.45V or VOH is held
, below Vee - 0.7V: '
IOl on Output pins: 10 mA
IOH on quasi-bidirectional pins: self limiting
IOH on Standard Output pins: 10 mA
5. Maximum current per bus pin (data and control) during normal operation is ± 3.2 mA.
6. During normal (non-transient) conditions the following total current limits apply:
Port 1, P2.6 IOl: 29 mA IOH is self limiting
HSO, P2.0, RXO, RESET IOl: 29 mA IOH: 26 mA
P2.5, P2.7, WR, BHE IOl: 13 mA IOH: 11 mA
ADO-AD15 IOl: 52 mA IOH: 52 mA
RD, ALE, INST -CLKOUT IOl: 13 mA IOH: 13 mA
7. Typicals are based on a limited number of samples and are not guaranteed. The values listed are at room temperature
and VREF = Vee = 5V.
60r-----~------_r------,-----~
50~----_+------4_------~~--~
40~----_+------~~--~~~--~
ICC
rnA 30~----_+~~--~~----+-----~
20~----_+~~---r----~~~--~
FREQUENCY
270909-21
ICC Max = 3.88 x FREQ + 8.43
IIDlE Max = .1.65 x FREQ + 2.2
4-140
87C196KB16
The system must meet these specifications to work with the 87C196KB:
NOTES:.
1. If max is exceeded, additional wait states will occur.
2. When using wait states, add 2Tasc x n where n = number of wait states.
4-141
87C196KB16
NOTES:
, Tose = 83.3 ns at 12 MHz; Tosc = 100 ns at 10 MHz.
1. Typical specification, not guaranteed.
2. Assuming back-to-back bus cycles.
3. Testing performed at 3.5 MHz, however, the device is static by design and will typically operate below 1 Hz.
4. When using wait states, all 2Tose + n where n = number of wait states.
4-:142
87C196KB16
XTAL1
CLKOUT
. tCLLH
ALE
BUS
BUS - - (
~I
AbDRESS OUT
__ ~ _ _U DATA OUT )~\I(__A_D_DR_E_SS_ _ _ __
L tRHBX ...
itWHBX
BHE,INST VALID
270909-22
4-143
87C196KB16
XTAL1
CLKOUT
tCLLH
ALE
READY
XTAL1
BUS
-{~:---------~~-----)~---------- 270909-24
4-144
87C196KB16
HOLD/HLDA Timings
------
Symbol Description tJ!in Max Units Notes
THVCH' HOLD Setup 85 55 ris (Note 1)
CLKOUT
BHE,INST \ I, ,\ ,,
RD.WR ----~----~'--~!~/----~
270909-25
L-.._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .. _ _ _ _ _ _ _ _ _ _ .. _. _ _ _ _ _ _ _ _ _ _ _ _ _ _--'
4-145
inter 87C196KB16
270909-26
An external oscillator may encounter as much as a 100 pF load at XTAL 1 when it starts-up. This is due to
interaction between the amplifier and its feedback capacitance. Once the external signal meets the VIL and
VIH specifications, the capacitance will not exceed 20 pF.
EXPLANATION OF AC SYMBOLS
Each symbol is two pairs of letters prefixed by "T" for. time. The characters in a pair indicate a signal and its
condition, respectively. Symbols represent the time between the two signal/condition points.
Conditions: Signals:
H High A - Address HA - HLDA·
L Low B - BHE L - ALE/ADV
V Valid BR - BREQ Q - DATA OUT
x No Longer Valid C - CLKOUT R - RD
z - Floating o - DATA IN W - WR/WRH/WRL
G - Buswidth x .- XTAL1
H - HOLD Y -READY
4-146
inter 87C196KB16
EPROM SPECIFICATIONS
NOTES:
1. Run Time Programming is done with Fosc = 6.0 MHz to 16.0 MHz. VREF = 5V ± 0.65V. TA = -i- 25°C to ± 5°e and
Vpp = 12.75V. For run-time programming over a full operating range, contact the factory.
NOTE:
Vpp must be within 1V of Vee while Vee < 4.5V. Vpp must not have a low impedance path to ground or VSS while
Vee> 4.5V.
4-147
87C196KB16
SLAVE PROGRAMMING MODE DATA PROGRAM MODE WITH SINGLE PROGRAM PULSE
PORTS
3/4 --t-~~:::!~~~~
PVER
270909-29
SLAVE PROGRAM MODE IN WORD DUMP OR DATA VERIFY MODE WITH AUTO INCREMENT
--J
I ADDR
.1 I ADDR+ 2
.1
PORTS
ADDR/COt.4t.4AND VEA: BITS/WO DUMP VER BITS/WO DUMP
3/4
-tSHLl~ tPLDV -
f-- - tPHDX ~ -+tPLDV - tPHDX· ~
/
\ f \ V
tlLPL~ -tPHPL-
i'- 270909-30
SLAVE PROGRAMMING MODE TIMING IN.DATA PROGRAM MODE WITH REPEATED PROG PULSE
AND AUTO INCREMENT
270909-31
4-148
inter 87C196KB16
•
SERIAL· PORT WAVEFORM-SHIFT REGISTER MODE
RXO-""""'-'
(IN) __J~._CC:~"L
270909-32
4·149
87C196KB16
10-81T AID CHARACTERISTICS stability of VREF. VREF must be., close toVee since it
supplies both the resistor ladder and the digital sec-
The speed of the AID converter in the 10-bit mode tion of the converter.
can be adjusted by setting a clock prescaler on or
off. At high frequencies more time is needed for the
comparator to settle. The maximum frequency with AID CONVERTER SPECIFICATIONS
the clock prescaler disabled is 6 MHz. The conver-
sion times with the prescaler turned on or off is The specifications given below assume adherence
shown in the table below. The AD_TIME register to the Operating Conditions section of this data
has not been characterized for· the 10-bit mode. sheet. Testing is performed with VREF = 5.12V.
4-150
87C196KS16
FULL SCALE ERROR-The difference between the Vee REJECTION-Attenuation of noise on the Vee
expected and actual input voltage corresponding to line to the AlP converter.
the full 'scale code transition;
ZERO OFFSET-The difference between the ex-
IDEAL CHARACTERISTIC-A characteristic with pected and actual input voltage corresponding to
its first code transition at VIN = 0.5 LSB, its last the first code,transition.
code transition at VIN = (VREF - 1.5 LSB) and all
code widths equal to one LSB.
4-151
87C196KB16
CONVERTING FROM OTHER 8096BH 5. Indexed and indirect operations relative- to the
stack pointer' (SP) work .differently . on the
FAMILY PRODUCTS TO THE
80C196KB than on the 8096BH. On the 8096BH,
8XC196KB the address is calculatfild baSed on the· un-updat-
The following list of suggestions for designing 'an ed version ·of the. stack pointer. The 87C196KB
879XBH system will yield· a design that is easily con- uses the updated version. The offset for POP[SPj
verted to the 87C196KB. and POP nn[SPj instructions may need to be
changed by a count of 2.
1. Do not base critical timing loops on 'instruction or
peripheral execution ti~es. ' 6. PACT has changed from the HSO.O on the
8796BH to P2. '? on the 87C196KB.
2.. Use equate statements to set all timing parame-
ters, Including the baud rate. 7. The VPD on the 8096BH has changed to a Vss
pin on the 87C196KB. .
3. Do not base hardware -timings on CLK0UT or
XTAL1. The timings of the 87C196KB are differ-
ent than those of the 8X9XBH, l;lUt they will func-
. tion with standard ROM/EPROM/Peripheral type
DATA SHEET REVISION HISTORY
. memory systems. This data sheet (version -001) is valid for devices
4. Verify that all inputs are driven high or low and net with a "C" suffix on the topside tracking number.
left floating.
This is the first version of the 87C196KB16 data
sheet.
: ,
4-152
~OO[gIl..O[M]OOO&OOW
83C198/80C198,83C194/80C194
16-BIT CHMOS MICROCONTROLLER
. 83C198 - 8 Kbytes of Factory Mask-Programmed ROM
80C198 -.ROMless
• Register-to-Register Architecture
• High Speed 1/0 Subsystem
The 83C198 is an 80C198 with 8 Kbytes on-chip ROM. In this document, the 80C198 will refer to both
products unless otherwise stated. .
Bit, byte, word and some 32-bit operations are available on the 80C198. With a 12 MHz oscillator a 16-bit
addition takes 0.66 J.A-s,and the instruction times average 0.5 J.A-s to 1.5 J.A-s in typical applications.
Four high-speed 'capture inputs are provided to record times when events occur. Six high-speed outputs are
available for pulse or waveform generation. The high-speed output can also generate four software timers or
start an AID conversion. Events can be based on the timer or counter.
Also provided on-chip are an AID converter, serial port, watchdog timer, and a pulse-width-modulated output
signal.
V EF ANGND
CONTROL
SIGNALS
PORT 3
ADDR /
} DATA
BUS
PORT 4
HSI
HSO
270815-1
Figure 1. 83C198/80C198 Block Diagram
MCS®-96 is a registered trademark of Intel Corporation.
October 1990
4-153 Order Number: 270815-002
83C198/80C198,83C194/80C194
"ci c.i'" 0
..; ..;
11. 11.
I~
"" '"
:I: :I:
~ ~~ ;5
:::; N
..J
.... 8 ;:; '
.11.
"
11.
ACHS/PO.S AD2/P3.2
. ACH4/PO.4 . AD3/P3.3
ANGND AD4/P3.4
VREF AD5/P3.5
vss
EXTINTjP2.2
RESET
inter AD6/P3.6
AD7/P3;7
A8/P4.0
RXD/P2.1 N80C198 A9/P4.1
TXD/P2.0 TOP VIEW Al0/P4.2
HSI.O All/P4.3
HSI.l A12/P4.4
HSO.4/HSI.2 A13/P4.5
HSO.5/HSI.3 A14/P4.6
0
ci ci
N
'" .
"'''' ljl a: "! ...
I~ N ~ '"N .....
...
ci >
Vl Vl Vl
:I:
0
Vl > > ,
~
,....
11. « 11.
W 11.
:I: :I: :I:
:::;
~
11.
Vl
0::
0::
"""
..J
(.)
U")
:t
....
'" ....
'" 270815-2
4-154
inter 83C198/80C198,83C194/80C194
64
41
40 25 25 40
270815-3
111111111111!1!!
64 T2CLK/P2.3
AD1/P3.1 - 1 63 Vss
ADO/P3.0 2 62 READY
Rli 3 61 T2RST/P2.4
ALE/ADV - 4 60 ---"-- N.C.
INST
59 WR
Vss 58 PWt.l/P2.5
N.C. - 7 57 N.C.
XTAL2 - 8 56 Vpp
XTAL1 - 9 55 vss
Vss 10 54 vss
Vss 11
53 HSO.3
Vee 12
52 Vee
Vee 13
51 ¥ss
EA 14
50 HSO.2
Vss 15
49 N.C.
N.C. 16 48 N.C.
N.C. 17
.47 N.C.
N.C. 18
46 N.C.
N.C. 19
45 HSO.1
ACH6/PO.6 20
44 HSO.O
ACH7/PO.7 21 43 HSO.5/HSI.3
N.C. 22 42 ¥ss
ACH5/PO.5 23
~ ~ ::. ~ ~ :il ;;; ~ ::l ~ :ll ~ ::; :ll Sl
HSO.4/HSI.2
ACH4/PO.4 24 ;f 41
!llllll!!!l!!l!!
270815-4
4·155
inter 83C198/80C198,83C194/80C194
PIN DESCRIPTIONS
Symbol Name and Function
Vee Main supply voltage (5V).
Vss The PLCC package has 5 VSS pins and the QFP package has 12 VSS pins. All must be
connected to circuit ground.
VREF Reference voltage for the AID converter (5V). VREF is also the supply voltage to the
analog portior;J of the AID converter and the logic used to read Port O. Must be
connected for AID and Port 0 to function.
ANGND Reference ground for the AID converter. Must be held at nominally the same potential
as Vss.
Vpp Timing pin for the return from powerdOwn circuit. Connect this pin with a 1 p.F capacitor
to Vss. If this function is not used. connect to Vee. This pin is the programming voltage
on the EPROM device.
XTAL1 Input of the oscillator inverter and of the internal clock generator.
XTAL2 Output of the oscillator inverter.
RESET Reset inpl,lt to the chip. Input low for at least 4 state times to reset the chip. The
subsequent low-to-high transition commences the Reset Sequence in which the PSW is
cleared. a byte read from 2018H loads CCR. and a jump to location 2080H is executed.
Input high for normal operation. RESET has an internal pull up.
INST Output high during an external memo!), read indicates the read is an instruction fetch.
INST is valid throughout the bus cycle. INST is activated only during external memory
accesses and output low for a data fetch.
EA Input for memory select (External Access). EA equal to a TTL-high causes memory
accesses to locations 2000H through 3FFFH to be directed to on-chip ROM/EPROM.
EA equal to a TTL-low causes accesses to these locations to be directed to off-chip
memory.
ALE/ADV Address Latch Enable or Address Valid output. as selected by CCR. Both pin options
provide a latch to demultiplex the address from the addressl data bus. When the pin is
ADV. it goes inactive high at the end of the bus cycle. ADV can be used as a chip select
for external memory. ALEI ADV is activated only during external memory accesses.
RD Read signal output to external memory. RD is activated-only during external memory
reads.
WR Write output to external memory. WR will go low for every external write.
4-156
inter . 83C198/80C198, 83C194/80C194
Port ° 4-bit high impedance input-only port. These pins can be used as digital inputs and/or as
analog inputs to the on-chip AID converter. These pins set the Programming Mode on
the EPROM device.
Port 2 Multi-functional port. All of its pins are shared with other functions in the 80C198.
Ports 3 and 4 8-bit bi-directionall/O ports with open drain outputs. These pins are shared with the
multiplexed address/data bus which has strong internal pull ups. Available as I/O only
on the ROM and EPROM devices.
TxD
°
The TxD pin is used for serial port transmission in Modes 1, 2, and 3. The TxD function is
enabled by setting IOC1 5. In mode the pin is used as the serial clock output.
RxD
°
Serial Port Receive pin used for serial port reception. The RxD function is enabled by
setting SPCON.3. In mode the pin functions as input or output data.
EXTINT A positive transition on the EXTINT pin will generate an external interrupt. EXTINT is
selected as the external interrupt source by setting IOC1.1 high.
T2CLK The T2CLK pin is the Timer2 clock input or the serial port baud rate generator input.
T2RST A rising edge on the T2RST pin will reset Timer2. The external reset function is enabled
by setting IOCO.03 T2RST is enabled as the reset source by clearing IOCO.5.
PWM Port 2.5 can be enabled as a PWM output by setting IOC1.0 The duty cycle of the PWM
is determined by the value loaded into the PWM-CONTROL register (17H).
4-157
83C198/80C198,83C194/80C194
MEMORY MAP
OFFFFH
EXTERNAL MEMORY OR 1/0
4000H
INTERNAL ROMIEPROM OR
EXTERNAL MEMORY
2080H
RESERVED
2040H
UPPER 8 INTERRUPT VECTORS
2030H
ROMIEPROM SECURITY KEY
2020H
RESERVED
2019H
CHIP CONFIGURATION BYTE
2018H
RESERVED
1--- 2014H,
LOWER 8 INTERRUPT VECTORS
PLUS 2 SPECIAL INTERRUPTS
2000H
PORT 3 AND PORT 4
1FFEH
EXTERNAL MEMORY OR 1/0
0100H
INTERNAL DATA MEMORY· REGISTER FILE
(STACK POINTER, RAM AND SFRS)
EXTERNAL PROGRAM CODE MEMORY
OOOOH
1'9H 19H
STACK POINTER STACK POINTER
18H 18H
17H IOS2 17H PWM CONTROL
16H IOS1 16H IOC1
15H 1050 15H lOCO
14H WSR 14H WSR
13H INT_MASK1 13H INT_MASK1
12H INT_PEND1 12H INT_PEND1
11H SP_STAT 11H SP_CON
10H PORT2 10H PORT2 10H RESERVED (1)
OFH RESERVED (1) OFH RESERVED (1) OFH RESERVED (1)
OEH PORTO OEH BAUD RATE OEH RESERVED (1)
ODH TIMER2 (HI) ODH TIMER2(HI) ODH RESERVED (1)
OCH TIMER2 (LO) OCH TIMER2 (LO) OCH RESERVED (1)
OBH TIMER1 (HI) OBH IOC2
WSR ~ 15
OAH TIMER1 (LO) OAH WATCHDOG
OSH INT PENDING 09H INT PENDING OTHER SFRS IN WSR
08H INT MASK 08H INT MASK 15 BECOME READABLE
IF THEY WERE WRITABLE
07H SBUF.(RX) 07H SBUF(TX) INWSR ~ OANDWRITABLE
06H HSI_STATUS 06H HSO_COMMAND IF THEY WERE READABLE
INWSR ~ 0
05H 'HSI_TIME (HI) 05H HSO_TIME (HI)
04H HSI_TIME (LO) 04H HSO_TIME (LO)
03H AD RESULT (HI) 03H HSI MODE
02H AD RESULT (LO) 02H AD COMMAND
01H ZERO REG (HI) 01H ZERO REG (HI)
OOH ZERO REG (LO) OOH ZERO REG (LO) 'NOTE,
1. Reserved registers should not be written.
WHEN READ WHEN WRITTEN
WSR =0
4-158
intJ 83C198/80C198,83C194/80C194
STATUS:
X
o = AID CURRENTLY IDLE
1 = CONVERSION IN PROCESS
II CHANNEL # SELECTS WHICH OF THE 4
ANALOG INPUT CHANNELS IS TO BE
CONVERTED TO DIGITAL FORM.
270815-5
....X
270815-6
..
15(111 lB)=EXCHANGE READ/WRIlt REGISTERS
~0
;1 OTHER = UNDEFINED, DO NOT USE
4 o
ADDRESS VALID STROBE SELECT o
(ALE I ADV)
o
(lRCO) l~TERNAL READY CONTROL o
(lRCt) MODE
270815-8
(LOCO) }
(LOC1) PROGRAM LOCK MODE
270815-7
'-----HSl.l MODE
L - - - - - - - H S I . 2 MODE L - - - - - - - H S I . 2 STATUS
' - - - - - - - - - - H S I . 3 MODE L - - - - - - - - - H S I . 3 STATUS
WHERE EACH 2 - BIT MODE CONTROL FIELD WHERE FOR EACH 2 - BIT STATUS FIELD THE LOWER
DEFINES ONE OF 4 POSSiBLE MODES: BIT INDICATES WHETHER OR NOT AN EVENT HAS
OCCURED ON THIS PIN AND THE UPPER BIT INDICATES
00 8 POSITIVE TRANSITIONS THE CURRENT STATUS OF THE PIN.
01 EACH POSITIVE TRANSITION 270815-10
10 EACH NEGATIVE TRANSITION
11 EVERY TRANSITION
(POSITIVE AND NEGATIVE)
270815-9
4-159
83C198/80C198,83C194/80C194
270815-13 270815-14
...--------------------------------------------------~
TIMER 21 TIMER 1
LOCK CAM
270815-15
4-160
83C198/80C198,83C194/80C194
,---------------------~
HSO.l "
ENABLE +2 PRESCALER ON PWM
HSO.2 X (SET TO 0)
HSO.3 A/D CLOCK PRESCALER DISABLE
HSO.4 T2 ALTERNATE INTERRUPT @ 8000H
HSO.5 ENABLE lOCKED CAM ENTRIES
T2RESET CLEAR ENTIRE CAM
START A/D 270815-21
_ _ _ _ _ _ _ _ _ _ _ _ _ • _ _ _ _ _ _.....J
270815-20
L......_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ~ ~.
4-161
inter, 83C198/80C198,83C194/80C194
Ambient Temperature
* WARNING: Stressing the device beyond the "Absolute
MaximUm Ratings". may cause permanent damage.
Under Bias ...................... O°C to + 70°C
These' are stress ratings only. Operation beyond the
. Storage Temperature .......... -65°C to + 150°C "Operating Conditions" is not recommended and ex-
Voltage On Any Pin to VSS ........ -0.5V to + 7.0V tended exposure beyond the "Operating Conditions"
may affect device reliability.
Power Dissipation .......................... 1.5W
Operating Conditions
Symbol Description Min Max Units
TA Ambient Temperature Under Bias 0 +70 °C
Vee Digital Supply Voltage 4.50 5.50 V
NOTE:
ANGND and Vss should be nominally at the same potential.
NOTE:
1. All pms except RESET and XTAl1.
2. Holding these pins below VIH In Reset may cause the part to enter test modes.
4-162
83C198/80C198,83C194/80C194
NOTES:
(Notes apply to all specifications) ,
1. Standard Outputs include ADO-15, RD, WR, ALE, INST, HSO pins, PWM/P2.5, RESET, Ports 3 and 4, TXO/P2.0, and
RXD (In serial mode 0). The VOH specification is not valid for RESET. Ports 3 and 4 are open-drain outputs.
2. Standard Inputs include HSI pins, EA, READY, RXD/P2.1, EXTINT/P2.2, T2CLK/P2.3, and T2RST/P2.4.
3. Maximum current per pin must be externally limited to the following values if VOL is held above 0.45V or VOH is held
below Vee - 0.7V:
IOL on Output pins: 10 mA
IOH on Standard Output pins: 10 mA
4. Maximum current per bus pin (data and control) during normal operation is ± 3.2 rnA.
5. During normal (non-transient) conditions the following total current limits apply:
HSO, P2.0, RXD, RESET IOL: 29 rnA IOH: 26 rnA
P2.5, WR IOL: 13 rnA IOH: 11 rnA
ADO-AD15 IOL: 52 rnA IOH: 52 rnA
RD, ALE,INST IOL: 13 rnA IOH: 13 rnA
6. Typicals are based on a limited number of samples and are not guaranteed. The values listed are at room. temperature
and VREF = Vee = 5V.
60r-----~-----r----~
ICC MAX
50~----+-----~---~~
4-163
83C198/80C198,83C194/80C194
A.C. Characteristics
For uSe over specilie,d operatiRQ conditions,
Test Conditions: Capacitive load on all phlS = 100 pF, Rise and fall times = 10 ns, lose = 12 MHz
The system must meet these specifications to work with the 83C198/80C198:
Symbol Description Min Max Vnlts Notes
NOTES:
1. If max is exceeded, additional wait states will occur.
2. When using wait states, add 2Tasc x n, where n = number of wait states.
4-164
inter 83C198/80C198,83C194/80C194
A.C. Characteristics
For use over specified operating conditions
Test Conditions: Capacitive load on all pins = 100 pF, Rise and fall times = 10 ns, fose = 12 MHz
NOTES:
1. Testing performed at 3.5 MHz. However, the part is static by design and will typically operate below 1 Hz.
2. Typical specification, not guaranteed.
3. Assuming back-to-back bus cycles.
4. When using wait states, add 2TOSC x n, where n = number of wait states.
4-165
83C198/80C198,83C194/8QC194
XTALI
ALE
--1.
, tLHLH
J \
I+- tLHLL.-- I-- tLLRL --I-- tRLRH --- - tRHLH ....
~
J
tRLDV
rt.t.vLL- ,-.tLLAX ~.
BUS
-<r-- ADDRESS OUT >--< DATA »}}~
tAVDV I .1
I-- t LLWL ~ tWLWH ~ ~tWHLH""
tWHox.1
I--tOVWH 1 .
XTALI
ALE
READY
~. tWLWH+2Tos e J
j.1·--- tOVWH ~ 2 Tose =:::J
r---A-D-DR-E-SS-OU-T--~~~<~_ _ _ _._D_AT_A_O_UT_ _ _ _ _~X~
I
___A_DD_R_ES_S__~ II
270815-24
.4-167
83C198/80C198,83C194/80C194
270615-25
An external oscillator· may encounter as much as a 100 pF load at XTAL 1 when it starts-up. This is due to
interaction between the amplifier and .its feedback capacitance. Once the external signal meets the VIL and
VIH specifications the capacitance will not exceed 20 pF. .
2.4 -V- 2.0> TEST POINTS < 2.0 V-- VLOAO+ O. 15V - - - - - - - - -
vLOAO ____ TIMING REF'ERENCE.____
....--- POINTS
VLOAO-O.15 V ' -_ _ _ _ _ _ __
----..
0.45---1\ O.B O.B-A-
270815-26
A.C. Testing Inputs are driven at 2 4V for a Logic "1" and 0.45V 270815-27
for a LogiC "0" Timing measurements are made at 2.0V for a For Timing Purposes a Port Pin IS no Longer Floating when a
Logic "I" and 0.8V for a Logic "0". 100 mV change from Load Voltage Occurs and BeginS to Float
when a 100 mV change from the Loaded VOHIVOl Level occurs
IOl/lOH = ± 15 rnA
EXPLANATION OF AC SYMBOLS
Each symbol is two pairs of letters prefixed by "T" for time. The characters in a pair indicate a signal and its
condition, respectively. Symbols represent the time between the two signal/condition points.
Conditions: Signals:
H - High A Address
L Low D DATA IN
V - Valid L - ALE/ADV
X - No Longer Valid Q DATA OUT
Z Floating R RD
W WR
X XTAL1
Y READY
4-168
83C198/80C198,83C194/80C194 ,
TXHOV Next Output Data Valid after Clock Rising Edge 2 Tose +50 ns
TDVXH Input Data Setup to Clock Rising Edge Tose +50 ns
TXHDX Input Data Hold after Clock Rising Edge 0 ns
TXHOZ Last Clock Rising to Output Float 1 Tose ns
r- --j TXLXL
TXD---U ---U ---U ---U ---U- ---U ---U ---U
TovxW'1 r- TXLXH-I r- TXHOV i-1 -I r-TXHOX TXHQZ-l I
(O~;)--<!)(----"X 2 X 3 X"'-4-""\X 5 X 6 X 7 >-
TDVXH -+j f..- -l r- TXHDX
RXD
(IN)
270815-28
4-169
I"m:.-r
•• ~"' 83C198/80C198,83C194/80C194
The converter is ratiometric, so the absolute The 8XC194 does not have an AID converter.
accuracy is directly dependent on the accuracy and
NOTES:
'An uLSB", as used here, has a value 01 approximately 5 mY.
1. Typical values are expected for most devices at 25°e but are not tested or guaranteed.
2. De to 100 KHz.
3. Multiplexer Break-Belore-Make Guaranteed.
4. One state = 167 ns at 12 MHz, 250 ns at 8 MHz.
4-170
83C198/80C198,83C194/80C194
80C198 FUNCTIONAL DEVIATIONS 2. Location 201 AH is reserved for use by Intel and
must contain OFFH.
The 80C198 has the following problems. 3. HSO commands OCH and ODH are reserved and
1. The DJNZW instruction is not guaranteed to be must not be used.
functional. The instruction, if encountered, will not 4. All unused Windows are reserved and must never
cause an unimplemented opcode interrupt. (The be accessed.
opcode for DJNZW is OE1 Hex.) The DJNZ (byte)
in.!ltruction works correctly and should be used in- 5. Do not toggle the EA pin when the device is exe-
stead. cuting.
2. Factory test' modes. On future devices, factory 6. The device will make use of many of the unimple-
test modes will be entered by holding the ALE, mented opcodes and these opcodes will no long-
RD, WR and PWM pins in their active states on er cause an umimplemented opcode interrupt.
the rising edge of RESET. ALE, RD and WR are 7. On future devices, An AID conversion may take·
active low, and PWM is active high. During RE- 1.5 less states to complete. Do not base critical
SET, these pins will be held inactive by semi- timing .Ioops on an AID conversion time.
strong devices. These semi-strong devices will 8. The ONCE (ON Circuit Emulator) mode will be en-
sink or source about 2 mA and still stay above VIH tered differently. ONCE is currently entered by
or below VIL. Factory test modes are reserved by holding ALE high, and INST, RD, and EA low on
Intel. However, a system must be designed so the rising edge of RESET. For future versions, the
that it does not inadvertantly enter one of these ONCE mode will be entered by holding the TxD
modes. (P2.0) pin low on the riSing edge of RESET.
The PWM pin is the qualifier. If the PWM pin is
above VIL and any of the other pins are below ONCE mode entry is primarily a concern for emula-
VIH, the device may enter a factory test mode. A tors. However, a system needs to be designed so it
system must not override any of these semi- will not enter ONCE. Currently, the TXD pin is weakly
strong devices. driven high during RESET. For future versions, the
TXD pin will be semi-strongly driven high during
RESET so an external load will not pull the TXD pin
80C198 DESIGN CONSIDERATIONS below VIH and put the device into ONCE. The TXD
pin on future devices will source about 2.0 mA and
In order to remain compatible with future versions of still remain above VIH. A system must not pull more
the 80C198, the following design considerations than 2.0 mA from the TXD pin during RESET or the
need to be taken into account when implementing device will enter the ONCE mode.
an 80C198 design: 9. RESET. The RESET pin currently must be held
1. Reserved Bits in SFR spaGe. Reserved bits must low for a minimum of 4 states for a valid device
always be written as zeroes when writing to an Reset. The two internal Reset sources, WDT
SFR that has reserved bits. Never rely on the overflow and RST instruction, also drive the
state of a reserved bit. when reading an SFR as RESET pin low for 4 states.
these bits are indeterminate. Reserved bits in-
clude: On future versions, the RESET pin must be held low
Program Status Word bit two (PSW.2) for a minimum of 16 states for a valid device Reset.
To remain compatible, always assert the RESET pin
Window Select Register bits four through six for at least 16 states. The internal' Reset sources will
(WSR.4-.6) . also drive the pin low for 16 states.
110 Control Register Two bit three (IOC2.3)
AID Command Register bits four through sev- Also, future versions will take 5 to 8 more state times
en (AD_COMMAND.4-.7) from the rising edge of RESET to begin executing
from location 2080H.
Serial Port Control Register bits five through
seven (SP_CON.5-.7)
AID Result LO Register bits four and five
(AD_RESULT_L0.4-.5)
Serial Port Status Register bits zero and one
(SP_STAT.0-.1)
Interrupt Mask Register one bit seven
(IMASK1.7)
4-171
83C198/80C198,83C194/80C194
4-172
87C 198/87C 194
16-BIT CHMOS MICROCONTROLLER
8 Kbytes of OTPROM
• Reglster-to-Register Architecture
• 16-Bit Timer
The 87C198 has 8 Kbytes of on-~hip One Time Programmable Read Only Memory (OTPROM).
Bit, byte, word and some 32-bit operations are available on the 87C198. With a 12 MHz oscillator a 16-bit
addition takes 0.66 f.Ls, and the instruction times average 0.5 f.Ls to 1.5 f.Ls in typic~1 applications.
Four high-speed capture inputs are provided to record times when events occur. Six high-speed outputs are
available for pulse or waveform generation. The high-speed output can also generate four software timers or
start an AID conversion. Events can be based on the timer or counter.
Also provided on-chip are an AID converter, serial port, watchdog timer, and a pulse-width-modulated output
signal.
V EF" ANGNO
CONTROL
SIGNALS
PORT 3
ADOR
} DATA
BUS
PORT 4
HSI
270899-1
Figure 1. 87C198 Block Diagram
October 1990
4-173 Order Number: 270899-001
inter 87C198/87C194
<D
"...0 ...0 If'; COl
;::-~ '~
'" >-~
...'" .;...
:I: :I:
u
00(
..J ..J
~ I~ >tl >~t!
x x
~ Jl ~ ~ 1li1 "c
0
00(
c
00(
ACH5/PO.5 AD2/P3.2
ACH4/PO.4 AD3/P3.3
ANGND AD4/P3.4
vREr AD5/P3.5
vss AD6/P3.6
EXTINT/P2.2
RESET
RXD/P2.1
inter
TOP VIEW
AD7/P3.7
A8/P4.0
A9/P4.1
TXD/P2.0 A10/P4.2
HSI.O A11/P4.3
HSI.1 A12/P4.4
HSO.4/HSI.2 A13/P4.5
HSO.5/HSI.3 A14/P4.6
0
0 >"''''
0VI 0Vl VI
N
III •
~ i ,...~ I~ ..... >-c~ '"... "...
:I: :I:
0
Vl
:I: :I:
:::E
~
'" '"
;::.Vl '" "'"
..J
Q.
of)
:;c
Q.
'"'">- U'">-
270899-2
4-174
87C 198/87C 194
64 ",
41 41
40 25 25 40
270A99- 3
Top View
!l!!!!!!!!!!!!!!
~ ~ ~ ~ ~ ~ ~ ~ ~ ; R~ ~ ~ ~ ~
T2CLK/P2.3
AD1/P3.1 64
Vss
ADO/P3.0 63
62 READY
Rii 61 ....-..-..:. T2RST/P2.4
ALEji\DV 4
60 N.C.
INST 5 59 ViR
VSS 58 PWM/P2.5
N.C.
57 N.C.
XTAL2
56 Vpp
XTAL1
55 VSS
VSS 10
54 Vss
VSS 11
53 HSO.3
Vee 12
52 Vee
Vee
EA
13
14
51
50
- VSS
HSO.2
VSS 15
49 N.C.
N.C. 16
48 N.C.
N.C. 17
47 N.C.
N.C. 18
46 N.C.
N.C. 19 45 HSO.1
ACH6/PO.6 20
44 HSO.O
ACH7/PO.7 21
43 HSO.5/HSI.3
N.C. 22
42 VSS
ACH5/PO.5 23
HSO.4/HSI.2
ACH4/PO.4
!!!!!!!!!!!!!!!l
270899-4
4·175
87C1.98/87C194
PIN DESCRIPTIONS
Symbol Name and Function
Vee Main supply voltage (5V).
V~s The PLCC package has 5 Vss pins and the QFP package has 12 Vss pins. All must be
connected to circuit ground.
VREF Reference voitage for the AID converter (5V). VRI::F is ~Iso the supply voltage to the
analog portion of the AID converter and the logic used to read Port O. Must be
connected for AID and Port 0 to function .
._----
ANGND Reference ground for the AID converter. Must be held at nominally the same potential
as Vss.
-
Vpp Programming Voltage. Also, timing pin for the return from powerdown circuit. Connect
this pin with a 1 IJ.F capacitor to Vss. If this function is not used, connect to Vee.
XTAL1 Input of the oscillator inverter and of the internal clock generator.
XTAL2 Output of the oscillator inverter.
RESET Reset input to the chip. Input low for at least 4 state times to reset the chip. The
subsequent low-to-high transition commences the Reset Sequence in which the PSW is
cleared, a byte read from 2018H loads CCR, and a jump to location 2080H is executed.
Input high tor ~ormal operation. RESET has an internal pullup.
INST Output high during an external memory read indicates the read is an instruction fetch.
INST is valid throughout the bus cycle. INST is activated only during external memory
accesses and output low for a data fetch.
EA Input for memory select (External Access). EA equal to a TTL-high causes memory
accesses to locations 2000H through 3FFFH to be directed td on-chip ROM/EPROM.
EA equal to a TTL-low causes accesses to these locations to be directed to Off-chip
memory
ALE/ADV Address Latch Enable or Address Valid output, as selected by CCR. Both pin options
provide a latch to demultiplex the address from the address/data bus. When the pin is
ADV, it goes inactive high at the end of the bus cycle. ADV can be used as a chip select
for external memory. ALE/ ADV is activated only during external memory accesses.
RD Read signal output to external memory. RD is activated only during external memory
reads .
._ - -
WR Write output to external memory. WR will go low for every external write.
-
4-176
inter 87C198/87C194
4-177
inter 87C198/87C194
MEMORY MAP
OFFFFH
EXTERNAL MEMORY OR I/O
4000H
INTERNAL ROM/EPROM OR
EXTERNAL MEMORY
20S0H
RESERVED
2040H
UPPER 8 INTERRUPT VECTORS
2030H
ROM/EPROM SECURITY KEY
2020H
RESERVED
2019H
CHIP CONFIGURATION BYTE
201SH
RESERVED
2014H
LOWER S INTERRUPT VECTORS
PLUS 2 SPECIAL INTERRUPTS
2000H
PORT 3 AND PORT 4
lFFEH
EXTERNAL MEMORY OR I/O
0100H
INTERNAL DATA MEMORY - REGISTER FILE
(STACK POINTER, RAM AND SFRS)
EXTERNAL PROGRAM CODE MEMORY
OOOOH
19H 19H
STACK POINTER STACK POINTER
lSH lSH
17H IOS2 17H PWM CONTROL
16H 10Sl 16H 10Cl
15H 10SO 15H lOCO
14H WSR 14H WSR
13H INT_MASKl 13H INT~ASKl
12H INT_PENDl 12H INT_PENDl
llH SP_STAT llH SP_CON
10H PORT2 10H PORT2 10H RESERVED (1)
OFH RESERVED (1) OFH RESERVED (1) OFH RESERVED (1)
OEH PORTO OEH BAUD RATE OEH RESERVED (1)
ODH TlMER2(HI) ODH TIMER2 (HI) ODH RESERVED (1)
OCH .TIMER2 (LO) OCH TIMER2(LO) OCH RESERVED (1)
OBH TIMERl (HI) OBH IOC2
WSR ~ 15
OAH TIMERl (LO) OAH WATCHDOG
QSH INT PENDING OSH INT PENDING OTHER SFRS IN WSR
OSH INT MASK OSH INT MASK 15 BECOME READABLE
IF THEY WERE WRITABLE
07H SBUF(RX) 07H SBUF(TX) INWSR ~ o AND WRITABLE
06H HSI STATUS 06H HSO_COMMAND IF THEY WERE READABLE
INWSR ~ 0
05H HSI_TIME (HI) OSH HSO_TIME (HI)
04H HSI_TIME (LO) 04H HSO_TIME (LO)
03H AD_RESULT (HI) 03H HSI MODE
02H ·AD RESULT (LO) 02H AD COMMAND
01H ZERO REG (HI) 01H ZERO REG (HI)
OOH ZERO REG (LO) OOH ZERO REG (LO) NOTE:
1. Reserved registers should not be wntten.
WHEN READ WHEN WRITTEN
WSR ~O
4-178
inter 87C198/87C194
STATUS:
X
0= AID CURRENTLY IDLE
1 = CONVERSION IN PROCESS
Il3 -
I--
X
CHANNEL # SELECTS WHICH OF THE 4
ANALOG INPUT CHANNELS IS TO BE
CONVERTED TO DIGITAL FORM.
270899-5
.....
X
270899-6
-0
o
ADDRESS VALID STROBE SELECT o
(ALEI ADV)
o
(IRCO) } INTERNAL READY CONTROL o
(IRC1) MODE .
270899-8
(LOCO) }
(LOC1) PROGRAM LOCK MODE
270899-7
17 S 15 41 3 2 11 10 1
HSI.O MODE L HSI.O STATUS
L----HSI.1 MODE HSI.1 STATUS
' - - - - - - - H S I . 2 MODE HSI.2 STATUS
......- - - - - - - - H S I . 3 MODE HSI.3 STATUS
WHERE EACH 2 - BIT MODE CONTROL FIELD WHERE FOR EACH 2 - BIT STATUS FIELD THE LOWER
DEFINES ONE OF 4 POSSIBLE MODES: BIT INDICATES WHETHER OR NOT AN EVENT HAS
OCCURED ON THIS PIN AND THE UPPER BIT INDICATES
00 B POSITIVE TRANSITIONS THE CURRENT STATUS OF THE PIN.
01 EACH POSITIVE TRANSITION 270899-10
10 EACH NEGATIVE TRANSITION
11 EVERY TRANSITION
(POSITiVE AND NEGATiVE)
270899-9
4-179
87C198/87C194
tNT_PEND/tNT_MASK (09H/OSH)
SP_CON (11H)
BIT.1, BI.1.O SPECIFY THE MODE
0 X
O.O=MODEO 1.0 = MODE 2
0.1 =MODE 1 1.1 =MODE3 X
270899-13 270899-14
,4·180
87C198/87C194
4-181
87C198/87C194
Operating Conditions
Symbol Description Min Max Units
TA Ambient Temperature Under Bias 0 +70 °C
Vee Digital Supply Voltage 4.50 5.50 V
NOTE:
ANGND and Vss should be nominally at the same potential.
NOTE:
1. All pins except RESET and XTAL 1.
2. Holding these pins below VIH in Reset may cause the part to enter test modes.
4-182
inter 87C198/87C194
IpD Powerdown Mode Current 5 50 /-LA Vee = Vpp ;,. VREF = 5.5V
NOTES: ,
(Notes apply to all specifications)
1. Standard Olltputs include ADO-15, RD, WR, ALE, INST, HSO pins, PWM/P2.5, RESET, Ports 3 and 4, TXD/P2.0, and
RXD (in serial mode 0). The VOH specification is not valid for RESET. Ports 3 and 4 are open-drain outputs.
2. Standard Inputs include HSI pins, EA, READY, RXD/P2.1, EXTINT/P2.2, T2CLK/P2.3, and T2RST/P2.4.
3. Maximum current per pin must be externally limited to the following values if VOL is held above 0.45V or VOH is held
below Vee - 0.7V:
IOL on Output pins: 10 mA
IOH on Standard Output pins: 10 mA
4. Maximum current per bus pin (data and control) during normal operation is ±3.2 mAo
5. During normal (non-transient) conditions the following total' current limits apply:
HSO, P2.0, RXD, RESET IOL: 29 rnA IOH: 26 rnA
P2.5, WR IOL: 13 rnA IOH: 11 rnA
ADO-AD15 IOL: 52 rnA IOH: 52 rnA
RD, ALE, INST IOL: 13 rnA IOH: 13 rnA
6. Typicals are based on a limited number of samples and are not guaranteed. The values listed are at room temperature
and VREF = Vee = 5V.
, 60 r----,---,..--.,
Icct.lAX
50~----+------r--~~
ICC 30 ~----+-~"'---j;,~---l
mA
o~-~~--~--~
4t.lHz 8t.lHz 12t.lHz
ICC Max = 3.88 x FREQ + 8.43 F'REQ
IIDLE Max = 1.65 X FREQ + 2.2 270899-22
4~183
87C198/87C194
A.C. Characteristics
For use ~)VE!r specified operating conditions
Test Conditions: Capacitive load on all pins = 100 pF, Rise and 'fall times = 10 ns, fose = 12 MHz
The system must meet these specifications to work with the 87C198:
Symbol Description Min Max Units Notes
TAVYV Address Valid to Ready Setup ~
2Tose - 85 ns
TLLYV ALE Low to READY Setup . Tos~ - 70 , ns
TYLYH Non READY Time No upper limit ns
TLLYX READY Hold after ALE Low Tose - 15 2Tose - 40 ns (Note 1)
NOTES:
1. If max is exceeded, additional wait states will occur.
2. When using wait states, add 2T OSC x n, where n = number of wait states.
",' I,:'
4·184
87C198/87C194
A.C. Characteristics
For use over specified operating conditions
Test Conditions: Capapitive load on all pins = 100 pF, Rise and fall times = 10 ns, fose = 12 MHz
NOTES:
1. Testing performed at 3.5 MHz. However, the part is static by design and will typically operate below 1 Hz.
2. Typical specification, not guaranteed.
3. Assuming back-to-back bus cycles.
4. When using wait states, add 2Tase x n, where n = number of wait states.
4-185
87C198/87C194
XTAL1
ALE
--1
, tLHLH
J
I-- tLHLL- I-- tLLRL- f.-- tRLRH ---I-- tRHLH .....
\ I
r-- t AVLL -
f.- tLLAX
tRLDV
~
BUS --(
I--
ADDRESS OUT
tAVDV I
>---<.1 DATA »»)~,
~ tWLWH - :
I--tWHLH .....
I-- t LLWL
I--tOVWH
tWHo~1
BUS -< . ADDRESS OUT ,}'I..( DATA OUT. }X( ADDRESS
I I
I-tRHBX..,
tWHBX
BHE,INST VALID
I-tRHAX..,
tWHAX
270899-23
4,186
inter 87C198/87C194
XTAL1
ALE
READY
_~~~~~~~~~~~~~~~~_~:.:~~-----tw-L-W-H-+-2-T-os-e--4
--j,._ _ _ _ _ _ __
,. 1-01·>---- t QVWH + 2 Tose ~
~--A-D-DR-E-SS-OU-T--.u)~~(~-----D-AT-A-O-U-T------JX~__A_DD_R_ES_S__
I
270899-24
4·187
87C198/87C194
270899-25
An external oscillator may encounter as much as a 100 pF load at XTAL 1 when it starts-up. This is due to
interaction between the amplifier. and its feedback capacitance. Once the external signal meets the VIL and
VIH specifications the capacitance will not exceed 20 pF.
2.4
0: 45
-V
.--A
2.0> TEST POINTS
0.8
< 2.0
0.8 .
>C VLOA O+O.20V
vLOAO
----
r-------_
"",-----TIMING REFERENCE...___
POINTS
VLOAO-O.20V - - - - - - - - -
-...........
270899-26
A.C. Testing inputs are driven at 2.4V for a LogiC "1" and 0.45V 270899-27
for a LogiC "0" Timing measurements are made at 2.0V for a For Timing Purposes a Port Pin is no Longer Floating when a
LogiC "1" and 0.8V for a LogiC "0". 200 mV change from Load Voltage Occurs and Begins to Float
when a 200 mV change from the Loaded VOHIVOl Level occurs
IOl/loH ~ ± 15 mAo
EXPLANATION OF AC SYMBOLS
Each symbol is two pairs of letters prefixed by "T" for time. The characters in a pair indicate a signal and its
condition, respectively. Symbols represent the time between the two signal/condition points.
Conditions: Signals:
H High A - Address
L - Low D - DATA IN
V Valid L - ALE/ADV
X No Longer Valid Q - DATA OUT
Z Floating R RD
W WR
X - XTAL1
Y READY
inter 87C198/87C194
EPROM SPECIFICATIONS
NOTES:
1. Run Time Programming is done with Fosc = 6.0 MHz to 12.0 MHz, VREF = 5V ± 0.65V. TA = + 25°e to ± 5°C and
Vpp = 12.75V. For run-time programming over a full operating range, contact the factory.
NOTE:
Vpp must be within 1V of Vee while Vee < 4.5V. Vpp must not have a low impedance path to ground or Vss while
Vee> 4.5V.
4·189
inter 87C 198/8,7C 194
SLAVE PROGRAMMING MODE DATA PROGRAM MODE W.ITH SINGLE PROGRAM PULSE
3/<
PORTS --t--~~$~~~
PVER
270899-28
SLAVE PROGRAM MODE IN WORD DUMP OR DATA VERIFY MODE WITH AUTO INCREMENT
.. I.
270899-29
SLAVE PROGRAMMING MODE TIMING IN DATA PROGRAM MODE WITH REPEATED PROG PULSE
AND AUTO INCREMENT
PVER
tPHIL
270899-30
4-190
87C198/87C194
270899-31
4-191
inter 87C198/87C194
The converter is ratio metric, so the absolute The 87C194 does not have an AID converter.
accuracy is directly dependent on the accuracy and
NOTES:
'An "LSB", as used here, has a value 01 approximately 5 mY.
1. Typical values are expected lor most devices at 25°e but are not tested or guaranteed.
2. De to 100 KHz.
3. Multiplexer Break-Belore·Make Guaranteed.
4. One state = 167 ns at 12 MHz, 250 ns at 8 MHz.
4-192
inter 87C198/87C194
4-193
MCS®-96
87C196KB/83C196KB/80C196KB
Express
The Intel EXPRESS system offers enhancements to the operational specifications of the MCS®:96 family of
microcQntroliers. These EXPRESS products are designed to meet the needs of those applications whose
operating requirements exceed commercial standards.
The EXPRESS program includes an extended temperature range with orwithout burn-in, depending on the package
type.
With the commercial standard temperature range operational characteristics are guaranteed over the temper-
ature range of O°C to +' 70°C. With the extended temperature range option, operational characteristics are
guaranteed over the range of - 40°C to +' 85°C.
The optional burn-in is dynamic, for a minimum time of 160 hours at 125°C with Vcc = 5.5V ± 0.5V, following
guidelines in MIL-STD-883, Method 1015. .
Package types and EXPRESS versions are identified by a one- or two-letter prefix to the part number. The
prefixes are listed in Table 1.
This data sheet specifies the parameters for the extended temperature range option. The commercial temperature
range data sheets including functional deviations are applicable otherwise.
VREF ANGND
CONTROL
SIGNALS
PORT 3
} ~f~:
BUS
PORT 4
~
270590-1
Intel Corporation assumes no responsibilityforthe use of any circuitry other than circuitry embodied in an Intel product. No other circuit
patent licenses are implied. Information contained herein supersedes previously published specifications on these devices from Intel.
August 1989
© l[ltel Corporation, 1987 Order Number: 270780-002
4-194
8XC196KB,EXPRESS
Table 2. Thermal'Cllaracteristlcs
4·195
~[Q)W~[NJ©~ n[NJlF(Q)lRlfl~un©[f.!]·
8XC196KBEXPRESS , ,~
EXPRESS PACKAGING
The 80C196KBITB and 83C196KBITB are available in a 68~pin PLCC package. In addition, the80C196KBITB is
available in a 68-pin PGA package. The 87C196KB is only available in a 68-pin LCC package.
1 9 ACH7/PO.7 24 54 AD6/P3.6 47 31
--
P1.6/HLDA
2 8 ACH6/PO.6 25 . 53 AD7/P3.7 48 30 P1.5/BREQ
3 7 ACH2/PO.2 26 52 AD8/p4.0 49 29 HSO.1
4 6 ACHO/PO.O 27 51 . AD9/P4.1 50 28 HSO.O
5 5 ACH1/pO.1 28 50 AD10.P4.2 51 27 HSO.5/HSL3
6 4 ACH3/PO.3 29 49 AD11/P4.3 52 26 HSO.4/HSL2
7 3 NMI 30 48 AD121P4.4 53 25 HSL1
8 2 EA 31 47 AD13/P4.5 54 24 HSLO
9 1 Vee 32 46 AD14/P4.6 55 23 P1.4
10 68 Vss 33 45 AD15/P4.7 56 22 P1.3
11 67 XTAL1 34 44 T2CLKlP2.3 57 21 P1.2
12 66 XTAL2 35 43 READY 58 20 P1.1
13 65 CLKOUT 36 42 T2RST/P2.4/AINC 59 19 P1.0
14 64 BUSWIDTH 37 41 BHElWRH 60 18 TXD/P2.0
15 63 INST 38 40 WRIWRL 61 17 RXD/P2.1
16 62
-
ALE/ADV 39 39 PWM/P2.5 62 16 RESET
17 61 RD' 40 38 P2.71T2CAPTURE/PACT
-- 63 15 EXTINT/P2.2
18 60 ADO/P3.0 41 37 Vpp 64 14 Vss
(1)
9 8 7 6 5 4 3 2 1 68 67 66 65 64 63 62 61
ACH5/PO,5 10 AOO/P3,0
ACH4/PO,4 A01/P3,1
ANGND AD2/P3,2
V REf AD3/P3,l
'VSS
MCS®-9.6 AD4/P3.4
EXTINT/P2,2 68 PIN AD5/P3,5
RESET PLCC AD6/P3,6
RXO/P2,1 AD7/P3,7
TXO/P2,0 AD&/R4,0
P1.0 AD9/P4,1
P1.1 TOP VIEW AD10/P4.2
P1.2 ADll/PO
LOOKING DOWN ON
P1.3 ADI2/P4,4
P1.4
COMPONENT SIDE ADI3/P4,5 '
HSIO OF PC BOARD AD14/P46
HSll AD15/P4.7
H512/H504 , 44 T2CLK/P2,3
272,8 29 30 31 323334 35 36 37 38 3& 40 41 42 43
270634-2
.... co NO ....
c:i c:i c:i c::i c:i c:i
~~.e::..e::.~~
.... co N O .... I")
...,
N
..
::>
:t
Q I~
.." .." ." "..
:>: :>: :>: :>: :>: :>:
~ ~
Vl~
'i I~ ~ '"
z > > x . ~ d.
-' 0
~ Iii
::>
l!:
"~ 1~
;'1 2 3 4 5 6 7 1011 12 13 14 15 16 17 L
ACH5/PO,5 68 18 ADO/P3,0
ACH4/PO.4 67
68 PIN AD1/P3,1
19
ANGND 66 LEADLESS CHIP CARRIER 20 AD2/P3,2
VREF 65 TYPE "S" 21 AD3(P3,3
v88 64 22 AD4/P3.4
EXTINT/P2,2 63 23 ADS/P3,5
RE5ET 62 ' 24 AD6/P3,6
0
RXO/P2,1 61 25 A07/P3,7
TXD/P2,0 60 26 A08/P4,0
PLO 59 27 AD9/P4,1
Pt.1 58 28 A010/P4,2
P1.2 57 29 A011/PO
P1.3 56 30 AD12/PU
P.l.4 55 31 A013/P4,5
H51.0 54 (EPROM ONLY) 32 A014/P4,6
H51,1 53 TOP VIEW 33 , A015/P4,7
H51.2/H50.4 52 34 T2CLK/P2,3
., 51 50 49 48 47 46 45 44 43 4241 40 39 38 37 36 35 r"
4-197
in1:el 8XC196KBEXPRESS
Operating Conditions
Symbol Description Min Max Units
TA Ambient Temperature Under Bias -40 +85 ·C
NOTE:
ANGND and Vss should be nominally at the same potential.
This Is an Advance Data Sheet. It is expected that parameters may change before Intel releases this
product for sale. Contact your local sales office before finalizing the Timing ,and D.C. Characteristics
section of a design to verify you have the latest information.
NOTE:
1. All pins except RESET and XTAL 1. ,
2. Holding these pins below VIH in Reset may cause the part to enter test modes.
4-198
inl:el 8XC196KB EXPRESS
NOTES:
(Notes apply to all specifications)
1. QSD (Quasi-bidirectional) pins include Port 1, P2.6 and P2.7. "
2. Standard Outputs include ADO-15, RD, WR, ALE, SHE, INST, HSO pins, PWM/P2.5, CLKOUT, RESET, Ports 3 and 4,
'TXD/P2.0, and RXD (in serial mode 0). The V.Qt! specification is not valid for RESET. Ports 3 and 4 are open-drain outputs.
3. Standard Inputs include HSI pins, CDE, EA, READY, SUSWIDTH, NMI, RXD/P2,1, EXTINT/P2.2, T2CLK/P2.3, and
T2RST IP2.4.
4. Maximum current per pin must be externally limited to the following values if VOL is held above 0.45V or VOH is held
below Vee - 0.7V:
IOL on Output pins: 10 mA
IOH on quasi-bidirectional pins: self limiting
IOH on Standard Output pins: 10 mA
5. Maximum current per bus pin (data and control) during normal operation is ±3.2 mAo
6. During normal (non-transient) conditions the following total current limits apply:
Port 1, P2.6 IOL: 29 mA IOH is self limiting
HSO, P2.0, RXD, RESET IOL: 29 mA IOH: 26 mA
P2.5, P2.7, WR, SHE IOL: 13 mA IOH: 11 mA
ADO-AD15 IOL: 52 mA IOH: 52 mA
RD, ALE, INST -CLKOUT IOL: 13 mA IOH: 13 mA .
7. Typicals are based on a limited number of samples and are not guaranteed. The values listed are at room temperature
and VREF = Vee = 5V.
6. Ipo is not guaranteed on the standard 60C196KS part and may exceed 100 IJ.A on some parts. Customers whos.e applica-
tions use the powerdown mode and require a guaranteed maximum value of Ipo should contact an Intel Field Sales Repre-
sentative.
60r------r-----,r-----~
ICC 30 f-------+-~fL-__j"""'----_j
rnA
20 f--___..::t-,"""''----c:J.....=---_jI,OLE MAX
10 f-----'9------If--:=:..-lIIDLE lYPICAL
O~----~----~~----~
ICC Max = 3.88 X FREO + 8.43 4MHz 8MHz 12MHz
4-199
inter 8XC196KB 'EXPRESS
A.C. CHARACTERISTICS
For use over specified operating conditions
Test Conditions: Capacitive. load on. all pins'; 100 pF, Rise and fall times = 10 ns, fosc = 12 Mhz
NOTE:
1. If max is exceeded, additional wait states will occur.
2. When using wait states, add 2Tosc x n where n = number of wait states.
4·200
8XC196KB EXPRESS
A.C. CHARACTERISTICS
For use over specified operating conditions ,
TestConditions: Capacitive load on all pins = 100 pF, Rise and fall.times = 10 ns, fosc =,12 Mhz
Tosc 1/FXTAL
80C 196KB12/83C 196KB 12 83 286
87C196KB10 100 286
T XHCH XTAL 1 high to CLKOUT high or low Note 2
80C196KB12/83C196KB12 35 110
87C196KB10 40 130
T CLCL CLKOUT cycle time 2Tosc
T CHCL CLKOUT high time Tosc-10 Tosc+10
4-201
8XC196KB EXI:>RESS
NOTES:
1. Testing performed at 3.5 MHz. However, the device is static by design and will typically operate below 1 Hz.
2. Typical specification, not guaranteed.
3. Assuming.l;>ack-to-back bus cycles.
4. When using wait states, add 2 Tosc x n where n =number of wait states.
4-202
intel 8~C196KB EXPRESS
XTALl
CLKOUT
ALE
BHE,INST VALID
4-203
aXC196KB EXPRESS
_TAVYV_
TRLRH + 2Tose
READ
T RLDV,+ 2Tose
TAVDV+ 2Tose
~.
~
TWLWH+ 2Tose
WRITE
TOVWH+ 2Tose
4·204
8XC196KB EXPRESS
Buswidth Timings
XTAL1
CLKOUT
ALE
BUSWIDTH
~TAVGV
BUS -{ ADDRESS OUT )~~(~_ _D_AT_A-J)~-------
4-205
inler aXC196KB EXPRESS
HOLD/HLDA Timings
-- ,
THVCH HOLD Setup 90 ns 1
--
CLKOUT Low to HLDA Low -15 15 ns
TCLHAL
NOTES':
1, To guarantee recognition at next clock,
CLKOUT
HOLD
LATENCY
HOLD
HLDA
TCLHAL_
-- TCLHAH_
--
BREQ
TCLBRH-
--
BUS
THAHAX---
--
BHE, THAHBV
\ I
INST
' I
n
\
Ro,WR
TCLLH
ALE.f\
{
II
, II
{ ,
4-206
8XC196KB EXPRESS
270634-18
An external oscillator may encounter as much as a 100 pf load at XTAL 1 when it starts-up. This is due to interaction
between the amplifier and its feedback capacitance. Once the external signal meets the V' I and V' h specifications,
the capacitance will not exceed 20pf. ' I I
2,4=X
0.45
, ' 2 . 0 > TEST POINTS
. 0.8
<' 2.0
0.8 .
>C
270634-19
A.C, Testing inputs are driven at 24V for a Logic "1" and 0.45V 270634-20
for a Logic "0" Timing measurements are made at 2,OV for a For Timing Purposes a Port Pin is no Longer Floating when a
Logic "1" and 0,8V for a Logic "0", 100 mV change from Load Voltage Occurs and Begins to Float
when a 100 mV change from the Loaded VOHIVOL Level occurs
IOL/IOH = ± 15 mA.
EXPLANATION OF AC SYMBOLS
Eachsymbol is two pairs of letters prefixed by"T" fortime. The characters in a pair indicate a signal and its condition,
respectively. Symbols represent the time between the two signal/condition points.
Conditions: Signals:
H - High A - Address G - Buswidth R - RD
L - Low B - BHE H - HOLD W - WRIWRHIWRL
V - Valid BR - BREQ HA - HLDA X - XTAL1
X - No Longer Valid C - CLKOUT L - ALElADV Y - READY
Z - Floating D - DATA IN Q - DATA OUT
4-207
8XC196KB EXPRESS
270634-21
4-208
ifltel 8XC196KB EXPRESS
NOTES:
'An "LSB", as used here, has a value 01 approximately 5 mY.
1. Typical values are expected lor most devices at 25°C but are not tested or guaranteed.
2. DC to 100 KHz.
3. Multiplexer Break-Belore-Make Guaranteed.
4. One state = 167 ns at 12 MHz, 333 ns at 6 MHz.
4-209
inter 8XC196KB EXPRESS
4-210
I ":nti Wd ci :1 4'1+' 'Ii i (1)@':il)iriP)
EV80C196KB FEATURES
• Zero Walt-State 12 MHz Execution Speed
• 24K Bytes of ROMsim
• Flexible Wait-State, Buswidth, Chip-Select Controller
• Totally CMOS, Low Power Board
• Concurrent Interrogation of Memory and Registers
• Sixteen Software Breakpoints
• Two Single Step Modes
-. High-Level Language Support
• Symbolic Debug
• RS-232-C Communication Link
LOW COST CODE EVALUATION TOOL
Intel's EV80C196KB evaluation board provides a hardware environment for code
execution and software debugging at a relatively low cost. The board features the
80C196KB advanced, CHMOS*, 16-bit microcontroller, the newest member of the
industry standard MCS®-96 family. The board allows the user to take full advantage of
the power of the MCS-96. The EV80C196KB provides zero wait-state, 12 MHz execution
of a user's code. Plus, its memory (ROMsim) can be reconfigured to match the user's
planned memory system, allowing for exact analysis of code execution speeds in a
particular application.
"CHMOS IS a patented Intel process
UIBM PC, XT, AT <lod DOS are regl(:.tered trddemarks of International Busme!>s Mathmes Corporalion
4-211
P~pular features such as a symbolic single, line assembler / disassembler, si~gle-step'
p~ogram exec(ltion, ,and sixteen software breakpoints are standard on the EV80C196KB.
Intel provides a c,omplete code development environment using assembler (ASM-96) as
Well as high-level languages such as Intel's iC-96 or PL/M-96 to accelerate development
schedules. "
24KBYTES OF ROMSIM
the board comes with 24K bytes of SRAM to be used as ROMsim for the user s code and
as data memory if needed. 16K bytes of this memory are configured as sixteen bits wide,
and 8K bytes are configured as eight bits wide. The user can therefore evaluate the speed
of the part executing from either buswidth. '
4-212
TWO STEP MODES
There are two single-step modes available. The first stepping mode locks out all
interrupts which might occur during the step. The second mode enables interrupts, and
treats subroutine calls and interrupt routines as one indivisible instruction.
SYMBOLIC DEBUG
The host has a Single Line Assembler, and a Disassmbler, which recognize symbolics
generated by Intel software tools.
PI
RS·232
ClFSELECT
BUFFERS
BUSWDIli
8OCI96KB READY
CPU
LOGIC
P2
T.d
R.d ADDRESS
l I ~ ...
82510
ANALOG INPUT 8to32K 8to32K 8to32K UART
,-
PortO DATA
ANALOG x16 .16 .8
DIGITAL RAMEPROM RAMEPROM RAMEPROM
DIGITAL 110 110 CONTROL
Port 1,2 '----
*
HSO,HSI
4-213
"'.'
80C196KC, User's Guide 5
and Data Sheets
October 1990
80C196KC
User's Guide
5-2
CONTENTS PAGE CONTENTS PAGE
The 80C196KC family is a CHMOS branqh of the There are many members of the 80C196KC family; to
MCS®-96 family of high performance, 16-bit microcon- provide easier reading this manual will refer to the fam-
trollers. Other members of the MCS-96 family include ily ge~erically as the 80Ct96KC. Where information
the 8096BH, 8098 and 80C196KB. All of the MCS-96 applies only to specific components it will be clearly
components share a common instruction set and archi- indicated.
tecture. However the CHMOS components have en-
hancements to provide higher performance and lower This document was written to be a standalone users'
power consumptions. The .80C196KC has twice the guide for anyone wishing to implement a design with
memory of any previous MCS-96 family member with the 80C196KC. Those customers who are already fa-
488 bytes of RAM and 16K of ROM/EPROM, and at miliar with the 80C196KB architecture can proceed to
16 MHz, is 33% faster thanari 80C196KB at 12 MHz section 18 for a description of the additional features of
and at least twice as fast as an 8096BH at 12 MHz. the 80C 196KC. Section 18 also contains the informa-
Because some instructions operate in fewer clock cycles tion needed to convert an 80C196KB design to a
than an NMOS device, the 80C196KC can be as much 80C196KC.
as 2.5-3X the performance of an NMOS device.
V r ANGND
CONTROL
SIGNALS
PORT 3
} ~~~:
BUS
PORT 4
1+--+-
~~]::=+:::
L PWM1
PWM2
HSO
270704-1
5-4
inter 80C196KC USER'S GUIDE
The CPU on the 80CI96KC is 16 bits wide and con- REGISTER! ALU (RALU)
nects to the interrupt controller and the memory con-
troller by a 16-bit bus. In addition, there is an 8-bit bus Most calculations performed by the 80Cl96KC take
which transfers instruction bytes from the memory con- place in the RALU. The RALU, shown in Figure 1-2,
troller to the CPU. An extension of the 16-bit bus con- contains a l7-bit ALU, the Program Status Word
nects the CPU to the peripheral devices. (PSW), the Program Counter (PC), a loop counter, and
three. temporary registers. All of the registers are 16-
bits or 17 -bits (16 + sign extension) wide. Some of the
1.1 Memory Controller registers have the ability to perform simple operations
to off-load the ALU.
The RALU accesses the memory, except for the loca-
tions in the register file and SFR space, through the A separate incrementor is used for the Program Coun-
memory controller. Within the memory controller is a ter (PC) as it accesses operands. However, PC changes
bus controller, a four byte prefetch queue and a Slave due to jumps, calls, returns and interrupts must be han-
Program Counter (Slave PC). Both the internal ROM/ dled through the ALU. Two of the temporary registers
EPROM bus and the external memory bus are driven have their own shift logic. These registers are used for
by the bus controller. Memory access requests to the the operations which require logical shifts, including
bus controller can come from either the RALU or the Normalize, Multiply, and Divide. The "Lower Word"
queue, with queue accesses having priority. Requests and "Upper Word" are used together for the 32-bit
from the queue are always for data at the address in tl;ie instructions and as temporary registers for many in-
slave PC. structions. Repetitive shifts are counted by the 6-bit
"Loop Counter".
By having program fetches from memory referenced to
the slave PC, the processor saves time as addresses sel- A third temporary register stores the second operand of
dom have to be sent to the memory controller. If the two operand instructions. This includes the multiplier
address sequence changes because of a jump, interrupt, during multiplications and the divisor during divisions.
call, or return, the slave PC is loaded with a new value, To perform subtractions, the output of this register can
the queue is flushed, and processing continues. be complemented before being placed into the "B" in-
put of the ALU.
Execution speed is increased by using a queue since it
usually keeps the next instruction byte available. The Several constants, such as 0, I and 2 are stored in the
instruction execution times shown in Section 3 show RALU to speed up certain calculations. (e.g. making a
the normal execution times with no wait states added 2's complement number or performing an increment or
and the 16-bit bus selected, Reloading the slave PC and decrement instruction.) In addition, single bit masks for
fetching the first byte of the new instruction stream bit test instructions are generated lin the constant regis-
takes 4 state times. This is reflected in the jump taken/ ter based on the 3-bit Bit Select register.
not-taken times shown in the table.
When debugging code using a logic analyzer, one must 1.3 Internal Timing
be aware of the queue. It is not possible to determine
when an instruction will begin executing by simply The 80Cl96KC requires an input clock on XTALl to
watching when it is fetched, since the queue is filled in function. Since XTALl and XTAL2 are the input and
advance of instruction execution. output of an inverter a crystal can be used to generate
the clock. Details of the circuit and suggestions for its
use can be found in Section 14. ,
1.2 CPU Control
Internal operation of the 80C196KC is based on the
A microcode engine controls the CPU, allowing it to crystal or external oscillator frequency divided by 2.
perform operations with any byte, ,word or double word Every 2 oscillator periods is referred to as one "state
in the 256 byte register space. By using the VWindow- time", the basic time measurement for all 80C196KC
ing scheme discussed in Section 3-3, the additional 256 operations. With a 16 MHz oscillator, a state time is
bytes of RAM can also be used as registers. Instruc- 125 nanoseconds. Since the 80CI96KC will be run at
tions to the CPU are taken from the queue and stored many frequencies, the times given throughout this
temporarily in the instruction register. The microcode chapter will be in state times 01: "states", unless other-
engine decodes the instructions and generates the cor- wise specified. A clock out (CLKOUT) signal, shown
rect sequence of events to have the RALU perform the in Figure 1-3, is provided as an indication of the inter-
desired function. Figure 1-2 shows the memory control- nal machine state. Details on timing relationships can
ler, RALU, instruction register and the control unit. be found in Section 14.
5-5
(
Master
Pro9ram Counter
w/Incrementer Memory
::!! Bus
co
c
.... Upper word
ID
.... register
w/shifter
~ RAM
lJ
»
I""
Lower word
register
011
C
C w/shlfter (')
I»
j "*
CO
Q. CD
,Processor
s:
ID
3
Register
FlIe~ Status
Word
"c::
(')
m '<0... en
01
and
m
0 Special II
0
......
j Function
Registers
enC)
2- --r-- _ CPU s:c
...
is Control
and Status m
til
0' Signals
(') RAM &: SFR
71:' Control
!2
!II
Registers
CQ ~
3iill
16
CPU BUSES
1
8
270704-2
,/
80C196KC USER'S GUIDE
2040H
2.2 Spec;ial Function Registers
UPPER INTERRUPT VECTORS
Locations OOH through 17H are the I/O control regis-
2030H
ters or SFRs. All of the peripheral .devices on the
ROM/EPROM SECURITY KEY
2020H
80CI96KC (except Ports 3 and 4) are controlled
RESERVED
through the SFRs. As shown in Figure 2-2, three hori-
20l9H zontal windows (HWindows) are provided on the
CHIP CONFIGURATION BYTE 80CI96KC to increase SFR space while remaining up-
201BH ward compatible. with earlier MCS-96 products.
RESERVED' Switching between Horizontal Windows is discussed in
20l4H Section 3.3.
LOWER INTERRUPT VECTORS
2000H
HWindow 0 is a superset of the SFR space on the
PORT 3 AND PORT 4
8096BH and identical to the 80C196KB. As depicted in
lFFEH
Figure 2-2, it has 24 registers, some of which have dif-
EXTERNAL MEMORY
200H
ferent functions when read than when written.
, ADDITIONAL RAM
100H HWindow I contains the additional SFRs needed to
REGISTER FILE AND support the added functionality of the 80C196KC.
EXTERNAL PROGRAM MEMORY These SFRs support the Peripheral Transaction Server
o (PTS), the two new PWMs, Timer2, and the new func-
tions of the A/D converter. These registers are not
Figure 2-1. 80C196KC Memory Map needed to remain compatible with the 80C196KB. All
SFRs are read/writable in this window.
5-7
inter 80C 196KC, USER'S GUIDE
In register HWindow 15, the operation of the SFRs is labeled should be treated as reserved registers and bits.
changed, so that those which were read-only in HWin- Note that the default state of internal registers is 0,
dow, 0 space are write-only and vice versa. The only while that for external memory is 1. This is because
major exception is Timer2 is read/write in HWindow 0, SFR functions are typically disa,bled with a zero, while
and T2 Capture is read/write in HWindow 15. Timer2 external memory is typically erased to allis.
was read-only on the 8096BH.
Caution must be taken when using the SFRs as sources
Figure 2-3 contains brief descriptions of the SFR regis- of operations or as base or index registers for indirect or
ters. Detailed descriptions are contained in the seCtion indexed operations. It is possible to get undesired re-
which discusses the peripheral controlled by the regis- sults, since external events can change SFRs and some
ter. Figure 2-4 contains a description of the alternate SFRs clear when read. The potential for an SFR to
function in HWindow 15. change value must be taken into account when operat-
ing on these registers. This is particularly important
Within the SFR space are several registers and bit loca- when high level languages are used as they may not
tions labeled "RESERVED". A reserved bit location make allowances for SFR-type registers. SFRs can be
must always be written with 0 to maintain compatibil- operated on as bytes or words unless otherwise speci-
ity with future parts. Registers and bits which are not fied.
NOTE:
'This was previously called T2CONTROL or T2CNTC.
5-8
80C196KC USER'S GUIDE
Register Description
RO Zero Register· Always reads as a zero, useful ,for a base when indexing and as a
constant for calculations and compares.
AD_RESULT AID Result Hillow • low and high order results of the A/D converter
AD_COMMAND A/D Command Register· Controls the A/D
HSI_MODE HSI Mode Register· Sets the mode of the High Speed Input unit.
HSI_TIME HSI Time Hillo • Contains the time at which the High Speed Input unit was triggered.
HSO_TIME HSO Time Hillo· Sets the time or count for the High Speed Output to execute the
command in the Command Register.
HSO_COMMAND HSO Command Register· Determines what will happen at the time loaded into the
HSO Time registers.
HSI_STATUS HSI Status Registers· Indicates which HSI pins were detected at the time in the HSI
Time registers and the 'current state of the pins.
SBUF(TX) Transmit buffer for the serial port, holds contents to be outputted.
SBUF(RX) Receive buffer for the serial port, holds the byte just received by the serial port.
INT_MASK Interrupt Mask Register· Enables or disables the individual interrupts.
INT_PEND Interrupt Pending Register· Indicates that an interrupt signal has occurred on one of
the sources and has not been serviced. (also INT_PENDING)
WATCHDOG Watchdog Timer Register· W'ritten periodically to hold off automatic reset every 64K
state times.
TIMER1 Timer 1 Hilla· Timer1 high and low bytes.
TIMER2 Timer 2 Hilla· Timer2 high and low bytes.
10PORTO
BAUD_RATE
IOPORT1
Port 0 Register· levels on pins of Port O.
Register which determines the baud rate, this register is loaded sequentially.
Port 1 Register· Used to read or write to Port 1,
II
IOPORT2 Port 2 Register. Used to read or write to Port 2.
SP_STAT Serlal Port Status· Indicates the status of the serial port.
SP_CON Serial Port Control· Used to set the mode of the serial port.
10SO I/O Status Register 0 . Contains information on the HSO status.
IOS1 I/O Status Register 1 • Contains information on the status of the timers and of the
HSI.
lOCO I/O Control Register O· Controls alternate functions of HSI pins, Timer 2 reset
sources and Timer 2 clock sources.
IOC1 I/O Control Register 1 • Controls alternate functions of Port 2 pins, timer interrupts
and HSI interrupts.
PWM_CONTROl Pulse Width Modulation Control Register· Sets the duration of the PWM pulse.
Figure 2·3. Special Function Register Description
5·9
inter 80C196KC USER'S GUIDE
Register Description
INT_PEND1 .Interrupt Pending register for the 8 new interrupt vectors (also INT_PENDING1)
INT_MASK1 Interrupt Mask register for the 8 new interrupt vectors
IOC2 1/0 Control Register 2
IOS2 1/0 Status Register 2 - Contains information on HSO events
WSR Window Select Register - Selects register window
AD_TIME Determin~s AID Conversion Time
IOC3 New 80C196KC features (T2 internal clocking, PWMs) (PreviOusly T2CONTROL or
T2CNTC)
PTSSEL Individually enables PTS channels
PTSSRV End-of-PTS Interrupt Pending Flags
Figure 2-3. Special Function Register Description (Continued)
Being able to write to the read-only registers and vice-versa provides a lot of flexibility. One of the most useful
advantages is the ability to set the timers and HSO lines for initial conditions other than zero.
5-10
inter 80C196KC USER'S GUIDE
Instruction and data fetches from the internal ROM or C-96 USER'S GUIDE
EPROM occur only if EA is tied high, and the address Order Number 167632 (DOS Systems)
is' between 2000H and 5FFFH. At all other times data
is accessed from either the internal RAM space or ex- Throughout this chapter short sections of code are used
ternal memory and instructions are fetched from exter- to illustrate the operation of the device. For these sec-
nal memory. The EA pin is latched on RESET rising. tions it is assumed that the following set of temporary
Information on programming EPROMs can be found registers has been declared:
in Section 17 of this manual. AX, BX, CX, and DX are 16-bit registers.
AL is the low byte of AX, AH is the high byte.
A security feature can lock the chip against reading
and/or writing the internal memory. In order to main- BL is the low byte of BX
tain security, code can not be executed out of the last CL is the low byte of CX
four locations of internal ROM/EPROM if the lock is
DL is the low byte of DX
enabled. Details on this feature are in Section 17.
These are the same as the mimes for the general data
registers used in the 8086. In the 80CI96KC these are
2.4 System Bus not dedicated registers but merely the symbolic names
There are several modes cif system bus operation on the assigned by the programmer to an eight byte region
SOC 196KC. The standard bus mode uses a l6-bit multi- within the on-board register file.
plexed address/data bus. Other bus modes include an
S:bit mode and a mode in which the bus size can dy-
namically be switched between 8-bits and l6-bits. '3.1 Operand Types
The MCS-96 architecture supports a variety of data
Hold/Hold Acknowledge (HOLD/HLDA) and Ready
types ,likely to be useful in a control application. To
signals are available to create a variety of memory sys-
avoid confusion, the name of an operand type is capital-
tems. The READY line extends the width of the RD
ized. A "BYTE" is an unsigned eight bit variable; a
(read) and WR (write) pulses to allow a~ess of slow
"byte" is an eight bit unit of data of any type.
memories. Multiple processor systems. with shared
memory can be designed using HOLD/HLDA. Details
on the System Bus are in Sections 15 and 16. BYTES
5-11
80C~96KC ,USER'S,GUIDE
5-12
80C196KC USER'S GUIDE
REGISTER·DIRECT REFERENCES
The register-direct mode is used to directly access a tion and the register address must conform to the oper-
register from' the 256 byte on-board register file. The and type's alignment rules. Depending on the instruc-
register is selected by an 8-bit field within the instruc- tion, up to three registers can take part in the calcula-
tion.
Examples
ADD AX,BX,CX AX:=BX+CX
MUL AX,BX AX:=AX*BX
INCB CL CL:=CL+l
INDIRECT REFERENCES
Th~ indirect mode is used to access an operand by plac- dress space of the 8OC196KC, including the register
ing its address in a WORD variable in the register file. file. The register which contains the indirect address is
The ,calculated address must conform to the alignment selected by an eight bit field within the instruction. An
rules for the operand type. Note that the indirect ad- instruction can contain only one indirect reference and
dress can refer to an operand anywhere within the ad- the remaining operands of the instruction (if any) must
be register-direct references.
Examples ,
LD ,AX, [AX] AX:=MEM_WORD(AX)
ADDB AL,BL, [CX] ,AL:=BL+MEM_BYTE(CX)
POP [AX]. MEM_WORD(AX)
:=MEM_WORD(SP)
SP:=SP+2
Examples
LD AX, [BX]+ AX:=MEM_WORD(BX) ; BX:=BX+2
ADDB AL,BL,[CX]+ AL:=BL+MEM_BYTE(CXI ; CX:=CX+l
PUSH [AX] + SP:=SP-2;
MEM_WORD(SP) :=MEM_WORD(AX)
AX::AX+2
IMMEDIATE REFERENCES
This addressing mode allows an operand to be taken GER operands the field is 16 bits wide. An instruction
directly from a field in the instruction. For operations can contain only one immediate reference and the re-
on-BYTE or SHORT-INTEGER operands this field is maining operand(s) must be register-direct references.
eight bits wide, for operations on WORD or INTE-
,Examples
ADD AX,#340 AX::AX+340
PUSH #1234H SP:=SP-2; MEM_WORD(SP) :=1234H
DIVB AX,#lO AL:=AX/10; AH::AX Mob 10
5-13
80C196KC USER'S GUID.E
SHORT-INDEXED REFERENCES
In this addressing mode an eight bit field in the instruc- Since the eight bit field is sign-extended, the effective
tion selects a WORD variable in the register file which address can be up to 128 bytes before the addres~ in the
contains an address. A second eight bit field in the in- WORD variable and up to 127 bytes after it. An in-
struction stream is sign-extended and summed with the struction can contain only one short-in!1exed reference
WORD variable to form the address of the operand and the remaining operand(s) must be register-direct
which will take part in the calculation. references.
ExamplE1s
LD AX,12[BX] AX:=MEM_WORD(BX+12)
MULB AX,BL,3[CX] AX:=BL*MEM_BYTE(CX+3)
LONG-INDEXED REFERENCES
This addressing mode is like the short-indexed mode struction can contain only one long-indexed reference
except that a J6-bit field is taken from the instruction and the remaining operand(s) must be register-direct
and added to the WORD variable to form the address references;
of the operand. No sign extension is necessary. An in-
Examples
AND AX,BX,TABLE[CX] AX:=BX AND MEM_WORD(TABLE+CX)
ST AX, TABLE [BX] MEM_WORD(TABLE+BX) :=AX
ADDB AL,BL,LOOKUP[CX] AL:=BL+MEM_BYTE(LOOKUP+CX)
The first two bytes in the register file are fixed at zero variable in a long-indexed reference. This combination
by the 80C196KC hardware. In addition to providing a of register selection and address mode allows any loca-
fixed source of the constant zero for calculations and tioll in memory to be addressed directly.
comparisons, this register can be used as the WORD
Examples
ADD AX,1234[0] AX:=AX+MEM_WORD(1234)
POP 5678[0] MEM_WORD(5678) :=MEM_WORD(SP)
SP:=SP+2
The system stack pointer in the 80Cl96KC is accessed accessed by using the stack pointer as the WORD vari-
as register 18H of the internal register file. In addition able in an indirect reference. In a similar fashion, the
to providing for convenient manipulation of the stack stack pointer can be used in the short-indexed mode to
pointer, this also facilitates the accessing of operands in access data within the stack.
the stack. The top of the stack, for example, can be
Examples
PUSH ESP] DUPLICATE TOP_OF_STACK
LD AX,2[SP] AX:=NEXT_TO_TOP
5-14
inter 80C196KC OSER'S GUIDE
5-15
inter 80C196KC USER'S GUIDE
01 EO 1:1
07
01COH 01COH
03
01AOH
06
0180H 0180H 0180H
0160H
05
0140H 0140H
02
0120H
04
0100H 0100H 0100H
WINDOWS
OOEOH
03
OOCOH DOCOH
01
OOAOH
02
0080H 0080H 0080H
0060H
0040H 0040H
0020H
OOOOH OOOOH OOOOH
5-16
80C196KC USER'S GUIDE
1FFH
,----..,
13FH
.......,....,.,....,.,....,....
OOOH
270704-76
5-17
80C196KC USER'S GUIDE
N: The Negative flag is set to indicate that the oper- flag can be used along with the C flag to control
ation generated a negative result. Note that the N rounding after a right shift. Consider multiplying
flag will be in the algebraically correct state even two eight bit quantities and then scaling the re-
if an overflow occurs. For shift operations, in- sult down to 12 bits:
cluding the normalize operation and all three
forms (SHL, SHR, SHRA) of byte, word and MULUB AX,CL,DL ;AX:=CL*DL
double word shifts, the N flag will be set to the SHR AX,#4 ;Shift right 4
same value as the most significant bit of the re- places
sult. This will be true even if the shift count is O.
V: The oVerflow flag is set to indicate that the oper- If the C flag is set after the shift, it indicates that the
ation generated a result which is outside the bits shifted off the end of the operand were greater-than
range for the destination' data type. For the SHL, or equal-to one half the least significant bit (LSB) of the
SHLB and SHLL instructions, the V flag will be result. If the C flag is c1el\r after the shift, it indicates
set if the most significant bit of the operand that the bits shifted off the end of tjIe operand were less
changes at any time during the shift. For divide than half the LSB of the result. Without the ST flag,
operations, the following conditions are used to the rounding decision must be made on the basis of the
determine if the V flag is set: C flag alone. (Normally the result would be rounded up
if the C flag is set.) The ST flag allows a finer resolution
For the in the rounding decision:
operation: V is set if Quotient is:
UNSIGNED
C ST Value of the Bits Shifted Off
BYTE DIVIDE> 255 (OFFH)
0 0 Value = 0
UNSIGNED
WORD DIVIDE> 65535 (OFFFFH) 0 1 o < Value < % LSB
1 0 Value = % LSB
SIGNED < -127(SlH)
BYTE or 1 1 Value> Y2 LSB
DIVIDE > 127 (7FH) Figure 3-6. Rounding Alternatives
5-1S
inter 80C196KC USER'S GUIDE
ations on 32-bit variables can be implemented by com- unsigned operands were involved or a JGT Gump if
binations of 16-bit operations. As an example the se- greater-than) if signed operands were involved.
quence:
Tables 3-7 and 3-8 summarize the operation of each of
ADD AX,CX the instructions.
ADDC BX,DX
The execution times for the instruction set is given in
performs a 32-bit addition, and the sequence Figure 3-8. These times ar.e given for a 16-bit bus with
no waitstates. On-chip EPROM/ROM space is a 16-
SUB AX,CX bit, zero waits tate bus. When executing from an 8-bit
SUBC BX,DX external memory system or adding waitstates, the CPU
becomes bus limited and must sometimes wait for the
performs a 32-bit subtraction. Operations on REAL prefetch queue. The performance penalty for an 8-bit
(i.e. floating point) variables are not supported directly external bus is difficult to measure, but has shown to be
by the hardware but are supported by the floating point between 10 and 30 percent based on the instruction
library for the 80C196KC (FPAL-96) which imple- mix. The best way to measure code performance is to
ments a single precision subset of Draft 10 of the IEEE actually benchmark the code and time it using an emu-
Staildard for Floating Point Arithmetic. The perform- lator or with TIMER!.'
ance of this software is significantly improved by the
80C196KC NORML instruction which normalizes a The indirect and indexed instruction timings are given
32-bit variable and by the existence of the ST flag in the for two memory spaces; SFR/Internal RAM space (0-
PSW. IFFH), and a memory controller reference (200H-
OFFFFH). Any instruction that uses an operand that is
In addition to the operations on the various data types, referenced thru the memory controller (ex. Add
the 80C196KC supports conversions between these rl,5000H[0l) takes 2-3 states longer than if the oper-
types. LDBZE (load byte zero extended) converts a and was in the SFR/Internal RAM space. Any data
BYTE to a WORD and LDBSE (load byte sign extend- access to on-chip ROM/EPROM is considered to be a
ed) converts a SHORT-INTEGER into an INTEGER. memory controller reference.
WORDS can be converted to DOUBLE-WORDS by
simply clearing the upper WORD of the DOUBLE- Flag Settings. The modification to the flag setting is
WORD (CLR) and INTEGERS can be converted to shown for each instruction. A checkmark (,....) means
LONGS with the EXT (sign extend) instruction. that the flag is set or cleared as appropriate. A hyphen
means that the flag is not modified. A one or zero (1) or
The MCS-96 instructions for addition, subtraction, and (0) indicates that the flag will be in that state after the
comparison do not distinguish between unsigned words instruction. An up arrow (t) indicates that the in-
and signed integers. Conditional jumps are provided to struction may set the flag if it is appropriate but will
allow the user to treat the results of these operations as not clear the flag. A down arrow ( J.- ) indicates that the
either signed or unsigned quantities. As an example, the flag can be cleared but not set by the instruction. A
CMPB (compare byte) instruction is used to compare question mark (1) indicates that the flag will be left in
both signed and unsigned eight bit quantities. A JH an indeterminant state after the operation.
Gump if higher) could be used following the compare if
5-19
80C196KC USER'S GUIDE
XCH/XCHB 2 D~A,A~D - - - - - -
LDBSE 2 D ~ A; D + 1 ~ SIGN(A) - - - - - - 3,4
LDBZE 2 D~A;D + 1 ~O - - - - - - 3,4'
PUSH 1 SP ~ SP - 2; (SP) ~ A - - - - - -
POP 1 A ~ (SP); SP + 2 - - - - - -
PUSHF 0 SP ~ SP - 2; (SP) ~ PSW; 0 0 0 0 0 0
PSW ~ OOOOH; I ~ 0
POPF 0 PSW ~ (SP); SP ~ SP + 2; I ~ /;' /;' /;' /;' /;' /;' /;'
5-20
80C196KC USER'S GUIDE
5·21
inter 8OC196KC USER'S GUIDE
SKIP 0 PC-PC+2 - - - - - -
NOTES:
1. If the mnemonic ends in "B" a byte operation is performed, otherwise a word operation is done. Operands D, B, and A
must conform to the alignment rules for the required operand type. D and B are locations in the Register File; A can ,be
located anywhere in memory.
2. D,D + 2 are consecutive WORDS in memory; D is DOUBLE-WORD aligned.
3. D,D + 1 are consecutive BYTES in memory; D is WORD aligned.
4. Changes a byte to word.
5. Offset is a 2's complement number.
6. Specified bit is one of the 2048 bits in the register file.
7. The "L" (Long) suffix indicates double-word operation.
8. Initiates a Reset by pulling RESET low. Software should re-initialize all the necesi;lary registers with code starting at
2080H.
9. The ~ssembler will not accept this mnemonic.
5-22
inter 80C196KC USER'S GUIDE
NOTES:
1. Indirect and indirect + share the same opcodes, as do short and long indexed opcodes. If the second byte is even, use
indirect or short indexed. If odd, use indirect or long indexed.
2. The opcodes for signed multiply and divide are the unsigned opcode with an "FE" prefix.
5-23
80C196KC USER'S GUIDE
I
XCI;i 3/04 - - - 4/0B 5/0B
XCHB 3/14 - - - 4/1B 5/1B
LOBSE 3/BC 3/BO 3/BE 3/BE 4/BF 5/BF
LBSZE 3/AC 3/AO 3/AE 3/AE 4/AF 5/AF
5-24
80C1'96KC USER'S GUIDE
NOTE:
1. Execution times for memory controller references may be one to two states higher depending on the number of bytes in
the prefetch queue.
2. INT stack is 0-1FFH and EXT stack is 200-0FFFFH.
5-25
inter 80C 196KC USER'S GUIDE
MNEMONIC ~ , MNEMONIC
PUSHF (int stack) 6 PUSHF (ext stack) 8
POPF (int stack) 7 POPF (ext stack) 10
PUSHA tint stack) 12 PUSHA (ext stack) 18
POPA (int stack) 12 POPA (ext stack) 18
TRAP (int stack) 16 TRAP (ext stack) 18.
LCALL (int stack) 11 LCALL (ext stack) 13
SCALL (int stack) 11 SCALL (ext stack) 13
RET (int stack) 11 RET (ext stack) 14
CMPL 7 DEC/DECB 3
CLR/CLRB 3 EXT/EXTB 4
NOTINOTB 3 INC/INCS 3
NEG/NEGB 3
LJMP 7
SJMP 7
BR [indirect] 7
TIJMP 15 + 3 ·for each memory controller reference
JNST,JST 4/8 jump not taken/jump taken
JNH, JH 4/8 jump not taken/jump taken
JGT, JLE 4/8 jump not taken/jump tak~n
JNC, JC 4/8 jump not taken/jump taken
JNVT, JVT 4/8 jump not taken/jump taken
JNV,JV 4/8 jump not taken/jump taken
JGE, JLT 4/8 jump not taken/jump taken
JNE, JE 4/8 jump not taken/jump taken
JBC, JBS 5/9 jump not taken/jump taken
OJNZ 5/9 jump not taken/jump taken
OJNZW 6/10 jump not taken/jump taken
NORML 8 + 1 per shift (9 for 0 shift)
SHRL 7 + 1 per shift (8 for 0 shift)
SHLL 7 + 1 per shift (8 for 0 shift)
SHRAL 7 + 1 per shift (8 for 0 shift)
SHR/SHRB 6 + 1 per shift (7 for 0 shift)
SHL/SHLB 6 + 1 per shift (7 for 0 shift)
SHRAISHRAB 6 + 1 per shift (7 for 0 shift) ,
CLRC 2
, SETC 2
01 2
EI 2
OPTS 2
EPTS 2
CLRVT 2
NOP 2
RST 20 (includes fetch of configuration byte)
SKIP 3
10LPO 8/25 (proper key/improper key)
5-26
80C196KC USER'S GUIDE
5-27
80C,196KC USER'S GUIDE
REGISTER UTILIZATION, When this procedure is entered at run time the stack
will contain the parameters in the following order:
The MCS-96 architecture provides a 256 byte register
file. Some of these registers are used to control register-
mapped I/Q devices and for other special functions , 7171?? : param 1
such as the ZERO register and the stack pointer. The high word of' param2
remaining bytes in the register file, some 230 of them,
plus the extra 256 bytes of RAM, are available for allo- low word of param2
cation by the programmer. If these registers are to be
used effectively, some overall strategy for their alloca- param3
tion must be adopted. PLM-96 adopts the simple and return address - StacLpointer
effective strategy of allocating the eight bytes between
addresses I CH and 23H as temporary storage. The Flgl,lre 3-9. Stack Image
starting address of this region is called PLMREG. The
remaining area in the register file is treated as a seg- If a procedure returns a value to the calling code (as
ment of memory which is allocated as required. opposed to modify~ng more global variables) then the
result is returned in the variable PLMREG. PLMREG
is viewed as either an 8-, 16- or 32-bit variable depend-
ADDRESSING 32-BIT OPERANDS ing on the type of the procedure.
These operands are f!lrmed from two adjacent 16-bit The standard calling convention adopted by PLM-96
words in memory. The least significant word of the has several key features:
double word is always in lower address, even when the
data, is in the'stack (which means that the most signifi- a) Procedures can always assume, that the eight bytes of
cant w\lrd must be pushed into the stllck first). A dou- register file memory starting at PLMREG can be
used as temporaries within the body of the proce-
ble word is addressed by the address of its least signifi-
cant byte. Note that the hardware supports some opera- dure.
tions on double words. ' b) Code which calls a procedure must assume that the
eight bytes of register file memory starting at
PLMREG are modified by the procedure.
c) The Program Status,Word (PSW-see Section 3.4) is
not saved and restored by procedures so the calling
code must assume that the condition flags (Z, N, V,
VT, C, apd ST) are modified by the pr9cedure.
d) Function results from procedures ate always re-
turned in the variable PLMREG.
5-28
inter 80C196KC USER'S GUIDE
PLM-96 allows the definition of INTERRUPT proce- 4.1 Pulse Width Modulation Output
dures which are executed when a predefined interrupt (D/A)
occurs. These procedures do not c.onform to the rules of
a normal procedure. Parameters cannot be passed to Digital to analog conversion can be done with the Pulse
these procedures and they cannot return results. Since Width Modulation output. The SOCl96KC has 3 PWM
they can execute essentially at any time (hence the term outputs, like the 1 PWM on the SOC196KB.
interrupt), these procedures must save the PSW and
PLMREG when they are entered and restore these val- The output waveform is a variable duty cycle pulse
ues before they exit. which is selectable to repeat every 256 state times or
512 state times. Changes in the duty cycle are made by
writing to the PWM registers. Several types of motors
3.8 Software Protection Hints require a PWM waveform for most efficient operation.
Additionally, if this waveform is filtered it will produce
Several features to assist in recovery from hardware
a DC level which can be changed in 256 steps by vary-
and software errors are available on the SOCI96KC.
ing the duty cycle. Details on the PWM are in Section
Protection is also provided against executing unimple-
mented opcodes by the unimplemented opcode inter- 7.0.
rupt. In addition, the hardware reset instruction (RST)
can cause a reset if the program counter goes out of 4.2 Timer1 and Timer2
bounds. This instruction has an opcode of OFFH, so if
the processor reads in bus lines which have been pulled Two 16-bit timers are available for use on the
high it will reset itself. SOC 196KC. The first is designated "Timerl", the sec-
ond "Timer2". The timers are the time bases for the
The Watchdog Timer (WOT) further helps protect HSI and HSQ units and can be considered an integral
against software and hardware errors. When using the part of the HSI/Q. Details on the Timers are in Section
WOT to protect software it is desirable to reset it from S4 .
only one place in code, lessening the chance of an unde-
sired WOT reset. The section of code that resets the
WOT should monitor the other code sections for prop- Timer1
er operation. This can be done by checking variables to Timer1 is a free-running timer which is incremented
make sure they are within reasonable values. Simply every eight state times. It can be read and written, but
using a software timer to reset the WOT every 10 milli- care must bb taken when writing to it if the HSIQ Sub-
seconds will provide protection only for catastrophic system is being used. The precautions necessary when
failures. writing to Timerl are described in Section S. Timerl
can cause an interrupt when it overflows.
4.0 PERIPHERAL OVERVIEW
Timer2
There ~re five major peripherals on the SOCI96KC: the
Pulse-Width-Modulated outputs (PWM), Timerl and Timer2 counts transitions, both positive and negative,
Timer2, High Speed I/O. Unit, Serial Port, and AID on its input which can be either the T2CLK pin or the
Converter. A minor peripheral is the watchdog timer. HSI.1 pin. Also, the SOC196KC has added the capabili-
With the exception of the high speed I/O unit (HSIQ), ty to clock Timer2 internally every 1 or S state times.
each of the peripherals is a single unit that can be dis- Timer2 can be read and written and can be reset by
cussed without further separation. hardware, software or the HSQ unit. It can be config-
ured to count up or down based on Port 2.6 and it's
Four individual sections make up the HSIQ and work value can be captured into the T2CAPTURE register
together to form a very flexible timer/counter based on a rising edge on Port 2.7.
I/O system. Included. in the HSIQ are a 16-bit timer
(Timerl), a l6-bit up/down counter (Timer2), a pro- When clocking Timer2 externally, the maximum input
grammable high speed input unit (HSI), and a pro- transition speed is Once every S state times or once per
grammable high speed output unit (HSQ). With very state time in the Fast Increment mode. CLKQUT can-
little CPU overhead ,.the HSIO can measure pulse not be used to clock Timer2 directly. It must first be
widths, generate waveforms, and create periodic inter- divided by 2 since Timer2 counts both positive and neg-
rupts. Oepending on the application, the HSI/O can ative transitions.
perform the work of up to IS timer/counters and cap-
ture/compare' registers.
4.3 High Speed Inputs (HSI)
A brief description of the peripheral functions and in-
terractions is included in this section. All of the details The High Speed ·Input (HSI) unit can capture the value
on control bits and precautions are in the individual of Timer1 when an event takes place on one of four
sections for each peripheral starting with Section 7. input pins (HSI.0-HSI.3). Four types of events can
5-29
, \
80C196KC USER'S.GUIDE
trigger a capture: nsing edges only, falling edges onty, ~he HSO unit by first writing to HSO_COMMAND
rising or falling edges, or every eighth rising ,edge. Each 'with the event to occur, and then to HSO_TIME with
HSI pin can be independently programmed to look for the, timer match'value.
any of these conditions. A block diagram of this unit is
shown in Figure 4-1. ' Fourteen different types of events can be triggered by
the HSO: 8 external and 7 internal. There are two inter-
When events occur, the Timer! value gets stored in the rupt vectors associated with the HSO, one for external
FIFO along with 4 status bits whioh indicate the input events, and one for internal events. External events con-
line(s) that caused the event. The neltt event ready to Pe sist of switching one or more of the 6 HSO lines
unloadec;l from the FIFO is placed in the HSI Holding (HSO.0-HSO.5). HSO.4 and HSO.5 share pins with
Register, so a total of 8 pieces of data can be stored in HSI.2 and HSI.3 and it is possible to have these pin~
the FIFO. Data is taken off the FIFO by reading the enabled for both functions. Internal events include set-
HSIJTA11US register, followed by reading, the ting up 4 Software Timers, resetting Timer2, and start-
HSI_TIME register. When\ the time register is read ing an AID conversion. The software timers are flags
the next FIFO location is loaded into the holding regis- that can be set by the HSO and optionally cause inter-
ter. rupts. '
XTAL1/16
~ HITOLO HSI.O
-r- LOTOHI HSl.l
HSI.2
CHANGE
DETECTOR
TRIGGERED
INPUT(S)
270704-6
270704-7
5-30
(
inter 80C196KC USER'S GUIDE
16-BIT 16-BIT
, T2CLK
T21NT
16
5-31
inter 80C196KC USER'S GUIDE
Twenty-eight (28) sources of interrupts are available on NMI, the external Non-Maskable Interrupt, is the
the 80C196KC. These sources are gathered into 15 vec- highest priority interrupt. It vectors indirectly through
tors plus special vectors for NMI, the TRAP instruc- location 203EH. For design symmetry, a mask bit ex-
tion, and Unimplemented Opcodes. Figure 5-1 shows ists in INT_MASK1 for the NMI. However, the bit
the routing of the interrupt sources into their vectors as does not function and will not stop an NMI from oc-
well as the control bits which enable some of the sourc- curring. For future compatibility, the NMI mask bit
es. The operation of the Peripheral Transaction Server must be set to zero.
(PTS) is intimately a part of interrupt operation and is
discussed in Section 6. NMI on the 8096BH vectored directly to location
OOOOH, so for the 80C196KC to be compatible with
8096BH software, which uses the NMI, location
Special Interrupts 203EH must be loaded with OOOOH. The NMI interrupt
vector and interrupt vector location is used by some
Three special interrupts are available on the Intel development tools. The NMI interrupt is rising
80C196KC: NMI, TRAP and Unimplemented opcode. edge triggered.
Although available for customer use, these interrupts
may be used in Intel development tools or evaluation
boards.
SOURCES VECTORS
PORTO.7 ---_e~IOC1.l
- ' EXTINT
270704-9
5-32
80C196KC USER'S GUIDE
5-33
80C196KC USER'S GUIDE
7 6 5 4 3 2 1 0
,12H IPEND1:, FIFO EXT T2 T2
NMI HSI4 RI TI
13H IMASK1: FULL INT1 0VF CAP
,
7 6 5 4 3 2 1 0
09H IPEND: EXT SER SOFT HSI.O HSO HSI AID TIMER
OSH IMASK: INT PORT TIMER PIN PIN DATA DONE OVF
Figure 5·3. Interrupt Mask
, and Pending Registers
Global Disable Vector
Number Source Priority
The processing of all interrupts except the NMI, TRAP Location
and unimplemented opcode interrupts can be disabled INT15 NMI 203EH 15
by clearing the I bit in the PSW. Setting the I bit will
enable interrupts that have mask register bits set. The I INT14 HSI FIFO Full 203CH 14
bit is controlled by the EI (Enable Interrupts) and DI INT13 EXTINT1 203AH ' 13
(Disable Interrupts) instructions. Note that the I bit
only controls the actuat servicing of interrupts. Inter- INT12 TIMEA2 Overflow 2038H 12
rupts that occur when l'is cleared will be held in the INT11 TIMEA2 Capture 2036H 11
pending register and serviced on a prioritized basis
when I is set. INT10 4th Entry into' HSI FIFO 2034H 10
INT09 AI 2032H 9
The priority encoder looks at all of the interrupts which SPECIAL Unimplemented Opcode 2012H N/A
are both ,pending and enabled, and selects the one with SPECIAL Trap 2010H N/A
the highest priority. The priorities are shown in Figure
5-4 (15 is highest, 0 is lowest). The interrupt generator INT07 EXTINT 200EH 7
then forces a call to the location in the indicated vector INT06 Serial Port 200CH 6
'location. This location would be the starting location of
the Interrupt ServiCe Routine (ISR). INT05 Software Timer 200AH 5
I
a) After the Irtterrupt controller decides to process ari
interrupt, it executes a "CALL", using the location
Service the interrupt 'froJ;Il the corresponding interrupt vector table entry
as the destination. The return address is pushed onto
the stack. Another interrupt cannot be serviced \lntil
i after the first instruction following the interrupt call
POPA Restore' is executed.
RET
5-34
80C196KC USER'S GU!DE
b) The PUSHA instruction, which is guaranteed to exe- sider clearing a bit in the interrupt pending register as
cute, saves the PSW, INT-MASK, INT-MASKl, part of a non-interrupt routine:
and the WSR on the stack as two words, and clears
them. An interrupt cannot be serviced immediately LDB A~,INT_PEND
following a PUSHA instruction. (If INT-MASK 1 ANDB AL,#b1t_mask
and the WSR register are not used, or 8096BH code STB AL,INT_PEND
is being executed, PUSHF, which saves only the
PSW and INT~ASK, can be used in place of This code works if no other routines are operating con-
PUSHA). currently, but can cause occasional and serious prob-
c) LO INT_MASK, which is guaranteed to execute, lems if used in a concurrent environment. (All pro-
enables those interrupts that are allowed to interrupt grams which make use of interrupts must be considered
this ISR. This allows the software to establish its a concurrent environment.) For example, assume that
own priorities independent of the hardware. the INT_PEND register contains OOOOllllB and bit 3
(HSO event interrupt pending) is to be reset. The ~ode
d) The EI instruction reenables the processing of inter- does work for this data pattern but what happens if an
rupts with the new priorities. HSI interrupt occurs somewhere between the LDB and
e) At the end of the ISR, the POPA instruction restores , the STB instructiQns? Before the LOB instruction
the PSW, INT_MASK, INT_MASKl, and WSR INT_PEND contains OOOOllllB and after the LOB
to their original state when the interrupt occurred. instruction so does AL. If the HSI interrupt service
Interrupts cannot occur immediately following a routine executes at this point then INTJENO will
POPA instruction so the RET instruction is guaran- change to 0000101 lB. The ANOB changes AL to
teed to execute. This prevents the stack from over- OOOOOlllB and the STB changes INT_PEND to
flowing if interrupts are occurring at high frequency. 000001 1lB. It should be 0000001 lB. This code se-
(IfINT_MASKl and the WSR are not being used, quence has managed to generate a false HSI interrupt.
or 8096BH code is being executed, POPF, which re- These problems can be avoided by assuring mutual ex-
stores only the PSW and INT_MASK, can be used clusion which means that if more than one routine can
in place of POPA. change a variable, then the programmer must ensure
exclusive access to the variable during the entire opera-
Notice that the "preamble" and exit code for the inter- tion on the variable.
rupt service routine does not include any code for sav-
ing or restoring registers. This is because it has been In many cases the instruction set ofthe 80C196KC al-
assumed that the interrupt service routine has been al- lows the variable to be modified with a single instruc-
located its own private set of registers from the on- tion. The code in the above example can be implement-
board register file. The availability of some 230 bytes of ed with a single instruction.
register storage makes tl}is quite practical. By using the
VWindowing Scheme, an additional 256 bytes become ANDB
available (See Section 3.4).
Instructions an;: indivisible so mutual exclusion is en-
sured in this case. Changes to the INT_PENO or
5.3 Critical Regions INT_PENDI register must be made ,as a single in-
struction, since bits can be changed in this register even
Interrupt service routines sometimes must share data if interrupts are disabled. Depending on system config-
with other routines. Whenever the programmer is cod- urations, several other SFRs might also need to be
ing those sections of a program which access these changed in .a single instruction for the same reason.
shared pieces of data, great care must be taken to en-
sure that the integrity of the data is maintained. Con- When variables must be modified without interruption,
and a single instruction can not be used, the program-
mer must create what is termed a critical region. One
way to do this is to simply disable interrupts with a 01
instruction, perform the modification, and then re-en-
5-35
80C'196KC USER'S GUIDE
able interrupts with an EI instruction. The problem When an interrupt is acknowledged the interrupt pend-
with this 'approach is that it leaves the interrupts en- ing bit is cleared, and a call is forced to the location
abled even if they were not enabled at the start. A bet- indicated by the specified interrupt vector. This call oc-
ter solution is to enter the critical region with a PUSHF curs after the completion of the instruction in process,
-instruction which saves the PSW and also cleani the except as noted above. The procedure of getting the
interrupt enable flag. The region can then be terminat- vector and forcing the call requires 16 state times. If the
ed with a POPF instruction which returns the ,interrupt stack is in external RAM an additional 2 state times are
enable to the state it was in before the code sequence. It required. This assumes a 0 wait-state bus.
should, be ,noted that some system cOnfigurations might
require more protection to form a critical region. An The maximum number of state times required from the
example is a system in which more than one processor time an interrupt is generated (not acknowledged) until
has access to a common resource such as memory or the 80C196KC begins executing code at the desired lo-
external 110 devices. cation is the time of the longest instruction, NORML
(Normalize - 39 state times), plus the 4 state times
prior to the end of the previous instruction, plus the
5.4 Interrupt Timing response time (16(internal stack) or 18(external stack)
state times). Therefore, the maximum response time is
The 80C196KC can be interrupted from four different 61 (39 + 4 + 18) state times. This does not include the
external sources; NMI, P2.2, HSI.O and PO.7. All exter- 6 state times required for PUSHF if jt is used as the
nal interrupts are sampled during PHI or CLKOUT first instruction in the interrupt routine or additional
low and are latched internally. Holding levels on exter- latency caused by having the' interrupt masked or dis-
, nal interrupts for at least one state time wiII ensure abled. Refer to Figure 5-5, Interrupt Response Time, to
, recognition of the interrupts. visualize an example of worst case scenario.
The externaI.interrupts on the 8OC196KC, although Interrupt latency time can be reduced by careful selec-
sampled during PHI, are edge triggered interrupts as tion of instructions in areas of code where interrupts
opposed to level triggered. are expected. Using: 'EI' followed immediately by a
long instruction (e.g. MUL, NORML, etc.) will in-
Interrupts are not always acknowledged immediately. crease the maximum latency by 4 state times, as an
If the interrupt signal does not occur prior to 4 state- jnterrupt cannot occur between EI and the instruction
times before the end of an instruction, the interrupt following EI. The DI, PUSHF, POPF, PUSHA, POPA
may not be acknowledged until after the next instruc- and TRAP instructions wiII also cause the same situa-
tion has been executed. This is because an instruction is tion. Typically these instructions would only effect la-
fetched and prepared for execution a few state times tency when one interrupt routine is already in process,
before it is actually executed. as these instructions are seldom used at other times.
There are 6 instructions which always inhibit interrupts
from being acknowledged until after the next instruc- 5.5 Interrupt Summary
tion has been executed. These instructions'are:
EI, DI - Enable and disable all interrupts by tog- Many of the interrupt veotors on the 8096BH were
gling the global disable bit (PSW.9). shared by multiple interrupts. The interrupts which
were s~ared on the 8096BH are: Transmit Interrupt,
PUSHF - PUSH Flags ,pushes the PSW/INT_ Receive Interrupt, HSI FIFO Full, Timer2 Overflow
MASK pair then clears it, leaving both and P2.2.0n the 8OC196KC, each of these interrupts
INt_MASK and PSW.9 clear. have their own interrupt vectors. The source of the in-
POPF - POP Flags pops the PSWlINT.-MASK terrupt vectors 'are typically programmed through con-
pair off the stack - trol registers. These registers can be read in HWindow
PUSHA - PUSH All does a PUSHF, then pushes 15 to determine the source of any interrupt. Interrupt
, the INT_MASK I/WSR pair and clears sources with two possible interrupt vectors, serial re-
INT.-MASKI ceive interrupt sharing serial port and receive interrupt
vectors for example, should be configured for only one
POPA - POP All pops the INT.-MASKI/wSR interrupt vector.
pair and then does a POPF
5-36
inter 80C196KC USER'S GUIDE
STATE TIMES
EXECUTION
PENDING I SET
BIT - I
Interrupts with separate vectors include: NMI, TRAP, to one generates an interrupt when the FIFO, indepen-
Unimplemented Opcode" Timer2 Capture, 4th Entry dent of the holding register, has six entries in it.
into HSr FIFO, Software timer, HSI.O Pin, High Speed
Outputs, and AID' conversion Complete, The NMI, On the 80C196KC, separate interrupt vectors are avail-
TRAP ,and Unimplemented Opcode interrupts were able for the HSI FIFO FULL(203CH) and HSI DATA
covered in Section 5,1. . AVAILABLE(2004H) interrupts. The interrupts
should be programmed for separate vector locations.
Refer to Section 9 for more information on the High
EXTINT and PO.7 Speed Inputs.
The 8OCl96KC has two external interrupt vectors;
EXTINT (200EH) and EXTINTl (203AH), The
EXTINT vector has two alternate sources selectable by
IOCLl, the external interrupt pin (Port 2.2) and Port The HSI FIFO can generate an interrupt when the HSI
0.7. The external interrupt pin is the only source for the has four or more entries in the FIFO. The HSI
EXTINTl interrupt vector. The external interrupt pin FIFO_4 interrupt vectors through location ·2034H.
should not be programmed to interrupt thro\1gh both Refer to Section 9 for more information on the High
vectors. Both external interrupt sources are rising edge Speed Inputs.
triggered.
HSI.O External Interrupt
Serial Port Interrupts
A rising edge on HSI.O pin can be used as an external
The serial port generates one of three possible inter- interrupt. Sampling is guaranteed if the pin is held for
rupts: Transmit interrupt TI(2030H), Receive Interrupt at least one state time. The interrupt vectors through
RI(2032H) and SERIAL(200cH). Refer to section 10 location 2008H. The pin does not have to be enabled to
for information on· the serial port interrupts. The the FIFO to cause an interrupt.
8096BH shared the TI and RI interrupts on the
SERIAL interrupt vector. On the 80Cl96KC, these in-
terrupts share both the serial interrupt vector and have Tlmer2 and Tlmer1 OverflOW
their own interrupt vectors. Ideally, the transmit and Timer2 and Timer! can interrupt on overflow. These
receive interrupts should \:Ie programmed as sllParate interrupts shared the same interrupt vector TIMER
interrupt vectors while disabling the SERIAL inter- OVERFLOW(2000H) on the 8096BH. The interrupts
rupt. For 8096BH compatibility, the interrupts can still are individually enabled by setting bits 2 and 3 in lOCI.
use the SERIAL interrupt vector. Which timer actually caused the interrupt' can be deter-
mined by bits 4 and 5 of 10SL On the 80Cl96KC
HSI FIFO FULL and HSI DATA AVAILABLE Timer2 ovc;rflow (OH or 8000H) has a separate inter-
rupt vector through location 2038H.
HSI FIFO FULL and HSI DATA AVAILABLE in-
·terrupts shared the HSI DATA' AVAILABLE inter-
rupt I vector on the 8096BH. The source of the HSI Timer2 Capture
DATA AVAILABLE interrupt is controlled by the The 8OCl96KC can interrupt in response to a Timer2
setting of I/O Control Register 1,(IOCL7). Setting capture triggered by a rising edge on P2.7. Timer2 Cap-
IOCL7 to zero will generate an interrupt when a time ture vectors through location 2036H.
value is loaded into the holding register. Setting the bit
5-37
80C196KC USER'S GUIDE
High Speed Output sion. The interrupt vectors indirectly through location
2002H. Refer to Section 12 for more information on the
The High Speed Output interrupt can be generated in AID Converter.
response to a programmed HSO command which caus-
es,an external event. HSO commands which set or clear
the High Speed Output pins are considered external 6.0 PERIPHERAL TRANSACTION
events. Status Register IOS2 indicates which HSO SERVER
events have occured and can be used to arbitrate which
HSO command caused the interrupt. The Hig~ Speed The Peripheral Transaction Server (PTS) is a new fea-
Output interrupt vectors indirectly through location ture of the 80C196KC. ,The PTS provides DMA-like
2006H. For more information on High Speed Outputs, response to an interrupt with much less CPU overhead.
refer to Section 10. Single and block transfer modes are supported, as well
as special modes to service the AID Converter and the
HSI/O. Any of the 15 interrupt vectors can be alterna-
Software Timers tively mapped to its PTS channel.
HSO commands which create internal events can inter-
rupt through the Software Timer interrupt vector. In- Figure 6-1 shows the difference between a normal In-
ternal events include triggering an AID conversion, re- terrupt Service Routine and the same interrupt mapped
setting Timer2 and software timers. Status registers to its PTS channel. Instead of an Interrupt Service
IOS2 and 10SI can be used to determine which internal Routine, the PTS channel generates a PTS cycle. The
HSO event has occured. Location 200AH is the inter- software overhead of forcing the interrupt call,
rupt vector for the Software Timer interrupt. Refer to PUSHA, POPA, and executing the RET instruction is
Section 10 for more information on software timers and eliminated. Instead, the PTS cycle is interleaved with
the HSO. the normal instruction flow much like a DMA cycle.
PUSHA
LD VAR, TEMP3 / - ; RESPONSE TO
MUL SPEED, DISTANCE - ; INTERRUPT
- ; GOES HERE
INTERRUPT OCCURS
_ _ POPA
OR HERE, THERE
RrT
270704-77
PTS Response
NORMAL EXECUTION PTS CYCLE
--
MUL SPEED, DISTANCE / " : ; EXECUTED IN MICROCODE
; PROGRAM COUNTER NEVER
INTERRUPT OCCURS ; CHANGES
OR HERE, THERE
270704-78
5·38
inter 80C196KC USER'S GUIDE
5-39
)
80C196KC USER'S GUIDE
the PTS Control Block (PTSCB). The microcode then bit in PTSSRV (PTS Serve) is set to actually request the
executes the proper PTS cycle, based on the contents of end-of-PTS interrupt. PTSSRV is located in HWindow
the PTSCB.' 1 at 06H (see Figure 6-4). The PTSSRV register acts
just like the Interrupt Pending registers in requesting
The PTSCOUN1; in the "PTSCB defines the number of interrupts. The PTSSRV register is used instead of the
PTS cycles to be run consecutively without software Pending Registers for the end-of-PTS interrupt so one
intervention. Since PTSCOUNT is an 8-bit value, the actual PTS request from the interrupt source can be
maximum number is 256. Loading PTSCOUNT with buffered in the Pending Register.
zero causes 256 transfers to occur. At the end of each
'PTS cycle, PTSCOUNT is decremented. When The end-of-PTS interrupt vectors through, the associat-
PTSCOUNT expires (i.e., equals 0), an actual interrupt ed location in the interrupt vector table. For example, if
called the end-of-PTS interrupt is requested which the TI interrupt is mapped to its PTS channel with its
should inyoke any processing needed and reinitialize PTS vector at 2050H, its end-of-'PTS interrupt is at
the PTS chan!1el. 2030H. The end-of-PTS interrupt has the same priority
as the normal interrupt vector. When the end-of-PTS
When PTSCOUNT expires; a unique series of events interrupt is called, the bit in PTSSRV is automatically
happens. F~rst, the associated bit in PTSSEL is cleared cleared .. however the PTSSEL bit must be set manually
to inhibit any additional PTS cycles until after, the end- t? reenable the PTS channel. See Figure 6-5.
of-PTS inter..rupt has executed. Secondly, the associated
5-40
80C196KC USER'S GUIDE
Interrupt Source,
270704-90
Figure 6-5
5-41
80C196KC USER'S GUIDE
During a single transfer cycle, a byte or word is trans- to set up the ISR, 84 states to transfer each byte, and 59
ferred from the memory location pointed to by the states for the final ISR for a total of 10727 state times
PTSSRC to the memory location pointed to by (35 + 127 (84) + 59).
PTSDST. PTSSRC and PTSDST are optionally incre-
mented with the SI, SU and DI, DU bits. PTSCOUNT This same task clm easily be accomplished using the
is then decremented. If PTSCOUNT equals 0, the ap- PTS channel associated with the TI interrupt with
propriate PTSSRV bit is set and the PTSSEL bit is much less CPU overhead. The PTS channel is set up to
cleared to disable any further PTS cycles until the End- do a single byte transfer on every TI PTS request. The
of-PTS ISR is executed. PTSDST register always points to SBUF and does not
increment. The PTSSRC register points to the begin-
A single transfer takes 18 states + 3 for each memory ning of the block of memory and is set up to increment
controller reference. ' every PTS cycle. The code to set up the PTS channel
and the End-of-PTS interrupt is shown in Figure 6-6. It
At this time, an example would probably be of great takes 64 state times to set up the PTS channel, 21 state
help. Let's say a 128-byte block of contiguous memory times t9 transfer each byte, and 54 state times for the
needs to be transmitted over the serial port to another End-of-PTS interrupt for a grand total of 2721 state
host processor. Figure 6-7 shows the code necessary to times (64 + 127 (21) + 54). This reduces the software
accomplish this task using the TI interrupt and an In- overhead of this task by 75% compared to an Interrupt
terrupt Service Routine. This code takes 35 state times Service Routine.
CSEG AT 2030H
DCW TI ISR ;SET UP TI INTERRUPT VECTOR
5-42
inter 80C196KC USER'S GUIDE
CSEG AT 2030H
OCW TI END PTS_INT ;SETUP END OF PTS INTERRUPT
CSEG AT 2050H
OCW TIPTSCNT ;SETUP PTS VECTOR BY POINTING
;AT THE PTSCON REGISTER
TI ENO_PTS_ISR:
PUSHF
ANDB FLAGS,#OOOOOOOlB ;SET FLAG INDICATING
POPF ;TRANSMISSIONS DONE
RET
270704-80
PTS BLOCK TRANSFER MODE Transfer with the SI and DI bits, and using the SU and
DU bits, keep their final value or revert to their value at
For a PTS Block Transfer, the PTSCB (Figure 6-3) the beginning of the PTS cycle. Finally, the
contains all the same registers as the Single Transfer PTSCOUNT register is decremented and if it equals 0,
Mode with the addition of a block count (PTSBLOCK) the PTSSRV bit is set and the PTSSEL bit is cleared to
register. The PTSCON also retains the same format as request the end-of-PTS interrupt.
the Single TranSfer Mode (see Figure 6-6).
A Block Transfer PTS cycle takes 13 states + 7 for
When a Block Transfer is selected, PTSBLOCK deter- each transfer (1 minimum) + 3 for each memory con-
mines how many byte or word transfers will take place troller reference. ,
(N = 1 to 32 transfers). Loading a zero in PTSBLOCK
causes 32 transfers to take place. N transfers take place Care must be taken when using the Block Transfer. A
from the memory pointed to by PTSSRC to the memo- Block Transfer cannot be interrupted. It would be very
ry pointed to by PTSDST. PTSSRC and PTSDST are easy to make a long uninterruptable instruction with a
optionally incremented after each transfer by the SI and Block Transfer. Taking the worst case, a Block Trans-
DI bits. When N transfers have expired, the PTSSRC fer of 32 words from ,external source to external desti-
and PTSDST registers are optionally updated with the nation over an 8-bit bus would take about 500 states
SU and DU. bits. This allows the PTSSRC and (assuming no wait states).
PTSDST registers to be incremellted during a Block
5-43
80C196KC USER'S GUIDE
PTS AID MODE This makes it easier to save several HSI events in mem-
ory for later processing. The format of the HSI table is
The AID mode al.1ows automatic restart of the AID shown in Figure 6-10. For more information on the
converter while storing the previous result in a table HSI, see Section 9.
located in memory by mapping the AID_DONE in-
terrupt to its PTS channel. Figure 6-9 shows the AID
table format. The User sets up the AID commands in HSI_TIMEJ
the table and the PTSloads the AID with the com- XXX+OA
mahd and stores the result in the appropriate table lo- HSLSTATUSJI HSI_STATUSJ
XXX+8
cation. For more information on the AID Converter, HSI TIME 1
XXX+6
see Section 12. HSI_STATUS_11 HSI_STATUS_1
XXX+4
HSI_TIME_O
XXX+2
AID RESULT 2 HSI_STATUS_O I HSI_STATUS_O
XXX+OA XXX' +-PTSDST
I AID COMMAND 3 'XXX Can Lie anywhere in addressable memory space
XXX+8
AID RESULT 1
XXX+6 Figure 6-10. HSI PTS Table
I AID COMMAND 2
XXX+4
XXX+2
AID RESULT ° The PTSCB is made up of a destination register
I AID COMMAND 1
(PTSDST). a block count register (PTSBLOCK), and
XXX' +-S/D the control register (PTSCON) as shown in Figures 6-3
'XXX Can lie anywhere in addressable memory space and 6-5. PTSDST can be optionally updated at the end
of the PTS cycle by setting the UPDT bit in PTSCON.
Figure 6-9. PTS AID Table Format
When this PTS cycle is initiated, PTSBLOCK is read
The PTSCB contains a sourceldestination register to determine how many HSI transfers will take place
(SID), a register address (REG), and the PTS control (N = I to 7). For each transfer, the HSI_STATUS
register (PTSCON). The PTSCON format for the AID and HSI_TIME registers are written out to consecu-
Mode is shown in Figure 6-5. The SID register points tive words in memory pointed to by the PTSDST.
to the table in memory, and REG will point to the When N transfers have finished, PTSDST is optionally
AD_COMMAND register at location 02H in HWin- updated. Finally the value in PTSCOUNT is decre-
dow O. mented and if it is 0, the PTSSRV bit is set and the
PTSSEL bit is cleared to request the End-of-PTS inter-
In a PTS AID cycle, the word pointed to by SID is rupt.
loaded into a temporary internal register. SID is then
incremented by 2. Next, the AD_RESULT register is The HSI can generate an interrupt or PTS request
stored at the location pointed to by SID. The AID when the FIFO contains I, 5 or 7 entries, so the
command stored in the temporary register is now load- PTSBLOCK register should contain one of these val-
ed into the AD_COMMAND register to initiate an- ues.
other AID conversion. Now the SID is optionally up-
dated to point to the next word in the table with the The HSI mode takes 12 state times + 10 for each block
UPDT bit in PTSCON. If the SID is not updated, the transfer (I minimum) for Internal RAM/SFR space
same AID command is read and the result stored in and 16 states + 10 for each block transfer (I mini-
the same location for every PTS cycle.. Fiqally. mum) with memory controller references.
PTSCOUNT is decremented and if it is zero, t\le
PTSSEL bit is cleared and the PTSSRV bit is set to
request the end-of-PTS interrupt. PTS HSO (HIGH SPEED OUTPUT) Mode
5-44
80C196KC USER'S GUIDE
5-45
intJ 80C196KC USER'S.GUIDE
10% 25
~~.Jl~__~n~____~n~____
HI
50% 128
LO
80% 230
~..J u u
HI
119.8% 255
LO
270704-13
80C196KC BUFFER
TO MAKE FILTER
HSO
OR
PWM
f-+
OUTPUT
SWING
RAIL
r--+
(PASSIVE
OR
ACTIVE)
----. POWER
AMP
(OPTIONAL)
ANALOG
f-+ OUTPUT
TO (OPTIONAL)
RAIL
270704-14
Vee
* 1/2 VQ3001P
270' 5.lK
PWM----~~~----. t-____~~----~-----AN;~~G
270704-15
~OC196:Kt ~._________
I- I ~ t" 1-:+--= 270704-16
1+----------------P2.7
UP DOWN __
. 't~P2.6
IOC2.1
1 + - - - T2 INTERNAL CLOCK
1+---T2CLK
1+---HSI.l
'------------------T2RST
270704-5
5-47
80C196KCWSER'S GUIDE
externally using either the T2CLK pin or the HSI.l pin Fast Increment Mode
Timer2 counts on both positive and negative tran-
sitions. The maximum transition speed is once per state Timer2 can be programmed to run in fast increment
time in the Fast Increment mode, and once every 8 mode to count transitions every state time. Setting.
states otherwise. New on the80C196KC, Timer2 can IOC2.0 programs Timer2 in the Fast Increment mode.
be clocked internally every 1 or 8 state times. Timer2 IIi this mode, the events programmed on the HSO unit
can be read and written through location OCH in with Timer2 as a reference will not execute properly
HWindow O. Timer2 can be reset by hardware, soft- since the HSO requires eight state times to compare
ware or the HSO unit. Either T2RST or HSI.O can every location in the HSO CAM. With Timer2 as a
reset Timer2 externally depending on the setting of reference for the HSO unit, Timer2 transitioning every
IOCO.5. Figure 8-2 shows the configuration and input state time may cause programmed HSO events to be
pins of Timer2. Figure 8-3 shows the reset and clocking missed. For this reason, Timer2 should not be used as a
options for Timer2. The appropriate control registers reference for the HSO if transitions occur faster than
can be read in HWindow 15 to determine the pro- once every eight state times.
grammed modes. However, IOCO.l (T2RST) is not
latched and will read a 1. Timer2 should not be RESET in the fast increment
mode. All Timer2 resets are synchronized to an eight
Caution should be used when writing to the timers if stat<; time clock. If Timer2 is reset when clocking faster
they are used as a reference to the High Speed Output than once every 8 states, it may reset on a different
Unit. Programmed HSO commands <;ould be missed if count.
the timers do not count continuously in one direction.
High Speed Output events based on Timer2 must be
carefully programmed when using Timer2 as an Internal Clock Mode
up/down counter that can be reset externally. Pro- A new feature on the 80Cl96KC is the ability for
grammed events could be missed or occur in the wrong Timer2 to be clocked internally. Timer2 can be clocked
order. Refer to Section 9 for more information on using every 1 or 8 states. In the 8 state mode, Timer2 incre-
the timers with the High Speed Output Unit. ments at the same time as Timer!. Internal clocking is
enabled by setting IOC3.0 Clocking Timer2 every state
.Capture Register time is controlled by setting IOC2.0 while clearing
IOC2.0 causes Timer2 to count every 8 states.
The value in Timer2 can be captured into the
TZCAPTURE register by a rising edge on Port 2 pin 7.
The logic level must be held for at least one state time Up/Down Counter Mode
as discussed in the next section. T2CAPTURE is locat- Timer2 can be made to count up or down based on the
ed at OCH in HWindow 15. The interrupt generated by
Port 2.6 pin if IOC2.1 = 1. However, caution must be
a T2CAPTURE vectors through location 2036H.
Bit = 1 Bit", 0
IOCO.1 Reset Timer2 each write No action
IOCO.3 Enable external reset Disable
IOCO.5 HSI.O is ext. reset source T2RST is reset source
lOCO.? HSI.1 is T2clock source T2CLK is clock source
IOC1.3 Enable Timer2 overflow int. Disable overflow interrupt
IOC2.0 . Enable fast increment Disable fast increment
IOC2:1 Enable downcount feature Disable down count
P2.6 Count down if IOC2.1 = 1 Count up
IOC2.5 Interrupt on 7FFFH/8000H Interrupt on OFFFFH/OOOOH
P2.7 Capture Timer2 into
T2CAPTURE on rising edge
IOC3.0 Selects Timer2 internal Selects Timer2
clock source external clock source
Figure 8·2. Timer2 Configuration and Control Pins
5-48
80C196KC USER'S GUIDE
used when this feature is working in conjunction with Interrupts can be generated if Timer2 crosses the
the HSO. If Timer2 does not complete a full cycle it is OFFFFH/OOOOH boundary or .the 7FFFH/8000H
possible to have events in the CAM which never match boundary in either direction. By having two interrupt
the timer. These events would stay in the CAM until points it is possible to have interrupts enabled even if
the CAM is cleared or the chip is reset. Timer2 is counting up and down centered around one
of the interrupt points. The boundaries used to control
the Timer2 interrupt is determined by the setting of
8.3 Sampling on External Timer Pins . IOC2.5. When set, Timer2 will interrupt on the
7FFFH/8000H boundary, otherwise, the OFFFFH/
The T2UP/DN, T2CLK, T2RST, and T2CAP pins are OOOOH boundary interrupts.
sampled during PH1. PHI roughly corresponds to
CLKOUT low externally. For valid sampling, the in- A T2CAPTURE interrupt is enabled by setting INT_
puts should be present 45 ns prior to the rising edge of MASK1.3. The interrupt will vector through location
CLKOUT or it may not be 'sampled until the next 2036H.
CLKOUT. To synchronize the inputs, the rising edge
of CLKOUT should latch the inputs and hold them Caution must be used when examining the flags, as any
until the next rising edge of CLKOUT. T2UP/DN and access (including Compare and Jump on Bit) of 10SI
T2CLK need to be synchronized unless they never clears bits 0 through 5 including the software timer
transition within one state time of each other. Other- flags. It is, therefore, recommended to copy the byte to
wise, Timer2 may count in the wrong direction. a temporary register before testing bits. Writing to
lOS I in HWindow 15 will set the status bits but not
cause interrupts. The general enabling and disabling of
8.4 Timer Interrupts the timer interrupts are controlled by the Interrupt
Mask Register bit O. In all cases., setting a bit enables a
Both Timerl and Timer2 can trigger a timer overflow function, while clearing a bit disables it.
interrupt and set a flag in the I/O Status Register I
(lOS I). Timerl! overflow is controlled by setting
IOC1.2 and the interrupt status is indifated in IOS1.5. 9.0 HIGH SPEED INPUTS
The TIMER OVERFLOW interrupt is enabled by set-
ting INT_MASK.O. The High Speed Input Unit (HSI) can record the time
an event occurs with respect to Timer!. There are 4
A Timer2 overflow condition interrupts through loca- lines (HSI.O through HS1.3) and up tOI a total of 8
tion 2000H by setting IOC1.3 and setting INT_ events can be recorded. HSI.2 and HSI:3 are bidirec-
MASK.O. Alternatively, Timer2 overflow can interrupt tional pins which can also be used as HSO.4 and
through location 2038H by setting INT_MASK1.4. HSO.5. The I/O Control Registers (lOCO and lOCI)
The status of the Timer2 overflow interrupt is indicated determine the functions of these pins. The values pro-
in !OS 1.4. grammed into lOCO and lOCI can be read in HWin-
dow 15. A block diagram' of the HSI unit is shown in
Figure 9-1. .
HSI.1
IOCO.7- - - --
. T2CNT
HSO# 14 ~----,
lOCO. 1 ~---I
,
IOCO.5
270704-17
1
FIFO
INTERRUPT
&:
CONTROL LOGIC
~lTSIMER
~
4 7x20 BIT
FIFO
~ HITOlO
-r- lOTOHI
~ORlo'""L..
.hnnruuuW
EVERY EIGHTH POSITIVE
TRANSITION
270704-18
5-50
inter 80C196KC USER'S GUIDE
5-51
inter 80C196KC USER'S GUIDE
of the holding register. Since all interrupts are rising 9.5 Initializing the HSI
edge triggered, the processor will not be reinterrupted
until the FIFO first contains 5 or less records, then When starting the HSI, two things need to be done.
contains six or more. The HSI FIFO FULL interrupt The FIFO should first be fl\lshed and the HSI initial-
mask bit is INT_MASKI.6. The occurrence of a HSI ized. The· FIFO should be flushed to clear out any
FIFO FULL interrupt is indicated by IOSI.6. Earlier pending events. The following section of code can be
warning of a impending FIFO full condition can be used to flush the FIFO:
achieved by the HSI FIFO 4th Entry interrupt.
reflush: ld 0., HSLTIME ;clear an event
The HSI_FIFO_4 interrupt generates an interrupt skip ;wait 8 state times
when four or more events are stored in the HSI FIFO skip
independent of the holding register. The interrupt is jbs 100Sl, 7, reflush
enabled by setting·' INT_MASKI.2. The HSI_
FIFO_4 vectors indirectly through location 2034H, When initializing the HSI, interrupt(s) need to be en-
There is no status flag associated with the HSI_ abled and the HSI pins need to be individually enabled
FIFO_4 interrupt since it has its own independent in- to the FIFO through lOCO. It is very important to
terrupt vector. . initialize the interrupts before the HSI pins or a FIFO
lockout condition could occur. For example, if the H~I
The HSI.O pin can generate an interrupt on the rising pins were enabled first, an event could get loaded into
edge even if its not enabled to the HSI FIFO. An inter- the holding register before the HSI_DATA_A VAIL-
rupt generated by this pin vectors through location ABLE interrupt.is enabled. If this happens, no HSI_
2008H. DATA-..:AV AILABLE interrupts will ever OCCljr.
'1 6 5 4 3 I 2 I 1 I 0
HSO_ CAM TMR2/ SET/ INT/
CHANNEL 06H
COMMAND LOCK TMR1 CLEAR INT
5-52
80C196KC USER'S GUIDE
IOS2: 7 6 5 4 3 2 1 0
START T2
HSO.5 HSO.4 HSO.3 HSO.2 HSO.1 HSO.O
AID RESET
l1H
read Indicates which HSO' event occcured
START AID: HSO'_CMD IS, start AID
T2RESET: HSO'_CMD 14, Timer2 Reset
HSO'.O-S: O'utput pin's HSO'.O through HSO'.S
5-53
80C196KC USER'S GUIDE
16-81T 16-81T
T2CLK
XTAL1/16
T2RST
CONTROL
LOGIC
L~J 24-----t
CAM FILE 8
16
time the action is to be carried out into word address can also be overwritten. Since it can take up to 8 state
0004H. The typical code would be: times for a command to move from the holding register
to the CAM, 8 states must be allowed between succes-
LOB HSO_COMMAND,#what_to_do sive writes to the CAM.
ADD HSO_TIME,Timerl,#when_to_do_it
To provide proper synchronization, the minimum time
that should be loaded to Timer! is Timerl + 2. Small-
er values may cause the Timer match to occur 65,636
counts later than expected. A similar restriction applies
HSO.O CURRENT STATE
if Timer2 is used.
HSO.1 CURRENT STATE
HSO.2 CURRENT STATE
Care must be taken when writing the command tag for
the HSO, because an interrupt can occur between writ-
HSO.3 CURRENT STATE ing the command tag and loading the time value. If the
HSO.4 CURRENT STATE interrupt service routine writes to the HSO, the com-
mand tag used in the interrupt routine will overwrite
HSO.5 CURRENT STATE
the command tag from the main routine. One way of
CAM ~ HOLDING REGISTER IS FULL aVdiding this problem would be to disable interrupts
HSO HOLDING REGISTER IS FULL
when writing'to the HSO unit.
270704-25
10.3 HSO Status
Figure 10-4.1/0 Status Register 0,
Before writing to the HSO, ensure that the Holding
Writing the time value loads the HSO Holding Register Register is empty.]f it is not, writing to the HSO will
with both the time and the last written command tag. overwrite the value in the Holding Register. I/O Status
The command does not actually enter the CAM file Register 0 (IOSO) bits 6 and 7 indicate the status of the
until an empty CAM register becomes available. HSO unit. If IOSO.6 equals 0, the holding register is
empty and at least one CAM register is empty. If
Commands in the holding register will not execute even IOSO.7 equals O,the holding register is empty. The pro-
if their time tag is reached. Commands must be in the grammer should carefully decide which of thes.e two
CAM to execute. Commands in the holding register flags is the best to use for each application. This register
5-54
inter 80C196KC USER'S GUIDE
also shows the current status of the HSO.O through 10.4 Clearing the HSO and Locked
HSO.5. The HSO pins can be set by writing to this Entries
register in HWindow 15. The format for I/O Status
Register 0 is shown ,in Figure 10·4, All 8 CAM locations of the HSO are compared before
any action is taken. This allows a pending external
event to be cancelled by simply writing the opposite
16H event to the CAM. However, once an entry is placed in
SOFTWARE TIMER 0 EXPIRED the CAM, it cannot be removed until either the speci·
fied timer matches the written value; a chip reset oc-
SOFTWARE TIMER 1 EXPIRED curs or IOC2.7 is set. IOC2.7 clears all entries in the
SOFTWARE TIMER 2 EXPIRED CAM.
SOFTWARE TIMER 3 EXPIRED
Internal events cannot be cleared by writing an oppo-
TIMER 2 HAS OVERFLOW site event. This includes events on HSO channels 8-B
TIMER 1 HAS OVERFLOW
and E-F. The only method for clearing these events is
by a reset or setting IOC2.7.
HSI FIFO IS FULL
HSI HOLDING REGISTER DATA AVAILABLE
HSO LOCKED ENTRIES
270704-26
The CAM Lock bit (HSO_Command.7) can be set to
Figure 10-5. 1/0 Status Register 1 (1051) keep commands in the CAM, otherwise the commands
will clear from the CAM as soon as they cause an
The expiration of software timer 0 through 4, and the event. This feature allows for generation periodic events
overflow of Timer! and Timer2 are indicated in lOS 1. based on Timer2 and must be enabled by setting
The status bits can be set in HWindow 15 but not cause IOC2.6. To clear locked events from the CAM, the en-
interrupts. The register is shown in Figure 10·5. tire CAM can be cleared by writing a 'one to the CAM
clear bit IOC2.7. A chip reset will also clear the CAM.
Whenever the processor reads this register all of the
time· related flags (bits 5 through 0) are cleared. This Locked entries are useful in applications requiring peri-
applies not only to explicit reads such as: odic or repetitive events. Timer2 used as an HSO refer-
ence can generate periodic events with the use of the
LDB AL,IOSI HSO T2RST command. HSO events programmed with
a HSO time less then the Timer2 reset time will occur
but also to implicit reads such as: repeatedly as Timer2 resets. Recurrent software tasks
can be scheduled by locking software timers commands
JB IOSl.3,somewhere_else into the High Speed Output Unit. Continuous sampling
'of the A/D converter can be accompished by program-
which jumps to somewhere_else if bit 3 ofIOSI is set. ming a locked HSO A/D conversion command. One of
In most 'cases this situation can best be handled by hav· the most useful features is the generation of multiple
ing a byte in the register file which maintains an image PWM's on the High Speed Output lines. Locked entries
of the register. Any time a hardware timer interrupt or provide the ability to program periodic events While
a HSO software timer interrupt occurs the byte can be minimizing software overhead.
updated:
Individual external events setting or clearing an HSO
ORB IOSLimage,IOSl pin can by cancelled by writing the opposite event to
the CAM. The HSO events do not occur untU the timer
leaving 10SI_image containing all the flags that were reference has changed state. An event programmed to
set before plus all the new flags that were read and set and clear an HSO event at the same time will cancel
cleared from 10S1. Any other routine which needs to each other out. Locked entries can correspondingly be
sample the flags can safely check lOS I_image. Note cancelled using this method. However, the entries re-
that .if these routines need to clear the flags that they main in the HSO CAM and can quickly fill up the
have acted on, then the modification of lOS I_image available eight locations. As an alternative, all entries in
must be done from inside a critical region. the HSO CAM can be cleared by setting IOC2.7.
5-55
80C196KC USER'S GUIDE
10.5 HSO Precautions port is functionally compatible with the serial port on
the MCS-5l family of microcontrollers, although the
Timer! is incremented every S state-times. When software controJling the ports is different.
Timer! is being used as the reference timer for an HSO
command, the comparator has a chance to look at all S 'Data to and from the serial port is transferred through
CAM registers before Timer! changes its value. Writ- SBUF(RX) and SBUF(TX), both located at 07H.
ing to, Timer!, which is allowed in HWindow 15, SBUF(TX) holds data ready for transmission and
should be carefully done. The user should ensure writ- SBUF(RX) contains data received by the serial port.
ing to Timer! will not cause programmed HSO events SBUF(TX) and SBUF(RX) can be'read and written in
to be missed or occur in the wrong order. The same HWindow IS.
precaution applies to Timer2.
Mode 0, the synchronous shift register mode, is de-
The HSO requires at least eight state times to compare signed to expand I/O over a serial line. Mode' I is. the
each entry in the CAM. Therefore, the fast increment standard S bit data asynchronous mode used for normal
mode for Timer2 cannot be used as a reference for the serial communications. Modes 2 and' 3 are 9 bit data
HSO if transitions occur faster then once every eight asynchronous modes typically used for interprocessor
state times. communications.
5-56
inter 80C196KC USER'S GUIDE
~-~--+--:-'-+--:--~-T-:-8-r-R-:-N-+-P-~-N-+--M-12~r-M-~~1 11H
TB8 - Sets th~ ninth data bit for transmission. Cleared after each transmission. Not valid
if parity is enabled.
REN - Enables the receiver
PEN - Enables the Parity function (even parity)
M2, MI - Sets the mode. ModeO = 00, Model = 01, Mode2 = 10, Mode3 = 11
7 6 5 4 3 2 1 0
RB8/ ,
RI TI FE /TXE OE X X 11H
RPE
RB8 - Set if the 9th data bit is high on reception (parity disabled)
RPE - Set if parity is enabled and a parity error occurred
RI - Set when the last data bit is sampled
TI - Set at the beginning of the STOP bit transmission
FE - Set if no STOP bit is found at the end of a reception
. TXE - Set if tw~ bytes can be transmitted
OE - Set if receive~ is overwritten
The Transmitter Empty (TXE) bit is set if the transmit In the asynchronous modes, writing to SBUF (TX)
buffer is empty and ready to take up to two characters. ; starts a transmission. A falling edge on RXD will begin
TXE gets cleared as soon as a byte is written to SBUF. a reception if REN is set to 1. New data placed in
Two. bytes may be written consecutively to SBUF if SBUF (TX) is held and will not be transmitted until the
TXE is set. One byte may be written if TI alone is set. end of the stop bit has been sent.
By definition, if TXE has just been set, a transmission
has completed and TI will be set. The TI bit is reset In all modes, .the RI flag is set after the last data bit is
when the CPU reads the SP_STAT registers. sampled approximately in the middle of the bit time.
For all modes, the TI flag is set after the last data bit
The TB8 bit is cleared after each transmission and both (either 8th or 9th) is sent, also in the middle of the bit
TI and RI are cleared when SP_STAT is read. The RI time. The flags clear when SP_STAT is read, but do
and TI status bits cap. be set by writing to SP_STAT in not have to be clear for the port to receive or transmit.
HWindow 15 but they will not cause an interrupt. The serial port interrupt bit is set as a logical OR of the
Reading of SP_CON in HWindow 15 will read the RI and TI bits. Note that changing modes will reset the
last value written. Whenever the TXD pin is used for Serial Port and abort any transmission or reception in
the serial port it must be enabled by setting IOC1.5 to a progress on the channel.
1. lOCI register 1 can be read in HWindow 15 to deter-
mine the setting.
DETERMINING BAUD RATES
STARTING TRANSMISSIONS AND RECEPTIONS Baud rates in all modes are determined by the contents
of a 8-bit register at location OOOEH. Reading or writ-
In Mode 0, if REN = 0, writing to SBUF (TX) will ing this register in HWindow 15 is reserved by Intel for
start a transmission. A rising edge on REN, or clearing future use. This register must be loaded sequentially
RI with REN = I, will start a reception. Setting with 2 bytes (least significant byte first). The MSB of
REN = 0 will stop a reception in progress and inhibit this register selects one of two sources for the input
further receptions. To avoid a partial reception, REN frequency to the baud rate generator. If it is a I, the
must be set to zero before RI is cleared. This can be XTALl pin is selected, if not, the T2CLK pin is used.
handled in an interrupt environment by using software The maximum input frequency is 4 MHz on T2CLK.
flags or in straight-line code by using the Interrupt
Pending register to signal the completion of a reception.
5-57
80C196KC USER'S GUIDE
This provides the needed synchronization to the inter- 8096BH shared the TI and RI interrupts on the SERI-
nal serial port clocks. AL interrupt vector. On the 80CI96KC, these inter-
rupts share both the serial interrupt vector and have
The unsigned integer represented by the lower 15 bits 'their own interrupt vectors. Because the interrupts now
of the baud rate register defines a number B, where B have separate vectors, you do not have to sort the inter-
has a maximum value of 32767. The baud rate equa- rupts out in the same interrupt service routine.
tions are shown below.
When the TI bit is set it can cause an interrupt through
Asynchronous Modes 1, 2 and 3: the vectors at locations 200CH or 2030H. Interrupt
through location 2030H is determined by INT_
BAUD REG = XTAL1 -10R T2CLK MASKl.O. Interrupts through the Serial interrupt are
- Baud Rate' 16 - Baud Rate' 8 controlled by the sarrie bit as the RI interrupt (IN'I:_
MASK.6).
Synchronous Mode 0:
5-58 '
inter 80C196KC USER'S GUIDE
TXD
DO D1 D2 D3 D4 D5 De D7
AXD(IN)
EXPANDED:
TXD ~~I--
RXD(OUT) DO x::: D1 C: D2
DO D1
RXD (IN) ---c:J----I,I----IDI---;/F#-I--
270704-27
CLOCK INHIBIl
~ ____________ ________-;PX.
~
15K
DATA
)o~~--~---------;AXD
CLOCK
L-____~--____~--__'TXD
INPUTS
80C196KC
SERIAL IN A
ENABLE
11>-----1 PX.X
270704-28
5·59
intJ 80C196KC USER'S GUIDE
STOP
270704-29
270704-30
5-60
80C196KC USER'S GUIDE
VREF
8 TO 1
ANALOG
MULTIPLEXER
START
CONVERSION
HSO COMMAND "F"
270704-33
5-61
80C196KC USER'S GUIDE
7 0
I AID CHANNEL
1 STA,RT NOW
o STARTED BY HSO
o 10-BIT CONVERSION
1 8-BIT CONVERSION
270704-81
15 8 6 3 o
~1__~~__..L-_M~S~BS__L-~__","-_,~I__L~S~BS__~IR_S_v.IM_O_OE.:I_S~T~1__~C~~_#L-~I02H
5·62
80C196KC USER'S GUIDE
Programmable Sample and Convert Times Because the 8OCl96KC can run from 3.5 MHz to
16 MHz, it is difficult to optimize both the Sample and
There are two parameters,that define the time an AID Convert times using only the fast and normal conver-
conversion will take; the Saplple Time plus the Convert sion modes on the 8OC196KB. Therefore, an
time. The Sample time is the time the analog input AD_TIME register in HWINDOW 1 was added so
channel. is actually connected to the Sample Capacitor. both the Sample and Convert times could be pro-
If this time is too short, the Sample capacitor will not grammed in number of state times. The fast and normal
charge properly. If the Sample time is too long, the conversions are still present to remain compatib~e with
input may change and errors, occur. The Convert time the 8OC196KB. Figure 12-5 shows the AD_TIME
is defined to be the length of time to convert one bit of register and the equations for calculating the number of
the analog voltage on the Sample Capacitor to a digital state times for an AID conversion. IOC2 is shown in
value. The Convert- time has to be long enough for the Figure 12-6 which enables the different conversion
comparator to settle and resolve the voltage, but short times.
enough so the Sample Capacitor will not discharge and
lose resolution.
7 o
270704-84
5-63
80C196KC USER'S GUIDE
The AID...:-TIME register only prognup.s the speed the control logic. If an H~O command was used, ,the con-
AID can,run, NOT the speed it pan convert correctly. version will begin when Timerl increments. This aids
The 80CI96KC data sheet will contain the correct val- applications' attempting, to approach spectrally pure
ues for the Sample and Convert times in microseconds. sampling, since successive, samples spaced by _equal
Timerl delays will occur with 'a variance of about ± 50
ns (assuming a stable cl0Ck on XTALl). However, con-
Restrictions on the AID Converter versions initiated by writing a one to the ADCoN reg-
I. ,Fo~ an AID conversion, initiali~e the' AID registers ister GO Bit will start within three state times after the
in the following order; AD_TIME, IOC2, and instruction has completed execution resulting in a vari-
AD_COMMAND. ance of about 0.38 ,..,s,(XTALI = 16 MHz).
2. Do 'not start a conversion using the AD_TIME reg-
ister when Ii conversion using a 80CI96KB compati- To perform the actual analog-to-digital conversion the
ble mode is in progress (and VICE-VERSA). 8OC196KC implements a sucoessive approximation al-
3. Never write zero to the AD_TIME register. gorithm. The converter hlll'dware consists of a 256-ro-
sistor ladder, a comparator, coupling capacitors and Ii
10-bit successive approximation register (SAR) with
logic that guides the process. The resistor ladder pro-
12.1 AID Conversion Process vides 20 mV steps (VREF = 5.12V), while capacitive
The conversion process is initiated by the exe~ution of coupling creates 5 mV steps within the 20 mV ladder
HSO command OFH, or by writing a one to the GO Bit voltages. Therefore, 1024 internal reference voltages are
in the AID Control Register. Either activity causes a available for comparison against the analog input to
start conversion signal to be sent to the AID converter generate a to-bit conversion result. For an 8-bit conver·
sion, there are 256 levels.
7 o
: AID SE<
~~'---'---r-l-.a....-.a....-.a....--, 10C2
I
5-64
inter 80C196KC USER'S GUIDE
A successive approximation conversion is performed by may degrade converter accurliCY as a result of the inter-
comparing a sequence of reference voltages, to the ana- nal sample capacitor not being fully charged during the
log input, in a binary search for the reference voltage sample window.
that most closely matches the input. The 1/. full scale
reference voltage is the first tested. This corresponds to If large source impedances degrade converter accuracy
a lO-bit result where the most significant bit is zero, because the sample capacitor is not charged during the
and 'all other bits are ones (0111.1111.1lb). If the ana- sample time, an external capacitor connected to the pin
log input was less than the test voltage, bit 10 of the compensates for this degradation. Since the sample ca-
SAR is left a zero, and a new test voltage of '/. full scale pacitor is 2 pF, a 0.005 J.l-F capacitor will charge the
(00 11.1111.11 b) is tried. If this test voltage was lower sample capacitor to an aecurate input voltage of
than the analog input, bit 9 of the SAR is set and bit 8 ±0.5LSB (2048 * 2 pF). An external capacitor does not
is cleared for the next test (0101.l111.1,lb). This binary compensate for the voltage drop across the source re-
searchcontiilUes until 10 or 8 tests have occurred, at' sistance, but charges the sample capacitor fully during
which time the valid 100bit or 8-bit conversion result the sample time.
resides in the SAR where it can be read by software.
Placing an external capacitor on each analog input will
also reduce the sensitivity to noise, as the capacitor
12.2 AID Interface Suggestions combines with series resistance in the external circuit to
form a low-pass filter. In practice, one should include a
The external interface circuitry to an analog input is small series resistance pridr to the external capacitor on
highly dependent upon the application, and can impact the analog input pin and choose the largest capacitor
converter characteristics. In the external circuit's de- value practical, given the frequency of the signal being
sign, important factors such as input pin leakage, sam- converted. This provides a low-pass filter on the input,
ple capacitor size and multiplexer series resistance from while the resistor will also limit input current during
the input pin to the sample capacitor must be consid- over-voltage conditi0!ls.
ered. The following calculation assumes a 1 ,..,S Sample
Window. Figure 12-S shows a simple analog interface circuit
based upon the discussion above. The circuit in the fig- '
For the 80C196KC, these factors are idealized in Fig- ure also provides limited protection against over-volt-
ure 12-7. The external input circuit must be able to age conditions on the analog input. Should the input
charge a sample capacitor (Cs) through a series resist- voltage inappropriately drop significantly below •
ance (RI) to an accurate voltage given a D.C. leakage ground, diode D2 will forward bias at about O.S DCY:
(IL). On the SOC 196KC, Cs is around 2 pF, RI is This will limit the current sourced by the input pin to
around ± 5 KO and IL is specified as 3 ,..,A maximum. an acceptable amount. However, before any circuit is
In determining the necessary source impedance Rs, the used in an actual application, it should~ be thoroughly
value of YBIAS is not important. \ analyzed for applicability to the specific problem at
hand.
VREF
01
ANALOG
FROM USER CIRCUIT>--4...--j,JV'v-..... -a INPUT PIN
02
270704-34
ANGNO
Figure 12-7. Idealized AID Sampling Circuitry 270704-35 '
External circuits with source impedances of 1 KO or Figure 12-8. Suggested AID Input Circuit
less will be able to maintain an input voltage within a
tolerance of about ±0.61 LSB (1.0 KO X 3.0 ,..,A=
3.0 mY) given the D.C. leakage. So~rce impedances
above 2 KO can result in an external error of at least
one LSB due to the voltage drop caused by the 3 ,..,A
leakage. In addition, source impedances above 25 KO
5-65
80C196.KC USER'S GUIDE
ANAlOG REFERENCES An. unavoidable error simply results from the conver-
sion of a continuous voltage to an integer digital repre-
Reference supply levels strongly influence the absolute sentation. This error is called quantizing error, and is
accuracy of the conversion. Bypass capacitors should always :to.5 LSB. Quantizing error is the only error
be used between VREF and ANGND. ANGND should seen in a perfect AID converter, and is. obviously pres-
be wjthin abo.llt a tenth of a volt of Vss. VREF should ent in actual converters. Figme 12-9 shows the transfer
be well reMted and used only for the AID converter. fUllction for an ideal 3-bit AID converter (i.e. the Ideal
The VREP supply can be between 4.5V.and 5.5V and Characteristic).
needs to. be able to source around 5 rnA. See Section 13
for the minimum hardware connections. Note that in Figure 12-9 the Ideal Characteristic pos-
sesses unique qualities: .it's first code transition occurs
Note that·if only ratiometric information is desired, wb.en the input voltage is 0.5 LSB; it's full-scale code
VREF can be connected to Vee. In addition, VREP and . transition occurs when the input voltage equals the full-
ANGND must be connected even if the AID converter scale reference minus 1.5 LSB; and it's code widths are
is not being used. Remember that Port 0 receives its all exactly one LSB. These qualities result in a digitiza-
power from the VREP and ANGND pins even when it tion without offset, full-scale or linearity errors. In oth-
is used as digital I/O. er words, a perfect conversion.
ous sub-components of error are important in many Differential Non-Linearity anll Non-Linearity are
applications. These error components are described in quantified. by m!l8suring the Terminai.Based Linearity
Section 12.5 and in the text below where ideal and actu- Errors. A Terminal Based Characteristic results when
al converters are compared. . an Actual Characteristic is shifted and rotated to elimi-
nate zero offset and full-scale error (see Figure·12-11).
'The Terminal Based Characteristic is similat to the Ac-
5-66
80C196KC USER'S GUIDE
a
3
~ THE VOLTAGE CHANGE
BETWEEN ADJACENT CODE
TRANSITIONS (THE "CODE
WIDTH") IS = 1 LSB.
O~---L---.----~---.---------r--------~--------r---~----r----r---'---------.
1/2 2 3 4 5 6 61/2 7 B
tual Characteristic that would be seen if zero offset and Undesired signals come from three main sources. First,
full-scale error were externally trimmed away. In prac- noise on Vee-Vee Rejection. Second, input signal
tice, this is done by using input circuits which include changes on the channel being converted after the sam-
gain and offset triJhming. In addition, VREF on the ple window has closed-Feedthrough. Third, signals •
80C196KC could also be closely regulated and applied to channels not selected by the multiplexer-
trimmed within the specified range to affect full-scale Off-Isolation.
error.
Finally, multiplexer on-channel resistances differ slight-
Other factors that affect a real A/D Converter system ly from one channel to the next causing Channel-to-
include sensitivity to temperature, failure to completely Channel Matching errors, and random noise in general
reject all un~anted signals, multiplexer channel dissim- results in Repeatability errors.
ilarities and random noise. Fortunately these effects are
small.
5-67
7
5 ABSOLUTE ERROR
~
C
ACTUAL
~
..... CHARACTERISTIC
co
~
.....
? .4
8....
'f
-
~
c
!t
III
:::J
o
CD
0')
"~
(")
(l)
CO
Q.
3
rn
ii ::D
CD (I)
!t G)
0 c:
~
...
III
6
rn
~ 2
;-
:l-
In
~
In
ACTUAL
5 CHARACTERISTIC
"'1'1
c·
c TERMINAL BASED
...
GJ CHARACTERISTIC
~
......
~
4
o....
';;}
3
Q ....~
o
<f -~ c:
O'l
co m ~
:
Q.
(')
3
NON-LiNEARllY
l:I
u)
G)
::r c:
I»
ji; 6
m
~
:::!.
2
g.
!DEAL CODE WIDTH
12~4 AID Glossary of Term$ FULL SCALE ERROR-The difference betwee~ the
expected and actual input voltage corresponding to the
Figures 12-9. 12-10. and 12-11 display many of these full scale code· transition.
terms. Refer to AP-406 'MCS-96 Analog Acquisition
Primer' for additional information on the AID terms. IDEAL CHARACfERISTIC-A characteristic with
its first code transition at VIN = 0.5 LSB. its last code
ABSOLUTE ERR9R-The maximum difference be- transition at VIN = (VREF - 1.5 LSB) and all code
tween corresponding actual and ideal code transitions. widths equal to one LSB,
Absolute Error accounts for all deviations of an actual '
converter from an ideal converter. INPUT RESISTANCE-The effective series resistance
from the analog input pin to the sample capacitor~ ,
ACfUAL CHARACfERISTIC-The characteristic of
an actual converter. The characteristic of a given con- LSD-LEAST SIGNIFICANT BIT: The voltage value
verter may vary over temperature. supply voltage. and corresponding to the full scale voltage divided by 2n.
frequency conditions. An Actual Characteristic rarely where n is the number of bits of resolution of the con·,
has ideal first and last transition locations or ideal code verter. For a lO-bit converter with a reference voltage
widths. It may even vary over multiple conversion un- of 5.12 volts. one LSB is S.OmV. For an 8-bit conver·
der the same conditions. sion. one LSB equals 20 mY. Note that this is different
than digital LSBs.
BREAK-BEFORE-MAKE-The property of a multi-
plexer which guarantees that a previously selected MONOTONIC-The property of successive approxi-
channel will be deselected before a new channel is se- mation converters which guarantees that increasing in-
lected. (e.g. the converter will not short inputs put voltages produce adjacent codes of increasing value.
together.) and that decreasing input voltages produce adjacent
codes of decreasing value.
CHANNEL-TO-CHANNEL MATCHING-The dif-
ference between corresponding code transitions of actu- NO MISSED CODES-For each and every output
al characteristics taken from different channels under code. there exists a unique input voltage range which
the same temperature, voltage and frequency condi- produces that cod~ only.
tions.·
NON-UNEARITY-The maximum deviation of code
CHARACfERISTIC-A graph. of input voltage ver- transitions of the terminal based characteristic from the
sus the resultant output code for an AID converter. It corresponding code transitions of the ideal characteris-
describes the transfer function of the AID converter. tics. '
SAMPLE TIME UNCERTAINTY-The variation in While discussing the characteristics of the 1/0 pins
the sample time. some approximate current or voltage specifications will
be given. The exact specifications are. available in the
SAMPLE WINDOW-Begins when the sample capac- latest version of the data sheet that corresponds to the
itor is attached to a selected channel and ends when the device being used.
sample capacitor is disconnepted from the selected
channel. ALTERNATE CONTROL
PI!!! FUNC.
FUNCTION REG.
SUCCESSIVE APPROXIMATION-An AID con-
version method which uses a binary search to arrive at 2.0 Output TXO (Serial Port Transmit) IOC1.5
the best digital representation of an analog input. 2.1 Input RXO (Serial Port Receive) SPCON.3
TEMPERATURE COEFFICIENTS-Chang~ in the 2.2 Input Extint IOC1.1
stated, variable per degree centigrade temperature
change. Temperature coefficients are added to the typi- 2.3 Input' T2CI,..K (Timer2 Clock & Baud) IOC9· 7
cal values of a specification to see the effect of tempera- 2.4 Input T2RST (Timer2 Reset) , IOCO.5
ture drift. '
2.5 Output PWMOutput IOC1.0
TERMINAL BASED CHARACTERISTIC-An Ac- 2.6 OBO· Timer2 up/down select IOC2.1
tual Characteristic which as been rotated and translat-
ed to remove zero offset and full-scale error. 2.7 OBO· Timer2 Capture N/A
·OBD =
..
QuaSI-bidirectional
Vee REJECTION-Attenuation of naise on the Vee Figure 13·1. Port 2 Multiple Functions
line to the AID converter.
5.-71
80C196KC USER'S GUIDE
13.2 Quasi-Bidirectional Ports Quasi-bidirectional pins can be' used as input and out~
put pins without the need for a data direction register.
Port 1 and Port 2 have quasi-bidirectional 1/0 pins. They output a strong low value and a' weak. high value.
When used as inputs the data on these pins must be The weak high value can be externally pulled low pro-
stable one state time prior to reading the 'SFR. This , viding an input.function. Figure 13.-3 shows the config-
timing is also valid for the input-only pins o(Port 2 and uration of a CHMOS q\lasi-bidirectional port.
is similar to the HSI in that the sample occurs during
'PHI '0,{ during CLKOUT low. When used as outputs,
the quasi-bidirectional pins will change state shortly af-
ter CLKOUT 'falls. If the change was from '0' td a 'I'
the low impedance pullup will remain on for one state
time after the change. '
Vee vee
o
rROMPORT~~~----~~------~------~~~~
LATCH,
5-72
80C196KC USER'S GUIDE
Outputting a 0 on a quasi-bidirectional pin turns on the ecutes. The first is that even though Pl.l is being driv~
strong pull-down and turns otT all of the pull-ups. en high by the 80CI96KC it is possible that it is being
When a I is output the pull-down is turned otT and 3 held low externally. This typically happens when the
pull-ups (strong-PI, weak-P3, very weak-P2) are turned port pin drives the base of an NPN transistor which in
on. Each·time a pin switches from 0 to I transistor PI turn drives whatever there is in the outside world which
turns on for two oscillator periods. ~2 remains on until needs to be toggled. The base of the transistor will
a zero is written to the pin. P3, is used as a latch, so it is clamp the port pin to the transistor's Vbe above
turned on whenever the pin is above the threshold.value ground, typically 0.7V. The 80CI96KC will input this
(around 2 volts). value as a zero even if a one has been written to the port
pin. When this happens the XORB instruction will al-
To reduce the amount of current which flows when the ways write a one to the port pin's SFR and the pin will
pin is externally pulled low, P3 is turned otT when the not toggle.
pin voltage drops below the threshold. The current re-
quired to pull the pin from a high to a low is at its The second problem, which is related to the first, is that
maximum just prior to the pull-up turning otT. An ex- if P1.0 happens to be driven to Ii zero when Port I is
ternal driver can switch these pins easily. The maxi- read by the XORB instruction, then the XORB will
mum current required occurs at the threshold voltage write a zero to P1.0 and it will no longer be useable as
and is approximately 700 microamps. an input. .
When the Port I pins are used as their alternate func- The first situation can best be solved by the external
tion, (HOLD, HLDA, BREQ, PWMs), the pins act like driver design. A series resistor between the port pin and
a standard output port. the base of the transistor often works by bringing up
the voltage present on the port pin. The second case can
be taken care of in the software fairly easily:
HARDWARE. CONNECTION HINTS
When using the quasi-bidirectional ports as inputs tied LDB AL, rOPORTl
to switches, series resistors may be needed if the ports XORB AL, #OlOB
will be written to internally after the part is initialized. ORB AL, #OOlB
The amount of current sourced to ground from each STB AL, rOPORTl
pin is typically 7 rnA or more. Therefore, if. all 8 pins
are tied to ground, 56 rnA will be sourced. This is A software solution to both cases is to keep a byte in
equivalent to instantaneously doubling the power used RAM as an image of the data to be output to the port;
any time the software wants to modify the data on the
by the chip and may cause noise in some applications.
port it can then modify the image byte and copy it to
This potential problem can be solved in hardware or the port.
software. In software, never write a zero to a pin being
If a switch is used on a long line connected to a quasi-
used as an input.
bidirectional pin, a pullup resistor is recommended to
In hardware, a IK resistor in series with each pin will reduce the possibility of noise glitches and to decrease
limit current to a reasonable value without impeding the rise .time of the line. On extremely long lines that
the ability to override the high imped~nce pullup. If all are handling slow signals, a capacitor may be helpful in
8 pins are tied together a 120n resistor would be rea- addition to the resistor to reduce noise.
sonable. The problem is not quite as severe when the
.inputs are tied to electronic devices instead of switches,
as most external pulldowns will not hold 20 rnA to 0.0 13.3 Output Ports
volts. Output pins include the bus control lines, the HSO
lines, and some of Port 2. These pins can only be used
Writing to a Quasi-Bidirectional Port with electronic as outputs as there are no input butTers connected to
devices attached to the pins requires special attention. them. The output pins are changed before the rising
Consider using P 1.0 as an input and trying to toggle edge of PHI and is valid some time during PH1. Exter-'
PI. I as an output: nally, PHI corresponds to CLKOUT low. It isnot pos-'
sible to use immediate logical instructions such as XOR
ORB rOPORT1, #OOOOOOOlB Set PLO to toggle these pins.
for input
XORB rOPORT1, #OOOOOOlOB Complement The control outputs and HSO pins have output butTers
Pl.l with the same output characteristics as those of the bus
pins. Included in the category of control outputs are:
The first instruction will work as expected but two TXD, RXD (in Mode 0), PWM, CLKOUT, ALE,
problems can occur when the second instruction ex- BHE, RD, and WR. The bus pins have 3 states: output
5-73
inter 80C196KC USER'S GUIDE
high,output low, and high impedance. 'Figure 13-4 To read Port 3 and 4 requires that "ones" be written to
shows. the internal configuration of an output pin. the port registers to first setup the input port configura-
tion circuit. Note that the ports are reset to this input
condition, but if zeroes have been written to the port,
13.4 Ports 3 and 41ADO-15 then ones must be re-written to any pins which are.to
be used as inputs. Reading Port 3 and 4 from a previ-
These pins have two functions. They are either bidirec- ously written zero condition is as follows ...
tion~l ports with open-drain outputs or System Bus
pins which the memory controller uses when it is ac- LD intregA,' #OFFFFH setup port
cessing off-chip memory. If the EA line is low, the pins change mode
always act as the System Bus. Otherwise they act as bus pattern
pins only during a memory access.
ST intregA, lFFEH register ~
Accessing Port 3 and 4 as 1/0 is easily done from inter- Port 3 and 4
nal registers. Since the LD and ST instructions require LD &: ST not
the use of internal registers, it may be necessary to first needed if
move the port information into an internal location be- previously
fore utilizing the data. If ·the data is already internal, written as ones
the LD is unnecessary. For instance, to write a word
value to P!lrt 3 and 4 ... LD intregB, lFFEH register~
Port 3 and 4 '
LD intreg, portdata register ~
data When acting as the system bus the pins have strong
not needed if drivers to both Vee and Vss. These drivers are used
already whenever data is being output on the system bus and
internal are not used when data is being output by Ports 3 and
4. The pins, external input buffers and pulldowns are
ST intreg, lFFEH register ~ shared between the bus. and the ports. The ports use
Port 3 and 4 different output buffers which are configured as open-
drain, and require external pullup resistors. (open-drain
is the MOS version of open-collector.) The port pins
and their system bus functions are shown in Figure
13-5. .
BUS
ALT.
F'UNCT. ---1"-----1
5-74
inter 80C196KC USER'S GUIDE
BUS
ADDR _-4-_+-___-1
DATA
PIN---t---t---t--+------1K"'- 1 - - - - - - - - '
PORT BUS SAMPLE RESET
BUS PORT FCN SELECT
270704-40
Ports 3 and 4 on the 80C196KC are open drain ports. 14.1 Power Supply
A diagram of the output buffers cormected to Ports 3
and 4 and the bus pins is shown in Figure 13-5., Power to the 80C196KC flows through 6 pins. Vee
supplies the positive voltage to the digital portion of the
When Ports 3 and 4 are to be used as inputs, they must chip while VREF supplies the A/D converter and
first be written with a '1'. This will put the ports in a Port 0 with a positive voltage. These two pins need'to
high impedance mode. When they are used as outputs, be connected to a 5 volt power supply. When using the
a pullup resistor must be used externally. A 15K pullup A/D converter, it is desirable to connect VREF to a
resistor will source a maximum of 0.33 milliamps, so it separate power supply, or at least a separate trace to
would be a reasonable value to choose if no other cir- minimize the' noise in the A/D converter.
cuits with pullups were connected to the, pin,
The four common return pins, VSSl, VSS2, Vss3, and
Ports 3 and 4 are, addressed as off-chip memory- Angd, must all be nominally at 0 volts. Even if the
mapped I/O. The port pins will change state shortly A/D converter is not being used, VREF and Angd must
after the falling edge of CLKOUT. When these pins are still be connected for PortO to function.
used as Ports 3 and 4 they are open drains, their struc-
ture is different when they are used as part of the bus.
14.2 NOise Protection Tips
Port 3 and 4 can be reconstructed as I/O ports from the
Address/Data bus. Due to the fast rise and fall times of high speed CMOS
logic, noise glitches on the power supply lines and out-
puts at the chip are not uncommon, The 80C196KC is
14.0 MINIMUM HARDWARE no exception. So it is extremely important to follow
CONSIDERATIONS good design and board layout techniques to keep noise
to a minimum. Liberal use of deco\lpling· capacitors,
The 80C196KC requires several external connections to Vee and ground planes, and transient absorbers can all
operate correctly. Power and ground must be connect- be of great help. It is much easier to design a board
ed, a clock source must be generated, and a reset circuit with these features then to search for random noise on
must be present. We will look at each of these areas in a poorly designed PC board. For more information on
detail. noise, refer to Applications Note AP-125, 'Designing
Microcontroller Systems for Noisy Environments' in
the Embedded Control Application Handbook.
5-75
80C196KC USER'S GUIDE
.--------1--_ To Intemal
circuitry'
XTAL1 XTAL2
QUARTZ CRYSTAL---i==±'-I
Rf OR CERAMIC
RESONATOR
XTAL1
V-;s
270704-42
XTAL2 XTAL2
rLOAT
270704-91
5-76
80C196KC USER'S GUIDE
Two non-overlapping internal phases are created by the 14.4 Reset and Reset Status
clock generator: phase 1 and phase 2 as shown in Fig-
ure 14-4. CLKOUT is generated'by the rising edge of Reset starts the SOC196KC off in a known state. To
phase 1 and phase 2. This is not the same as the reset the chip, the RESET pin must be held low for at
8096BH, which uses a three phase clock. Changing least 16 state times after the power supply is within
from a three phase clock to aJwo phase speeds up oper- tolerance and the oscillator has stabilized. As soon as
ation for a set oscillator frequency. Consult the latest the RESET pin is hel,d low, the 1/0 and control pins
data sheet for AC timing specifications. are asynchronously driven to their reset condition.
CASE I
CLKOUT
CASE II
CLKOUT
ALE----I._____rL-
Rii ------..,ul"-------,L
AID BUS ------C>-Of-----cr
cca 201 BH 20BOH
270704-44
5-77
80C196KC USER'S GUIDE
5-78
inter 80C196KC USER'S GUIDE
WATCHDOG TIMER Figure 14-7 shows what the RESET pin looks like in-
ternally. The RESET pin functions as an input and as
There are three ways in which the 80Cl96KC can reset an output to reset an entire system with a watchdog
itself. The watchdog timer will reset the 80C 196KC if it timer overflow; or by executing a RST instruction. For
is not cleared in 64K state times. The watchdog timer is a system reset application, the reset circuit should be a
enabled the first time it is cleared. To clear the watch- one-shot with an open collector output. The reset pulse
dog, write a 'IE' followed immediately by an 'EI' to may have to be lengthened and buffered since RESET
location OAH. Once enabled, the watchdog can only be is only asserted for 16 state times. A capacitor cannot
disabled by a reset and on the 80C196KC. ' be connected directly to RESET if it is to drive the reset
pins of other chips in the circuit. The capacitor may
keep 'the voltage on the pin from going below guaran-
RST INSTRUCTION teed VIL for circuits connected to the RESET pin. Fig-
Executing a RST instruction will also reset the ure 14-8 shows an example of a system reset circuit.
80C196KC. The opcode for the RST instruction is
OFFH. By putting pullups on the Addr/data'bus, unim-
plemented areas of memory will read OFFH and cause 14.5 Minimum Hardware Connections
,the 80Cl96KC to be reset. Figure 14-9 shows the minimum connections needed to
get the 80C196KC up and running. It is important to
RESET CIRCUITS tie all unused inputs to Vee or Vss. If these pins are
left floating, they can float to a mid voltage level and
The simplest way to reset an 80C196KC is to insert a draw excessive current. Some pins such as NMI or
capacitor between the RESET pin and Vss. The EXTINT may generate spurious interrupts if left un-
80Cl96KC has an internal pullup. A 5 uF or greater connected.
capacitor should provide sufficient reset time as' long as
Vee rises quickly. '
Vce
WATCHDOG TIMER
OVERFLOW
RESET INSTRUCTION
(OFFH)
270704-45
5-79
80C196KC USER'S GUIDE
80C196KC
OPTIONAL OTHER
CIRCUITRY
Vee RESET 1-.....-1 ONE-SHOT
74AC123
lOOK
l l .0 J.l.F'
270704-46
NOTE:
1. The diode will provide a faster eycle time repetitive power-on,-resets.
r
20
+5V +5V
Vee VREF
lJ.1.F' lJ.1.F'
V SS1 ANGND
VSS2
VSS3 - +5V
BUSWIDTH
READY
RESET
5 J.l.F .::r:. BUS
CONTROL
RXD ADO-AD15
EXTINT
T2CLK PO.O - PO.7
T2RST
HSI.O - HSI.3 EA
NMI
BOC196KC
270704-47
NOTE:
'Inputs must be driven high or low.
5-80
inter 80C196KC USER'S GUIDE
15.0 SPECIAL MODES OF Ports 3 and 4 will retain the value present in their data
OPERATION latches if being used as I/O ports. If these ports are the
ADDR/DATA bus, the pins will float.
The 80C196KC has Idle and Powerdown Modes to re-
duce the amount of current consumed by the chip. The It is important to note the Watchdog Timer continues
80C196KC also has an ONCE (ON-Circuit-Emulation) to run in the Idle Mode if it is enabled. So the chip
Mode to isolate itself from the rest of the components must be awakened every 64K state times to clear the
in the system. Watchdog or the chip will reset.
XTALI
CLKOUT
,
.,
PHI
INTERNAL'
POWERDOWN : ,r '---i-"';"--o-!I ~------""';--+--i
SIGNAL ~i_...,._...,._....;_....;~....J.
r
--i--.;.-.....;~....;.-....;..-~'1r-flL....---"";"-";"'-+--';'-"""';
EXTINT ;.:-...;..-.....
Vpp :
,,
TIMEOUT .: -------..;.--..;.--.;...---~I~
270704.,.48
When exiting Powerdown with an external interrupt, a at a logical 1 during reset. Exter!).al circuitry' must \lot
positive level on the pin mapped to INT7 (either pull the pin low or the ONCE mode will be entered. All
EXTINT or portO. 7) will bring the chip out of Power· pins except XTALI and XTAL2arefloated. Some of
down Mode. The interrupt does not have to be un· the pins are not truly high impedance as they have
masked to exit Powerdown. An interll'al timing circuit weak pullups or pulldowns. The ON<;E Mode is useful
ensures that the oscillator hils time to stabilize before in electrically removing the 8OC196KC from the rest of
turning on the internal clocks. Figure 15·1 shows the the system. A typical application of the ONCE Mode
power down and power up sequence using an external would be to program discrete EPROMs onboard with·
interrupt. out removing the 80Cl96KC from its socket.
XTAL1
CLKOUT
ALE J\""'-________
READY
BUS WIDTH
WRITE ---------"'\~
270704-49
All of the external bus signals are gated by the rising The CCR is shown in Figure 16-2.
and falling edges of CLKOUT. A zero waitstate bus
cycle consists of two CLKOUT periods. Therefore, Bits 7 and 6 of the CCR contra! ROM/EPROM pro-
there are 4 clock edges that generate a complete bus tection. ROM/EPROM protection is covered in Sec-
cycle. The first falling edge of CLKOUT asserts ALE tion 17. The next two bits control the internal READY
and drives an address on the bus: The rising edge of mode. The three next bits determine the. bus control
CLKOUT drives ALE inactive. The next falling edge signals. The next bit enables or disables the Powerdown
of CLKOUT asserts RD (read) and floats the bus for a Mode.
read cycle. During a WR (write) cycle; this edge asserts
WR and drives valid data onthe bus. 'On the last rising
edge of CLKOUT, data is latched into the 80C196KB
for a read cycle, or data is valid for a write cycle. CHIP CONFIGURATION REGISTER
The CCR (Chip Configuration Register) is the first WRITE STROBE MODE SELECT
(WR AND BHE/WRL AND WRH)
byte fetched from memory following a chip reset. The
CCR is fetched from the CCB (Chip Configuration L----ADDRESS VALID STROBE SELECT
Byte) at location 2018H in either internal or external (ALE/ADV)
memory depending on the EA pin. The CCR is only (IRCO) } INTERNAL READY
loaded once during the reset sequence. Once loaded, the .....- - - - ( I R C 1 ) CONTROL MODE
CCR cannot be changed until the next reset. During
CCB fetch, strong drivers are active on AD8-AD15 (LOCO) )PROGRAM LOCK
only during the address portion of the cycle. Weak .....- - - - - - ( L O C 1 ) MODE
drivers are applied during the read portion of the cycle 2~0704-50
to avoid bus contention in 16-bit systems. Pull up resis-
tors should not be installed on AD8-ADI5 in 8-bit Figure 16·2. Chip Configuration Register
systems.
5-83
80C196KC USER'S GUIDE
READY control This feature gives very simple and flexible. ready con-
trol. For example, every slow memory chip select line
The uSer has two options for ready control. He can use could be ORed together and connected to the READY:
the READY pin and/or the internal ready control bits. pin with Internal Ready Control programmed to insert
Ready control is only valid for external memory. On- the desired number of waitstates into the. bus cycle.
chip RAM/SFR space and on-chip ROM/EPROM is
always accessed with 0 waitstates. The modes are cho-
sen by bits 4 and 5 of the CCR and are shown in Figure Bus' control
16-3. Using .the CCR, the 80CI96KC can generate several
types of control signals designed to reduce external
IRC1 IRCO Description hardware. The ALE, WR, and BHE pins serve dual
functions. Bits 2 and 3 of the CCR specify the function
0 0 Limit to one waitstate
performed by these control lines.
0 1 Limit to two waitstates
1 0 Limit to three waitstates
1 1 Wait states not limited internally Standard bus control
Figure 16-3. Ready Control Modes If CCR bits 2 and 3 are Is, the standard bus control
signals ALE, WR, and BHE are generated as shown in
The internal ready control logic limits the number of Figure .16-4. ALE rises as the address starts to be driv-
waitstates that slow devices can insert into the bus cy- en, and falls to externally latch the address. WR is driv-
cle. When the READY pin is pulled low, waitstates are en for every write. BHE and MAO can be combined to
inse~ted into the bus cycle until the READY pin goes fO.rm WRL and WRH for even and odd byte writes.
high, or the number of waitstate equal the number pro-
grammed into the CCR. So the ready control is a logi-
calOR between the READY pin and the internal ready
control.
ALE.Jl
IL ALE J l , , - '_ _ IL
WRiTE
LJ u
BHE VALID ADO-71 ADDR LOW DATA OUT r
ADO'. 15 1 ADDR
·1 DATA OUT
r
2,70704-51
AD8 -15 r
~..._ _ _A_D_D_RE_S_S_H_IG_H_ _ _...
270704-.52
16-BII Bus Cycle 8-BII Bus Cycle
5-84
infef 80C196KC USER'S GUIDE
WRITE LOW
MAO
270704-53
Figure 16-5 is an example of external circuitry to de- Address Valid Strobe Mode
code WRL and WRH.
Address Valid strobe replaces ALE if the CCR bit 3 is
0. When Address valid Strobe mode is selected, ADV
Write Strobe Mode will be asserted after an external address is setup. It will
The Write Strobe Mode eliminates the need to external- stay asserted until the end of the bus cycle as shown in
ly decode odd and even byte writes. If the CCR bit 2 is Figure 16.7. ADV can be used as a simple chip select
0, arid the bus is a 16-bit cycle, WRL and WRH are for external memory. ADV looks exactly like ALE for
generated in place of WR and BHE. WRL is asserted back to back bus cycles. The only difference is ADV
for all byte writes to an even address and all word will be inactive when the external bus is idle.
writes. WRH is asserted for all byte writes to odd ad-
dresses and all word writes. The Write 'Strobe mode is Address Valid with Write Strobe
shown in Figure 16-6.
If the CCR bits 2 and 3 are 0, the Address Valid with
In the eight bit mode, WRL and WRH are asserted for Write Strobe mode is enabled. Figure 16-8 shows,the
both even and odd addresses. signals.
ALE Jl rL ALE
WRL VALID
I
WRH VALID
I ADO -7 ~ ADDR LOW DATA OUT r--
ADD -15
~ ADDR DATA OUT
5-85
8(1C196KC USER'S GUIDE
ADV
I ADV
I
WRITE WRITE
U
BHE VALID ADO-7 --4ADDR LOWI DATA OUT
~
ADO-15 --4 ADDR DATA OUT
~ AD8-15 --4 ADDRESS OUT HIGH
~
270704-56 270704-57
16-Blt Bus Cycle 8-Blt Bus Cycle
16.3 Bus Width During 16-bit bus cycies, Ports 3 and 4, contain the
address multiplexed with data.using ALE to latch the
The 80C196KC external bus width can be run-time address, In 8-bit bus cycles, Port 3 is multiplexed with
configured to operllte as a 16-bit multiplexed address/ address/data but Port 4 only outputs the upper 8 ad-
data bus, or a mUltiplexed 16-bit address/8-bit data dress bits. The Addresses on Port 4 are valid through-
bus. out the entire bus cycle. Figure 16-9 shows the two bus
width options.
ADO -15 --I ADDR DATAOJT ~ AD8 -15 ~",_ _A_D_D_RE_S_S_H_IG_H_ _~,~
270704-58 270704-59
16-Blt Bus Cycle 8-Blt Bus Cycle
5-86
inter 80C196KC USER'S GUIDE
BUS CONTROL
8DC196KC 80C196KC
8-BIT
PORT 4 LATCHED
ADDRESS HIGH
PORT 4
PORT 3
PORT 3
270704-60 270704-61
(8) 16-BII Bus (b) 8-Bil Bus
The external bus width can be changed every bus cycle ed, or high for the entire bus cycle. For data reads and
if a I was loaded into bit CCRI at reset. The bus width writes; the INST pin is low. The INST pin is low for
is changed on the fly by using the BUSWIDTH pin. If the Chip Configuration Byte fetch and for interrupt
the BUSWIDTH pin is a I, the bus cycle is 16-bits. For vector fetches. '
an 8-bit bus cycle, the BUSWIDTH pin is a O. The
BUSWIDTH pin is sampled by the 80CI96KC after
the address is on the bus. The BUSWIDTH pin has 16.4 HOLD/HLDA Protocol
about the same timing as the READY pin.
The 80CI96KC supports a bus exchange protocol, al-
Applications for the BUSWIDTH pin are numerous. lowing other devices to gain control of the bus. The
For example, a system could have code fetched from 16 protocol consists of three signals, HOLD, HLDA, and
bit memory, while data would come from 8 bit memo- BREQ. HOLD is an input asserted by a device which
ry. This saves the cost of using two 8 bit static RAMS if requests the 80CI96KC bus. Figure 16-10 shows the
the capacity of only one is needed. This system could be timing for HOLD/HLDA. The. 80Cl96KC responds
easily implemented by tying the chip select input of the by releasing the bus and asserting HIDA. When the
8-bit memory to the BUSWIDTH pin. device is done accessing the 8OCl96KC bus; it relin-
quishes the bus by deasserting the HOLD pin. The
If the CCR bit I is a 0, the 80CI96KC is locked into 80CI96KC will remove its HDLA and assume control
the 8 bit mode and the BUSWIDTH pin is ignored. of the bus. The third signal, BREQ, is asserted by the
80Cl96KC during the hold sequence when it has a
When executing code from a 8-bit bus, some perform- pending external bus cycle. The80Cl96KC deasserts
ance degrada~ion is to pe expected. The prefetch queue BREQ at the same time it deasserts HDLA.
cannot be kept full under all conditions from an 8-bit
bus. Also, word reads and writes to external memory The HOLD, HLDA, and BREQ pins are multiplexed
take an extra bus cycle. with Pl.7, Pl.6, and Pl.5, respectively. To enable
HOLD, HLDA an,d BREQ, the HLDEN bit (WSR.7)
must be set. HLDEN is cleared during reset. Once this
INST PIN bit is set, the portl pins cannot be returned to being
quasi-bidirectional pins until the device is RESET, but
The INST pin is useful for decoding more than 64K of can still be read as inplJts. The HOLD/HLDA feature,
addressing space. The I1'lST pin allows both 64K of however, can be disabled by clearing the HLDEN bit
code space and 64K of data space. For instruction for locked bus cycles.
fetches from external memory, the INST pin is assert-
5-87
80C196KC USER'S GUIDE
CLKOUT
__________________ ~r_
\~------------~;-
ADDR/DATA _ _ _ _ _ _ _ _ --JXI..______.....;F.;;;lo:.;at;;.d:....._ _ _ _ _ _.....X
ALE. RD. ViR.
BHE. INST
-------"'"'X X
. \"._ _ _ _ _ _,...w,;,.;.,;;;ak~ly~d;;.rlv,;,.;.,;,.;n_ _ _ _ _ _ _•
270704-62
HOLD is sampled on phase I, or when CLKOUT is If HOLD is asserted asynchronously, the minimum
low. hold latency increases by one state time and = THVCL
+ 1.5 states + TCLHAL.
When the 80CI96KC acknowledges the hold request,
tqe output buffers for the addrldata bus are floated. Figure 16-11 summarizes the additional hold latency
ALE and INST are weakly held LOW and ADV, RD. added to the minimum latency for the 3 types of bus
WR, WRL, WRH are weakly held high during HOLD. cycles. When accessing external memory, add one state
The request to hold latency is dependent on the state of for each waitstate inserted into the bus cycle. For ·an 8-
the bus' controller. bit bus, worst case hold latency is for word reads or
writes. For this case, the bus controller must access the
bus twice. which increa,ses latency by two states.
MAXIMUM HOLD LATENCY
The time between HOLD being asserted and HLDA For exiting Hold. the minimum hold latency times ap-
being driven is known as Hold Latency. After recogniz- ply for when the 80C196KC will deassert HLDA in
response to HOLD being removed.
ing aOLD, the 80CI96KC waits for any current bus
cycle to finish, and then asserts HLDA.' There are 3 Max Hold Latency
types bus cycles; 8-bit external cycle, 16-bit external
cycle, and an idle bus. Accessing on-chip ROMI Idle Bus Min
EPROM is an idle bus. 16-bit External Access Min + 1 State
HOLD is an asynchronous input. There are two differ- 8-bit External Access Min + 3 States
ent system configurations for asserting HOLD. The Min ~ THVCL + 0.5 states + TCLHAL if T HVCL is met
80CI96KC will recognize HOLD internally on the next ~ THVCL + 1.5 states + TCLHAL for asynchronous HOLD
clock edge if the system meets THVCH (HOLD valid to Figure 16-11. Maximum HOLD Latency
CLKOUT high). IfTHVCH is not met (HOLD applied
asynchronously), HOLD may be recognized one clock REGAINING BUS CONTROL
later (see Fig\lre 16-12). Consult the latest 80CI96KC
data sheet for the THVCH specification. There is no delay from the time the 80CI96KC re-
moves HLDA to the time it takes control of the bus.
Figure 16-12 shows the 80C196KC entering HOLD After HOW is removed, the 80CI96KC drops HLDA
when the bus is idle. This is the minimurrl hold latency in the following state and resumes control of the bus.
for both the synchronous and asynchronous cases. If
THVCH is met, HLDA is asserted about on the next BREQ is asserted when the part is in hold and needs to
falling edge of CLKOUT. See the data sheet for perform an external memory cycle. An external memo-
ry cycle can be a data access or a request from the
TCLHAL (CLKOUT low to HLDA low) specification.
For this case, the minimum hold latency = THVCL + prefetch queue for a code request. A request comes
0.5 .states + TCLHAL. from the queue when it contains two bytes or less. Once
asserted, it remains asserted until HOLD is removed.
At the earliest, BREQ can be asserted with HLDA.
5-88
infef 80C196KC USER'S GUIDE
270704-92
270704-93
Figure 16~12
Hold requests do not freeze the SOC196KC when exe- DISABLING HOLD REQUESTS
cuting out of internal memory. The device continues
executing as 10l1cg as' the resources it needs are located Clearing the HLDEN bit (WSR.7), can disable HOLD
internal to the SOCI96KC. As soon as the device needs requests when consecutive memory cycles are required.
to access external memory, it asserts BREQ and waits Clearing the HDLEN bit, however, does not cause the
for the HOLD to be removed. At this time, the device SOC196KC to take over the bus immediately. The,
cannot respond to any interrupt requests until HOLD 80C196KC waits for the current HOLD ,request to fin-
is removed. ish. Then it disables the bus hold feature, causing any
new requests to be ignored until the HLDEN bit is set
When executing out of external memory during a again. Since there is a delay from the time the code for
HOLD, the SOC196KC keeps running until the queue clearing this bit is fetched to the time it is actually exe-
is empty or it needs to perform an external data cycle. cuted, the code that clears HLDEN needs to be a few
The 80C196KC cannot servic.e any interrupts until instructions ahead of the block that needs to be protect-
HOLD is removed. ed from HOLD requests.
The 80C196KC will also respond to hold requests in The safest way is to add a .IBC instruction to check the
the Idle Mode. The latency fQr entering bus hold from status of the HLDA pin after the code that clears the
the Idle Mode is the same as when executing out of HLDEN bit. Figure 16-13 is an example of code that
internal memory. prevents the part from executing a new instruction until
both current HOLD requests are serviced and the hold
Special consideration must be given to the bus arbiter feature is disabled.
design if the SOC196KC can be reset while in HOLD.
For example, a CPU device would try and fetch the
CCR from external memory after RESET is brought
16.5 AC Timing Explanations
high. Now there would be two parts attempting to ac- Figure 16-14 shows the timing of the ADDR/DATA
cess SOC196KC memory. The simplest solution is to bus and control signals. Refer to the latest data sheet
make the RESET pin of the SOC196KC a system reset. for the AC timings to make sure your system meets
This way the other bus master would also be reset. Ex- specifications. The major timing specifications are ex-
amples of system reset circuits are given in Section 13. plained in Figure 16-15.
5-89
80C196KC USER'S GUIDE
DI disable interrupts
ANDB WSR, #OEFH disable hold request
WAIT: JBC PORTI, S, WAIT; Check the HLDA pin
• If set, execute
• protected instructions,
•
ORB WSR,#80h enable HOLD requests
EI enable interrupts
NOTE:
Interrupts should be disabled to prevent code interruption
XTALI
CLKOUT
ALE
READ
BUS
WRITE
BUS
XTALI
CLKOUT
ALE
READY
BUS WIDTH
tLLGV
5-90
,
TIMINGS THE MEMORY SYSTEM MUST MEET: TCLDY - CLKOUT Low to Input Data Valid:
Maximum time the memory system has
TAYYY - ADDRESS Valid tl> READY Setup: to output valid data after the CLKOUT
Maximum time the memory system has falls.
to decode READY after ADDRESS is - RD High to Input Data Float: Time af-
output by the 80C196KC to guarantee ter RD is inactive until the memory sys-
at least one-wait ",tate will occur. tem must float the bus. If this timing is
TLLYY - ALE Low to READY Setup: Maximum not met, bus contention will occur.
time the memory system has to decode - Data Hold after RD Inactive: Time after
TRXDX
READY after ALE faUs to guarantee at RD is inactive that the memory system
least one wait state will occur. must hold Data on the bus. Always 0 ns
TYLYH -READY Low to READY HIGH: On the 80C196KC.
Maximum amount of nonREADY time
or the maximum number of wait states
that can be inserted into a bus cycle. TIMINGS THE 80C196KC WILL PROVIDE:
Since the 80C196KC is a completely FXTAL - Frequency on XTALl: Frequency ofsig-
static part, T YLYH is unbounded. nal input into the 80C196KC. The
80CI96KC runs internally at '/2 FXTAL.
TCLYX - READY Hold after CLKOUT Low:
Minimum time the level on the READY T0SC - l/FXTAL: All A.C. Timings are refer-
pin must be valid after CLKOUT falls. enced to T OSC.
The minimum hold time is always 0 ns. TXHCH - XTALl High to CLKOUT High or
If maximum value is exceeded, addition- Low: Needed in systems where the sig-
. al wait states will occur. nal driving XTALl is also a clock for
T LL YX - READY Hold AFI'ER ALE Low: external devices.
Minimum time the level on the READY T CLCL - CLKOUT Cycle Time: Nominally 2
pin must be valid after ALE falls. If Tosc·
maximum value is exceeded, additional T CHCL - CLKOUT High Period: Needed in sys-
wait states will occur. tems which use CLKOUT as clock for
TAYGY - ADDRESS Valid to BUSWIDTH Val- external devices.
id: Maximum time the memory system - CLKOUT Falling Edge to ALE/ADV
has to decode BUSWIDTH after AD- TCLLH
Rising: A help in deriving other timings.
DRESS is output by the 80C196KC. If
exceeded, it 1S not guaranteed the - ALE/ ADV Falling Edge to CLKOUT
80C196KC will respond with an 8- or Rising: A help in deriving other timings.
16-bit bus cycle. - ALE Cycle Time: Time between ALE
- ALE Low to BUSWIDTH Valid: pulses.
Maximum time after ALE/ ADV falls - ALE/ADV High Period: Useful in de-
until BUSWIDTH must be valid. If ex- termining ALE/ ADV rising edge to
ceeded, it is not guaranteed the ADDRESS valid. External latches must
80C196KC will respond with an 8- or also meet this spec.
16-bit bus cycle. - ADDRESS Setup to ALE/ADV Falling
TCLGX - BUSWIDTH Hold after CLKOUT Edge: Length of time ADDRESS is val-
Low: Minimum time BUSWIDTH must id before ALE/ ADV falls. External
be held valid after CLKOUT falls. Al- latches must meet this spec.
ways 0 ns of the 80C196KC. - ADDRESS Hold after ALE! ADV Fall-
TAYDY - ADDRESS Valid to Input Data Valid: ing Edge: Length of Time ADDRESS is
Maximum time the memory system has valid after ALE! ADV falls. External
to output valid data after the 80Cl96KC latches must meet this spec.
outputs a valid address. -- ALE!ADV Low to RD Low: Len~ of
- RD Low to Input Data Valid: Maximum time after ALE! ADV falls before RD is
time the memory system has to output asserted. Could be needed to insure
valid data after the 80C196KC asserts proper memory decoding takes place be-
RD. fore a device is enabled.
5-91
80C196KC USER'S GUIDE ~; ,
RD or
AD8-15 HIGH ADDRESS
DATA
80C196KC
ADO-.7
I ~
74AC
373
EPROM
LOW ADDRESS
ADV
T-\ Cs
\
OPTIONAL IF
LATCHED EPROM
IS USED
270704-65
5-92
intJ 80C196KC USER'S GUIDE
16.6 Memory System Examples Figure 16-18 shows a 16 bit system with 2 EPROMs.
Again, ADV is used to chip select the memory. Figure
External memory systems for the 80C196KC can be set 16-19 shows a system with dynamic bus width. Code is
up inmany different ways. Figure 16-16 shows a simple executed from the two EPROMs and data is stored in
8 bit system with a single EPROM. The ADV Mode the single RAM. Note the Chip Select of the RAM also
can be selected to provide a chip select to the memory. is input to the BUSWIDTH pin to select an eight bit
By setting bit CCR.l to 0, the system is locked into the cycle.
eight bit mode. An' eight bit system with EPROM and
RAM is shown in Figure 16-17. The EPROM is decod-
ed in the lower half of memory, and the RAM in the
upper half. '
AD15
ADV 1-----1
RD I---------~-----~
WR
270704-66
Cs
AD8-15 HIGH ADDRESS
EPROM
DATA
80C196KC
RD ~------~~----~
270704-67
5-93
intJ 80C196KC USER'S GUIDE
EPROM RAM
ADV r~~~::JDATA
LOW ADDRESS
80C196KC OE
~ ~------------~~----------~------------~
WR ~--------------------------------------------~
270704-68
WRL-----C(
MDO-MD7--------4---~~~ P3
WRH----t~
8 74HCT 74HCT
8
MD&-MD'5--------~--~~~ ~ 05 P4
(x, ....., (X, .....)
AD8-AD1S
270704-69
5-94
inter 80C196KC USER'S GUIDE
16.7 1/0 Port Reconstruction Three flexible EPROM programming modes are avail-
able on the '87CI96KC; Auto, Slave, and Run-time.
When a single-chip system is being designed using a These modes can program the 87C196KC in a stand
multiple chip system as a prototype, it may be neces- alone or run-time environment.
sary to reconstruct I/O Ports 3 and 4 using a memory
mapped I/O technique. The circuit to reconstruct the For ROM parts, a ROM dump mode allows the ROM
Ports is shown in Figure ,16-20. It can be attached to a contents to be verified by the user.
80C196KC system which has the required address de-
coding and bus demultiplexing.
17.1 Programming the 87C196KC
The output circuitry is a latch that operates, when
IFFEH or IFFFH are placed on the MA lines. The The EPROM is ~ped into mem.ory locations
inverters surrounding the latch create an open-collector 2000H-SFFF.!!.. if EA is at logical 1. By applying
output to emulate the open-drain output found on the + 12.S0V to EA when RESET is asserted places the
80C196KC. The RESET line sets the ports to all Is 87C196KC in Programming M.ode. The Programming
when the chip is reset. The voltage and current specifi- Mode supports programming and verification of
cations of the port will be different from the 87C196KC EPROMs.
80C196KC, but the functionality will be the same.
The Auto Programming Mode enables an 87C196KC
The input circuitry is a bus transceiver that is addressed to program itself with the 16K bytes of code beginning
at IFFEH and IFFFH. If the ports are going to be at address 4000H on its external bus. The Slave Mode
either inputs or outputs, but not both, some of the cir- provides a standard interface for an EPROM program-
cuitry can be eliminated. mer. The Run-time Mode allows individual EPROM
locations to be programmed at run-time under com-
plete software control.
17.0 USING ROM AND EPROM
PARTS In the Programming Mode, some I/O pins have new
functions. These new pin functions determine and sup-
The 87C196KC contains 16K bytes of ultraviolet Eras- port the different programming modes. Figure 17-1
able and Electrically Programmable Read Only Memo- shows how the pins are renamed and Figure 17-2 de-
ry (EPROM). The 83C196KC contains 16K bytes .of scribes in detail each new pin function.
Read Qnly Memory (ROM).
SELEC
t PROGRAMMING VOLTAGE
TSL
PROGRAMM ING
MO DE _ VPP ...
EA
PC.7
PORT 4 ADDRESS
PORT 3 'I
COMMAND DATA PATH
-y
"
~DE "
PC.6
-y PC.S
P2.7 PACT
P2.C PVER
87C196KC
P2.4 AINC
P2.6 CPVER
270704-70
5-95
inter 80C196KC USER'S GUIDE
N~me Function
PMODE Programming Input Mode Select. Determines the EPROM programming algorithm that is
performed. PMODE is sampled after a chip reset and should be static while the part is
operating.
PALE Programming ALE Input. Accepted by an 87C196KC that is in Slave Programming Mode.
Used to indicate that Ports 3 and 4 contain a command/ address.
PROG Programming Input. Falling edge indicates valid data on PBUS and the beginning of
programming. Rising edge indicates end of programming.
PACT Programming Active. Output indicates when programming activity is complete.
PVER Program Verification. Output signal is low after rising edge of PROG if the programming was
not successful.
AINC· Auto Increment. Active low input Signal indicates that the auto increment mode is enabled.
Auto Increment will allow reading or writing of sequential EPROM locations without address
transactions across the PBUS for each read or write.
PORTS Address/Command/Data Bus. Used to pass commands, addresses and data to and from
87C196KCs. Also used in the Auto Programming Mode as a regular system bus to access
external memory.
CPVER Cummulative Program Output Verification. Pin is high if all locations since entering a
programming mode have programmed correctly.
Figure 17-2. Programming Mode Pin Definitions
While in Programming Mode, the PMODE value se- ming Chip Configuration Byte). The PCCB is a sepa-
lects the programming function (see Figure 17-3). Run- rate EPROM location that is not mapped I:Inder normal
time programming can be done at any time during nor- operation. PCCB has implications in some of the pro-
mal execution. gramming modes, and also for the memory protection
options, discussed hit'er. Therefore, the PCCB must cor-
PM ODE Programming Mode rectly correspond to the memory system in the pro-
gramming setup, which is not necessarily the memory
0-4 Reserved system of the application.
5 Slave Programming The following sections describe the 87C196KC pro-
6 ROM Dump gramming modes in detail.
7-8 Reserve~
5·96
inter 80C196KC USER'S GUIDE
The MSB of this word also must be set. For example, PCCS Programming Mode
with a 10 MHz Clock, the word at 4014H should be
loaded with 8005H for .the correct pulse width. For The PCCB (Programming Chip Configuration Byte)
8 MHz It is 8004H and for 6 MHz it is 8003H.· can be treated just like any other EPROM location.
When in the Slave Programming Mode, the PCCB can
The 87CI96KC then reads a word from external mem- be programmed at location 2018H. .Butthe PCCB Pro-
ory, and the Modified Quick-Pulse Programming Algo- gramming Mode is a simple way to program the PCCB
rithm (described later) programs the corresponding when no other locations need be programmed. Figure
EPROM location. Since the erased state of a byte is 17-5 shows a block diagram for using the PCCB Pro-
OFFH,~ the Auto Programming Mode skips locations gramming Mode:
containing OFFH. PVER will go low anytime there is a
programming error. When all 16K have been pro- WithPMODE' = ODH and OFFH on Port 4, the
grammed, PACT goes high. PCCB will be programmed with the data on Port 3
when a 0 is placed ,on PALE. Afterprograri1ihing is
In the Auto Programming Mode, CCR is loaded with complete, PVER is driven high if the PCCB was pro-
the PCCB. The PCCB must correspond to the memory grammed correctly, and low if the programming failed.
system of the programming setup, which is not neces- PALE can be pulsed to repeat programming.
sarily the same as the memory system of the actual
application.
+5V A15
lOOK
~------------~~--~OE
1--------=---1 A8-A13
100}-" I. HAC AO-A7
373
G EN
27C128
~ _ _ _ _ _~-iDO-D7
+5V
+5V
87C196KC
270704-71
-Inputs must be driven high or low.
5-97
inter 80C196KC USER'S GUIDE
PORTS
3/4 «AOOR/COMMANO:> G G
PALE
~ I
PROG
\ I .\ I
AINC
U
PVER
0 270704-73
Figure 17.-6 shows the relationship of PALE, PROG, 17.4 Run-Time Programming
PVER, AINC and CPVER to the Command/Data
path on Ports 3 and 4 for the Data Program Command. In Run-Time Programming, the user can program an
EPROM location during the normal execution of code.
Ifhe only additional requirement of Run-Time Pro-
Word Dump Command gramming is programming voltage is ~lied Vpp.
When the Word Dump Command is issued, the Run-Time Programming is done with EA at a TTL
87C196KC places the value at the requested address on high.
Ports 3 and 4. A Word Dump command is selected by a
o on Port pin 3.0. For example, sending the command To Run-Time Program. the user writes to the location
2100H to a slave results in the slave placing the word at to be programmed. Figure 17-8 is the recommended
internal address 2100H on Ports 3 aIid 4. PROG gov- code seqll,ence for Run-Time Programming. The
erns when the 87C196KC drives the bus. The Timings EPROM cannot be accessed during Run-Time Pro-
are shown in Figure 17-7. In the Word Dump mode, gramming. Therefore, the part must enter the IDLE
the AINC pin can remain active and toggling. The mode immediately after writing to the EPROM or be-
PROG pin will automatically increment the address. gin executing immediately from external memory. The
Modified Quick Pulse algorithm guarantees the pro-
grammed EPROM cell for the life of tbe part.
PORTS _ _ _ _ _ -<
3/4
\~---------------------- 270704-74
5-99
8OC196KC USER'S GUIDE
"
"
; ~'
17.5 ROM/EPROM Memory Protection The OED (disable external Data fetch) bit disables the
Options bus controller from executing external data reads and
writes if the bit is O. If a data access is requested from
Write protection is available for EPROM parts, and the bus controller, the part will Reset itself.
read protection is provided for both' ROM and
EPROM parts. For more information on UPROMs, ~ Section '17.5.
Write protection is enabled by setting the LOCO bit in Authorized Access of Protected Memory
either CCR or the PCCB to zero. Figure 17-9 summa-
rizes the different write protection options. When write A "Security! Key" mechanism has been implemented
protection is enabled, the bus controller will cycle for authorized access of protected internal memory to
through the write sequence but will not actually drive test internal ROM/EPROM. This allows users to veri-
data to the EPROM or enable Vpp. This protects the fy the EPROM array and still keep their code protect-
entire EPROM 2000 ... 5FFFH from inadvertent or un- ed. '
authorized programming; With write protection en-
abled, the PTS cannot read the internal EPROM. ' The security key is a 128-bit number located in internal
memory at locations 2020H-202FH. The user pro-
CCB PCCB grams his own security key into these locations. Figure
Protection 17-10 shows the different programming modes and
LOCO LOCO
whether a security key verification is performed to al-
1 . 1 Unprotected EPROM. Writes to low entry into the programming mode. '
Internal M~mory always allowed.
1 0 Run-Time Programming Allowed. Programming , Key-
No programming modes allowed Mode Verification
0 1 Run-Time programming not Slave Programming If Protected·
allowed. Programming modes
allowed after key verification (if ROM Dump Always
needed). UPROM Programming Never
0 0 All programming unconditionally AUTO Programming If Protected·
disabled.
PCCB Programming Never
Figure 17-9. Write Protection Options
•If read or Wrtte protected In GGA.
Read protection is enabled by setting the LOci bit of Figure 17-10. Security Key Verification
I '
CCR to a zero. When read protection is selected, the
bus controller will only perform a data read from the The ROM Dump Mode is an easy way to verify the
address range 2020H-202FH and 2050H-5FFFH if contents of the EPROM or ·ROM array. The ROM
the Slave Program Counter is in the range 2000H- Dump writes out the entire EPROM or ROM to loca-
5FFFH. Since the Slave PC can be as many as 4 bytes tions 4OOOH-7FFFH in external memory. If the DED
ahead of the CPU program counter, an instruction after (Disable External Datil Fetches) bit has been pro-
address 5FFAH'may not access protected memory. grammed in the USFR, this mode is disabled entirely
The interrupt vectors and CCB are not read protected (see Section 17.5).
since interrupts can occur even when executing out of
external memory. LOCI in the PCCB can be pro- The ROM Dump Mode is selected with PMODE =
grammed, b'ut has no memory protection implications. 06H and always begins with a security key verification.
The user puts the same security key at external loca-
Also, two UPROM (Unerasable PROM) bits are im- tions 4020H-402FH that he has programmed in inter-
plemented on the 87C196KC for additional memory nal lpcations 2020H.202fH. Before doing a ROM
protection. The DEI (Disable External Instruction dump, the 80C196KC compa'r~s the two security keys.
fetch) bit disables the bus controller from executing ex- If they match, the80C196KC dumps the array to ex-
ternal instruction fetches if the bit is a O.If an attempt ternal memory. If they do not match, the 8OC196KC
is made to load the Slave PC with an external address, enters an endless loop of internal execution which can
the part will Reset itself. The automatic Reset also be exited only by a chip reset.
I
gives extra protection against runaway code. . '
When using the Auto Program1lling Mode, a security
Because of the prefetch queue in the bus controlier, key verification is done if the CCB has read and or
code cannot be executed from the last four bytes of write protection enabled. The security key must reside
internal memory if this feature is enabled. "
5-100
inter 80C196KC USER'S GUIDE
in external memory locations 4020H-402FH and the programming a UPROM bit, it can be verified to make
two keys must match or the 80C196KC enters an end- sure that it did indeed program. Customers are advised
less internal loop. that devices with programmed UPROM bits cannot be
returned to Intel for failure analysis.
In the Slave Programming Mode, a security key verifi-
cation is also performed if CCB has read and or write
protection enabled. The key verify is done 'somewhat Programming UPROMs
differently in the Slave Programming Mode. The user
The UPROM bits in the USFR can be programmed
must "program" the correct key into the array at loca- using the Slave Programming Mode, or with the sepa-
tions 2020H-202FH using the Data Program Com-
rate UPROM Programming Mode. Figure 17-12 shows
mand described in Section 17.3. The locations are not the locations to program a UPROM bit and the data in
actually programmed, but the da~a is compared to the the Slave Programming Mode.
internal security key. The key must be entered sequen-
tially, and if any of the locations is "programmed" in-
correctly, the 80C196KC will enter the elusive endless Bit Address Data
internal loop.
DED 0758H OOO4H
If CCB has any protection enabled, the security key is DEI 0718H 0008H
write protected to keep unauthorized users from over-
Figure 17-12. Programming UPROMs
writing the key with a known security key.
in the Slave Programming Mode
If the PCCB is programmed with any read or write
protection, there is no way to enter any of the program- The UPROM Programming mode works much the
ming modes. So the last thing that should be done to same way as the PCCB Programming Mode (see Figure
protect the part from unauthorized access, is to pro- 17-5). PMODE must be 09H, the value to program the
gram the PCCB. USFR is forced onto port 3, OFFH is forced on port 4,
and PALE is pulled low to begin programming. A 1 in
a bit location means to program the associated
17.6 UPROMs UPROM bit. PACT remains low while programming
and PVER indicates if the data was programmed cor-
Unerasable PROM (UPROM) devices are implement- rectly.
ed on the 87C196KC for some additional security fea-
tures. The USFR (UPROMSpecial Function Register) The Modified Quick Pulse Algorithm
along with what bits are available for the .ROM and
EPROM versions is shown in Figure 17-11. The The Modified Quick Pulse Algorithm must be used to
UPROM bits act as fuses, i.e., they can be pro- guarantee programming ov.er the life of the EPROM in
grammed, but not erased. Run-Time and Slave Programming Modes.
7 0 The Modified Quick-Pulse Algorithm calls for each
*IRSvIRSvIRSvIRSVIDEIIDEDIRSVIRSvl EPROM location to receive 25 separate 100 /bs
(± 5 /bs) programming cycles. Verification is done after
USFR the 25th pulse. If the location verifies, the next location
is programmed. If the location fails to verify, the loca-
DEI DED tion fails the programming sequence.
87C196KC UPROM Bit UPROM Bit Once all locations are programmed and verified, the
83C196KC N/A N/A entire EPROM is again verified.
,
*Always program reserved (RSV) bits to 1 Programming of 87C196KC EPROMs is done with
Figure 17-11. USFR Vpp = 12.50V ±0.25V and Vee = 5.0V ±0.5V.
5-101
inter 80C196KCUSER'S GUIDE
Opaque labels must always be placed over the Window 1S.2 Converting SOC196KB Designs to
to prevent unintentional erasure. In the Powerdown SOC196KC Designs
Mode, the part will draw more current than specified if
the EPROM window is exposed to light. 1. Clock Detect Enable Pin (CDE) -The CDE pin on
the SOCI96KB is a Vss pin on the SOCI96KC. An
The recommended erasure procedure for the extra VSS pin was needed on the SOC196KC to sup-
87C196KC is exposure to ultraviolet light which has a port the higher clock rates.
wavelength of 2537A.
5-102
BOC196KC USER'S GUIDE
2. DJNZW tnstruction -The DJNZW will work 6. EPROM Programming Modes -Gang Program-
properly on the SOC196KC. However, it will take 6/ ming with the Slave Programming Mode is no longer
10 state times rather than 5/9 state times as on thj: supported. Also, the Auto-Programming and Slave
SOC196KB. Programming Modes have been modified to support
3. Internal Reset Pulse -The Reset pulse on' the the 16K of onboard memory. This should only affect
SOC196KC has been increased to 16 state times. manufacturers of EPROM programmers, and should
There are 2 ways a SOC196KB or SOC196KC can not have an impact on the end user.
internally assert the RESET pin; Watchdog Timer 7. AID Converter -An AID conversion takes 1.5
Overflow, and a RST instruction. On the KB, the state times less on the SOC196KC in both the fast
Reset Pulse is 4 state times. Because the SOC196KC and slow conversion modes.
and future proliferations will run at much higher fre- S. HOLDIHLDA -The RD, WR, WRC, INST,
quencies, a 4 state time reset pulse was deemed un- BHE, ADV arid ALE pins are weakly held in their
reasonably small. This should cause no problems in inactive states during HOLD on the SOC19,6KC. On
most applications. the SOC 196KB, only ALE is weakly held during
4. Memory Map -Because the' SOC196KC has 16K of HOLD.
EPROM/ROM and 512 bytes of RAM, twice that of 9. The PSW -The PSW on the SOC196KC has an ex-
the SOC196KB, the memory map is different to ac- tra bit (PSE) to support the PTS. This bit was re-
commodate the extra memory. Locations 100- served on the SOC196KB.
1FFH contain the additional 256 bytes of RAM on
the SOC196KC. On the EPROM/ROM versions,lo- 10. HSO -HSO commands OCH and ODH were re-
cations 4000-5FFFH contain the extra SK of served on the SOC196KB. On the SOC196KC, OCH
EPROM. becomes a new command.
5. ONCE Mode Entry -The SOC196KC enters the 11. WSR -WSR bits that were reserved to 0 on the
ONCE mode by holding the TXD pin low on the SOC196KB must be 0 to be SOC196KC compatible.
rising edge of RESET. See Section 15.3.
5-103
8XC196KC
; 16.-BITHIGH·PERFORMANCE CHMOS
MICROCONTROLLER
87C196KC-16 Kbytes of On-Chip EPRO,.,
." 80C196KC-ROMless .
• 232
16 MHz 0p,eratI9n
• Dynamically Conflgurable 8-Bit or
16~Blt Buswidth
• 256 Byte Register File
• Full Duplex Serial Port
• Register-ta-Reglster
Bytes of Additional R~M
•
• 28 Interrupt Sources/16 Architecture
•
High Speed I/O Subsystem
16-Bit Timer
• Peripheral Transaction Server
Vectors
• 16-Bit Up/Down Counter with Capture
• 1.75 ,."s 16 x 16 Multiply (16 MHz) • 3 Pulse-Width-Modulated Outputs
•• 13.0,."s 32/16.Divide (16 MHz) • Four 16~Bit Software Timer:s
• Five
Powerdown and Idle Modes • 8- or 10-Bit A/D Converter with·
Sample/Hold
• 16-Bit8-Blt I/O Ports
• HOLD/HLDA Bus 'Protocol
• VVatchdog Timer • OTP One-Time Programmable Version
The 80C196KC 16-bit microcontroller is a high performance member of. the MCS®-96 microcontroller family.
The 80C196KC is an enhanced 80C196KB device with 488 bytes RAM, 16 MHz operation ~nd an optional
16 Kbytes of ROM/EPROM. Intel's CHMOS IV process provides a high performance procesSor along with low
power consumption.
The 87C196KC is an 80C196KC with 16 Kbytes on-chip EPROM. In this document, the 80C196KC will refer to
all products unless otherwise stated.
Four high-speed capture inputs are provided to record times when events occur. Six high-speed outputs are
'.,,' available for pulse or waveform generation. The high-speed output can also generate four software timers or
start an AID conversion. Events can be based on the timer or up/down counter.
VREF ANGND
CONTROL
SIGNALS
PORT 3
} ~~:
BUS •
PORT 4
I;~~~~PWMI
~PWM2
HSO
270942-1
Figure 1. 80C196KC Block Diagram
November 1990
Order Number: 270942-001
inter 8XC196KC
The 80C196KC User's Guide contains a complete desCiription of the feature set, order # 270704.
PACKAGING
QFP PLCC QFP PLCC QFP PLCC
Description Description Description
Pin# Pin# Pin# Pin# Pln# Pin#
1 59 AD1/P3.1 28 15 EXTINT IP2.2 55 36 VSS
2 60 ADO/P3.0 29 Vcc 56 37 Vpp
3 61 RD 30 16 RESET 57 38 P2.7/T2CAPTURE
4 62 ALE/ADV 31 17 RXD/P2.1 58 39 PWMO/P2.5
5 63 INST 32 18 TXD/P2.0 59 40 WR/WRL
6 64 BUSWIDTH 33 Vss 60 41 BHE/WRH
7 65 CLKOUT 34 19 P1.0 61 42 T2RST/P2.4
8 66 XTAL2 35 20 P1.1 62 43 READY
9 67 XTAL1 36 21 P1.2 63 N.C.
10 Vss 37 22 P1.3/PWM1 64 44 T2CLK/P2.3
11 68 Vss 38 23 P1.4/PWM2 65 45 AD15/P4.7
12 Vec 39 24 HSI.O 66 46 AD14/P4.6
13 1 Vcc 40 25 HSI.1 67 47 AD13/P4.5
14 2, EA 41 26 HSO.4/HSI.2 68 48 AD12/P4.4
15 3 NMI 42 N.C. 69 49 AD11/P4.3
16 4 ACH3/PO.3 43 27 HSO.5/HSI.3 70 50 AD10/P4.2
17 5 ACH1/PO.1 44 28 HSO.O 71 51 AD9/P4.1
18 6 ACHO/PO.O 45 29 HSO.1 72 52, AD8/P4.0
19 7 ACH2/PO.2 46 30 P1.5/BREQ 73 53 AD7IP3.7
20 8 ACH6/PO.6 47 31 P1.6/HLDA 74 54 AD6/P3.6
21
22
9 ACH7/PO.7
N.C.
48
49
32
33
P1.7/HOLD
P2.6/T2UP-DN
75
76 55
N.C.
AD5/P3.5 .
23 10 ACH5/PO.5 50 34 HSO.2 77 56 AD4/P3.4
24 11 ACH4/PO.4 51 Vss 78 57 AD3/P3.3
25 12 ANGND 52 Vce 79 N.C.
26 13 VREF 53 35 HSO.3 80 58 AD2/P3.2
27 14 Vss 54 Vss
N.C. = No Connection
Figure 2. Pin Definitions
5-105
inter 8XC196KC
"- CD
'" C! 0 '"0
0 00..
00. ~ 0 :t:
I~«
Q..'Q.. 0- 0-
'- '- '- '- '- '-, 5 Q , ,
"-
u u '"
:J:
CD
:J: '"
:J:
0
:J: ,:J: :J:
:;
11)« '" 0 i::>
...J
~ ""U
(I) 0-'-
« « « « « ~ ~
U U U
I~ ~ 11)1-
> x x
...J
III ~ ~Ifi
ACH5/PO.5 ADO/P3.0
ACH4/PO.4 AD1/P3.1
ANGND AD?/P3.2
VREF AD3/P3.3
VSS AD4/P3.4
EXTINTjP2.2 AD5/P3.5
RESET AD6/P3.6
RXD/P2.1 AD7/P3.7
TXD/P2.D AD8/P4.0
PI.O 51 AD9/P4.1
Plol TOP VIEW AD10/P4.2
PI.2 ADll/P4.3
LOOKING DOWN ON
PWMI/Pl.3 ADI2/P4.4
PWM2/PI.4
COMPONENT SIDE ADI3/P4.5
HSIO OF PC BOARD ADI4/P4.6
HSII ADI5/P4.7
HSI2/HS04 T2CLK/P2.3
27 28 29 30 31 32 33 34 35 3637 38 39 40 41 42 43
o(I)
"' 0
0
(I)
~:t:
'"iii
J:
270942-2
5-106
inter 8XC196KC
64 64
41 41
40 25 25 40
270942-39
Top View
1111111111111111
., ....'" .,.... .... <D on ... ., .... on
0
.... .... '" ....N ;;: ....0
.... .... .... '"
<D <D <D
<D
<D
'" 64 T2CLK/P2.3
AD1/P3.1
63 Vss
ADO/P3.0
62 REAQY
RD 61 T2RST/P2.4
ALE/ADV 4
60 BHE/WRH
INST
59 iVR/WRL
BUSWIDTH
58 PWt.40/P2.5
CLKOUT
57 P2. 7/T2CAPTURE
XTAL2
56 Vpp
XTAL1
55 Vss
VSS 10
54 Vss
Vss 11
53 HSO.3
Vee 12
52 Vee
Vee 13
51 Vss
EA 14
50 HSO.2
Nt.41 15
. 49 P2.6/T2UP/DN
ACH3/PO.3 , 16
48 P1.7/HOLD
ACH1/PO.1 17
47 P1.6/HLDA
ACHO/PO.O 18
46 P1.5/BREO
ACH2/PO.2 19
45 HSO.1
ACH6/PO.6 20
44 HSO.O
ACH7/PO.7 21
43 HSO.5/HSI.3
N.C. 22
42 Vss
ACH5/PO.5 23
., .... ., ... on .... ., 41 HSO.4/HSI.2
'"'" '"
ACH4/PO.4 24 N N N N
lllllllllllllll!
270942-40
5-107
inter 8XC196KC
PIN DESCRIPTIONS
Symbol Name and Function
Vee Main supply voltage (5V).
Vss Digital circuit ground (OV). There are three Vss pins, all of which must be connected.
VREF Reference voltage for the A/D converter (5V). VREF is also the supply voltage to the analog
portion of the AID converter and the logic used to read Port O. Must be connected for A/D
and Port 0 to function.
ANGND Reference ground for the AID converter. Must be held at nominally the same potential as
Vss·
Vpp Timing pin for the,return from powerdown circuit. Connect this pin with a 1 p.F capacitor to
Vss and a 1 M!l resistor to Vee, If this function is not used Vpp may be tied to Vee. This pin
is the programming voltage on the EPROM device.
XTAL1 Input of the oscillator inverter and of the internal clock generator.
XTAL2 Output of the oscillator inverter.
GLKOUT Output of the internal clock generator. The frequency of CLKOUT is % the oscillator
frequency.
RESET Reset input to the chip.
BUSWIDTH Input for buswidth selection. If GGR bit 1 is a one, this pin selects the bus width for the bus
cycle in progress. If BUSWIDTH is a 1, a 16-bit bus cycle occurs. If BUSWIDTH is a 0 an
8-bit cycle occurs, If GGR bit 1 is a 0, the bus is always an 8-bit bus.
NMI A positive transition causes a vector through 203EH.
INST Output high during an external memory read indicates the read is an instruction fetch. INST
is valid throughout the bus cycle. INST is activated only during e)(ternal memory accesses
and output low for a data fetch.
EA Input for memory select (External Access). EA equal to a TTL-high causes memory
. accesses to locations 2000H through 5FFFH to be directed to on-chip ROM/EPROM. EA
equal to a TTL-low causes accesses to those locations to be directed to off-chip memory.
ALE/ADV Address Latch Enable or ACldress Valid output, as selected by CGA. Both pin options
provide a signal to demultiplex the address from the address/data bus, When the pin is
ADV, it goes inactive high at the end of the bus cycle. ALE/ ADV is activated only during
external memory accesses.
RD Read signal output to external memory. RD is activated only during external memory reads,
WR/WRL Write and Write Low output to external memory, as selected by the GCA. \iVA will go low for
every external write, while WRl will go low only for external writes where an even byte is
being written. WR/WRL is activated only during external memory writes.
BHE/WRH Bus High Enable or Write High output to external memory, as selected by the CCA. BHE =
o selects the bank of memory that is connected to the high byte of the data bus. AO = 0
selects the bank of memory that is connected to the low byte of the data bus, Thus
accesses to a 16-bit wide memory can be to the low byte.only (AO == 0, BHE = 1), to the
high byte only (AO = 1, BHE = 0), or both bytes (AO = 0, SHE = 0), If the WRH function is
selected, the pin will go low if the bus cycle is writing to an odd memory location. SHE/WRH
is valid only during 16-bit external memory write cycles,
5-108
8XC196KC
5-109
8XC196KC
MEMORY MAP
OFFFFH
EXTERNAL MEMORY OR I/O
6000H
INTERNAL ROM/EPROM OR
EXTERNAL MEMORY
2080H
RESERVED
205EH
PTSVECTORS
2040H
UPPER INTERRUPT VECTORS
2030H
ROM/EPROM SECURITY KEY
2020H
RESERVED
20l9H
CHIP CONFIGURATION BYTE 0
20l8H
RESERVED
20l4H
LOW~R INTERRUPT VECTORS
2000H
PORT 3 AND PORT 4
lFFEH
EXTERNAL MEMORY
200H
ADDITIONAL RAM
100H
REGISTER FILE AND
EXTERNAL PROGRAM MEMORY
o
5-110
inter 8XC196KC
I7 6 15 41 3 2 11 1 0 I
AID CHANNEL NUMBER L HSI•O MODE
HSI.1 MODE
STATIlS:
0= AID CURRENTLY IDLE HSI.2 MODE
X 1 = CONVERSION IN PROCESS HSI.3 MODE
WHERE EACH 2 - BIT MODE CONTROL FIELD
5 X
DEFINES ONE OF 4 POSSIBLE MODES:
AID RESULT:
LEAST SIGNIFICANT 2 BITS 00 8 POSITIVE TRANSITIONS
01 EACH POSITIVE TRANSITION
10 EACH NEGATIVE TRANSITION
270942-3 11 EVERY TRANSITION
(POSITIVE AND NEGATIVE)
270942-6
AD_COMMAND (02H)
HSI_Status (06H)
r-;;'"] CHANNEL # SELECTS WHICH OF THE 8
1 ANALOG INPUT CHANNELS IS TO BE
CONVERTED TO DIGITAL FORM. ,
2
fo- GO = 1 START NOW HSI.O STATUS
~ fo- GO = 0 START BY HSO COMMAND
4 fo-
I--
=0 10- BIT CONVERSION
= 1 8 - BIT CONVERSION
'-----HSI.1 STATUS
' - - - - - - - - H S I . 2 STATUS
X
' - - - - - - - - - - H S I . 3 STATUS
f0-
X
WHERE FOR EACH 2 - BIT STATUS FIELD THE LOWER
f0- BIT INDICATES WHETHER OR NOT AN EVENT HAS
X SET UPPER THREE BITS TO ZERO
"- OCCURED ON THIS PIN AND THE UPPER BIT INDICATES
270942-4
THE CURRENT STATUS OF THE PIN.
270942-7
CCR (2018H)
HSO_COMMAND (06H)
IL7161514131211 10 ICHIP CONFIGURATION REGISTER
CHANNEL: 0-5 HSO.O - HSO.5 INDIV1DUALLY
~~OWERDOWN MODE ENABLE 6 HSO.O AND HSO.1
BUS WIDTH SELECT BIT: 0 7 HSO.2 AND HSO.3
(16- BIT BUS/8- BIT BUS) 8-B SOFTWARE TIMERS
'---WRITE STROBE MODE SELECT C HSO -HS05 SIMULTANEOUSLY
(WR ANDBHE IWRL AND WRH) 2 D RESERVED FOR FUTURE USE
E RESET TIMER2
ADDRESS VALID STROBE SELECT F START AID CONVERSION
(ALE I ADV)
INTERRUPT I NO INTERRUPT
(IRCO) }'NTERNAL READY CONTROL SET I CLEAR
(lRC1) MODE
TIMER 2/TIMER 1
(LOCO) }
(LOC1) PROGRAM LOCK MODE LOCK CAM
270942-8
270942-5
5-111
8XC196KC
SP_CON (llH)
BIT. 1,BIT.O SPECIFY THE MODE
0.0 = MODE 0 1.0 = MODE 2
0: 1 = MODE 1 1. 1 = MODE3
6 RECEIVE INDICATOR
270942-9 270942-30
270942-10 270942-12
TIMER 2 EXTERNAL RESET ENABLE / DISABLE TIMER 2 OVERFLOW INTERRUPT ENABLE / DISABLE
5-112
8XC196KC
WSR(14H) IOC2(OBH)
x HSO.4
X HSO.5
X T2RESET
5-113
8XC196KC
Operating Conditions
Symbol Description Min Mal( Units
TA Ambient Temperature Under Bias 0 +70 'C
Vee Digital Supply Voltage 4.50 5.50 V
VREF Analog Supply Voltage 4.00 5.50 V
fose Oscillator Frequency 8 16 MHz
NOTE:
ANGND and Vss should be nominally at the same potential.
5-114
inter 8XC19~KC
IpD PowerdQwn Mode Current 15 TBO f!-A Vcc = Vpp = VREF = 5.5V
NOTES:
(Notes apply to all specifications)
1. QSD (Quasi-bidirectional) pins include Port 1, P2.6 and P2.7.
2. Standard Outputs include ADO-15, RD, WR, ALE, SHE, INST, HSO pins, PWM/P'2.5, CLKOUT, RESET, Ports 3 and 4,
TXD/P2.0, and RXD (in serial mode 0). The VO H specification is not valid for RESET. Ports. 3 and 4 are open-drain outputs.
3. Standard Inputs include HSI pins, READY, SUSWIDTH, NMI, RXD/P2.1, EXTINT/P2.2, T2CLK/P2.3, and T2RST/P2.4.
4. Maximum current per pin must be externally limited to the following values if VOL is held above 0.45V or VOH is held
below Vcc - 0.7V:
IOL on Output pins: 10 mA
IOH on quasi-bidirectional pins: self limiting
IOH on Standard Output pins: 10 mA
5. Maximum current per bus pin (data and control) during normal operation is ±3.2 mA.
6. During normal (non-transient) conditions the following total current limits apply: .
Port 1, P2.6 IOL: 29 mA IOH is self limiting
HSO, P2.0, RXD, RESET IOL: 29 mA IOH: 26 mA
P2.5, P2.7, WR, SHE IOL: 13 mA IOH: 11 mA
ADO-AD15 IOL: 52 mA IOH: 52 mA
RD, ALE, INST -CLKOUT IOL: 13 mA IOH: 13 mA
70 Icc Max
60
50 IcC Typ
40
mA
30 10LE Max
20
IDLE Typ
10
. 0
4 10 16
ICC Max = 3.88 x FREQ + 8.43 Freq (MHz)
IIDLE Max = 1.65 x FREQ + 2.2 270942-17
5-115
inter ' 8XQ196KC
A.C. Characteristics
For use .over specified operating conditions. ,
Test Conditions: Capacitive load on all pins = 100 pF, Rise and fall times,., 10 ns, fose = 16 MHz
The system must meet these specifications to work with the 80C196KC- -,
Symbol Description Min Max Units Notes
TAVYV Address Valid to READY Setup 2 Tose - 68 ns
hLYX READY Hold after ALE Low Tose - 15 2 Tose - ,40 ns (Note 1)
TAVGV Address Valid to Buswidth Setup 2 Tose - 68 ns
TLLGV ALE Low to Buswidth Setup Tose - 60 ns
TeLGX Buswidth Hold after CLKOUT Low 0 ns
TAVDV Address Valid to Input Data Valid 3 Tose - 55 ns (Note 2)
TRLDV RD Active to Input Data Valid Tose - 22 ns (Note 2)
TeLDV CLKOUT Low to Input Data Valid Tose'- 50 ns
TRHDZ End of RD to Input Data Float Tose ns
TRXDX Data Hold after RD Inactive 0 ns
NOTE:
1. If max is exceeded, additional wait states will occur.
2.lf wait states are used, add 2 Tosc • N, where N = number of wait states.
5-116
inter SXC196KC
NOTES:
1. Testing performed at a MHz. However, the device is static by design and will typically operate below 1 Hz.
2. Assuming back-to-back bus cycles.
3. a-Bit bus only.
4. If wait states are used, add 2 Tose • N, where N = number of wait states.
5-117
8XC196KC
XTAL1
CLKOUT
ALE
BUS
BHE,INST VALID
270942-18
5-118
8XC196KC
XTAL1
, CLKOUT
ALE
READY
_-t-___________ ~~:.:~~~~--tw-~-H-+--2T-O-SC---~
114-'-- t QVWH + 2Tosc ~
JX
~---AD-D-RE-S-S-OU-T----ft~~(_________D_A_~_O_U_T________ ADDRESS
~----------~l ~-------
270942-20
Buswidth Timings
XTALI
5-119
eXC196KC
HOLO/HLDA Timings
Symbol . I)escrlptlon Min Max Units Notes
THVCH HOLD Setup 55 ns (Note 1)
TCLHAt: CLKOUT Low to HLDA Low -15 15 ns
TCLBRL CLKOUT Low to BREQ ,Low -15 15 ns
THALAZ HLDA Low to Address Flo~t 10 ns
THALBZ HLDA Low to BHE, INST, RD, WR Weakly Driven 15 ns
TCLHAH CLKOUT Low to HLDA High -15 15 ns
TCLBRH CLKOUT Low to BREQ High -15 15 ns •
THAHAX HLDA High to Address No Longer Float -15 ns
THAHBV HLDA High to BHE, INST, RD, WR Valid -10 ns
TCLLH CLKOUT Low to ALE High -5 15 ns
NOTE:
1. To guarantee recognition at next clock.
BUS -<'-____
iiilE,lNST ,,
RD,WR
S'-120
infeF 8XC196KC
, 270942-21
2.4
0.45~0.8
V 2.0> TEST POINTS < 0.8~
V--2.0
270942-22
A,C, Testing inputs' are driven at 2AV for a Logic "1" and OA5V' 270942-23
for a Logic "0" Timing measurements are made at 2,OV for a For Timing Purposes a Port Pin is no Longer Floating when a
Logic "1" and O,BV for a Logic "0", 100 mV change from Load Voltage Occurs and Begins to Float
when a 100 mV change from the Loaded VOHIVOl Level occurs
IOl/loH ~ ± 15 mA,
EXPLANATION OF AC SYMBOLS
Each symbol is two pairs of letters prefixed by "T" for time. The characters in a pair indicate a signal and its
condition, respectively. Symbols represent the time between the two signal/condition points.
,.5-121
\ 8XC196KC
EPROM SPECIFICATIONS
Run Time Programming Operating Conditions: Fosc = 6.0 MHz to 12.0 MHz, VREF = 5V ±0.50V. TA =
+ 25·C to ± 5·C and Vpp = 12.50V. For run·time programming over a full operating range, contact the factory.
Symbol Descrlptlqn . .. Min Max Units
TSHLL Reset High to First PAIl: Low 1100 Tose
TLLLH PALE Pulse Width 50 Tose'
TAVLL Address Setup Time 0 Tose
TLLAX Address Hold Tir:ne 100 Tose
TpLDV ~ Low to Word Dump Valid 50 Tose
TpHDX Word Dump Data Hold 50 Tosc
TDVPL Data Setup Time 0 Tose
TpLDX Data Hold Time 400 Tose
TpLPH(1) ~ Pulse Width 50 Tose
TpHLL ~ High to Next PALE Low 220 Tose
TLHPL PALE High to PRC:m" Low 220 Tose
TpHPL ~ High to Next ~ Low 220 Tose
•
·TpHIL ., ~ High to AINC Low 0 Tose
TILIH 7iJiiIe Pulse Width 240 Tose
TILVH PVER Hold after 7iJiiIe Low 50 Tose
"
TILPL AINC Low to ~ Low 170 Tose
TpHVL PROG High to PVER Valid 220 Tosc
NOTE:
1. This specification is for the Word Dump Mode. For programming pulses, use the Modified Quick Pulse Algorithm.
NOTE:
Vpp must be within 1V of Vee while Vee < 4.5V. Vpp must not have a low impedance path to ground of VSS while
Vee> 4.5V.
5-123
EPROM PROGRAMMING WAVEFORMS
SLAVE PROGRAMMING MODE DATA PROGRAM MODE WITt! S.INGLE PROGRAM PULSE
PORTS
3/4
--+-0---<
----r---- ADDR/COt.tt.tAND ,
PVER
270942-27
.
RESEt
I,
--'
I ADDR I ADDR+2
P(lRTS
3/4
ADDR/COMMAND VER BITS/WD DUMP VER BITS/WD DUMP
-
I--- tSHLL - - tPLDV -
~ -00 tPHDX 1-, KtPLDV - tPHDX -
PALE
\
I V
-" "
PROO
tlLPL -tPHPL-
"
AINC
\ ' " "
270942-28
5·124
inter 8XC196KC
OATA
AOOR '
>>----~
AOOR + 2
OATA >--
PVER
27Q942-29
5-125
8XC196K:C
10-811 AID CHARACTERISTICS of VREF. VREF must be close to Vcc since it supplies
both the resistor ladder and the digital section of the
The speed of the AI D' converter in the 10-bit mode converter.
can be adjusted by setting a clock prescaler on or'
off. At high frequencies more time is needed for the
comparator to settle. The maximum frequency with AID CONVERTER SPECIFICATIONS
the clock prescaler disabled is 6 MHz. The conver-
sion times' with the prescaler turned on or off is The specifications given below assume adherence
shown in the table below. The following specifica- , to the Operating Conditions section of this data
tions are tested @ 16 MHz with OC7H in AD_TIME. , sheet. Testing is performed with VREF = 5.12V.
NOTES:
'An "LSB", as used here, has a value of approximately 5 mY.
1, DC to 100 KHz,
2. Multiplexer Break-Before-Make Guaranteed.
3, Typicalvalues are expected for most devices at 25'C.
5-126
8XC196KC
NOTES:
'An "LSB", as used here, has a value of approximately 20 mY.
1. Typical values are expected for most devices at 25'C.
80C196KB TO 80C196KC DESIGN 5. During the bus HOLD state, the 80C196KC weak-
CONSIDERATIONS ly holds RD, WR, ALE, BHE and INST in their
inactive states. The 80C196KB only holds ALE in
1. Memory Map. The 80C196KC has 512 bytes of its inactive state.
RAM/SFRs and 16K of ROM/EPROM. The extra 6. A RESET pulse from the 80C196KC is 16 states
256 bytes of RAM will reside in locations 100H- rather than 4 states as on the 80C196KB (Le., a
1FFH and the extra 8K of ROM/EPROM will re- watchdog timer overflow). This provides a longer
side in locations 4000H-5FFFH. These locations RESET pulse for other devices in the system.
are external' memory on the 80C196KB.
2. The CDE pin on the KB has become a VSS pin on
the KC to support 16 MHz operation. 80C196KC ERRATA
3. EPROM programming. The 80C196KC has a dif- 1. Absolute maximum voltage on Port 0 is -0.5V to
ferent programming algorithm to support 16K of 9.0V relative to AVss.
on-board memory. When performing Run-Time 2. The HSI unit has two errata: one dealing with res-
Programming, use the section of code on page olution and the other with first entries into the
3-91 of the 1989 16-bit Embedded Controller FIFO.
Handbook. The HSI resolution is 9 states instead of 8 states.
4. ONCETM Mode Entry. The ONCE mode is en- Events on the same line maybe lost if they occur
tered on the 80C196KC by driving the TXD pin faster than once every 9 state times. '
low on the rising edge of RESET. The TXD pin is There is a mismatch between the 9 state time HS"i
held high by a pullup that is specified at 1.4 mA resolution and the 8 state time timer. This causes
and remain at 2.0V. This Pullup must not be over- one time value to be unused every 9 timer counts.
ridden or the 80C196KC will enter the ONCE
mode.
inter " 8XC,196KC
Events may receive's time:tagon one count later later than the firs~ ,time tag. If this is the ':skipped"
than expected because of this '''skipped;' time val- time value, tlie second event's time-tag is 2
ue. counts later than the first's.
If the first two eventsintb an empty FIFO (not If the FIFO and Holding Register are empty, the
including the Holding Register) occur in the same first event will transfer into the Holding Register
internal phase, both are recorded with one time- atter8 state times, leaving the FIFO empty again.
tag. Otherwise, if the second event occurs within If the second event occurs after this time, it will
9 states after the first, its time-tag is one count act as a new first event into an empty FIFO.
The following differences exist between this data sheet and 270741-003.
1. ONCE MODE VIL errata removed.
2. VREF Min changed from 4.5V to 4.0V.
The following differences exist between the -002 and -003 versions of data sheet 270741.
1. 80-Pin QFP package added, 68-pin Cerquad package deleted.
2. The following D.C. Characteristics were added:
VHYS RESET Hysteresis spec added
IIL1, AD BUS in RESET current Max added
3. The following A.C. Characteristics were changed:
TAVYV Max from 2Tasc-75 to 2Tasc-68
T AVGV Max from 2Tasc-7 5 to 2Tasc-68
TWLWH Min from Tasc-30 to T asc-20
TXHCH Min changed from 30 ns to 20 ns
'rHALBZ Max changed from 10 ns to 15 ns
4. Under 10-bit AID Characteristics:
Sample Time/Convert Time Testing Conditions added.
Typical values added for Full Scale Error, Zero Offset Error, Non-Linearity, and Channel-to-Channel Match-
ing.
Max Absolute Error changed from ± 8 to ± 3 LSBs
Max Non-Linearity changed from ± 8 to ± 3 LSBs
5. Under 8-bit Mode AID Characteristics;
Max Absolute Error changed from ± 2 to ± 1 LSBs
Max Non-Linearity changed from ± 2 to ± 1 LSBs
Typical Full Scale Error changed from ± 1 to ±0.5 LSBs
Typical Zero Offset Error changed from ± 2 to ± 0.5 LSBs
6. The minimum freqUency at which the device is tested was changed to 8.0 MHz from 3.5 MHz. Thus, data
sheet specifications are guaranteed from 8 MHz to 16 MHz. However, the device is static and will function
below 1 Hz.
7. The T2CONTROL (T2CNTC) SFR was renamed IOC3.
S. ONCE MODE VII: errata added. Other errata removed.
9. The A:Step device corresponding to data sheet 270741-002 had bits IOC1.4 and IOC1.6 reversed. The
problem was corrected in the B-1 Step device corresponding to data sheet 270741-003.
5-128
8XC196KC
5-129
','. "
8XC196KC
16-BIT MICROCONTROLLER
. EXPRESS
87C196KC-16 Kbytes of On-Chip EPROM
80C196KC-ROMless
83C196KC-16 Kbytes of On-Chip ROM
• 232
16 MHz Operation
• Full Duplex Serial Port
• Register-to-Register Architecture
Byles of Additional RAM
• 16-Bit Up/Down Counter with Capture
16-BitTimer
Package types and EXPRESS versions are identified by a one- or two-letter prefix to the part number. The
prefixes are listed in Table 1.
All A.C. and D.C. parameters in the commercial data sheets apply to the Express devices.
CONTROL
SIGNALS
PORT 3
} ~f:
BUS
PORT"
1~~~~~PW~l
~PW~2
270794-1
Figure 1. 8XC196KC Block Diagram
November 1880
5-130 Order Number: 270794-001
intJ 8XC196KC EXPRESS.
PACKAGING
The 80C196KC is 8vailablein a 68-pin PLCC package and 87C196KC is available fn a 68-pin Cerquad pack-
age. Contact your looal sales office to determine the ~xact orde~ing code for., the part desired. .
98765.3, I~D~~~~~~
80C196KC TN80C196KC
ACHS/PO.5 60 ADO/P30
ACH4/PO ...
83C196KC TN83C196KC
ANGND 12
87C196KC TJ87C196KC TN87C196KC'
Vss 'OTP VersIon
EXTINT/P2.2 15
RESET 16 AD6/P3.e
RXD/P2.1 17 "'07/P3.?
TXOjP2.Q 18 52 AD8/P4.0
P1.0 51 AD9/P4.1
Pl.1 TOP VIEW 50 ADIO/P.2
ADfl/P •. 3
LOOKING DOWN ON
PWW1/P13 22 AD12/P44
COMPONENT SIDE 47 ...OI3/P45
OF PC BOARD 46 ADI4/P4.6
HSI1 25 45 AOISiP4.?
HS12/HS04 26 44 T2CLK/P2".3
D~~~~.~M~~D~~~~aa
270794-2
5-131
EV80C196KC FEATURES·
• Zero Wait-State 16 MHz Execution Speed
• 24K Bytes of ROMsim
• Flexible Wait-State, Buswidth, Chip-Select Controller
• Totally CMOS, Low Power Board
• Concurrent Interrogation of Memory and Registers
• Sixteen Software Breakpoints
• Two Single Step Modes
• High-Level Language Support
• Symbolic Debug .
• RS-232-C Communication Link
LOW COST CODE EVALUATION TOOL
Intel's EV80C196KC evaluation board provides a hardware environment for code
execution and software debugging at a relatively low cost. The board features the
80C196KC advanced, CHMOS*, 16-bit microcontroller, the newest member of the
industry standard MCS®-96 family. The board allows the user to take full advantage of
the power of the MCS-96. The EV80C196KB provides zero wait-state, 16 MHz execution
of a user's code. Plus, its memory (ROMsim) can be reconfigured to match the user's
planned memory system, allowing for exact analysis of.code execution speeds in a
particular application.
~CHMOS is a patented Intel process.
"IBM PC, XT, AT and DOS are regIstered trademarks of Intemahonal Busmess Machines Corporation.
inter---------'----'--------
Intel Corporation assumes no responsibihty for the use of any circuitry other than circuitry embodies in an Intel product. No other circuit patent
licenses are implied. Information contained herein supersedes previously published specifications on these devices from Intel.
APRIL 1989
@ Intel Corporation 1989 Order number: 270802-001
5-132
Popular features such as a symbolic single line assembler1disassembler, single-step
program execution, and sixteen software breakpoints are standard on the EV80C196KC
Intel provides a complete code development environment using assembler (ASM-96) as
well as high-level languages such as Intel's iC-96 or PL/M-96 to, accelerate development
schedules.
5·133
TWO STEP MODES
There are two single-step modes available. The first stepping mode locks out all
interrupts which might occur during the step. The second mode enables interrupts, and
treats subroutine calls and interrupt routines as bne indivisible instruction.
SYMBOLIC DEBUG
The host has a Single Line Assembler, and a Disassmbler, wl;1ich recognize symbolics
generated by Intel software tools. .
RS-232
BUFFERS 80C196K~
CPU
II-----...,Txd
~'-------I Rxd ADDRESS
82510
UART
DIGITAL I/O CONTROL
5-134
MCS®-96 Development 6
Support Tools
_IJ1TMSOFTWARE----
inter~~__~~·.___
. ___.__. _.______ ~_.. _______~_____\_ _
*IBM PC, XT, AT and DOS are registered trademarks of InternatlOnal Business Machines Corporation
Intel CorporatIOn assumes no responSIbility for the use of any cirCUItry other than cirCUItry embodies In an Intel
product. No other Circuit patent licenses are lmplIed InfonnatlOll contamed herem supersedes preVIOusly pubhshed
specifications on these devi«es from Intel
© Intel Corporation 1989
6-1
18096/196 SOFTWARE DEVELOPMENT' PACKAGES 1
280799-1
FEATURES
• Software Tools support all members of code for execution in target with a
Intel's MCS®-96 family simple, one-step operation
• ASM-96/196 macroassembler for speed • 32-bit Floating Point Arithmetic Library
critical code to reduce your development effort and to.
• PL/M-96/196, packag~ for the allow fast, highly optimized numerics-
maintainability and reliability of a high- intensive processing ,
level language with support for many • Library utility for creating and
low-level hardware functions maintaining software object module
• iC-961196 package for structured C libraries' .
language programming, with many • PROM building utility that converts
hardware specific extensions object modules into standard
• Linker/Relocator program for linking , hexadecimal format for easy download
modules generated in assembler, PL/M into a non-Intel PROM Programmer
or C and assigning absolute addresses to • Hosted on IBM PC XTI AT with PC-DOS
relocatable code. RL-96 prepares your 3.0 or above
November 1990
6-2 Order Number: 280793-001
intJ
.FEATURES
Create and
Molntaln
Llbrories WIth
Compile
WIth I Lli6' VLSICE-96
ICE 196 PC
I
Include
rloatlng Point
LibrarIes With
280793-2
6-3
I. FEATURES
/
'iC-961196 SOFTWARE PACKAGE Modules can be written in ASM-96/196,
Intel's iC-96/196 is a structured programming PL/M-96/196, or iC-96/196. The RL-96/196
lltility also promotes programmer producti~ity
language designed to support applications for
by ~ncouraging modular programming.
the 16-bit family of MPS-96 microcontrollers. Because applications can be broken into
iC-96/196 implements the C language as
separate modules, they're easier to design, test
describe,d in the Kernighan and Ritchie book,
The C Programming Language, and includes and maintain. Standard modules can be reused
in different applications, saving software
many of the enhancemen~ as defined by the development time.
proposed ANSI C standard. Major features of
the iC-96/196 compiler include: FPA~96/196 FLOATING POINT
• Symbolics. The iC-96/196 compiler boosts ARITHMETIC UBRARY
. programmer productivity by providing
extensive debug information, including FPAL-961 1~6 is a library of single-precision 32-
symbols. The debug information can be used bit floating point arithmetic functions. These
to debug the code using either the VLSiCE-96 functions are compatible with the IEEE
emulator or the ICETM_196PC emulator. floating point standard for accuracy and
• Architecture Support. iC-96/196 generates reliability and include an error-handler
cOde which is fully optimized for the MCS-96 .library. .
architecture. iC-96/196 provides an UB-96/196
.INTERRUPT attribute, allowing you to
define interrupt handling functions in C, and The Intel LIB-96/196 utility creates and
library routines which allow you to enable maintains libraries of software object modules.
and disable interrupts directly from C (mid- Standard modules can be placed in a librllry,
1989). A REENTRANT/NOREENTRANT and linked into your applications programs
control is alsq included, allowing the using RL-96/196.
compiler to identify non-reentrant OH-£!6/196 .
procedures. This gives you full access to the
large MCS-96 register !let. The OH-96/196 utility converts Intel OMF-96
• Standard language. iC-96J196 accepts object modules into standard hexadecimal
standard C source code. iC-96/196 code is format. This allows the code to be loaded
fully linkable with both PLlM-96/196 and . directly into a P~OM via non-Intel PROM
ASM-96/196modules via an "alien" 'Programmers.
attribute, allowing programmers to utilize
the optimallangilage for any appljcation. In SERVICE, SUPPORT, AND
addition, programmers can quickly begin . TRAINING .
program~ing with iC-96/196 because it Intel augments its 'MCS-96 architec~ure family
conforms to accepted C language standards. development tools with a full array of
seminars, classes, and· workshops; on-site
R~96/19.6 L{NKER/RELOCATOR consulting services; field application
Intel's RL-196 utility is used to link multiple engineering expertise; telephone hot-line
MCS-96 object modules into a single program support; and software and hardware
and then assign absQIute addresses to all maintenance contracts. This full line of
relocatable addresses in the new program. services will ensure your design success.
ORDERING lNFORMATIONI
D86ASM96* 961196 Assembler for PC XT or D86C96· iC-96/196 Software package fQr
AT system (or compatible), PC XT or AT system (or .
running DOS 3.0 or higher compatible), ru~ing.DOS 3.0 or
D86PLM96" PL/M-96/196 Software Package higher. . .
for PC XT or AT system (or
compatible), running DOS 3.0 or
higher'
•i\Jso I~cludes: Relocator/LiDke~, Objecf;.to-hex converter, Floating Point Arithmetic Library, and Librarian.
6-4
VLSiCETM-96 IN-CIRCUIT EMULATOR
280794-1
FEATURES
• Real-time transparent emulation, up to • Symbolic debugging for faster and easier
12 MHz access to memory location and program
• 64K of mappable memory to allow early variables
software debug and (EP)ROM • Fast breaks and dynamic trace to allow
simulation, even before any target the user to modify and interrogate
hardware is available memory, and access the trace buffer
• Trace contains execution address, without stopping emulation
opcode, symbolics, and bus information • On-line Help me to speed development
• 4K frame trace buffer for storing real- • Shadow Registers can read many write-
time execution history only registers and write to many read-
• Ability to break. or trace on execution only registers, allowing enhanced
addresses, opCodes, data values, or flags debugging over component features
values
, November 1990
Order Number: 280794-001
inter
FEATURES
~ Includes 68-pin PGA adaptor; optional 68-pin simply added to the prototype and tested in
I;'LCC and 48-pin DIP adaptors are, also real-time. When the prototype is complete, it is
available ' tested with the final version ,of the system
• Serially hosted on IBM PC AT/XT or software. The VLSiCE-96 emulator'can then be
compatibles with DOS 3.0 or greater used'to verify or debug the target system as a
completed unit.
ONE TOOL FOR ENTIRE Because it SUPPOrtB the ROMlelillil, ROM and
DEVELO~MENTCYCLE ' EPROM versions ofIntel's microcontrollers,
The VLSiCE-96 emulator speeds target system the VLSiCE-96 emulatOr can debug a prototype
develOPment by allowing hardware and or production product at any stage in its
software design to proceed simultaneously; development without introdUcing extraneous
'You can develop software even before hardware or software test tools.
prototype hardware is finished. And becauB,e'
the VLSiCE-96 emulator precisely matches the'
component's electrical and timing ,
characteristics, it's a vaLuable tool for
hardware development and debug.
The VLSiCE-96 emulator also s~plifies and
expediteS system .integratjonand, test. As each
section o( the hl:\rdware is completf;!(i, 'it is
,. ~ " , ',",'
6-6
inter
SPECIFICATIONS I'
HOST REQUIREMENTS Electrical CharacteriBticB
An IBM PC AT/XTor compatible with 512 Power Supply
Kbytes RAM and hard disk. Intel recommends 100V -120V or 200V -240V (selectable)
an IBM PC AT or compatible with 640 Kbytes 50Hz-60Hz
of RAM, one floppy drive and one hard disk 2 amps (AC max) @ 120V
running PC-DOS 3.1 or later. 1 amp (AC max) @ 240V
SYBtem Performance PhYBical CharacteriBticB
l\:Iappable zero wait Mappable to user Controller Pod
state (up to 12 MHz), memory or ICE Width: 8'1." (21 cm)
Min 0 Kbytes, Max memory in 1K blocks Height: 1'/." (4 cm)
64 Kbytes on 1K boundaries Depth: 13'1." (34cm)
Weight: 4lbs (2 kg)
Trace Buffer 4 Kbytes X 48 bits
Power Supply
Virtual Symbol Table A maximum of61 Width: 7%" (18 cm)
Kbytes of host memory Height: 4" (10 cm)
space is available for Depth: 11" (28 cm)
the virtual symbol Weight: 15 lbs (7 kg)
table (VST)._ The rest of
the VST resides on disk User Cllble: 3' (1 m)
and is paged in and out
of host memory as
needed.
USER
CABLE
POWER
SUPPLY
TARGET
ADAPTER
280794-2
.~.
PIN 1
, !
"-+ •
.0. . . ·
i
.:
:
68 PIN
PLCC ADAPTOR
,
i
.!•
.:
:
: ................. =
~1~L3" yyyyyyyyyyy .
1
0 ,.." ,.."
68 PIN PGA
ADAPTOR
...... ......
C
.......... ::...
PIN 1 ::
3.2"
48 PIN DIP
ADAPTOR
J
L. ...........
0 !.-.J !.-.J
PIN 1
II---' -4.8"---1.1
280794-3
6-8
ORDERING INFORMATION
V096-KITA VLSiCE-96 Power supply SA096D Software for host, pr~be,
cable, emulation base, user diagnostic and tutorial on 5'/."
cable, Crystal Power Accessory media for use with the PC AT I
(CPA), serial cables for PC AT I XT under PC-DOS VS.O or
XT,a 68-pin PGA target later. (Requires software
adaptor, ASM-96, AEDIT Text license.) (Included with
Editor. Host, probe,diagnostic V096KITA and V096KITD.)
and tutorial software OQ 5,/•• D86C96NL C-96Compiler·
. . media for DOS hosts running
. DOS VS.O or later. (Requires D86PLM96NL PL/l'rf-96 CoI;npiler·
software license.) . D86ASM96NL ASM-96 Macroassembler·
V096KITD Same as V096KITA withou~ • Also Includes: Relocator/Linker, object-tp-hex converter,
librarian, and Floating Point Arithmetic· Library. .
ASM-96 and AEDIT text
editor.
TA096E Optional 68-pin PLCC Target
Adaptor Board
TA096B Optional 48-pin DIP Target
Adaptor Board
MSA96 Optional Multi-Synchronous
Accessory for multi-ICE
capability
6-9
REAL-TtME TRANSPARENT 80C196 IN-CIRCUIT
EMULATOR
280127-1
November 1990
6-10 Order Number: 280727-004
FEATURES
REAL-TIME EMULATION SYMBOLIC SUPPORT AND
The ICE-196KB/PC provides real-time SOURCE CODE DISPLA Y
emulation with the precise input/output pin Full ASM-96, PL/M-96 and iC-96 language
timings and funCtions across the full operating symbolics, including variable typing and scope,
frequencies of the 8OC196KB microcontroller. are supported by the rCE-196KB/PC memory
The ICE-196KB/PC connects to the intended accesses, trace buffer display, breakpoint
8OC196KB microcontroller socket via a 16" specification, and assembler/disassembler.
flex cable, which terminates in a 68-pin PLCC Additionally, iC-96 and PL/M-9~ source code
probe. can be displayed to make development and
debug easier.
MAPPABLE MEMORY
The ICE-196KB/PC has 64K bytes of ze.ro wait- STANDALONE OPERATION
state memory that can be enabled or mapped Product software can be developed prior to
as read-only, write-only or read/write in 4K hardware availability with the optional
byte increments to simulate the internal Crystal Power Accessory (CPA) and the
(EP)ROM ofthe 80C196KB or external ICE-196KB/PC mappable memory. The CPA
program memory. also provides diagnostic testing to assure full
functionality of the ICE-196KB/PC.
TRACE BUFFER
The ICE-196KB/PC contains a 2K entry trace VERSATILE AND POWERFUL
buffer for keeping a history of actual HOST SOFTWARE
instruction execution. The trace buffer can be The ICE-196KB/PC comes equipped with an
conditionally turned off to collect a user on-line help facility, a dynamic command
specified number of trace frames. Trace entry and syntax guide, built-in editor,
information can be displayed as disassembled assembler and disassembler, and the ability to
instructions or, optionally, disassembled customize the command set via literal
instructions and the original iC-96 and definitions and debug procedures.
PL/M-96 source code.
HOSTING
BREAK SPECIFICATION
The ICE-196KB/PC is hosted on the IBM PC·
Three execution address breakpoints or one XT, AT or compatibles with PC-DOS 3.x.
range of addresses can be active at any time.
The ICE-196KB/PC allows any number of
breakpoints to be defined and activated when
needed.
inter
SPECIFICATIONS
REQUIREMENTS"' ENVIRONMENTAL
, Host CHARACTERISTICS
IBM PC XT, AT (or compatjble) operating Temperature 10·C to 40·C
2K bytes RAM, Hard Disk 37.5·F to 104°F
PC·DOS3.x Operating Humidity Maximum 55%
One Unused Peripheral Slot Relative Humidity,
DC Current 2.5A non-condensing
Note: ICE·196KB/PC uses two bytes ofthe user
stack. ORDERING INFORMATION
TARGET INTERFACE BOARD Order Code Description
Length 2.0" (5.1cm) ICE196KBPC Emulation Board, user.
cable, target interface
Height 1.2" (3.0cm) board (PLCC), host,
Width 2.3" (5.8cm) diagnostic, and tutorial
software on 5 'I." DOS
USER CABLE diskette, and Crystal
Length 15.6" (39.6cm) Power Accessory with
power cable
PROBE ELECTRICAL . ICE196KBPCB Same as above except
80C196KB plus per pin . 50 pf loading does not include Crystal ,
Power Accessory
5ns propagation delay
CPA196KAKB Crystal Po~er Accessory
Icc (from target system) 50 rnA @ 12 MHz and power cable only
Operating Frequency 3.5 to 12 MHz, TA196PLCC68PGA 68-Pin PGA Target
12 MHz only with Adaptor
CPA
6·12
ICETM_196KB/HX IN~CIRCUIT EMULATOR
280847-1
November 1990
6-13 Order Number: 280847-002
inter, ;
6-14
inter
ICETM·196KB/HX IN· CIRCUIT EMULATOR,
6-1-5
I· SPECIFICATIONS' I
'HOSTREQUIREMENTS, • ONCE support: If ONCE (on-circuit
emulation) mode is selected, the RD# and
Emulators require an IBM PC AT, XT, or INSr pins are driven low while RESET# is
100% compatible with 512 Kbytes RAM and active (low).
hard d~ running DOS 3.x.
ELECTRICAL
CONSIDERATIONS
lIT.'"
II08T
L
TARGET INTERfACE BOARD
The emulator processor's user-pin timings and
loadings are identical to the 8xC196KB
component except as follows:
PLCCPROBE
• Additional pin capacitance: 280847-2
. I
6-16
ORDERING INFORMATION
ICE196KBHX ICE in-circuit emulator ICEBTB Enhanced break/trace
base chassis, 196 board (BTB) for upgrading
emulation control board an ICE-l96KB/MX
(ECB), 196KB target probe, system
196KB crystal power ICEOMB Optional memory board
accessory (CPA), enhanced with 64K zero-waitstate
break/trace board (BTB), mapped memory for
64K optional memory upgrading an ICE-l96KB/ \
board (OMB), clips in/out, MXsystem
power supply and cable,
serial cables for PC XT / ICECLIPS Clips in/out for upgrading
AT, 68-pin PLCC target an ICE-196KB/MX
adapter. Host, 196KB system (requires an
probe, diagnostic, and enhanced break/trace
tutorial software on 5Y4· board)
media for DOS hosts ADPTCA68PGA Hinge cable for 68 pin
running DOS a.x. PGA component
(Requires software packaging
license.)
ADPTCA68PLCC Hinge cable for 68 pin
ICE196KBMX. Same as ICEl96KBHX PLCC component
except ~thout enhanced packaging
break/trace board (BTB),
without 64K optional ADPTONC68PLCC Adaptor to support 68 pin
memory board (OMB), and PLCC component
without clips in/out packaging ONCE (on-
circuit emulation)
6-17
Memories Data Sheet 7
·'i
87C257
256K (32K x 8) CHMOS EPROM
• CHMOS/NMOS Microcontroller and • Noise Immunity Features
Microprocessor Compatible - ± 10% Vee Tolerance
- 87C257-1ntegrated Address Latch - Maximum Latch-up Immunity
- Universal 28 Pin Memory Site, 2-line Through EPI Processing
Control .
• New Quick-Pulse Programming™
• Low Power Consumption Algorithm
• High Performance Speeds, - 4 Second Programming
-150 ns Maximum At:cess Time • . 28-Pin Cerdip and 32-Lead PLCC
Packages
(See Packaging Spec., Order # 231369)
Intel's 87C257 EPROM is a 5V-only, 262,144-bit Erasable Programmable Read Only Memory, organized as
32,768 words of 8 bits. It employs advanced CHMOS*III-E circuitry for systems requiring low power, high
speed performance, and noise immunity. The 87C257 is optimized for compatibility with multiplexed address/
data bus microcontrollers such as Intel's 16 MHz 8051- and 8096- families.
The 87C257 incorporates latches on all address inputs to minimize chip count, reduce cost, and simplify
design of multiplexed bus systems. The 87C257's internal address latch allows address and data pins to be
tied directly to the processor's'multiplexed address/data pins. Address information (inputs Ao-A14) is latched'
early in the memory-fetch cycle by the falling edge of the ALE input. Subsequent address information is
ignored while ALE remains low. The EPROM can then pass data (from pins 00-07) on the same bus during
the last part of the memory-fetch cycle.
The 87C257 is offered in ceramic DIP (CERDIP) and Plastic Leaded Chip Carrier (PLCC) packages. The
CERDIP package provides flexibility in prototyping and R&D environments while the PLCC version is used.in
surface mount and automated manufacturing. The 87C257 employs the Quick-Pulse Programming™ Algo-
rithm for fast and reliable programming.
'CHMOS is a patented process of Intel Corporation.
DATA OUTPUTS
0 0-0 7
Of OUTPUT ENABLE
PROG LOGIC
OUTPUT BUffERS
cr CHIP ENABLE
ALE ADDRESS LATCH ENABLE
Y DECODE Y-GATING
:x:
~
:s )( DECODE 262,144 BIT
VI CELL MATRIX
Ao-A I4 VI
w·
ADDRESS
INPUTS '"g
...:
290135-1
Figure 1. Block Diagram
September 1990
7-1 Order Number: 290135-007
inter Q7'C257
N87C257
4 2 32 31 30
As 5 0 29 As
A5 6 28 Ag
A4 7 27 All
A3 8 32 LEAD PLCC 26 NC
A2 9 0.450" X 0.550" 25 OE
(11.430 X 13.970)
(MILLIMETERS)
Al 10 24 AIO
TOP VIEW
Ao ,11 23 CE
NC 12 22 °7
290135-13
Figure 3. PLCC Lead Configuration
7·2
87C257
EXTENDED TEMPERATURE
(EXPRESS) EPROMs .
The Intel EXPRESS 'EPROM family receives addi-
tional processing to enhance product characteris-
tics. EXPRESS processing is available for several
densities allowing the appropriate memory, size to
match system requirements. EXPRESS EPROMs
are available with 168 ± 8 hour, 125°C dynamic
burn-in using Intel's standard bias configuration.
This processing meets or exceeds most industry
burn-in specifications. The EXPRESS product family
is available in both O°C to + 70°C and - 40°C to
+ 85°C operating temperature range versions. Like
all Intel EPROMs, the EXPRESS EPROM family is
inspected to 0.1 % electrical AQL. This allows reduc-
tion or elimination of incoming testing.
Packaging
Speed 30 )J.S
CERDIP I PLCC H
-200V10 L I T AO.nJLS
PRODUCT DEFINITIONS' Al..JLf
•
Operating Burn-in 125°C •
Type
Temperature eC) (hr)
290135-5
Q O°C to 70°C 168 ±8 Binary Sequence from Ao to A14
T - 40°C to 85°C NONE
Burn-In Bias and Timing Diagrams
L -40°C to 85°C 168 ±8
7-3
inter 87C257
ABSOLUTE MAXIMUM RATINGS* NOTICE: This is a production data sheet. The specifi.
cations are subject to change without notice.' .
Operating Temperature .•.......... o·e to 70·e(1)
Temperature Under Bias •..•...••.. - 10°C to 80·e • WARNING: Stressing the device beyond the "Absolute
Storage Temperature .. ,........... '- 65·e to 125·e Maximum Ratings" may Cause permanent damage.
These are stress ratings only. Operation beyond the
Voltage on any Pin "Operating Conditions" is not recommended and ex-
(except A9, Vcc and Vpp) tended ,exposure beyond the "Operating Conditions"
with Respectto GN D ............. - 2V to 7V(2) may affect device reliability.
Voltage on A9 with
Respect to GND •.............. :"'2V to 13.5V(2)
Vpp Supply Voltage with
Respect to GND .' .............. - 2V to 14.0V(2)
Vcc Supply Voltage with
Respect toGND ................ -2V to 7.0V(2)
NOTES:
1. Operating temperature is for commercial product defined by this specification. Extended temperature options are available
in EXPRESS versions. .
2. Minimum DC input voltage is -;-0.5V on input/output pins. During transitions. this level may undershoot to -2.0V for
periods < 20 ns. Maximum DC voltage on input/output pins is Vce + 0.5V which. during transitions. may overshoot to Vee
+ 2.0V for periods < 20 ns. .
3. Maximum current value is with outputs 00 to 07 unloaded.
4. Output shorted for no more than one second. No more than one output shorted at a time.
5. Vee must be applied simultaneously or before ALElVpp and removed simultaneously or after ALElVpp.
6. Sampled, not 100% tested.
7. Typical limits are at Vee = 5V. TA = 25'C.
7-4
intJ 87C257
. 87C257-150V10 87C257-200V10
Verslons(4) Vee ±10%
N87C257-150V10 . N87C257·200V10 Unit
NOTES:
1. See AC Input/Output Reference Waveform for timing measurements.
2. OE may be delayed up to tCE-toE after the falling edge of CE without impact on tCE.
3. Sampled, not 100% tested.
4. Model Number Prefixes: No Prefix = CERDIP, N = PLCC.
AC WAVEFORMS
V1H
ALE
V1L
VIH----of-,~--+~
cr V
1L
VIH _ _ _ _ _ _ _ _ _ _ _ _ _ _ _...!:!!~L_{::§~~~~!£:~~
OUTPUT
V1L
290135-6
7-5
87C257
NOTE:
1. Sampled. not 100% tested.
. l.:.3~
~ .. lN914
IH OUTPUT
V1L
RL
DEVICE
290135-7 UNDER OUT
TEST
.I. CL
AC test inputs are driven at VOH (2.4 VnL) for a Logic CL = 100 pF
- 290135-S
"1" and VOL (0.45 Vnu for a Logic "0". Input timing CL Includes Jig Capacitance
begins at 1.5V. Output timing ends at VIH (2.0 Vnu RL = 3.3 KO
and VIL (0.8 Vnu. Input rise and fall times (10% to
,
90%) s: 10 ns.
DEVICE OPERATION
The Mode Selection table lists 87C257 operating modes. Read mode requires a single 5V power supply. All
inputs, except Vcc and ALElVpp, and A9 during inteligent Identifier Mode are TTL or CMOS.
ALE/
Mode Notes CE OE As Ao Vpp
Vee Outputs
NOTES:
1. X can be VIL or VIH.
2. See DC Programming Characteristics for VCP, Vpp and VIO voltages.
3. AI-As, AlO-14 = VIL.
7-6
inter 87C257
ALE controls the 87C257's internal address latch. StandbLmode substantially reduces Vee current.
When CE = V'H, the outputs are in a high imped-
As ALE transitions from V'H to V'L, the last address
ance state, independent of OE.
present at the address pins is retained. OE can then
enable EPROM data onto the bus.
vss vee RST Initially, and after each erasure, all EPROM bits are
in the "1" state. Data is introduced by selectively
programming "Os" into the desired bit locations. Al-
though only "Os" are programmed, the data word
can contain both "1s" and "Os". Ultraviolet light era-
sure is the only way to change "Os" to "1s".
290135-9
7-7
Program Verify SYSTEM CONSIDERATIONS
A verify should, be .performed following a program EPROM power switching characteristics require
operation to determine that bits have been correctly careful device decoupling. System designers are in-
programmed. With Vee at 6.25V, a substantial pro- terested in 3 supply current issues: standby current
9!!m margin in ensured. The verify is performed with levels (Iss), active current levels (Icc), and transient
CE at V,H. Valid data is available tOE after OE falls current peaks produced by falling and rising edges
low. . of CE. Transient current magnitudes depend on the
device output's capacitive and inductive loading.
Two-line control and proper de'coupling capacitor
Option;al Program Verify selection will suppress transient voltage peaks.
Each device should have a 0.1 /-,-F ceramic capacitor
The optional verify allows parallel programming and connected between its Vee and GND. This high fre-
verification when several devices share a common quency, low inherent-inductance capacitor should
bus. It is performed with CE = OE = V,L and Vpp = be placed as close as possible to the device. Addi-
Vee = 6:2.5V. The normal read mode is then used tionally, for every 8 devices, a 4.7 /-,-F electrolytic
for program verify. Outputs will tri-state depending capaCitor should be placed at the array's power sup-
on OE and CEo ply connection between Vee and GND. The bulk ca-
pacitor will overcome voltage slumps caused by PC
board trace inductances.
Program Inhibit
Program Inhibit Mode allows parallel prQ9!'amming ERASURE CHARACTERISTICS
of multiple EPROMs with different data. CE-high in-
hibits programming of non-targeted devices. Except Erasure begins when EPROMs ilre exposed to light
for CE and OE, parallel EPROMs may have common with wavelengths shorter than approximately 4000
"inputs. Angstroms (A). It should be noted that sunlight and
certain fluorescent lamps have wavelengths in the
3000-4000A range. Data shows that constant expo-
inteligent Identifier™ Mode sure to room level fluorescent lighting can erase an
EPROM in approximately 3 years, while it takes ap-
The inteligent Identifier Mode will determine an proximately 1 week for direct sunlight. If the device
EPROM's manufacturer and device type, allowing is exposed to these lighting conditions for extended
programming equipment to automatically match a periods, opaque labels should be placed over the
device with its proper programming algorithm. window to prevent unintentional erasure.
This mode is activated when a programmer forces The recommended erasure procedure is exposure
12V ± 0.5V on Ag. With CE, OE, A1-AS and A1O- to ultraviolet light of wavelength 2537 A . The inte-
A14 at V'L, Ao = V,L will present the the manufactur- grated dose (UV intensity x exposure time) for era-
er code and Ao = V'r! the device code. When Ag = sure should be a minimum of 15 Wsec/cm 2. Erasure
VID, ALE need not be toggled to latch each identifier time is approximately 15 to 20 minutes using an ul-
address. This mode functions in the 25°C ± 5°C am- traviolet lamp with a 12000 /-,-W/cm 2 power rating.
bient temperature range required during program- The EPROM should be placed within 1 inch of the
ming. lamp tubes. An EPROM can be permanently dam-
aged if the integrated dose exceeds 7258
Wsec/cm 2 (1 week @ 12000 /-,-W/cm2).
7-8
inter 87C257
290135-10
7-9
87C257
NOTES:
1. Maximum current value is with outputs 00 to 07 unloaded. .
2. VCP must be aRplied simultaneously or before Vpp and removed simultaned~sly or after Vpp. .
3. When programming; a 0.1 ,..,F capacitor is required between Vpp and GNO to suppress spurious voltage transients which
can damage the device.
4. See AC Input/Output Reference. Waveform for timing measurements.
5. tOE and tOFP are device characteristics but must be accommodated by the programmer.
6. Sampled, not 100% tested.
7. During programming, the addrEjss latch function is'bypassed whenever Vpp = 12.75V or ~g "' VH. When Vpp and Ag are
at TTL levels, the address latch function is enable<;l, and the device functions' in read mode.
8. Vpp can be 12.75V during Blank Check and Final Verify; if so, CE must be VIH.
7-10
inter 87C257
PROGRAMMING WAVEFORMS
V,H
Address V1l. _ _"""_"'::--:=--"""",+-~"':'::' __"';:;""""';';;=;';";';;;;;;-J}-_ _......;A.;;;D;;,;DR;;;;ES;.;S..;S.;;.TA;;,;BL;;.E+_ _"'n",,"",A;;;;DD;;,;R;;,;ES..;;,S.;.;VA.;;;LI..;;,D-'I~_
Data
12.75V - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --,--....,----1---+-+--....,-+......+----+----..
ALE/Vpp V,H - - --,----+------11---'1
tyPS
6.2SV
5.0V
Vee
V..
Ci'
V,H - - - ' - \ .
DE
290135-11
REVISION HISTORY
Number Description
07 Revised general datasheet structure, text to improve clarity.
Combined TIL/NMOS and CMOS Read Operation DC Characteristics.
Deleted -250 EXPRESS option.
Added -150 speed bin.
Deleted -170 speed bin.
7-11
DOMESTIC 'SALES OFFICES
ALABAMA FLORID,A MICHIGAN tlntel Corp * VIRGINIA
25700 SCience Park Or.
llilel Corp, tlntel Corp tlntel Corp. Suite ,100 tlntel Corp
5015 Bradford Dr. #2 800 FaIrway Drive 7071 Orchard Lake Road Beachwood 44122 1504 Santa Rosa Road
Huntsville 35805 Sl,Ilte 160 SUite 100, Tel' (216) 464-2736 Suite 108
Tel' (205) 830-4010 DeerfIeld Beach 33441 West BloomfIeld 48322 TWX: 81 0-427-9298 RIchmond 23288
FAX' (205) 637-2640 rei (305) 421-0506 Tel' (313) 851-8096 FAX' (804) 282-0673 Tel (804) 282-5668
FAX' (305) 421-2444 FAX' (313) 851-8770 FAX' (216) 464-2270
ARIZONA I
tlntel Corp, " tlntel Corp , MINNESOTA OKlfHOMA
410 North 44lh Sireel 5850 T G Lee Blvd WASHINGTON
SUite 340 " tlntel Corp Intel Corp.
SUIte 500 :!Soo W 80th St
Phoenix 85008 Orlando 32822 6801 N Broadway tlntel Corp
Tel (407) 240-8000 SUite 360 SUIte 115 155 loath Avenue N.E.
Tel (602) 231-0386
FAX: (602) 244-0446 FAX (407) 240-8097 ~~~~m;n2~t~~5~~~g1 Oklahoma City 73162
Tel'. (405) 848-8086
SUite 386
Bellevue 98004
Intel Corp. Intel Corp TWX 910-576-2867 FAX' (405) 840-9819 Tel: (206) 453-8086
7225 N, Mona Lisa Rd, 11300 4th Street Nortl') FAX: (612) 83t-6497 TWX, 910-443-3002
SUite 215 SUite 170 FAX' (206) 451 '9556
MISSOURI OREGON
Tucson S5741
i~I·P(~tf~)~U;~_g:T~6
~J~I ~~ullan Road
Tel' (602) 544-0227
FAX' (602) 544-0232 FAX' (813) 578-1607 l~J~1 ~a~R' CIty Expres~way tlntel Corp
15254 N.w. Greenbrier Parkway SUIte 102
SUite 131 BUilding B
CALIFORNIA Earth City 63045 Spokane-99206
GEORGIA Beaverton 97005
Tel (314) 291-1990 Tel. (509) 926-8086
tlntel Corp, Tel: (503) 645-8051 FAX: (509) 928-9467
21515 Vanowen Street tlntel Corp FAX (314) 291-4341 TWX' 910-467-8741
SUite 116 20 Technology Parkway FAX' (503) 645-8181
SUite 150 NEW JERSEY
¥:In(~:,~t49J~ Norcross 30092
tlntel Corp *
WISCONSIN
FAX' (818)340-1144 Tel (404) 449-0541 PENNSYLVANIA Intel Corp
FAX, (404) 605-9762 ,Parkway 109 Offlce Center
tlntal Corp. 328 Newman Springs Road 330 S. ExecutIVe Dr
tlntel Corp. * SUIte 102
300 N. Continental Blvd Red Bank 07701 925 Harvest Drive
Suite 100 ILLINOIS Tel' (201) 747-2233 BrookfIeld 53005
FAX (20t) 747-0963 SUite 200 Tel' (414) 784-8087
~~IS(~~~)d~~~go tlntel Corp *
_ Intel Corp
Blue Bell 19422
Tel: (215) 641-1000
FAX' (414) 796-2115
FAX: (213) 640-7133 WoodfIeld Corp Center III
300 N Martingale Road 280 Corporate Center FAX (215) 641-0785
Intel Corp SUIte 400 75 LIVIngston Avenue
1 Sierra Gate Plaza Schaumburg 60173 FIrst Floor tlntal Corp. *
400 Penn Center Blvd
CANADA
SUite 280C Tel (708) 605-8031 Roseland 07068
Roseville 95678 FAX (708) 706-9762 Tel (201) 740-0111 SUite 610
~~~~~~I~r 8'ii~~70
Tel: (916) 782-8086 FAX (201) 740-0626 BRITISH COLUMBIA
FAX' (916) 782-8153
INDIANA NEW YORK FAX' (412) 829-7578 Intel Semiconductor of
tlntel Corp. Canada, Ltd
9665 Chesapeake Dr tlntel Corp Intel Corp.* 4!$85 Canada Way
Suite 325 8910 Purdue Road 850 Crosskeys Of:fice Park PUERTO RICO Suite 202
~:r Peif~:~~:386
Suite 350 Fairport 14450 Burnaby VSG 4L6
Indianapolis 46268 Tel' (71 6) 425-2750 tlntel Corp Tel (604) 298-0387
FAX (619) 292-0628 Tel (317) 875-0623 TWX 510-253-7391 South Industrial Park FAX, (604) 298-8234
FAX (317) 875-8938 FAX. (716) 223-2561 P,O, Box 910
tlntel Corp. "" Las Piedras 00671
400 N Tustin Avenue tlntel Corp. * Tel' (809) 733-861~ ONTARIO
SUite 450 IOWA 2950 Express Dr , South
Santa Ana 92705 SUite 130 tlntel Semiconductor of
Tel' (714) 835-9642 Intel Corp Island18 11722 TEXAS Canada, Ltd,
TWX, 910-595-1114 1930 St Andrews Drive N E Tel (516) 231-3300 2650 QI,I8ensview Drive
FAX' (714) 541-9157 2nd Floor TWX 510-227-6236 Intel Corp
Cedar Rapids 52402 SUite 250
tlntel Corp * Tel (319) 393-5510
FAX' (516) 348-7~39 ~~~~,"C:C~~~ of Texas Hwy Ottawa K2B 8H6
San Tomas 4 Tel' (613) 829-9714
2700 San Tomas Expressway
2nd Floor KANSAS
~~~~g~r~~slness Center Tel' (512) 794-8086
FAX' (512) 338-9335
FAX: (613) 820-5936
Bldg 300, Route 9 tlntel Semiconductor of
Santa Clara 95051 Fishkill 12524
Tel' (408) 986-8086 tlntel Corp tlntel Corp * Canada. Ltd.
Tel (914) 897-3860 12000 Ford Road 190 Attwell Drive
TWX: 910-338-0255 10985 Cody SI FAX: (914) 897-3125
- FAX (408) 727-2620 SUIte 140 Suite 400 SUite 500
=
Overland Park 66210 Dallas 75248 Rexdale M9W SHe
Tel (913) 345-2727 NORTH CAROLINA Tel. (214) 241-8087 Tel' (416) 675-2105
COLORADO
FAX (913) 345-2076 FAX (214) 484-1180 FAX (416) 675-2438
, :·,nl~l Corp, tlntel Corp
5800 Executive Center Dr tlntel Corp. *
~83hpark Drive MARYLAND SUite 105 , 7322 S.W Freeway QUEBEC
Colorado Springs 80907 Charlotte 28212 \ SUite 1490
Tel: (719) 594-8622 tlntel Corp * Tel' (704) 568-8986 Houston 77074 tlntel SemIconductor at
FAX' (303) 594-0720 10010 JunctIon Dr FAX, (704) 535-2236 Tel' (713) 988-8086 Canada, Ltd
SUIte 200 TWX 910-881-2490 1 Rue Holiday
tlntal Corp * Annapolis JunctIon 20701 tlntel Corp
5540 Centerview Dr FAX: (713) 988-3660 SUite 115
600 S, Cherry SI Tel (301) 206-2860 Tour East
SUite 700 FAX' (301) 206-3677 SUite 215
Denver 80222 Raleigh 27606 Pt ClaIre H9R 5N3
(301) 206-3678 UTAH Tel' (514) 694-9130
Tel' (303) 321-8086 Tel' (919) 851-9537
FAX' (919) 851-8974 FAA' 514-694-0064
TWX' 910-931-2289 tlntel Corp
FAX. (303) 322-8670 MASSACHUSETTS 428 Easl 6400 SOUlh
OHIO SUIte 104
CONNECTICUT tlntel Corp * ,
Westford Corp Center tlntel Corp I< Murray 84107
Tel' (801) 263-8051
;~lte[~°rParm' Corporate Park
3 Carlisle Road 3401 Park Center Drive
2nd Floor Suite 220 FAA' (801) 268-1457
83 Wooster HeIghts Rd Westford 01886 Dayton 45414
Danbury 06810 Tel (508) 692-0960 Tel (513) 890-5350
Tel: (203) 748-3130 TWX' 710-343-6333 TWX, 810-450-2528
FAX, (203) 794-0339 FAX (508) 692-7867 FAX, (513) 890-8658