12.07.2015 Views

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

80C186EB/80C188EB Microprocessor User's Manual - CEUNES

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SERIAL COMMUNICATIONS UNITmov dx, P1CON ;Get state of port 1 controlsin ax, dxand ax, 0feh ;make sure P1.0 is portout dx, almov dx, B1CMPmov ax, tran_freqor ax, 8000h ;set internal clocking bitout dx, ax ;Mode 0, 1 million bpsmov dx, P2CON ;set Port 2.1 for TXDmov ax, 0ffhout dx, almov dx, S1TBUF ;send user's datamov ax, user_dataout dx, almov dx, S1CON ;Mode 0, No CTS, Transmitxor ax, axout dx, axmov dx, S1STSCheck_4_TI: in ax, dxtest ax, 0020h ;check for TI bitjz Check_4_TI_parallel_serial endplib_80186 endsendmov dx, P1LTCH ;pulse P1.0xor ax, axout dx, alnot ax ;set P1.0 highout dx, alnot ax ;set P1.0 lowout dx, alpop dx ;restore saved registerspop axpop bp ;restore user's bpretExample 10-2. Mode 0 Example (Continued)10.5.3 Master/Slave ExampleThis section shows an example of a Mode 2 and 3 master/slave network. Figure 10-20 shows theproper connection of the master to the slaves. The buffer is necessary to avoid contention on thereceive line. Alternatively, an open-collector buffer could be used and the port pin function couldbe deleted.10-27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!