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.

The program could also enable the INTR line with the INTE flip-flop and then monitorINTR instead of the IBF line. In this case, the interrupts from the 8255 are not enabled inthe host computer.Figure C.78255 Group A and B as mode 1 inputsTo use the 8255 in mode 1 output with interrupts:• Write a byte to the control register to configure the 8255 for mode 1 and theappropriate group for data output• With the bit set/reset operation, write a 1 to the interrupt enable flip-flop(INTE) of the desired port of the appropriate 8255• The 8255 interrupt request output (INTR) then goes high• The host computer detects the INTR line is active. From an interrupt serviceroutine (ISR) it writes a byte to the output port. This automatically resets theINTR line• The output buffer full (/OBF) line goes low to indicate that there is data to beread by the external device from the 8255• The external device pulses the acknowledge (/ACK) input low and then highagain to indicate that it has read the data• This makes INTR and /OBF go high again and the cycle may be repeated untilall the required data has been writtenWhenever a group of the 8255 is in mode 1 output, the status of the handshaking linesand interrupt signals can be obtained by reading port C. The byte read contains thefollowing information:

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

Saved successfully!

Ooh no, something went wrong!