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.

C.11 Single-bit set/resetAny of the eight bits of port C can be set or reset using a single output instruction to theDIOCTRL register. When port C is being used as status/control for port A or B any ofthese bits can be set or reset just as if they were data output ports. The format of the byteto write to the DIOCTRL register to set or reset a port C bit is shown below.Figure C.12DIOCTRL register – bit set/reset modeC.12 Mixed mode programmingAn 8255 is not constrained to operate in one mode only. For example, port A mayoperate in mode 2 and port B may then operate in either mode 1 or mode 0. For anycombination, some or all of the port C lines are used for control or status. The remainingport C lines may be used in mode 0 either as inputs or outputs.A read operation of port C returns all the port C lines except the /ACK and /STB lines.In their place will appear the status of the interrupt enable flip-flops (INTE X ). This isillustrated in Figures C.10 and C.11 above, and in the status information bytes that followthe figures.A write operation to port C will only affect lines programmed as mode 0 outputs. Towrite to any port C output programmed as a mode 1 output or to change an interruptenable flip-flop, the bit set/reset operation must be used.Using the bit set/reset command, any port C line programmed as an output (includingINTR, IBF and /OBF) can be written or an interrupt enable flag set or reset. Linesprogrammed as inputs (including /ACK and /STB) are not affected by this command.Writing to these lines will affect the interrupt enable flags.

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

Saved successfully!

Ooh no, something went wrong!