English
Language : 

Z85233 Datasheet, PDF (219/317 Pages) Zilog, Inc. – The Zilog SCC Serial Communication Controller
Application Note
SCC in Binary Synchronous Communications
INITIALIZATION (Continued)
The Z8002 CPU must be operated in System mode in
order to execute privileged I/O instructions, so the Flag
Control Word (FCW) should be loaded with
System/Normal (S//N), and the Vectored Interrupt Enable
(VIE) bits set. The Program Status Area Pointer (PSAP) is
loaded with address %4400 using the Load Control
instruction (LDCTL). If the Z8000 Development Module is
intended to be used, the PSAP need not be loaded by the
programmer as the development modules monitor loads it
automatically after the NMI button is pressed.
Table 2. Programming Sequence for Initialization
Register
WR9
WR4
WR10
WR6
WR7
WR2
WR11
WR12
WR13
WR14
WR15
WR5
WR3
WR1
WR9
Value
(hex)
C0
10
0
AB
CD
20
16
CE
0
03
00
64
C1
08
09
Effect
Hardware reset
x1 clock, 16-bit sync,
sync mode enable
NRZ, CRC preset to zero
Any sync character “AB”
Any sync character “CD”
Interrupt vector “20”
Tx clock from BRG output,
TRxC pin = BRG out
Lower byte of time constant =
“CE” for 9600 baud
Upper byte = 0
BRG source bit = 1 for PCLK
as input, BRG enable
External interrupt disable
Tx 8 bits/character, CRC-16
Rx8 bits/character, Rx enable
(Automatic Hunt mode)
RxInt on 1st char & sp. cond.,
ext. int. disable)
MIE, VIS, Status Low
Since VIS and Status Low are selected in WR9, the
vectors listed in Table 3 will be returned during the
Interrupt Acknowledge cycle. Of the four interrupts listed,
only two, Ch A Receive Character Available and Ch A
Special Receive Condition, are used in the example given
here.
Vector
(hex)
28
2A
2C
2E
Table 3. Interrupt Vectors
PS
Address*
(hex)
Interrupt
446E
4472
4476
447A
Ch A Transmit Buffer Empty
Ch A External Status Change
Ch A Receive Char. Available
Ch A Special Receive Condition
* “PS Address” refers to the location in the Program Status
Area where the service routine address is stored for that
particular interrupt, assuming that PSAP has been set to
4400 hex.
6-84
UM010901-0601