Zilog Z16C35 User Manual
Page 292

13-142
000002bb 10f0
722
djnz
txq2
;loop until all
723
;bytes have been
724 ;transmitted.
725
726
000002bd 3e28
727
ld
a,028h
;reset tx int pending
000002bf d3e8
728
out
(scc_cont),a
729 ;note:tx
buffer
730
;empty happens as tx
731
;shifter is loaded.
732
;
733
;count= last byte+
734 ;crc+flag+12bit
times-btdelay
735 ;btdelay=subr
delay+ctc1int+polling=8bits
736 ;8+16+8+12-8=36=24h
000002c1 0e24
737
ld
c,24h
000002c3 cdWwww
738
call
bittime
;bittime delay
739
;is stored in reg.c
740
;
000002c6741 l7:
;timer flag
000002c6 3aWwww
742
ld
a,(timflg)
;
000002c9 cb4f
743
bit
1,a
;if bit1=1 then count finish
000002cb 28f9
744
jr
z,l7
;
000002cd cb8f
745
res
1,a
;reset timflg bit1
000002cf 32Wwww
746
ld
(timflg),a
;update timflg
747
;
000002d2 3e03
748
ld
a,03h
;
000002d4 d3e5
749
out
(ctc1_cont),a
;disable int,software reset
750
;to kill counter
751
;****disable rs-422 driver after 12 to 18 1’s*****
000002d6 3e05
752
ld
a,05h
;select WR5
000002d8 d3e8
753
out
(scc_cont),a
000002da 3e60
754
ld
a,01100000b
;disable tx, set rts
000002dc d3e8
755
out
(scc_cont),a
756
000002de 3e03
757
ld
a,03h
000002e0 d3e8
758
out
(scc_cont),a
;WR3
000002e2 3ecd
759
ld
a,0cdh
000002e4 d3e8
760
out
(scc_cont),a
;8b/char,rx crc enabled,
761
;address search and rx enabled
762
763 ;*************************************
764
765
;count for the interframe gap
766
;of 200 usec or 46 bit times.
767 ;btdelay=subr
delay+ctc1int+polling=8bits
768
;46 - btdelay=46-8=26h
769
;note that timflg will be polled in
770
;the main routine.
771 ;
000002e6 0e26
772
ld
c,26h
000002e8 cdWwww
773
call
bittime
774
;
775
;bittime delay is stored in reg.c
776
;*************************************
000002eb e1
777
pop
hl
;restore
000002ec c1
778
pop bc
;restore
000002ed f1
779
pop
af
;restore status and a reg
000002ee c9
780
ret
781
782
783
Application Note
Technical Considerations When Implementing LocalTalk Link Access Protocol
Page 286 of 316
UM011002-0808
14-4