English
Language : 

Z85233 Datasheet, PDF (183/317 Pages) Zilog, Inc. – The Zilog SCC Serial Communication Controller
Application Note
The Z180™ Interfaced with the SCC at MHZ
(Continued)
Table 12. SCC Test Program – Interrupt for 180/SCC Application Board (Under Mode2 Interrupt) (Continued)
;external/status interrupt
service routine
ext_stat: ld
a,10h
out
in
and
rra
rra
rra
rra
rra
set
ld
ld
out
ei
ret
(scc_cont),a
a,(scc_cont)
00100000b
1,a
b,a
a,38h
(scc_cont),a
;reset ext/stat int
;read stat
;mask off bits other than /cts
;shift into D0 loc
;set interrupt flag
;save it
;reset highest ius
;enable int
;return from int
;initialization data table for scc
;table format - register number, then value for the register
;and ends with 0ffh - since scc doesn’t have
;register 0ffh...
scctab:
if
else
endif
db
scc_a
db
db
db
db
09h
10000000b
01000000b
0eh
20h
;select WR9
;ch a reset
;ch b reset
;select WR15
;only enable /cts int
db
01h
db
00000001b
;select WR1
;enable ext/stat int
db
10h
db
10h
;reset ext/stat int
;twice
db
09h
db
08h
;select WR9
;mie, vect not incl. stat
db
0ffh
;end of table
;interrupt vector table
org
sccvect:
dw
inttest + 100h
ext_stat
top_of_sp:
.block
end
100h
;reserve area for stack
6-48
UM010901-0601