Hardware Reference
In-Depth Information
DS14C232
1
DCD
6
DSR
2
14
11
RxD
PS1/TxD
T1 IN
T1 OUT
7
8
RTS
10
CTS 1
R2 IN
T2 IN
3
13
12
PS0/RxD
TxD
R1 OUT
R1 IN
7
8
CTS
9
RTS 1
T2 OUT
R2 OUT
4
DTR
Note:
1. Both CTS and RTS are
jumpered to an I/O pin in case
hardware handshake is needed.
9
RI
5
GND
DB9 connector
Figure 9.18 Diagram of SCI and EIA-233DB9 connector wiring in SSE256 demo board
Example 9.3
Write a subroutine to send a break to the communication port controlled by the
SCI0 interface. The duration of the break is approximately 24,000 E-clock cycles, or 1 ms
at 24 MHz.
Solution: A break character is represented by 10 or 11 consecutive 0s and can be sent out by
setting the bit 0 of the SCI0CR2 register. As long as the bit 0 of the SCI0CR2 register remains
set, the SCI will keep sending out the break character. The following assembly subroutine will
perform the desired operation:
#include
“c:\miniide\hcs12.inc”
sendbrk
bset
SCI0CR2,SBK
; turn on send break
ldy
#1
jsr
delayby1ms
bclr
SCI0CR2,SBK
; turn off send break
rts
#include
“c:\miniide\delay.asm”
 
 
Search WWH ::




Custom Search