Omega 1002 manual

Page 42

l=inp(wBaseAddr+2*4);

/* delay starting two clks */

h=inp(wBaseAddr+2*4);

 

for (count=32767;count>0;count--){

outp(wBaseAddr+12,0x80); /* latch counter_2 */ l=inp(wBaseAddr+8); h=inp(wBaseAddr+8);

if (h>=0x80) return NoError;

}

return TimeOut;

}

//--------------------------------------------------------

void AdPolling(UCHAR channel, UCHAR gain, WORD delay)

{

 

outp(wBaseAddr+0x18,0);

// Select Mode 0

outp(wBaseAddr+0x10,channel);

outp(wBaseAddr+0x14,gain);

 

P1002_Delay(delay);

 

outp(wBaseAddr+0x1c,01);

// A/D software tirgger

}

 

void SetupTimer(WORD wChannel, WORD wCoef)

{

WORD cmd; wChannel=wChannel&0x03; cmd=0x34+(wChannel<<6); outpw(wBaseAddr+3*4, cmd); outp(wBaseAddr+wChannel*4, (UCHAR)(wCoef&0xff)); outp(wBaseAddr+wChannel*4, (UCHAR)(wCoef>>8));

}

//========================================================= void main()

{

int i,j;

WORD wBoards,wRetVal,wPLX;

WORD Drdy,wAdData=0;

42

Image 42
Contents User’sGuide Servicing North America Table of Contents Software and Demo Program Diagnostic Program Introduction General DescriptionBlock Diagram X86 SystemFeatures Specifications Power ConsumptionAnalog Inputs 3 D/I and D/O 4 A/D Trigger MethodsProgrammable Timer/Counter Interrupt ChannelApplications OME-PCI-1002 series multifunction cardsProduct Check List Release NotesHardware Configuration Board LayoutJumper Setting A/D CalibrationSystem Block Diagram OME-PCI-1002 System Function BlockDaughter Boards OME-DB-8225 OME-DB-37OME-DB-16P Isolated Input Board OME-DB-16R Relay Board Analog Input Signal Connection Page Page Signal Shielding Jumper Settings Connectors Page How to Find the I/O Address O RegistersPage I/O Address Map Section 8254 Registers Status Register Clear Interrupt General Control Register Interrupt Source SelectionTrigger Method Selection Function Operation Digital I/O8254 Timer A/D triggerSymbol Name Minimum Maximum A/D Conversion CPUSuggested Settling Times 1 A/D Conversion Trigger Modes Software Trigger and Polling Techniques Page Page Software and Demo Program Power-ON Plug & Play Test Driver Plug & Play TestD I/O Test A/D TestWARRANTY/DISCLAIMER Temperature