Omega Engineering OME-PIO-D96 manual Read/Write 8-bit data Register

Page 37

3.3.8Read/Write 8-bit data Register

(Read/Write):wBase+0xc0/0xc4/0xc8/0xd0/0xd4/0xd8/

0xe0/0xe4/0xe8/0xf0/0xf4/0xf8/

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

D7

D6

D5

D4

D3

D2

D1

D0

Note. Refer to Sec. 3.1 for more information about wBase.

There are twelve 8-bit I/O port in the OME-PIO-D96. Every I/O port can be programmed as D/I or D/O port. Refer to Sec. 3.3.8 for D/I or D/O selection. When the PC is power-up, all twelve ports are used as D/I port.

outportb(wBase+0xc0,Val);

/* write to Port0

*/

Val=inportb(wBase+0xc0);

/* read from Port0

*/

outportb(wBase+0xcc,0x07);

/* set port0~port2 as D/O ports

*/

outportb(wBase+0xc0,i1);

/* write to Port0

*/

outportb(wBase+0xc4,i2);

/* write to Port1

*/

outportb(wBase+0xc8,i3);

/* write to Port2

*/

outportb(wBase+0xec,0x04);

/* set Port6 & Port7 as D/I ports */

 

/* set Port8 as D/O port

*/

j1=inportb(wBase+0xe0);

/* read Port6

*/

j2=inportb(wBase+0xe4);

/* read Port7

*/

outportb(wBase+0xe8,j3);

/* write to Port8

*/

NOTE: Make sure the I/O port configuration (DI or DO) before performing read/write to the data register. (Refer to sec. 3.3.7)

OME-PIO-D96 User Manual (Ver.1.1, Mar/2003)

---- 35

Image 37
Contents User’sGuide Mexico CanadaBenelux Czech RepublicOME-PIO-D96 Table of Contents Introduction FeaturesOrder Description SpecificationsOptions Product Check List PCI Data Acquisition FamilyOME-PISO-series cost-effective generation, isolated cards Board Layout Hardware configurationI/O port Location Enable I/O OperationRefer to DEMO1.C for demo program D/I/O Architecture Make sure the initial level is High or Low Interrupt OperationINTCHAN3 Interrupt Block Diagram of OME-PIO-D96INTCHAN0/1/2/3 COUNTL++ Initialhigh, activelow Interrupt sourceInitiallow, activehigh Interrupt source Muliti Interrupt Source Read all interrupt state OME-DB-37 Daughter BoardsOME-DN-37 & OME-DN-50 OME-DB-8125OME-ADP-37/PCI & OME-ADP-50/PCI OME-DB-24P/24PD Isolated Input Board OME-DB-24R/24RD Relay Board OME-DB-24PR/24POR/24C Daughter Boards Comparison Table Pin Assignment All signals are TTL compatibleVCC GND Resource-allocated information How to Find the I/O AddressOME-PIO/PISO identification information PC’s physical slot informationPIODriverInit&wBoards, wSubVendor,wSubDevice,wSubAux PIODriverInitWSubVendor=0x80 wSubDevice=1 wSubAux=0x10 /* for PIOD96 Current sinking Enable all D/I/O operation of card0 PIOGetConfigAddressSpaceEnable all D/I/O operation of card1 ShowPIOPISOwSubVendor,wSubDevice,wSubAux ShowPIOPISOSlot5 0x0A Slot6 0x08 Slot7 0x09 Slot8 0x07 Assignment of I/O AddressAddress Read Write I/O Address MapAUX Control Register RESET\ Control RegisterAUX data Register Aux Status Register INT Mask Control RegisterINV3 INV2 INV1 INV0 Interrupt Polarity Control Register7 I/O Selection Control Register Read/Write 8-bit data Register Demo program How to install software & utility?Piopiso PIOPISO.EXE for Windows DEMO1 DEMO2 DEMO3 COUNTL++ DEMO4 COUNTL++ DEMO5 CNTL1=CNTL2=CNTL3=CNTL4=0 Page WARRANTY/DISCLAIMER Temperature