Omega OME-A822PG manual 1 A/D conversion flow, Polling, interrupt and DMA

Page 30

2.7.1 A/D conversion flow

Before using the A/D converter, the user should configure the following hardware settings:

1.select single-ended or differential input (JP3) (refer to Sec. 2.9 first)

2.select internal trigger or external trigger (JP4)

3.select IRQ level if needed (JP5)

4.select DMA channel if needed (JP7,JP8)

5.select internal clock or external clock for counter0 if needed (JP6)

The user must decide which A/D conversion mode will be used. The software driver supports three different modes: polling, interrupt and DMA. The polling mode (sec. 2.4.9) is the simplest but most limited. The software driver should be used for interrupt or DMA mode.

The analog input signals come from CN3. These signals may be single-ended or differential and must match the setting of JP3.

The multiplexer can select 16 single-ended or 8 differential signals into the gain control module. The settling time of multiplexer depends on the source resistance. Because the software doesn’t account for the settling time, the user should provide sufficient delay when switching channels. (sec. 2.4.7)

The gain control module also requires settling time if the gain control code is changed.

Since the software doesn’t account for settling time, the user should provide sufficient delay if the gain control code is changed. (sec. 2.4.6)

The software driver provides a machine independent timer, A-822_Delay(), for settling time delay. This subroutine assumes that the JP6 jumper is set to the internal 2M clock and uses counter0 to implement a machine independent timer. If A-822_Delay() is used, counter0 will be reserved and can not be used as a user programmable timer/counter.

The A/D converter needs a trigger signal to start an A/D conversion cycle. The OME-A-822PGL/PGH supports three trigger modes, software, pacer and external trigger.

The result of the A/D conversion can be transferred into the PC memory by three modes:

polling, interrupt and DMA..

OME-A-822PGL/PGH Hardware Manual ---- 28

Image 30
Contents User’sGuide Benelux CanadaMexico Czech RepublicOME-A-822PGH/PGL Tables of Contents IntroductionConnector Features General DescriptionAnalog Inputs SpecificationsPower Consumption 3 A/D ConverterDA Converter Digital I/OInterrupt Channel Programmable Timer/Counter Direct Memory Access Channel DMAApplications Product Check ListHardware Configuration Board LayoutI/O Base Address Setting Default base address isJumper Settings 1 JP1 D/A Internal Reference Voltage Selection2 JP2 D/A Int/Ext Ref Voltage Selection 3 JP3 Single-ended/Differential Selection4 JP4 A/D Trigger Source Selection 5 JP5 Interrupt Level Selection6 JP6 User Timer/Counter Clock Input Selection 7 JP7 DMA Dack Selection JP8 DMA DRQ Selection DRQ JP7 Dack JP8 DMAI/O Register Address Address Read Write1 8254 Counter 2 A/D Input Buffer RegisterConversion is completed, the Ready bit will clear to zero 3 D/A Output Latch Register 4 D/I Input Buffer Register Clear Interrupt Request6 A/D Gain Control Register GAIN3 GAIN2 GAIN1 GAIN0OME-A-822PGH Gain Control Code Table 7 A/D Multiplex Control Register8 A/D Mode Control Register 9 A/D Software Trigger Control Register 10 D/O Output Latch Register Digital I/O CN28254 Timer/Counter CounterA/D Conversion 1 A/D conversion flow Polling, interrupt and DMA2 A/D Conversion Trigger Modes 3 A/D Transfer ModesUsing software trigger and polling transfer Delay the settling time refer to Sec .4.6 and SecRefer to Sec D/A Conversion Analog Input Signal Connection OME-A-822PGL/PGH Hardware Manual OME-A-822PGL/PGH Hardware Manual Signal Shielding Use a single connection to frame ground not A.GND or D.GNDUsing OME-DB-8225 CJC Output CN1/CN2/CN3 Pin Assignment CN1 Digital Input Pin AssignmentCN2 Digital Output Pin Assignment SINGLE-ENDED Signal Mode Differential Signals OME-DB-37 Daughter BoardOME-DB-8225 OME-DB-16PCalibration Description of Variable ResistorsD/A Calibration A/D Calibration Diagnostic Utility IntroductionOME-A-822PGL/PGH Hardware Manual Running The Diagnostic Utility Setup Base address selection screenDMA no and IRQ no selection screen Calibration Function Test Test Test Screen Digital I/O Test Screen Multiplexer Test Screen Use IRQ Test Screen Use DMA Test Screen DA Gain Test Screen Timer 0 Test Screen Special Test Help WARRANTY/DISCLAIMER Temperature