Experiment #8 Serial Communication Using The Asynchronous Communications Interface Adapter (Acia)
Experiment #8 Serial Communication Using The Asynchronous Communications Interface Adapter (Acia)
3.0 Background
A. The Asynchronous Communications Interface Adapter (ACIA)
The ACIA (MC6850) provides the data formatting and control to interface serial
asynchronous data communications systems to parallel bus systems.
When the CPU writes data to the ACIA in a parallel format, the ACIA performs a
parallel-to-serial conversion before transmitting the data serially. Similarly, when the
ACIA receives data in a serial format, it performs a serial-to-parallel conversion,
which enables the CPU to read the data in a parallel format.
The parallel bus (host CPU) interface of the ACIA consists of the following signals:
Quantity
3
1
1
1
1
8
Description
Chip Select lines (*CS2, CS1, CS0)
Register Select line (RS)
Read/Write line (R/*W)
Clock line (E)
Interrupt Request line (*IRQ)
Data lines (D0 to D7)
Experiment #8 - 1
The serial communications interface of the ACIA consists of the following signals:
Quantity
1
1
1
1
1
1
1
Description
Transmit Data (TX DATA)
Receive Data (RX DATA)
Clear-to-Send (*CTS)
Request-to-Send (*RTS)
Data Carrier Detect (*DCD)
Transmit Data Clock (TX CLOCK)
Receive Data Clock (RX CLOCK)
The top five serial communications signals are identical to the ones used to
implement an asynchronous version of the RS-232-C Serial Communications
Standard.
Registers
The ACIA has four internal registers that are accessible by the CPU. The selection of
a certain register depends on the state of the Register Select (RS) and Read/*Write
(R/*W) lines. The following chart illustrates how each register is selected.
RS
0
0
1
1
R/*W
0
1
0
1
Register Descriptions
Control Register (CR)
Status Register (SR)
Transmit Data Register (TDR)
Receive Data Register (RDR)
Experiment #8 - 2
Experiment #8 - 3
MC1489). This device converts the RS-232 signals (-3 to -15 Volts or +3 to +15
Volts) to TTL signals (0 or +5 Volts). The TTL data is then input to the ACIA on the
RX DATA pin.
Experiment #8 - 4
If no errors occurred, place the character in Data Register D0, then exit the
subroutine.
If an error occurred, print a message on the terminal indicating which type of
error occurred and the value of the received data. Exit the subroutine.
4. Write a subroutine that calls the subroutine of Prelim #3 and then displays the
received character on the terminal.
5. Write a subroutine to prompt the user to enter ten ASCII characters at the
terminal. An example of the input format is: ABCDE12345 <CR>. The routine
will then input these characters from the terminal, and then store them in a table
in memory (locations $900 to $909). When the table is full, transmit each
character out of ACIA #2 using the subroutine of Prelim #2, then exit the
subroutine.
6. Write a subroutine to receive ASCII characters from another lab unit (via ACIA
#2) using the subroutine of Prelim #3. As each character is received, its ASCII
code should be stored in a table in memory (locations $910 to $919). When the
table is full, display the received characters on the terminal, then exit this
subroutine.
B. Interrupt Implementation of Unit-to-Unit Communications
7. Write an initialization subroutine for ACIA #2. Configure the ACIA to operate as
follows:
8. Write an Interrupt Service Routine that queries ACIA #2 to determine the cause
of the interrupt request.
If the receiver section caused the interrupt, examine the error condition bits of the
Status Register.
If no receiver errors occurred, read the data from the RDR and store it into a 10
byte long table (locations $910 to $919) using Address Register A0 as the pointer
into the table. After storing the data, determine the condition of the table. If the
table is full, display its contents on the terminal, reinitialize the pointer to the
Experiment #8 - 5
starting address of the table, and then exit the routine. If the table is not full,
increment the pointer, then exit the interrupt service routine.
If an error occurred, print a message on the terminal indicating which type of
error occurred and the value of the received data. Exit the service routine.
Note: If the interrupt was generated by some condition other than received data,
disregard the interrupt.
9. Assemble each of the subroutines created above into the following program
format.
PROC1
LOOP1
PROC2
LOOP2
PROC3
LOOP3
PROC4
LOOP4
MOVE.L #$TBD,A7
JSR SUBRT1
JSR SUBRT2
BRA LOOP1
MOVE.L #$TBD,A7
JSR SUBRT1
JSR SUBRT4
BRA LOOP2
MOVE.L #$TBD,A7
JSR SUBRT1
JSR SUBRT5
JSR SUBRT6
BRA LOOP3
* TX and RX - POLLING
* ACIA init. - polling
* transmit char block
* receive char block.
MOVE.L #$TBD,A7
JSR SUBRT7
JSR SUBRT5
BRA LOOP4
* TX and RX - INTERRUPTS
* ACIA init. - interrupts
* transmit char block
Notes:
a. The label SUBRT1 is the name of the subroutine from Prelim #1, label
SUBRT2 is the name of the subroutine from Prelim #2, and so on.
b. TBD means to be determined by user.
C. Terminal I/O Routines using the TRAP #15 Handler
10. Write two subroutines to control ACIA#1 on the SANPER-1 Educational Lab
Unit. This ACIA provides an input and output interface to the terminal. The
routines should be similar to those of TRAP 14 Handler Functions 241 and 243.
The proper registers must be initialized before the TRAP calling sequence is
invoked. Note that entering a Return <CR> terminates data entry at the terminal.
Experiment #8 - 6
11. The above routines can only be accessed by executing a TRAP #15 instruction in
your program. Modify the original source code of Experiment #4 by replacing all
TRAP #14 instructions with TRAP #15 instructions.
6.0 Procedure
Note: Bring graph paper to the lab for the purpose of recording waveforms.
A. Unit-to-Unit Communications
1. Use the Memory Modify (MM) command to store the character i into location
$900.
2. Initialize address register A0 to point to location $900.
3. Run the PROC1 program. The same ASCII character should be transmitted
continuously. Using an oscilloscope, observe the transmitted data on pin #3 (TX
DATA) of the DB-25 connector that connects to ACIA #2 on the SANPER-1
Educational Lab Unit. Also, connect a wire from pin #4 to pin #5 on the DB-25
connector to tie *CTS to *RTS. Record this waveform in its RS-232-C format,
and indicate the start, data, parity, and stop bits for this bit stream. From this
waveform, draw the corresponding TTL waveform, which is the actual output of
ACIA #2.
4. Modify PROC1 so that the transmitted character is now S. Run PROC1 again.
Record the RS-232-C waveform and indicate all four groups of bits. Draw the
TTL waveform. Repeat this procedure three additional times for the following
characters: $, ESC, a.
5. Ask your Lab Instructor to connect your lab unit to an adjacent lab unit. Execute
PROC1 on one on the lab units and PROC2 on the other. One of the terminals
should display the characters received from the other lab unit. Verify that you
have received the correct value and number of characters. Reverse the execution
of the programs on the lab units, and again verify that the other lab unit is
receiving and displaying characters properly.
6. Demonstrate to your Lab Instructor that Procedure Step #5 is working properly.
7. Leave your lab unit connected to an adjacent lab unit. Execute PROC3 on each
lab unit. Each group should transmit a block of 10 characters. Your terminal
should display the characters received from the other lab group. Through your
terminal, your lab group should be able to pass data back and forth to the other
lab group.
8. Demonstrate to your Lab Instructor that your polling routine (Procedure Step #7)
is working properly.
Saniie & Perich
Experiment #8 - 7
9. Set the appropriate exception vector for ACIA #2 interrupt requests to point to the
starting address of the interrupt service routine, SUBRT8.
10. Leave your lab unit connected to an adjacent lab unit. Execute PROC4. Each lab
group should begin transmitting characters and your terminal should correctly
display the characters received from the other lab group.
11. Demonstrate to your Lab Instructor that your interrupt routine (Procedure Step
#10) is working properly.
B. Terminal I/O Routines
12. Set the exception vector of TRAP #15 to point to the starting address of
SUBRT10.
13. Execute the revised logic translator program. Your program should be able to
accept data from the terminal, perform the logic translation, and output data to
both the terminal and the User Display of the SANPER-1 Educational Lab Unit.
14. Enter the test data and verify that your program is working properly. Debug your
program using software breakpoints, software tracing, and the hardware singlestep mode.
15. Demonstrate to your Lab Instructor that the revised logic translator program
works properly.
Experiment #8 - 8
7.0 Discussion
Submit the following to your Lab Instructor as a Final Report:
1. Listing files of all your programs and subroutines which include both global and local
comments.
2. Drawings of the RS-232-C and TTL waveforms of the five different character words
from Procedures A.3 and A.4.
3. In Procedure step #7, one of the lab units did not receive one block of characters.
Why? How can this problem be solved?
4. Describe the advantages and disadvantages of implementing polling vs. interrupts.
5. List and explain which bits in the Status Register can cause an interrupt to occur.
6. The ACIAs Status Register contains the value $A3. What is the status of the ACIA?
7. What are the characteristics of a communications system if the ACIAs Control
Register contains $C2?
8. If the ACIAs Control Register reads $81, determine what the parity bit must be when
transmitting each of the following characters: "!", "7", "N", "P".
Experiment #8 - 9
A CIA
.----tr-------- -----------I
CNO
PWR
(+5)
I WRITE ONLY
TXO
DATA
LINES
TO
OR
FROM
MPU
IRQ
PE
0\'RN
FE
CTS
oco
TORE RORF
READ ONLY
1 3 1 2
ws
cos I
a
WRITE
ONLY
RXC
SERIAL DATA IN
Lr-- --r-r
TXC
RECEIVE
INT RUPT
CLOCK.
MPU
TRANSMIT
CLOC.K
tO
WRITE
FROM
MPU
RXD
-=r-'rso
ENABlE
_JSf1
l"'-DCoi:_j
EAR
A
I ol
REGISTER
SELECT
FROM
MPU
ADDRESS
LINE
SEND
SIGNAL
FROM
MODEM
-'
QUES T.
CHIP SELECT
FROM MPU
ADDRESS
LINES
SEND
:_:
TO
.
MODEM
DATA
CARRIER
DETECT
FROM
MODEM
Experiment #,1, - 12
.ACI..l
.. IIPU
07
07
..
lr-G=
00
.ACU
D.lT.A 0liT
lor!
[ "
00
(8) PARALL!!.. TO S!:RW.
07
00
110 BAUD
SERIAL ASCII DATA TIMING
MARKING
I
I
I
_..;;_J_
S?ACING
BIT TIME
I
I
I
I
I
I
I
I
I
I
I
I
I
I
19.09 L
_j_- ..L--L- _J
L._ _
...l..--
OATABITS
msec:
START
DO
01
02
04
03
06
OS
PARITY
BIT
STOP
BIT
STOP
BIT
IT
CHARACTER TIME@ 10 C?S (11 BITS!
100 msec
TR1 159
MARKINGlJ;--:--;--r--:--;--;--: -n-----
SPACING
I
I
I
t
I
j
I
l
'----
l
BIT TIME
!SEE TABLE
BELOWl
lSTART
BIT
00
DATA BITS
01
02
03
04
OS
06
PARITY
BIT
SiC?
SIT
-;
CHARACTERSiSEC
BIT TIME (mse-cl
I 15
I 30
I 6.67 I :3.:33
J3.J
SEC
BIT TIME BAUD RATE
110 BAUD
SERIAL DATA TIJ.IING FOR ASCII
Qu--
IJ
DO
01
02
START BIT
03
I
1
I
:
,.:;:Y
.I
...
11;.':-1 : ,$:-:
I ...-:-":
D4 5
7 OA T.A BITS
.IE
(B9IT
.0T9IJm
1l
J.-..J .
PARITY BIT
STOP BITS
110
9.09
.1 sec
10
80
150
6.66
0.73 sec
13.7
110
300
3.33
.0366 sec
27.32
218.6
1200
.833
.0092 sec
108.7
870
*Assume one start bit, eight data bits (including parity), and two stop bits, or
eleven bits per character.
= 1 /baud rate
Bit time
Character time = (total number of bits In word)
Characters/ sec - 1I character time
= 8 x characters/sec
Data bits/sec
DO .
01
02
03
04
'5iART BIT
x-sa, 6 -r
. '
O I
05
06
O O O
r r
x (bit time)
CHARACTER
i
-
I L=
04
05
'-------- 06
0
0
- b6
t>4
b.2
b1
.............. Column I
Hex I
I
I
'&*'
E
F
Row
I NUL I
OLE
DC1
o I
I SOH I
STX
DC2
ETX
OCJ
0
0
Of
Ei8
I o
I
I
6
7
8
9
SYN
o I
6
7
1
Of 8
1 I 9
I EOT
I ENO I
I ACK I
NAI(
1
0
(J
1 I
I o I
I I
1
I
1
I
1
I
I
BS I
BeL
DC4
I HT I
CAN
EM
1
I
10
11
LF
sus
VI
I E::iC I
Ol
12
FF
13
I o.
I E
CR
I FS I
I GS I
0 l 14
1
15
so I
RS
51
us
FIGURE 4-2.
3
0
SP
0
0
5
5
?
0
0
2
2
0
1
1
1
0
0
0
0
0
0
0
1
0
0
b3
0
1
.
+
I
I
o4
7
8
9
H
.I
I
I
I
I
I
7
7
0
Q
u
v
.e
I z
1:
I \
<
>
I z
1\
DEL
5C!ICharacter Set
I
I
I
START 1
S?ACE
Do
I
I
I
I
I
01
Dz
OJ
04
I
I
os
Ds
PARITY
STOP :
I
NEXT
STOP
CHAR.
66
TC2
97
RIE
81
65
TC1
80
8-1
500KHz
-i-64
800KHz
MASTER RESET
82
WORD LENGTH
0
0
, ,
7
7
7
7
1'
0
1
,
1
83
60
Cl
.;. 16
61
C2
-i-1
84
0
0
62
WS1
,
,,
,
63
WS2
WS3
8
8
2
2
1
,
2
1
1
1
CRS
"0'' -
87
86
BS
IRQ
PE
OVRN
84
FE:
83
CTS
82
DCD
81
TORE
80
RDRF
STATIJS REGISTEr\
.,. en :-:e ...:. ecet_vlr"'te n.::: ::- aoe rs se. t: re!'T1 tns !"'ign
aer :ne new:. tS re:ur:'1ec lew !.;-:::1 c:eare-o v
irst
>-"-0--
::o
RETURN TO
OTHER DEVICES
WRITE WORO
TO TOll
CONTINUE
POLLING
ROUTINE
ERROR
ROUnNE
RTI
IRETURN TO
IIAIN PROGRAIII
NO
RETURN TO
MAIN PROGRAII
OR POLL
OTHER DEVICES
CONTINUE
LOSS OF
ROUTINE
CARRIER
ROUTINE
POLLING
YES
'I!AO WORD
, TO IIPU
'HI
.RfTURII ro
Alii PROGRAIII
FRAIIING ERROR
ROUTINE
(fi\ NIOTOROLA
MC6850
(1.0 MHz}
MC68A50
(1.5 MHz)
MC68B50
(2.0 MHz)
MOS
(N-CHANNEL, SILICON-GATE)
ASYNCHRONOUS
COMMUNICATIONS INTERFACE
ADAPTER
S SUFFIX CtfiOIP
PAC"AGt CA::,E
623
P SUFFIX PLASTIC
PACKAGE CASE700
L SUFFIX CERAMIC
PACKAGE CASE 716
PIN ASSIGNMENT
Vss
CTS
Rx Data
DCO
Rx CLK
DO
01
Data
Data Bus
Transmit
Bus
Buffers
Data
RTS
Tx Di'lt<l
Receive
Data
Address
Control
and
Interrupt
and
Control
03
IRQ
04
cso
05
CS2
06
CS1
07
AS
Peripheral/
Modem
02
vee
E
R/W
Control
DS 9493-R2
MC6850MC68A50MC68B50
MAXIMUM RATINGS
Characteristics
Supply Voltage
Input Voltage
Operatrng Temperature Range
MeOO .MCOOA .MCOOB
MC C. MeOOA C. MCOOB e
Storage Temperature Range
Symbol
Value
Unit
Vee
-0.3 to + 7.0
Vin
-0.3 to + 7.0
TA
TL to TH
0 to 70
-40 to +85
oc
Tstq
-55to+1
oc
Symbol
Value
Unit
THERMAL CHARACTERISTICS
Characteristic
Thermal Resistance
Plasttc
Ceramtc
Cerdip
8JA
120
C/W
60
65
POWER CONSIDERATIONS
The average chip-junction temperature, T J, in C can be obtained from:
( 1)
TJ=TA+(Po8JAl
Where:
TA Ambient Temperature, oc
8JAPackage Thermal Resistance, Junction-to-Ambient, C/W
Po PiNT+ PPORT
PiNTIcc x Vee. Watts - Chip Internal Power
PPORT Port Power Dissipation, Watts - User Determined
For most applications PPORT -c PiNT and can be neglected. PpQRT may become significant if the device is configured to
drive Darlington bases or sink LED loads.
An approximate relationship between Po and T J (if PPQRT is neglected) is:
Po=K+(TJ+273C)
(2)
Solving equat1ons 1 and 2 for K gives:
(3)
K = Po(T A+ 273Cl + 8JAPo2
Where K IS a constant pertaining to the part1cular part. K can be determined from equation 3 by measuring Po !at equilibrium)
for a known T A Using this value of K the values of Po and T J can be obtained by solving equations ( 1) and (2) iteratively for any
value ofT ADC ELECTRICAL CHARACTERISTICS IVee= 5.0 Vdc +
- 5%. Vss = 0, T A= TL to TH unless otherwtse noted I
Symbol
Min
Typ
Max
Unit
VtH
Vss + 2.0
vee
V1L
vss-03
Vss+O.B
l,n
1.0
25
p.A
ITSI
2.0
10
p.A
VOH
Vss+2.4
Vss+2.4
Chl.tra<::teristic
00-07
00-07
Output Low Voltage IILoad= 1.6 mA. Enable Pulse Width< 25 p.sl
Output Leakage Current !Off State! IVoH = 2.4 VI
IRQ
L-----'----
VOL
Vss+0.4
ILOH
1.0
10
p.A
PiNT
300
525
mW
Cin
10
7.0
12.5
7.5
pF
10
5.0
Tx Data, RTS
DO-D7.
ffi. DCD
RTS, Tx Data
TAO
Cout
pF
MC6850MC68A50MC68850
Characteristic
16. + 64 Modes
16.... 64 Modes
... 1 Mode
1 Mode
PWcL
PWcH
MC6850
Min Max
MC68A50
Min Max
450
650
450
650
0.8
500
1.0
750
600
900
600
900
MC68B50
Min Max
Unit
280
500
280
500
1.5
1CXXl
MHz
kHz
ns
ns
tTDD
600
540
460
ns
1 Mode
'ADS
250
100
30
ns
... 1 Mode
tRDH
250
100
30
ns
tiR
1.2
0.9
0.7
JLS
tATS
560
400
ns
tr. If
1.0
480
Input R1se and Fall T1mes (or 10% of the pulse width if smaller)
0.5
0 25
JLS
+ 16. + 64
Modes
Mode
+1
PwcL--
C1k
Tx
or
Rx Clk
fc
Tx
Clk
or
Rx
Clk
Tx
Clk
''""'
I
tT
R x
Clock
oo
Tx Data
X+
tRos
\_
Rx
Clk
Rx Data
I
-
Enabli:
k'RO"
RTS
1 ..
IRQ
-tRTS
X
t1R
Note: Timing measurements are referenced to and from a low voltage of 0.8 volts and a high voltage ol 2.0 volts, unless otherwise noted
MC6850MC68A50MC68850
Symbol
MC6860
Min Max
MC68A50
Min Max
MC68B50
Min Max
0.67
0.5
Cycle Time
'eye
PWEL
1.0
430
PWEH
450
4
9
tr. If
25
25
'AH
10
80
10
60
60
10
13
14
15
18
21
30
31
'AS
tcs
80
10
10
20
50.
10
IDDR
'Dsw
'cH
'DHR
IDHW
10
10
10
20
-
Unit
jlS
ns
ns
ns
40
40
10
ns
ns
ns
ns
50.
ns
ns
150
-
ns
ns
50.
20
10
20
10
290
180
165
80
60
The data bus output buffers are no longer sourcing or sinking current by tDHRmax (High Impedance!.
---- <I}-----------------------------------E
R/W, Address---(Non-Muxedl
rr
--------
--------
---- ------------------------------------1-
----
----------------------------------
Load B
Tx Datal
ORO Only)
sov
5.0
RL =2.5 kO
3 kO
MMDGl!.>O
Test PouH
or lquv
tOOpF
MM() 70QQ
or E:.qu1v
C lJO pF to DO 01
30 pF lor R"TS """ T' Dat.1
RTs
Tx
Data
MC6850MC68A50MC68B50
Read/Write
Chip Select 0
Chip Select 1
Chip Select 2
4 -------------------1104
13
Transm1t
10
Data
Register
6 Transn11t Data
Register Select 11
24 CleartoSend
DO 22
Status
Register
D1 21
D2 20
7 Interrupt Request
D3 19
23 Data Carrier Detect
D4 18
D5 17
5 Request-to-Send
0616
Control
Hegster-
D7 15
Vee= Pin 12
Vss=Prn1
ReceiveCiock
Receive
Receive
Data
Shift
2 Recetve Data
3--------------
DEVICE OPERATION
At the bus mterface, the A CIA appears as two addressable
memory locations. Internally, there are four registers: two
read-only and two wnte-only registers. The read-only
registers are Status and Receive Data; the write-only
registers are Control and Transmit Data. The serial interface
cons1sts of serial input and output lines w1th independent
clocks. and three peripheral/modem control lines.
POWER ON/MASTER RESET
The master reset ICRO, CRll should be set during system
rnrtialization to insure the reset conditron and prepare tor pro
g:amm1ng the ACIA functional configuration when the com
munr:ations channel is required. During the first master
reset. the IRQ and RTS outputs are held at level 1 On all
other master resets, the RTS output can be programmed
hrgh :)r low w1th the IRQ output held high. Control bits CR5
and CR6 should also be programmed to define the state of
RTS whenever master reset rs utilized. The ACIA also con
tarns rnternal power-on reset !ogre to detect \he power line
turn-on transition and hold the chip in a reset state to pre
vent erroneous output transitions prior to initialization This
crrcuitry depends on clean power turn-on transitions The
MC6850MC68A50MC68B50
INPUT/OUTPUT FUNCTIONS
ACIA INTERFACE SIGNALS FOR MPU
The A CIA interfaces to the M6800 M PU w1th an 8-bit
bidirectional data bus, three chip select lines, a register select
line, an interrupt request line, read/wnte line, and enable
line. 1 hese s1gnals permit the MPU to have complete control
over the ACIA.
ACIA Bidirectional Data (00-07) - The bidirectional data
lines (DQ-07) allow for data transfer between the ACIA and
the MPU. The data bus output drivers are three-state devices
that remain in the high-impedance (off) state except when
the MPU performs an ACIA read operation.
ACIA Enable (E) - The Enable signal, E, is o high
impedance TTL-compatible input that enables the bus in
put/ output data buffers and clocks data to and from the
ACIA. This signal will normally be a derivative of the MC6800
.P2 Clock or MC6809 E clock.
Read/Write (R/W) - The Read/Write line is a high
Impedance input that is TTL compatible and is used to con
trol the direction of data flow through the ACIA's input/ out
put data bus interface. When Read/Write is high (MPU Read
cycle!, ACIA output drivers are turned on and a selected
reg1ster is read. When it is low, the ACIA output drivers are
MC6850MC68A50MC68B50
ACIA REGISTERS
The expanded block diagram for the ACIA indicates the in
ternal registers on the chip that are used for the status, con
trol, receiving, and transmitting of data. The content of each
of the registers is summarized in Table 1.
PERIPHERAL/MODEM CONTROL
The ACIA includes several functions that permit limited
control of a peripheral or modem. The functions included are
Clear-to-Send, Request-to-Send and Data Carrier Detect.
Clear-to-Send (CTS)
This high-impedance TTLcompatible input provides automatic control of the transmit
ting end of a communications link via the modem Clear-to
Send active low output by inhibiting the Transmit Data
Register Empty tTDREl status bit.
Request-to-Send (RTSI - The Request-to-Send output
enables the MPU to control a peripheral or modem via the
data bus. The RTS output corresponds to the state of the
Control Register bits CR5 and CR6. When CR6 = 0 or both
CR5 and CR6 = 1, the RTS output is low (the active state).
This output can also be used for Data Terminal Ready (OTRl.
Data Carrier Detect (OCD) - This high-impedance TTL
compatible input provides automatic control, such as in the
receiving end of a communications link by means of a
modem Data Carrier Detect output. The DCD input inhibits
and initializes the receiver section of the ACIA when high. A
low-to-high transition of the Data Carrier Detect initiates an
interrupt to the MPU to indicate the occurrence of a loss of
carrier when the Receive Interrupt Enable bit is set. The
Rx CLK must be running for proper DCD operation.
Data
Bus
Line
Number
Data Bt
RS RIW
RS RlW
RS R/W
Control
Register
Register
Receive
Data
Register
IRead Only)
Oata81tO
IWrite Only)
Counter
01v1cie
Select 1 (CROl
Data Bt 1
Data Bit 1
Counter Div1de
Select 2 1CR 1)
Data Bit 2
Data Bt 2
Word Select 1
Status
IRead Only)
Recetve
Data Aegtster
Full (RDRF)
ICR2l
IOCOl
Clear to Send
Data Bt 3
Data B1t 3
Word Select 2
ICR3l
ICTSl
Data Bit 4
Data Btt 4
Word Select 3
Frarnmg Error
Oata Bl 5
Data 81\ 5
Transn111 Control 1
ICR5l
IOVRNI
Data Btt 6
Data 81t 6
Transmtt Control 2
Data Bt 7
Oata81t7'"'"
Receve Interrupt
E nahle l C A 7)
ICR4i
IF E I
R@cever Overrun
ICR6l
Leadtng btt
. ,__
LSB
Interrupt Request
iiROl
Btl 0
MC6850MC68A50MC68850
CONTROL REGISTER
The ACIA Control Register consists of eight bits of write
only buffer that are selected when RS and R/W are low. This
register controls the functton of the receiver, transmitter, in
terrupt enables, and
the
Request-to-Send peri
pheral/modem control output.
Counter Divide Select Bits (CRO and CR1l - The Counter
Divide Select Bits !CRO and CR1l determine the divide ratios
utilized in both the transmitter and receiver sections of the
ACIA. Additionally, these btts are used to provide a master
reset for the ACIA which clears the Status Register (except
for external conditions on CTS and DCD) and initializes both
the receiver and transrrutter. Master reset does not affect
other Control Register bits. Note that after power-on or a
power fail/ restart, these bits must be set high to reset the
ACIA. After resetting, the clock divide ratio may be selected
These counter select btts provide for the following clock
divide ratios:
CR1
CRO
Function
0
0
+1
+16
1
1
+64
Master Reset
CR3
CR2
0
0
0
0
1
0
0
1
1
0
0
1
0
1
0
1
1
1
1
Function
7 B1ts + Even Parity+ 2 Stop Bits
7 B1ts +Odd Parity+ 2 Stop Bits
7 Bits+ Even Parity+ 1 Stop Bit
7 Bits+ Odd Parity+ 1 Stop Bit
8 B1ts + 2 Stop Bits
8 Bits+ 1 Stop Bit
8 Bits+ Even paritv+ 1 Stop Bit
8 Bits+ Odd Parity+ 1 Stop B1t
Word length, Parity Select, and Stop Bit changes are not
buffered and therefore become effective tmmediatelv.
Transmitter Control Bits (CR5 and CR6) - Two Transmit
ter Control btts provide for the control of the tnterrupt from
the Transmit Data Regtster Empty condition, the Request-to
Send (RTSl output, and the transmission of a Break level
!space) The following encoding format is used:
.-----
-r--
CR6
CR5
0
0
1
1
Function
RTS =!ow, Transmitting Interrupt D1sabled.
RTS 1 <N,, Transmitting lnterrupl Enabled.
ATS= f11qh. Transm;ttmg Interrupt D1sabled.
RTS =-low, Transm1ts a Break leve: on the
Transmit Data Output Transmitting Interrupt D1sabted.
STATUS REGISTER
Information on the status of the ACIA is available to the
MPU by reading the ACIA Status Register. This read-only
register is selected when RS is low and R/W is high. Infor
mation stored in this register tndicates the status of the
Transmit Data Register, the Receive Data Register and error
logic, and the peripheral/modem status inputs of the ACIA.
Receive Data Register Full (RDRFl, Bit 0 - Receive Data
Regtster Full indicates that received data has been trans
ferred to the Receive Data Register. RDRF is cleared after an
MPU read of the Receive Data Register or by a master reset.
The cleared or empty state indicates that the contents of the
Receive Data Register are not current. Data Carrier Detect
being high also causes RDRF to indicate empty.
Transmit Data Register Empty (TORE), Bit 1 - The
Transmit Data Regtster Empty bit being set high tndtcates
that the Tran.smit Data Regtster contents have been trans
ferred and that new data may be entered. The low state in
dicates that the register is full and that transmission of a new
character has not begun since the last write data command.
Data Carrier Detect (DCD), Bit 2 - The Data Carrier
Detect bit will be high when the BCi:5 mput from a modem
has gone high to indicate that a carrier is not present. This bit
going high causes an Interrupt Request to be generated
when the Receive Interrupt Enable is set. It remains high
after the DCD input is returned low until cleared by first
reading the Status Register and then the Data Register or
until a master reset occurs. If the DCD tnput remains high
after read status and read data or master reset has occurred,
the interrupt is cleared, the DCD status bit remains htgh and
will follow the DCD input.
Clear-to-Send (CTS), Bit 3 - The Clear-to-Send bit in
dicates the state of the Clear-to-Send input from a modem.
A low CTS indicates that there is a Clear-to-Send from the
modem. In the high state, the Transmit Data Register Empty
bit is inhibited and the Clear-to-Send status bit will be high.
Master reset does not affect the Clear-to-Send status bit.
Framing Error (FE), Bit 4 - Framing error indicates that
the received character is improperly framed by a Start and a
stop bit and is detected by the absence of the first stop bit.
This error indicates a synchronization error. faulty transmis
Sion, or a break condition. The framing error flag is set or
reset during the receive data transfer time. Therefore, thts er
ror indicator is present throughout the time that the
associated character is available.
Receiver Overrun IOVRN). Bit 5 - Overrun ts an error flag
that indicates that one or more characters tn the data stream
were lost. That is. a character or a number of characters
were received but not read from the Receive Data Register
(RDRl prior to subsequent characters being received The
'-'verrun condttton begtns at the midpoint of the last bit of the
second character recetved in succession without a read of
the RDR havtng occurred The Overrun does not occur tn the
Status Register until the valid character prior to Overrun has
MC6850MC68A50MC68B50
been read. The RDRF bit remains set until the Overrun is
reset. Character synchronization is maintained during the
Overrun condition. The Overrun indication is reset after the
reading of data from the Receive Data Register or by a
Master Re;,.::t.
Parity Error IPE), Bit 6 - The parity error flag indicates
that the number of highs Iones) in the character does not
agree with the preselected odd or even parity. Odd parity is
defined to be when the total number of ones is odd. The
parity error indicatioP will be present as long as the data
PACKAGE DIMENSIONS
CASE 70&-02
IPLASTIC)
MILliMEHRS
INCHES
f-'D:_I_:_M+-'"'"'IN"--j--'M"-'A'-'X'--j---'M=IN
A
3 11 4 3 1 7. 7
!5'5.4.5" 99l+if-!'!H-'l-'l
8 ..!..4.. o70
-c-6
f
G
J
041
051
1.27
1.52
1.548SC
0.10
0.30
o i[t
0.050 0.-i'&lL
O.IOOBSC
0.008 0 012
NOTES
I. OIM T" TO CENTER Of
LEADS WHEN FORMED
PARALLEL.
2 LEADSIVITHINO.IJmm
10.005) RADIUS OF TRUE
POSITION AT SEATING
PLANE AT MAXIMUM
MATERIAL CONDITION.
IWHEN FORMED PARALLEL!
J,IMETE RS
IN_CH!l_
036 056-10014100211
1.01
I 52
0 040 0.060
0 100 BSC
1.54 BSC
1.65
1.03
o.065
0.1Q ! 0.38 O.QQB I 0 015
f
.G
H
J
filo
5 24
051
609
NOTES
I POSITIONAL TOLERANCE Of LEADS 101.
SHALL BE WIIHIN 0 15'<'m 100101 AT
MAXIMUM MATERIAL CONDITION IN
RELATION TO SEATING PLANE AND
EACH OTHER
; -
101
Motorola reserves the rtght to make changes to any products heretn to rmprove reltabtilty. functton 01 des1gn Motorola does not assume any llabillty artstng
out of the appltcatton or use of any product or C1rcu11 descubed heretn. neither does tf convey any llcense under tts patent ryhts nor the rghts of others