Zilog Z16C35 User Manual
Page 206

Application Note
The Z180™ Interfaced with the SCC at MHZ
7
call
initdma
ld
b,0
;init status
ld
a,00h
;load 1st data to be sent
out
(scc_data),a
ld
a,11001100b
;enable dmac and int from DMA0
out0
(dstat),a
ld
a,05h
;select WR5
out
(scc_cont),a
ld
a,01101000b
;start tx
out
(scc_cont),a
ei
;wait here for completion
loop:
bit
1,b
;rx dma end?
jr
z,loop
;not, then loop again
push
bc
;save bc reg
ld
bc,length
;compare tx data with rx data
ld
de,tx_buff
ld
hl,rx_buff
chkloop:
ld
a,(de)
cpi
jr
nz,bad_data
jp
v,good
inc
de
jr
chkloop
bad_data:
pop
bc
;restore bc
set
2,b
;set error flag
jr
enddma
good:
pop
bc
;restore bc
enddma:
jr
$
;tx/rx completed
;
you can put breakpoint here
fill_mem:
l
d
hl,temp
; prepare data to be sent
ld
bc,length
; set length
ld
de,tx_buff
ld
(hl),00h
fill_loop:
ldi
jp
nv,fill_00
dec
hl
inc
(hl)
jr
fill_loop
fill_00:
ld
bc,length
; clear rx buffer area to zero
ld
de,rx_buff
ld
(hl),00h
fill_00l:
ldi
ret
nv
dec
hl
jr
fill_00l
Table 14. Test Program – Z180/SCC DMA Transfer (Continued)
Page 200 of 316
UM011002-0808
- S3F94C8 (11 pages)
- S3F80QB (29 pages)
- S3F8S19 (38 pages)
- Z51F6412 (96 pages)
- Z51F6412 (54 pages)
- Z51F6412 (55 pages)
- Z16F6411 (216 pages)
- EZ80F93 (11 pages)
- Z16F6411 (20 pages)
- ZMOT0BSB (314 pages)
- ZMOT0BSB (582 pages)
- EZ80F93 (13 pages)
- Z8F083A (14 pages)
- Z8F082A (18 pages)
- Z8F2480 (17 pages)
- Z8F082A (15 pages)
- Z8F0822 (17 pages)
- Z8F6423 (83 pages)
- Z8F2480 (19 pages)
- Z8F2480 (18 pages)
- Z8F6423 (18 pages)
- Z8F6423 (27 pages)
- Z8F6482 (50 pages)
- EZ80L92 (40 pages)
- EZ80L92 (26 pages)
- EZ80L92 (79 pages)
- EZ80F91GA (469 pages)
- EZ80F915 (411 pages)
- EZ80F91NAA (34 pages)
- EZ80F91 (41 pages)
- EZ80L92 (10 pages)
- eZ80F92 (87 pages)
- Z8FMC16 (26 pages)
- Z16FMC6 (41 pages)
- ZUSBOPTS (38 pages)
- ZUSBOPTS (59 pages)
- Z16FMC6 (520 pages)
- Z16FMC6 (8 pages)
- Z16FMC6 (26 pages)
- ZMOT1AHH (25 pages)
- ZMOT0BSB (34 pages)
- EZ80F915 (78 pages)
- EZ80190 (87 pages)
- EZ80L92 (86 pages)
- EZ80F91GA (127 pages)