Professional Documents
Culture Documents
MC6803U4
I
Advance Information ,,.,,
MICROCOMPUTER/MICROPROCESSOR (MCU/MPU)
.... ;\.
Enhanced MCWOO Instruction Set .,>’:,
,<*“:i’.t&,,.+>
,.:,.a:~~,‘*.> FFIX
Upward Source and Object Code Compatibility with ~~~C6800 PACKAGE
.}
and MC6BOI ;,. CASE 715
,,~<~1:, <
Bus Compatibility with the M6800 Family “ ‘y
~~ +/+$
8X 8 Multiply Instruction ‘,;.>, ,>
~.:.,,
J*~*\.:..,.\.,i.<.,,
Single-Chip or Expanded Operation to ~::,&~~WAddress Space
Internal Clock Generator with Divide:~~~Q&@~utput PIN ASSIGNMENT
r1
Serial Communications Interface (~$$$$~ ,,
16-Bit Six-Function Program~~b[&\,~~er Vss 1● 40E
Three Output Compare Fu~Ylo’@:$ XTALI 2 39 Scl
Two Input Capture FuqQQ*,,,$
EXTAL2 3 38 SC2
Counter Alternate Ad4~ess!
~\\,
,;.li%8<,.
>&. m4 37 P30
4096 Bytes of RO~(~b801 U4)
192 Bytes of:~A,M “W’ ml 5 36 P31
35 P32
‘1
32 Bytes ofti~~~,:~etainable During Power Down RESET 6
● 29 Para~{~~$&~and Two Handshake Control Lines Vcc 7 34 P33
● ~?l~~wd Until Stack Load P20 8 ‘ 33 P34
~~
● ~@%~1,t&850C Temperature Range
?,{ .i ~ P21 [ 9 32 ] P35
P22 [ 10 31 ] P36
— !., . . .1,? P23 [ 11 30 ] P37
*<IJ.I..,
~,i
GENERICINFORMATION
P24 [ 12 29 ] P40
‘Package Type Frequency (MHz) Temperature Generic Number .
Plo [ 13 2a ] P41
Ceramic 1.0 Ooc to 700c MC6801U4LI
L Suffix 1.0 – 40°C to 85°C MC6801 U4CLI Pll[ 14 27 ] P42
1.0 Ooc to 70”C MC6803U4L
P12 [ 15 26 ] P43
1.0 – 40°C to 85°C MC6803U4CL1
1.25 Ooc to 700c MC6801U4LI-I P13C 16 25 ] pa
lis document contains information on a new product. Specifications and information herein @ MOTOROW INC., 1984 ADI-896-R
are subject to change without notice.
MC~l U4 MICROCOMPUTER FAMILY BLOCK DIAGRAM
P37
P36
A71D7
rr
A61 D6
D7
D6
TINI
TOUT1
1/0
1/0
P35 A51D5 D5
SCLK 1/0
PM A41 D4 D4
P33 A31 D3 RDATA 1/0
D3
P32 * P24 TDATA 110
A21 D2 D2
P31 A1/Dl D1 -
P30 AOI DO DO
SC2 R/~ R/~ Scl
Scl AS ms
2
K
— +-
L
P47 A15 A7 1/0 < * Plo TIN2 1/0
P46 A14 A6 1/0 Y
* Pll TOUT2’ 1/0
P45 A13 A5 1/0 Port
* *, P12 TOUT3 1/0
P44 A12 A4 1/0 1
* * P13 1/0
P43 Al 1 A3 1/0
< * P14 1/0
P42 AIO AZ 1/0
● * P15 1/0
P41 A9 Al I/,@
* P16 1/0
P40 A8
~ P17 1/0
—
POWER CONSIDERATIONS
., ,,
MC6803U4 MC6803U41 Unit
Min Max Min Max
0.5 1,0 0.5 1.25” MHz
2.0 4,0 2.0 5.0 MHz
‘li~=rnal
.. Oscillator Freauency I 4fn 2.0 4,0 2.0 5.0 MHz
‘kCrystal Oscillator Startup Time trc – 100 – 100 ms
Processor Control Setup Time tpcs 200 – 170 – ns
m
.- ., MOTOROLA Semiconductor Products Inc.
FIGURE 1 –.DATA SETUP AND HOLD TIMES FIGURE 2 – DATA SETUP AND HOLD TIMES
(MPU READ) (MPU WRITE}
1, ,:!,
‘k\* ~ ,{~
*Access matches output strob,~*$>8~e*@SS = O, a read; 0SS = 1, a write)
NOTE: Timing measureme~x~~~$fi.~renced to and from a low voltage of 0.8 volts and a high voltage of 2.0 volts, unless otherwise noted.
,J: .
Vcc
o-
1 30 pF
I= Test Point MMD6150
or Equiv,
c R
MMD7000
or Equiv.
m.
= =
Addr/Data
Muxed
Addr/Data
Muxed
Address
~OTES:
1, Voltage levels shown are VL=O.5 V, VH =2,4 V, unless otherwise specified,
2. Measurement points shown are 0.8 V and 2.0 V, unless otherwise specified.
3. Usable access time is computed by 22+3 – 17+4,
4. Memory devices should be enabled only during E high to avoid port 3 bus contention,
5. Item 26 is different from the MC6801 but it is upward compatible.
7 A
15 D o
15 SP
\\\..&.,
7 ‘:+*, $2$ 0
●
m MOTOROLA Semiconductor Products Inc.
FIGURE9 – SINGLE-CHIPMODE
s-
Vcc
XTAL1 E
n
EXTAL2 ml
VCC Standby~
MC6801U4 IRQ1
m
I \ \t>*$ ‘ 1
XTAL1 +E gXTAL 1 +E
L 4 ,?2.
-m + ml
n d%,
m
EXTAL2
- ml >.$’‘)!:,} >,,. EXTAL2
,,,,\;.:tw.
VCCStandby ~ vcc$t~dbw+
RESET~ $?:;;WT+
MC6801U4 MC6801U4
“[*@\,
Port 1 Port 1
8 1/0 8 1/0
Unes Unes
16-Bit Timer 16-Bit Timel
* F3
0s3
Port 2
5 1/0 Lines
Scl
16-Bit Timer —
5 1/0 Lines
Vss
Scl
16-Bit Tmer
,..,
Port 1
8 1/0 Lines
16-Bit Timer
Port 2
5 1/0
Lines
Serial 1/0
16-Bit Tmer L
Port 3 ,8
Port4 ,8 / \
m \
R/~ 7
E T
(
8 8
tl
/ ‘ ,8 8
/
d ““d
* :
Vss “
RAM PIA ACIA
Vss
Vcc
I
=$
XTALI
n
EXTAL2
Vcc Standby
RESET MC6801U4
NMI MC6803U4
IRQI
Port 1
8 1/0
16-Bit Timer +
II
●
G OC
*
* T. D1 QI
)
*
T
* *
* 74 LS373 *
Address AO-A7
> [Typical) *
> *
D *
* *
Da Q8
1
*
+
Data DO-D7
I *
VMpH
Mode Inputs
(P20, P21, P221
e%o“,*,‘$’?$d.y{l~
MODE PROGRAMMING (Refer to Figure 14) ‘~?,,:*!s,
~~$
,,:~ .\\.
Characteristic ,:t:~:j.. . Symbol Min Max Unit
Mode Programming Input Voltage Low :,T,
,.,, N,.
.+,>t:st~t.$. VMpL – 1,8 v
Mode Programming Input Voltage High )i~:\,?\,
c
~.,,.,/* VMpH 4,0 – v
~1.?.
Mode Programming Diode Differential (If Diodes are Used) ..’.$.
:1!,.:,.
,.,\,.,,
..tit-:...,$!, VMpDD 0,6 – v
RESET Low Pulse Width .
“,:$ PWRSTL 3,0 – E Cvcles
... ....!
Mode Programming Setup Time ‘~ Y
~\N:.: tMpS 2,0 – E CVcles
Mode Programming Hold Time .*,.,. ‘*.:,\,$
~~~...:..
RESET Rise Timez 1 ps . .. .‘%.> tMpH o –
.V$‘~
‘)~:,
‘P!:*. ns
~T Rise Time< 1 ps ~, ,,, ~.~?
i..,> lM –
,},:,.~:.k~.$.
,..<:.
T&~~~;_MODE SELECTIONSUMMARY
,,, ‘.?:,:,mi$
P22 P21 Bus
Mode* PC2 Pcl Mode Operating Mode
7 H H ,.,,..’*N ,@ I I I I I I .Single Chip
6 H I,,*~: ‘,,“~<’” , , I MUX(2,
3) Multiplexed/Partial Decode
5 H ~%
@q:,” “’”H I I I NMUX(2, 3) Non-Multiplexed/Partial Decode
4 ,$ ‘~~:y’ L – – – — Undefined(4)
3 ,, $?:@ ,,, H H E I E Mux(1,5) Multiplexed/RAM
‘%’ H. L E 1 E MUX(I) Multiplexed/RAM
L L H I 1 E Mux(l ,3) Multiplexed/RAM and ROM
L L, L I I E MUX(I) Multiplexed Test
~.::..$~’~J:l\:.~
,, .,.~.,
.
‘~.:*
, E – External
.:$>,
.;~i \ \ ‘{,<:.,
>,,>
. .!..{
,,,.,:,, MUX – Multiplexed
‘++,
~,y
*j$:. NMUX – Non-Multiplexed
L – Logic “O”
H – Logic “l”
NOTES:
1. Addresses associated with ports 3 and 4 ere considered external in modes O, 1, 2, and 3.
2. Addresses associated with port 3 are considered external in modes 5 and 6.
3. Port 4 default is user data input; address output is optional by writing to port 4 data direction register.
4. Mode 4 is a non-user mode and should not be used as an operating mode.
5, Mode 3 has the internal RAM and internal registers relocated at $DOOO-$DOFF,
R2
NOTES:
1. Mode 7 as shown
2. R2. C = Reset time constant
3. R1 = 10 k (typical)
4. D= 1N914, 1N4001 (typical)
5. Diode Vf should not exceed VMpDD min.
NOTES:
1) Excludes the following addresses which may 4) This mode is the only mode which may be
be used externally: $04, $05, $00, $07, and used to examine the entire ROM using an ex-
$OF. ternal RESET vector.
2) The interrupt vectors are at $BFFO-$BFFF. 5) Modes 5-7 can be irreversibly entered from
3) There must be no overlapping of internal and mode O by wtiting to the PCO-PC2 bits of the
external memory spaces to avoid driving the port 2 data register.
data bus with more than one device.
0
M C~Ol U4
Mode
II
J I
Multiplexed/RAM & ROM
Multiplexed/RAM
$m(l)
Internal Registers
$001 F
External Memory Space
$0040
Internal RAM
$OOFF
$F~
Internal ROM
$FFEF
$FFFO
External Interrupt Vectors
$FFFF
NOTE:
●
1) Excludes the following addresses which maj
be used externally: $04, $05, $~, $07, and
$OF.
.9
9
MOTOROLA Semiconductor Products Inc.
@ 15
FIGURE 16 – MCWlU41MC~U4 MEMORY MAPS (Sheet 4 of 4)
0
m MCWO1 U4
Mode
,=
Multiplexed/Partial Decode
$m(l)
Internal Registers
$001 F
External Memory Space
$W
internal RAM
$OOFF
External Memory
$F~
Internal ROM
9 Register
Address
Other
Modes Mode 3
quests: maskable and non-maskable. A non-maskable inter-
rupt (~i) is always recognized and acted upon at the com-
pletion of the current instruction. Maskable interrupts are
Port 1 Data Direction Register*** 0000 DOOO controlled by the condition code register I bit and by in-
Port 2 Data Direction Register*** 0001 DOOI dividual enable bits. The I bit controls all maska~~, inter-
Port 1 Data Register 0002 DO02 rupts. Of the maskable interrupts, there are two ty@&~
Port 2 Data Register 0003 DO03 and ~2. The programmable timer and seria/~&~~~unica-
Port 3 Data Direction Register*** 0004* DO04* tions interface use an internal IRQ2 interruQ$wlY~~;,@~hown
Port 4 Data Direction Register*** 0005* * DO05* * in the block diagram. External devices a,n:~$~,,~se $ IRQI. An
Port 3 Data Register 0006’ DO06* ~ interrupt is serviced before ~2if’%~tti are pending.
.f,i+~” .~$,.’
“
Port 4 Data Resister 0007 + * DO07* * .,.>,.t<~~
~~$.~ J.
Timer Central and Status Register 0008 DO08
Counter (High BVte) 0009 DO09
Counter (Low BVte) 000A DOOA
Output Compare Register (High BVte) 000B DOOB
Output Campare Register (Low BVte) Oooc DOOC
Input Capture Register (High BVte) 000D DOOD
Input Capture Register (Low BVte) 000E DOOE
Port 3 Control and Status Register 000F* DOOF*
Rate and Mode Cantrol Register 0010 DOIO .,:$, “\
,,<~$i’;’\$:\
Transmit/ Receive Control and Status Registe 0011 DOI 1 All ~~ !~~&u’pts use hardware prioritized vectors. The
Receive Data Register 0012 DO12 singler~~$~j~~~rrupt and three timer interrupts are serviced in
Transmit Data Register 0013 DO13 a pri@~~Yed order and each is vectored to a separate loca-
RAM Control Register 0014 DO14 ~~~, A~interrupt vector locations are shown in Table 5, In
Counter Alternate Address (High BVte) 0015 DO15 .,..i,mx O, reset and interrupt vectors are defined as $BFFO-
~~ “~9FFF,
Counter Alternate Address (Low BVte) 0016 DO16
Timer Control Register 1 10017 I DO17 S%+.’*J+J:@
The interrupt flowchart is depicted in Figure17 and is
&$~$Q common toeverYinterrupt excluding reset. During interrupt
Timer Control Register 2 10018 I DO18
t~
Timer Status Register servicing, the program counter, index register, A ac-
MSB
BFFE
BFFC
BFFA
M(
mBFFD
BFFB
FFFC
FFFA
FFFD
FFFB
RESET”
Software
Interrupt* * *
Non-Maskable Interrupt**
Interrupt
BFF8 BFF9 FFF8 FFF9 Maskable Interrupt Request 1
BFF6 BFF7 FFF6 FFF7 Input Capture Flag*
BFF4 BFF5 FFF4 FFF5 Output Compare Flag*
BFF2 BFF3 FFF2 FFF3 Timer Overflow Flag*
BFFO BFFI FFFO FFFI Serial Communications lnte;face*
* IRQ2 interrupt
* *~ must be armed (bv accessng stack pointer) before an
~ is executed.
ITMP-I
+
Next
Instruction
1-
m
ITMP
Swl
N
Y
‘<
x 1-1 ‘*
1 I I I
& , ,x,:, ,
I
I Vect”r -Pc I
a
FIGURE 18 – INTERRUPT SEQUENCE
Last Instruction
4 Cycle
#1 #2 #3 #4
I
#5 #6 #7 #8 #g
Internal
Address Bus x Y x x x x x x x x
Op Code Op Code SP(n) SP(n-1) SP(n-2) SP(n-3) SP(n-4)
Addr Addr ,v!’i~;>, MSB Addr LSB Addr Address
+!$ it. ,.. -
m . ~..
~;,,l;r,$~,,>,:
,,.is:...
+ *tPCs L,. $%:~~,,
, ij~.> -,,
-.$,,.
~,$’
~t::>” ., -
\,+p
~ or IRQ2 .J, \*y,.
+ +tPcs )%*.:*,
‘if).
,. ~t~x
.,. .,.,
v.?,
.*I*?*..
*J.. .:!,,
,
Internal
Data 8US x x x x x x x x *,.. ~f~..., .*T x x x x Y x
Op Code Op Code PC O-7 PC8-15 ~ 0.7 *\+;&5J ACCA ACCB CCR Irrelevant Vector Vector First Inst. of
~...:> Data MSB LS B Interrupt Routine
>*
,,.:,.3
) 1
Vcc
RESET
Internal
Address Bus \\\\\\\\\\\\\\\\\\\\\u FFFE FFFE
Internal R/~
I b\\\\\\\/\\\\\\\\\\l\\\\\\\y
Internal
Data Bus h\\\\\\\\j~\\\\\( ,,,. ~’+~
>~,,’).
.,$~:~~ ~A\\\\\\\\\\\\\\\\\\\\\\\\\\\\\~ ; x x x x x x x
PC 8-15 PC O-7 First
\\,
Instruction
~~ Not Valid
FUNCTIONAL PIN DESCRIPTIONS it responds to the request. The MCU will then begin an inter-
rupt sequence. Finally, a vector is fetched from $FFFC and
VCC AND VSS $FFFD ($BFFC and $BFFD in mode O), transferred to the
VCC and VSS provide power to a large portion of the program counter, and instruction execution is resumed. ~
MCU. The power supply should provide + 5 volts ( + 5Yo) to typically requires a 3.3 kQ (nominal) resistor to Vcc. There is
VCC and VSS should be tied to ground. Total power dissipa- no internal ~ pullup resistor. ~must be held low for at
tion” (including VCC standby) will not exceed PD milliwatts. least one E cycle to be recognized under all conditions.
VCC STANDBY
VCC standby provides power to the standby portion ($4o
through $5F in all modes except mode 3 which is $D~O
through $D05F) of the RAM and the STBY PWR and RAME
,,.,.,.
bits of the RAM control register, Voltage requirements de-
~ (MASKABLE INTERRUPT RE:u\:~j}~Y
pend on whether the device is in a power-up or power-down
state. In the power-up state, the power supply should pro- i RQI is a level-sensitive input w~~h @tibe used to re-
vide + 5 volts ( + 5Yo) and must reach VSB volts before quest an interrupt sequence, The,~[U}h# complete the cur-
RESET reaches 4.0 volts. During power down, VCC standby rent instruction before it respondwt~:the
,.,.,l.$ $,
:,* request. If the inter-
must remain above VSBB (minimum) to sustain the standby rupt mask bit (1bit) in the cq#dI%~ code register is clear, the
RAM and STBY PWR bit. While in power-down operation, MCU will begin an interr~~t~e~uence. A vector is fetched
the standby current will not exceed ISBB, from $FFF8 and $FFF9~*$::*~$~~~and
.$s:,3s,. $BFF9 in mode O), trans-
It is typical to power both VCC and VCC standby from the ferred to the progra,rn c~nter, and instruction execution is
resumed, ,.: :?
same source during normal operation. A diode must be used
between them to prevent supplying power to VCC during IRQI typic#y~&’fires an external 3.3 k~ (nominal)
power-down operation. resistor to ~.~~ f~? wire-OR applications. IRQI has no inter-
nal pul Iup{~~is?&r.
XTALI AND EXTAL 2 .,,. -.),$
,
These two input pins interface either a crystal or TTL- scl$~k SC2 (STROBE CONTROL I AND 2)
~y~ ‘*?
compatible clock to the MCU internal clock generator. ~:function of SC I and SC2 depends on the operating
Divide-by-four circuitry is included which allows use of the ‘~:- Scl is configured as an output in all modes except
inexpensive 3.58 MHz or4. W36 MHz color burst TV crystals. *$~&le-chip mode, whereas SC2 is always an output. SCI
A 20 pF capacitor should be tied from each crvstal Din to .! “%nd SC2 can drive one Schottky load and 90 pF.
,,,x
ground to ensure reliable startup and operation. AlternativQ#~
Iy, EXTAL2 may be driven by an external TTL-compati~e*~,, SCI AND SC2 IN SINGLE-CHIP MODE – In single-chip
clock at 4 f. with a duty cycle of 50% ( ~ 5% ) with XS&&3,~ mode, S.CI and SC2 are configured as an input and output,
,Y:$I*5*’,,‘ .. respectively, and both function as port 3 control lines. SCI
connected ground. ,*> ‘~~’
.,.
The internal oscillator is designed to interface ~~~~w~T- functions as 1S3and can be used to indicate that port 3 input
cut quartz crystal resonator operated in paraMk.@6nance data is ready or output data has been accepted. Three op-.
mode in the frequency range specifiedkf~E~~~~~L. The tions associated with IS3 are controlled by the port 3 control
crystal should be mounted as close as .@s%J#to the input and status register and are discussed in the port 3 descrip-
pins to minimize output distortion an&3$t@up stabilization tion; refer to P30-P37 (PORT 3). If unused, 1S3 can remain
time. The MCU is compatible ,@~%~~ost commercially unconnected.
available crystals. Nominal cry~~.~aeters are shown in SC2 is configured as 0S3 and can be used to strobe out-
put data or acknowledge input data, It is controlled by out-
put strobe select (0SS) in the port 3 control and status
RESET register. The strobe is generated by a read (0SS = O)or write
This input is usedJt~~~&e~the internal state of the device (0S$= 1) to the port 3 data register. 0s3 timing is shown in
and provide an or~~tit%rtup procedure, During power up, Figure 3.
RESET must bq,+~d~jbelow 0.8 volts: (1) at least tRC after
SC1 AND SC2 IN EXPANDED NON-MULTIP”LEXED
VCC reacheS~7~~olts in order to provide sufficient time for
MODE – In the expanded non-multiplexed mode, both SCI
the cloc~,~~~~~$tor to stabilize, and (2) until VCC standby
and SC2 are configured as outputs. SCI functions as in-
reache~~,tx{k~lts. RESET must be held low at least three E
put/output select (10S) and is asserted only when $0100
cycl~~Jf,~~erted during power-up operation.
,J, ,),<~
.:.,$*.y through $01FF is sensed on the internal address bus.
.:;
E (ENABLE) SC2 is configured as read/write and is used to control the
direction of data bus transfers. An MpU read is enabled
This is an output clock used primafily for bus synchroniza-
when readlwrite and E are high.
tion. It, is TTL compatible and is the slightly skewed divide-
by-four result of the device input” clock frequency. It will SCI AND SC2 IN EXPANDED MULTIPLEXED MODE –
drive one Schottky TTL load and 90 pF, and all data given in In the expanded multiplexed modes, both SCI and SC2 are
cycles is referenced to this clock unless otherwise noted. configured as outputs. SCI functions as address strobe and
can be used to demultiplex the eight least significant ad-
~ (NON-MASKABLE INTERRUPT) dresses and the data bus. A latch controlled by address
An NM I negative edge requests an M CU interrupt se- strobe captures the lower address on the negative edge, as
quence, but the current instruction will be completed before shown in Figure 13,
RESET
r
J
4 tRc
Oscillator
Stabilization
Time, tRC
SC2 is configured as read/write and is used to control the PORT3 CONTROLAND STATUS REGISTER
direction of data bus transfers. An M PU read is enabled’ 7654321 0.
when readlwrite and E are high.
1s3 1s3 ~ ~ss Latch ~ ~ ~
$OF
Flag IRQ1 Enable
PIO-P17 (PORT 1)
Port 1 is a mode independent 8-bit 1/0 and timer port.
Each line can be configured as either an input or outputa5 Bits O-2 Not used.
defined by the port 1 data direction register. Port 1 bits O, 1, Bit 3 Latch Enable – This bit controls the input latchf~r
and 2 (PIO, PI 1, and P12) c“an also be used to exercise one port 3. If set, input data is latched by atii:~x,
input edge function and two output compare functions of negative edge. The latch is transparent af~~r’~~wd
the timer. The TTL compatible three-state buffers can drive of the port 3 data register. Latch enabl~Jj~*~&@red
one Schottky TTL load and 30 pF, Darlington transistors, or ,.,$
<,’.:
~ ~’v:.
during reset. s~,+.:
, ::.f;::,i:).~,.
k-.:,
CMOS devices using external pullup resistors. It is con-
Bit 4 0SS (Output Strobe Select) – ~~~~b~{etermines
figured as a data input port during RESET. Unused pins can
whether 0S3 will be generat~.@:+~@,@%d or write of
remain unconnected.
the port 3 data register. W%&@ar, the strobe is
generated by a read; w~d~,set?fl is ganerated by a
P20-P24 (PORT 2)
write. 0SS is cleare~${~{~~ reset.
Port 2 is a modeindependent, 5-bit, multipurpose l/o ,,;. ~\.
,,,:7 ,, ‘.J.,.:?\>.
port. The voltage levels present on P20, P21, and P22 on the Bit 5 Not used. ee.,:,,b
.~.{v
~
~>),,
.*,,>> ,.>i:
‘
rising edge of RESET determine the operating mode of the Bit 6 1S3 IRQ1 En%~~~?~hen set, an IRQI interrupt
MCU. The entire port is then configured as a data input port. will be en~~]ed Menever the [S3 flag is set; when
The port 2 lines can be selectively configured as data output clear, t~~i~~~rupt is inhibited. This bit is cleared
lines by setting the appropriate bits in the p,ort 2 data direc- durin~~’~
tion register. The port 2 data register is used to move data
Bit 7 l~,~~s This read-only status bit is set by an 1s3
through the port. However, if P21 is configured as an out-
ti~~tive edge, It is cleared by a read of the port 3
put, it is tied to the timer output compare 1 function and can-
“~?da~%-register or during reset.
,?‘,:;+,,,)
not be used to provide output from the port 2 data register ..:,:,,
unless output enable 1 (OEI) is cleared in timer control
,\i.;t:
,~,
:s{:$,:, >
register 1. ,,x~~~$~
.:,<\
!, 3 IN EXPANDED NON-MULTIPLEXED MODE –
Port 2 can also be used to provide an interface for the liY~Wt3 is configured as a bidirectional data bus (D7-DO) in the
serial communications interface and the timer input edge ‘~’~~panded non-multiplexed mode. The direction of data
function. These configurations are described in SERIAL+ transfers is controlled by read/write (SC2). Data is clocked
COMMUNICATIONS INTERFACE and PROGRAMMA~~&$,, by E (enable).
:.,:. ..,.
TIMER. .,-,.,..,
......
The port 2 three-state TTL-compatible output b~:#~#~~& PORT3 IN EXPANDED MULTIPL~ED MODE – Port 3 is
capable of driving one Schottky TTL load an~,@!p.~ ‘or configured as a time multiplexed address (A7-AO) and data
CMOS devices using external pullup resistors$)~~~.~~ bus (D7-DO) in the expanded multiplexed mode where ad-
i+\\
~i~ky: ‘ dress strobe (AS) can be used to damultiplex the two buses.
PORT”2DATA REGIST~ s;~ , “~~?“~ Port 3 is held in a high-impedance state between valid ad-
7 6 5 4 3 ~*’”*@~~S O dress and data to prevent bus conflicts. ~
P40-P47 (PORT 4)
>~A “/s Port 4 is configured as an 8-bit 1/0 port, as address out-
PWP37 (PORT 3) ‘~’.\\.{,
.:?\.” puts, or ‘as data inputs depending on the operating mode.
Port 3 can be confi~f~~~ as an 1/0 port, a bidirectional Port 4 can drive one Schottky TTL load and 80 pF, and is the
8-bit data bus, or a mu~pf~~d address/data bus depending only port with internal pullup resistors. Unused lines can re-
on the operating ti~&&~~he TTL compatible three-state out- main unconnected.
put buffers can ~~~+.one Schottky TTL load and 90 pF.
Unused lineq~~~e%ain unconnected. PORT 4 IN SINGLE-CHIP MODE – In single-chip mode,
~:,$t.s
~~ \\?~
;,:, ?,, port 4 functions as an 8-bit 1/0 port with each line con-
POR~+&tj~:@~hGLE-CHIP MODE – Port 3 is an 8-bit 1/0 figured by the port 4 data direction register. Internal pullup
port~n %“~~~gle-chip mode with each line configured by the resistors allow the port to directly interface with CMOS at
por~~~ab direction register. There are also two lines, IS3 5-volt ‘levels. External pull up resistors to more than 5 volts,
and &83, which can be used to control port 3 data transfers. however, cannot be used.
Three port 3 options are controlled by the port 3 control
and status register and are available only in single-chip PORT 4 IN EXPANDED NON-MULTIPLEXED MODE –
mode: 1) port 3 input data can be latched using 1S3as a con- port 4 is configured from reset as an 8-bit input port where
trol signal, 2) 0S3 can be generated by either an MPU read the port 4 data direction register can be written to provide
or write to the port 3 data register, and 3) an ~ interrupt any or all of eight address lines AO to A7. Internal pullup
can be enabled by an IS3 negative edge, Port 3 latch timing resistors pull the lines high until the port 4 data direction
is shown in Figure 4, register is configured.
PORT 4 IN EXPANDED MULTIPLEXED MODE – In all ex- which is incremented by E (enable). It is cleared during reset
o
panded multiplexed modes except modes 1 and 6, port 4 and is read-only with one exception: in mode O a write to the
functions as half of the address bus and provides A8 to A15. counter ($091 will configure it to $FFF8, This feature, intend-
In modes 1 and 6, the port is configured from reset as an ed for testing, can disturb serial operations because the
8-bit parallel input port where the port 4 data direction counter provides the SCI internal bit rate clock. The TOF is
register can be written to provide any or all of upper address set whenever the counter contains all ones. If ETOI is set, an
lines A8 to A15. Internal pullup resistors pull the lines high interrupt will occur when the TOF is set. The counter may
until the port 4 data direction register is configured where bit also be read as $15 and $16 to avoid inadvertently h}garing
O controls A8. the TOF.
RAM CONTROL REGISTER compare registers are set to $FFFF during reset.
a
7 654321
INPUT CAPTURE REGISTERS ($OD:OE), ($IE:l F)
:WB; RAME x x x x x
The two input capture registers are 16-bit read-only
:,*.,,* ‘+>:, registers used to store the free-running counter when a
~>i,
,3:. ,
a
MOTOROLA Semiconductor Products Inc.
@ 23
,
I Port Control
$lC:l D I Grcuitry
I
Output Compare
1’ Output Compare Output Compare I
Register 3 Register 2
I
I 1“
I
I
I
I
I
Output Compares
I
(Three)
I Input Edge
,,:: < P20
:..$+ I
/ <
I
/’ ‘,.\+)h / < Plo
( ,,, I
;\:p
\ ~s /3 I
1 Output Level
P21
Output Level I
Register 1 I
TCSR [$~)
I ICF1 I
A 1
;
I
{ ( { I
) / Output Level
JJJJJJ
*)$:5*l&3~;8) i
ICF2 I ICF1 I 0CF3 I OCF2 I OCF1 I TOF lP1 :~,t.$:$,
. EIC12
I
EICII EOC13 EOC12 EOCI1
I I
ETOi
TCR2 ($18)
TEST CLOCK
OutDut Level ,
Register 2 1
Pll
w“
1
,’$. ,~: I I
I I I I I .. . . ,. I I I I I
I
I
I
f I
I
Output Level
* o I * P12
Output Level ,
Register 3
I
>’
‘1
,.
TIMER CONTROL AND STATUS REGISTER (TCSR) Bit 7 Input Capture Flag – ICFI is set to indicate that a
($08) – The timer control and status register is an 8-bit proper level transition has occurred; it is cleared by
‘o register of which all bits arereadable, while only bits O-4 can
be written. All the bits in this register are also accessible
through the two timer control registers and the timer status
reading the TCSR or the TSR (with ICFI set) and
the input capture register 1 high byte ($OD), or dur-
ing reset. Refer to TIMER STATUS REGISTER
register. The three most significant bits provide the timer (TSR) ($19).
status and indicate if:
1. a proper level transition has been detected at P20, TIMER CONTROL REGISTER 1 (TCRI ) ($17) ..,-~$jmer
2. a match has occurred between the free-running control register 1 is an 8-bit read/write register<JWH~W~on-
counter and output compare register 1, or tains the control bits for interfacing the output~o@}e and
3. the free-running counter has overflowed. input capture registers to the correspondit~gy~!,~w~ns.
.~.r...~
.>,.,
, i>~:$~>
~.~
‘/$}
Each of the three events can generate an ~ interrupt
and is controlled by an individual enable bit in the TCSR.
o
IEDG1= O transfer on a negative-~dge $;*
~Lil*:-
IEDG1= 1 transfer on a positive-edge Bit 2 Output Level 3 – 0LVL3 is clocked to output level
Refer to TIMER CONTROL REGISTER l’~~~~j ) register 3 by a successful output compare and will
($17). “:.+.
i.,!,,,
~,~1, ..$,.
.......
.. appear at P12 if bit 2 of port 1 data direction register
$,i~~~ ,.(,.
Bit 2 ~le Tmer Ovetilow Interrupt -~*tie~&et, an is set and the 0E3 control bit is set. 0LVL3 and out-
IRQ2 interrupt will be generate~,’w~~he timer put level register 3 are cleared during reset.
3***.p,+b.
overflow flag is set; when cle~~k~~~$mterrupt is in-
Bit 3 Input Edge 1 – IEDGI is cleared during reset and
hibited. ETOI is cleared d~{!n~k &set. Refer to controls which level transition on P20 will trigger a
TIMER CONTROL REGl~%~%$~CR2) ($18).
counter transfer to input capture register 1.
Bit 3 Enable Output Com@#W~fi&trupt 1 – When set, IEDGI =0 transfer on a negative-edge
an IRQ2 interrup~t,~~lab,$ generated when output IEDGI = 1 transfer on a positive-edge
compare flag 1 i~,~e~~~flhenclear, the interrupt is in- Refer to TIMER CONTROL AND STATUS
hibited. EO~ll %Y.qf~ared during reset. Refer to REGISTER (TCSR) ($08).
TIMER CQWRQL REGISTER 2 (TCR2) ($18),
‘,:.‘+’::$::,
“,,,* Bit 4 Input Edge 2 – IEDG2 is cleared during reset and
Bit 4 Enabl:~l@&t ‘~apture Interrupt 1 – When set, an controls which level transition on PIO will trigger a
lR~ ~qtetrupt will be generated when input cap- counter transfer to input capture register 2,
tq~~~~~l is set; when clear, the interrupt is in- IEDG2= O transfer on a negative-edge
,j’~i~w. EICII is cleared during reset. Refer to IEDG2= 1 transfer on a positive-edge
~\?J\J@ER CONTROL REGISTER 2 (TCR2) ($18).
.: Bit 5 Output Enable 1 – OEI is set during reset and
~i~k~’s~mer Ovetilow Flag – The TOF is set when the enables the contents of output level register 1 to be
.<,;;’,’?$,.:>:
,., ,
~: ,,L.,i% counter contains all onas ($FFFF). It is cleared by connected to P21 when bit 1 of port 2 data direc-
~:.,)’
~:> reading the TCSR or the TSR (with TOF set) and tion register is set.
the counter high byte ($09), or during reset. Refer OEI = O port 2 bit 1 data register output
to TIMER STATUS REGISTER (TSR) ($19). OEI = 1 output level register 1
Bit 6 Output Compare Flag 1 – OCFI is set when output Bit 6 Output Enable 2 – OE2 is cleared during reset and
compare register 1 matches the free-running enables the contents of output level register 2 to be
counter., OCFI is cleared by reading the TCSR or connected to PI 1 when bit 1 of port 1 data direc-
the TSR (with OCFI set) and then writing to output tion register is set.
compare register 1 ($OB or $OC); or during reset, 0E2=0 port 1 bit 1 data register output
Refer to TIMER STATUS REGISTER (TSR) ($19). 0E2 = 1 output level register 2
WAKE-UP FEATURE
In a typical serial loop multiprocessor configuration, the SERIAL COMMUNICATl~\~~~~lSTERS
software protocol will usually identify the addressee(s) at the The serial communi@@h%+interface includes four ad-
beginning of the message. In order to permit uninterested dressable registers as.t~~i~~d in Figure 22. It is controlled
MPUS to ignore the remainder of the message, wake-up by the rate an~~&~8e control register and the
feature is included whereby all further SCI receiver flag (and transmit/ receiv~~o,n,t%l and status register. Data is transmit-
interrupt) processing can be inhibited until its data line goes ted and rece:~~h%&zing a write-only transmit register and a
idle, An SCI receiver is re-enabled by an idle string of ten read-only ~c~y”mregister. The shift registers are not accessi-
consecutive ones or during reset. Software must provide for ble to@f,W,&.
.<~,$ir
1,>3/,
~;,t, ,;,
‘,$+,.+~..s..,.,.
tt.;.
$ (Not Addressable)
Tx
I Transmit Shift Register
12
Bit
4
8 it
stop
1234567
NOTES:
1. Addressing Modes
lNHER=lnherent INDXD = Indexed IMMED = Immediete
REL= Relative EXTND = Extended DIR= Direct
2, Unassigned opcodes are indicated by “o” and should not be executed.
3, Codes marked by “T” force the PC to function as a 16-bit counter.
1- 1,, u ,, ,,
_- ,.,
I I I
I 1 1 I I I I I I , , ,T, 2 II ]~~A . ,, .
. IRICIRIR ,, ,,
5F 2“ 1 ~~B . . R s R R
%ti CMPA 81 2 2 91 3 2 Al 4 2 B1 4 3 A–M . . ! $ $ $“
CMPB c1 2 2 DI 3 2 El 4 2 F1 4 3 . .
.
B–M # 1 # 1
l’s Complement COM 63 6 2 73 6 3 MUM ● . #
COMA 43 2 1 A~A ● ●
t t : :
COMB 53 2 1 B+B .
●
t # R s
I I I I I I [ Condition Codes I
I
Accumulator and ] Immed I Direct / Index I Extend I lnher I Boolean 2 1 0
Memo~ Operations MNEM Op -l#lopl -l#lopl-l#lopl-1# lopl-1# Expression H I N z v c
.
Decimal Adjust, A DAA I I I 119] 211 Adj Mnarv sum to BCD ●
# ! $ t
Decrement DEC I I I I 16A161217A16131 I I M-I*M ● . t t t ●
DECA 4A 2 1 A–l+A . . $ m
DECB 5A 2 1 B–l-B ● ●
Load Double
Logical Shift, Left LSL 68 6 2 78 6 3
LSLA 48 2 1 -
LSLB 58 2 1
LSLDIIIIIIIIIII 11051312
1
Multiply
LSRB
LSRD
AhlII .$~h ?nlln
.. -., 1 lAxR-n
.---- I .
..
. l*lRl#l~[~
..*. If
a
) 1 1 I 1 .
., .,.,
I
. 4
2s Complement (Negate) M–M-M Jt!l
#
#
No Operation ,-. lPc+l+Pr -,, - t
1
. . 1
. 1
. 1
. 1
.
1
I
Inclusive OR lA+M~A
I
1 1 1
l$t%14121FA14131
,... ,-,. I I IB+M-B
, ,
L I
Rotate Left
59,
Rotate Right *
, . ,-.,.%
1
#@’ i
>.
Rodallllllllll 1 1 I 1 1 1
66
I
6
1
2
1
76 6
II1461711C
1 1 1
.
!
3
1
- —m
. . 111#Ii
., .,. m
RORB I 1561211 +M
CRA
..- I I I I I I I I I I I I lln 1911
,“ .
A–Q~A ““w
-.-
I . . Itltlt
SBCA az 2 2 92 3 2 AZ 4 2 B2 4 3 A–M– C-A .
.
.
.
i i i i
SBCB C2 2 2 D2 3 2 E2 4 2 F2 4 3 B–M– C-B t $ t 1
STAA 97 3 2 A7 4 2 B7 4 3 AdM . . t # R ●
STAB D7 3 2 E7 4 2 F7 4 3 B~M . . t # R ●
+
SUBA180121219013121AO1412 IBO14]31 I I IA– M-A
SUBBlCO12121DO13121EO14[2 IFO14131 IB-M+B . . 111!1$
SUBDla3141319315121A316/2 IB316 3 D–M:M+l+D . . t $ $ !.
TAR
, n“
I
I
I
I
I
i
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
11R1711
I
rvL, A+B . . t t R “
TRA
.-, 1171711
,. - B~A . . t $ R ●
TST 6D 6 2 7D 6 3 M–00 . . t $ R R
TSTA 4D 2 1 A–00 . . $ # R R
TSTB 5D 2 1 B–00 . . $ # R R
The condition code register notes are listed after Table 12.
u
4c
a
;
w
ABA INX ●
ABX JMP 3
ADC JSR 6
ADD LDA 4
ADDD LDD 5
AND LDS 5
ASL LDX 5“
ASLD LSL
$;;$$,
ASR LSLD
BCC LSR “:’*+ “
BCS LSRD ,,,..
,’8
BEQ MUL ●
BGE NEG 6
BGT NOP ●
BHI ORA 4
BHS ●
BiT ●
BLE ●
B LO ●
B LS 6
B LT 6
BMI ●
BNE RTS ●
BPL S BA ●
BRA SBC 4
BRN SEC @
BSR SEI ●
BVC SEV ●
——
BVS STA 4
CBA STD 5
CLC STS 5
CLI STX 5
CLR SUB 4
CLV 6
SW! ●
h
CMP
COM TAB ●
CPX TAP ●
DAA TBA ●
L
DEC TPA ●
DES TST 6
D EX TSX ●
EOR TXS 0
INC “ WAI 0
INS ~~t’ts
\ &.,.-x)$,,,.
~<y ‘*’ ,,~,
.,, .:,<.)jp,\\.
.,{!;,! .
i:ip~~,$>x. ,‘,>t
,.1..>
.isil,!$:
,*.,
.$
CMP SUB
>i,s.r
.y$’> \i;,<:
<$, !!:
STA 3 1 Opcode Address 1 op$p$~*F,””
2 Opcode Address+ 1 1 Dest?~tion Address
3 Destination Address o ~ata frbrn Accumulator
LDS 4 1 Opcode Address ~~ode
LDX 2 Opcode Address+ 1 ~Address of Operand
LDD. 3 Address of Operand ,$ Operand Data (High Order Byte)
4 Operand Address + 1 { Operand Data (Low Order BVte)
STS 4 1 Opcode Address Opcode
.?$J
STX 2 Opcode Address+ 1,i:$~ 1 Address of Operand
STD 3 Address of OperanQ.k ‘=!:$ 0 Register Data {High Order BVte)
4 Address of Oper$~Q~<j 0 Register Data ( Low Order BVte)
CPX 5 1 Opcode Ad&~ ~~ 1 Opcode
SUBD 2 Opcode AW’~%#& 1 1 Address of Operand
ADDD 3 Opera~$~~&ss 1 Operand Data (High Order BVte)
4 0per*{,~3Uress + 1 1 Operand Data (Low Order BVtel
5 ,A,M&qs~$8us FFFF 1 Low Bvte of Restart Vector
JSR 5 1 ~Op~8e Address 1 Opcode
‘~~ode Address+ 1 1 Irrelevant Data
Subroutine Address 1 First Subroutine Opcode
Stack Pointer 0 Return Address (Low Order BVte)
Stack Pointer– 1 0 Return Address’ fHigh Order BVte)
o
m
+DEC TST* Low Byte of Restart Vector
o New Oparand Data
T
1 Opcode
1 Operand Address (High Order Byte)
1 Operand Address (Low Order Byte)
1 Operand Data (High Order Byte)
m
I
1 Operand Data [Low Order Bvte)
1 Low Bvte of Restart Vector
Opcode
+ Address of Subroutine (High Order Bvtel
Address of Subroutine (Low Order Bvtel
Opcode of Next Instruction
Return Address (Low Order Bvte)
Return Address (High Order Bvte)
.
9,
m MOTOROLA Semiconductor Products Inc.
37
TABLE 14 – CYCLE-BY-CYCLE OPERATION (Sheet 3 of 5)
m
~ 2 Opcode Address+ 1 1 Offset
3 Address Bus FFFF 1 Low Bvte of Restart Vector
1 Opcode Address 1 Opcode .y~~,,
t~..s,*~.~wy\.:,
2 Opcode Address+ 1 .1 Offset -)+:,
,,.h,,i, ;\,
,+l.
3 Address Bus FFFF 1 Low Byte of Restart Vector \?[\ .Y’~L’’””
~e~;:..,, ,,,
....:f~::,:.~
~
4 Index Register Plus Offset 1 Operand Data ,,:,?,yi,;.,:,
I
1 I Opcode Address
2 Opcode Address+ 1
T
3 Address Bus FFFF
4 Index Register Plus Offset
LDS 5 1 Opcode Address
LDX 2 Opcode Address+ 1
LDD 3 Address Bus FFFF
4 Index Register Plus Offset
HERENT
\BA DAA SEC I 2 1 9pcode Address Opcode
ISL DEC SEI 2 Opcode Address+ 1 Opcode of Next Instruction *,<\
ISR INC SEV
:BA LS R TA E
:LC NEG TAF
:Ll NOP TB1
:LR ROL TPP
:LV ROR TST
:OM SBA
I
\BX 3 1 Opcode Address
2 Dpcode Address+ 1
3 Address Bus FFFF
1 Opcode Address
2 Dpcode Address+ 1
3 Address Bus FFFF
..:,.$,.
1 Opcode Address Opcode
2 Opcode Address+ 1
3 Previous Stack Pointer Content:
NX 3 T Opcode Address
3
IEX 2 Opcode Address+ 1
3 Address Bus FFFF
‘SHA 3 1 ‘G~code
‘SHB 2 Opcode of Next Instruction
3 Accumulator Data
‘Sx 3 1 Opcode
2 Opcode of Next Instruction
3 Irrelevant Data
1 Opcode
2 Opcode of Next Instruction
3 Low Byte of Restart Vector
1 Opcode
2 Opcode of Next Instruction
3 Irrelevant Data
4 Operand Data from Stack
-
1 O@ode Address Opcode
$~’,$ ~~code Address+ 1 Irrelevant Data
+
‘:&:,# Stack Pointer Index Register (Low Order Byte)
:4 Stack Pointer– 1 Index Register (High Order Byte)
L
1 Opcode Address Opcode
2 Opcode Address+ 1 Irrelevant Data
3 Stack Pointer Irrelevant Data
4 Stack Pointer+ 1 Index Register (High Order Byte)
5 Stack Pointer+ 2 Index Register (Low Order Byte)
1 Opcode Address Opcode
2 Opcode Address+ 1 Irrelevant Data
3 Stack Pointer Irrelevant Data
4 Stack Pointer+ 1 Address of Next Instruction (High Order Byte)
5 Stack Pointer+ 2 Address of Next Instruction (Low Order Byte)
1 Opcode Address Opcode
2 Opcode Address+ 1 Opcode of Next Instruction
3 Stack Pointer Return Address (Low Order Byte)
4 Stack Pointer– 1 Return Address (High Order Byte)
5 Stack Pointer– 2 Index Register (Low Order Byte)
6 Stack Pointer– 3 Index Register (High Order Byte)
7 Stack Pointer– 4 Contents of Accumulator A
8 Stack Pointer– 5 Contents of Accumulator B
—9 Stack Pointer– 6 Contents of Condition Code Register
1 Opcode
1 Branch Offset
1 Low Byte of Restart Vector
1 Opcode
1 Branch Offset
1 Low Byte of Restart Vector
1 Opcode of Next Instruction
o Return Address (Low Order Byte)
o Return Address (High Order Byte)
I&
$9D=JSR SP–6
Direct SP–5
SP–4
‘TN
K= Direct Address SP–3 [ Index Register (XH)
Main Program
s~ Stack SP–2
[
SP–1
SP RTNL
INDXD ‘m
RTN Next Main Instr.
~ Stack
Main Proqram SP
[B
SP+2 I Acmltr B
a
SH= Subr. Addr. I
EXTND
SL= Subr. Addr. SP+3 Acmltr A
* K = Offset
JMP, Jump Main Program Main Proaram
‘RTN H Next Main Instr. I $7E=JMP I
% ‘m I KH= Next Address I
8 INDXD
Extended I KL= Next Address I
Q RTS, Return from Subroutine Subroutine
:
X+K
I Next Instruction
I
I Next Instruction I
s ‘R
L d
.
Title
.0,
MOTOROLA Semiconductor Producfs Inc.
@ 42
SEATING
PLANE
NOTES:
1. POSITIONAL TOLERANCE OF LEADS (D),
SHALL BE WITHIN 0.25 mm (0.010) AT
@
L SUFFIX
CERAMIC PACKAGE
CASE 71&M
L
i
>>c, “$,i.
~.:.~” 3. ~ IS SEATING PLANE.
?jp’+~’
s .
,,...,..,,
~.~,.
,.
$$: 4. DIMENSION “L”TO CENTER OF LEADS
WHEN FORMED PARALLEL.
5. DIMENSIONING AND TO LERANCING
PER ANSI Y14.5, 1973.
Motorola reserves the right to make changes to any products herein to improve reliability, function or design. Motorola does not assume anv Iiabilityarising
out of the application or use of any product or circuit described herein; neither does it convev anv license under its patent rights nor the rights of others.
43
,.,.,>..,,..
,
,,”
. ..
.,, ,,,
,, ,,2,,. !
,,, _. .. .
‘, ..., .. ’,’ ,“- .- ..,,,,,
e-
.!,
:::,
..
.“
...;
.
,:
:,