13.07.2015 Views

Data Acquisition

Data Acquisition

Data Acquisition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure C.8Port C mode 1 output status informationThe 8255 may alternatively be used in mode 1 and the data written by polled (program)transfer. This is done as follows:• Write a byte to the control register to configure the 8255 for mode 1 and theappropriate group for data output• The program continually monitors the /OBF line by reading port C, waitingfor it to go high. A high indicates that the last data written to the port hasbeen read by the external device• Then the program can write new data to the port• The /OBF line goes low to indicate that there is data to be read by the externaldevice from the 8255• The external device pulses the /ACK input low and high to read the data.• This makes the /OBF line go high again and the cycle may be repeated untilall the required data has been writtenThe program could also enable the INTR line with the INTE flip-flop and then monitorINTR instead of the /OBF line. In this case, interrupts to the host computer are notenabled.C.9 Mode 2: strobed bi-directional bus I/OThis mode provides a means for communicating with an external device using an 8-bitbus for both transmitting and receiving data. Both input and output handshaking signalssimilar to mode 1 are provided to maintain proper bus flow discipline. Hardwareinterrupts signal the host computer that the port needs attention.The following characterizes mode 2:• Only group A operates in mode 2• One 8-bit bi-directional port, functions as both input and output• Five of the port C lines take on special functions• Both inputs and outputs are latched• One 3-bit simple I/O port• <strong>Data</strong> transfer by interrupts or polled I/O

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

Saved successfully!

Ooh no, something went wrong!