13.07.2015 Views

Data Acquisition

Data Acquisition

Data Acquisition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Table C.6Instructions for reading or writing to the portsC.5 Mode 0: simple I/OThis mode is used for simple input and output operations for each of the ports. Nohandshaking is required and no interrupts are generated. <strong>Data</strong> is simply read from orwritten to a selected port.The following characterize mode 0:• Two 8-bit ports (ports A and B) and two 4-bit ports (upper and lower nibbleof port C)• Any port can be configured for input or output• Outputs are latched, inputs are not latched• <strong>Data</strong> transfer by polled I/OC.6 Mode 0 programmingTo use the 8255 in mode 0:• Write a single byte to the control register to set the 8255 into mode 0 with thethree ports configured for the desired data direction• Then read to or write from the I/O port corresponding to an 8255 port (port A,B or C) as many times as necessary to obtain or transfer the required amountof dataC.7 Mode 1: strobed I/OIn this mode data transfers are controlled by handshaking signals and hardware interrupts.Some of the port C lines are used for these control signals. Hence they take on differentfunctions and names. The following characterize Mode 1:• Two groups, group A and B. Each group consists of an 8-bit data port andthree control lines• Certain port C lines take on special functions• The data ports can be either input or output ports

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

Saved successfully!

Ooh no, something went wrong!