Master/Slave Example - Intel 80C188EC User Manual

Hide thumbs Also See for 80C188EC:
Table of Contents

Advertisement

SERIAL COMMUNICATIONS UNIT
mov
in
and
out
mov
mov
or
out
mov
mov
out
mov
mov
out
mov
xor
out
mov
Check_4_TI:
in
test ax, 0020h
jz
mov
xor
out
not
out
not
out
pop
pop
pop
ret
_parallel_serial endp
lib_80186
ends
end

11.5.3 Master/Slave Example

This section shows an example of a Mode 2 and 3 master/slave network. Figure 11-18 shows the
proper connection of the master to the slaves. The buffer is necessary to avoid contention on the
receive line. Alternatively, an open-collector buffer could be used and the port pin function could
be deleted.
11-24
dx, P1CON
;Get state of port 1 controls
ax, dx
ax, 0feh
;make sure P1.0 is port
dx, al
dx, B1CMP
ax, tran_freq
ax, 8000h
;set internal clocking bit
dx, ax
;Mode 0, 1 million bps
dx, P2CON
;set Port 2.1 for TXD
ax, 0ffh
dx, al
dx, S1TBUF
;send user's data
ax, user_data
dx, al
dx, S1CON
;Mode 0, No CTS, Transmit
ax, ax
dx, ax
dx, S1STS
ax, dx
;check for TI bit
Check_4_TI
dx, P1LTCH
;pulse P1.0
ax, ax
dx, al
ax
;set P1.0 high
dx, al
ax
;set P1.0 low
dx, al
dx
;restore saved registers
ax
bp
;restore user's bp
Example 11-2. Mode 0 Example (Continued)

Advertisement

Table of Contents
loading

This manual is also suitable for:

80c186ec

Table of Contents