Home

DMM-32DX-AT User Manual - Diamond Systems Corporation

image

Contents

1. Note that the value written is shifted by 1 bit i e divided by 2 For example if you want a FIFO threshold of 256 samples write a 128 to this register The interrupt routine must read exactly this number of samples out each time it runs The last time the routine runs it should read whatever is remaining in the FIFO by monitoring the EF bit Empty Flag in the FIFO status register at Base 7 When the FIFO is empty EF 1 and the FIFO returns the value hex FF on all read operations If you are sampling at a slow rate or want to control when the interrupt occurs you can set the threshold to a low value For example if you are sampling 16 channels at 10Hz and you want an interrupt each set of samples you can set the threshold to 16 write an 8 to this register so that an interrupt will occur each 16 samples Then the interrupt routine should read out 16 samples from the FIFO and you get new data as soon as it is available For higher sample rates 100KHz or higher it may be necessary to increase the threshold above 256 to around 350 or even 512 with enhanced features enabled If you set the threshold too high you may overrun the FIFO since the interrupt routine may not respond before the remaining locations are filled causing an overflow An overflow can be detected by checking the OVF bit in the FIFO status register at Base 7 The correct threshold for your application can only be determined by testing www diamondsystems co
2. only output voltage ranges with the full scale output range set to 5V 10V or programmable The maximum output current on any channel is 5mA Current outputs such as 0 20mA outputs are not supported Moreover the hardware jumper settings can be overridden by software by setting the bit D A JPOVRD when the board is operating in maximum mode On power up the DACs are configured to reset to mid scale 0V in bipolar mode or zero scale 0V in unipolar mode so that the DACs power up to OV In programmable mode the full scale output voltage can be set anywhere from OV to 10V in software You must use the Universal Driver software to set programmable D A range as it requires calibration to fine tune the setting to the desired value The Diamond MM 32DX AT demo package includes a section showing how to set the D A range in software To configure the analog output range set jumper block J6 according to the tables below The first two positions are used for the output range the third position is to determine the output polarity and the fourth position is to determine a fixed or variable full scale output The use of the 5th position can be defined by the user for uses that do or do not involve the D A converter Placing the jumper in position grounds the corresponding control signal For example inserting the B U jumper sets the board to unipolar mode J6 Analog Output Configuration Jumper Settings Output Range 1 4 GN1 GNO B U F V 2
3. CLOCK 0 3 GEN 20MHz TIMING CONT ROL J3 DIGITAL A SAL N 04 0 23 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 4 2 FEATURES Analog Inputs 9 9 o 32 input channels 16 bit resolution May be configured as 32 single ended 16 differential or 16 SE 8 DI Programmable gain range and polarity on inputs 250 000 samples per second maximum sampling rate 1024 sample FIFO for reduced interrupt overhead Autocalibration of all input ranges under software control Patented hardware implemented auto autocalibration Analog Outputs 9 9 o 4 analog output channels with 16 bit standard 12 bit optional resolution 5mA max output current Multiple fixed full scale output ranges including unipolar and bipolar ranges Programmable full scale range Patented hardware implemented auto autocalibration 1024 sample FIFO for D A wave form generation 250 KHz maximum update rate Simultaneous update for all 4 channels capability Digital I O 24 bi directional lines using integrated 8255 type circuit Buffered I O for enhanced current drive Handshaking controls enable external latching of data as well as interrupt operation User configurable pull up pull down resistors 7 additional I O lines are fixed direction with programmable functions Counter Timers and A D Triggering 1 32 bit counter timer for A D pacer clock and interrupt ope
4. 34 8 ANALOG INPUT RANGES AND RESOLUTION nanne 35 8 1 Unipolar and Bipolar Inputs it ete eres sa ERR EEA od ekeren Te eu cet 35 8 2 Input Ranges and Resolution eee tenente enne ene enne teen enn ene 35 8 3 ALD Conversion P EO RE RE GRO TORT e SS HER DES E HERE vacant REP 36 6 4 Correlation between A D Code and Input Voltage essen eene 36 9 PERFORMING AN A D CONVERSION 38 9 1 Select the input channel or input channel range eese eene nenne 38 9 2 Select the GNGlOg input tange diet ger rH HE neen D E OER 39 9 3 Wait for the analog circuit to settle esee eene nene nennen trennen rennen 39 9 4 Start an A D conversion on the current channel eese eene teen nennen enne enne 39 9 5 Wait for the conversion to finish eese eese enne nete eene enne 39 9 67 Read the A D PERI EP ES EE DE NUR ETE DAS vast bande 39 9 7 Convert the numerical data to a meaningful value eese eese nennen eene 39 102 A DISAMPLING METHODS ere ee ERE EE Eel deden ore eene ERR 40 Sampling Modes x2 idet det eee ed telo digest tre e e te a fidet tdt 40 10 2 FIFO Description eed en pU e FR DROPS 4I 10 3 Scan Sampling nne a eR eit ete er ees 41 10 4 Sequenti
5. 5V In In Out Out 5V In Out Out Out 10V Out In Out Out 0 5V In In In Out 0 10V In Out In Out Programmable X X X In Programmable mode requires use of driver software to set and calibrate range Digital I O Pull Up Pull Down The 24 digital I O lines on I O header J4 are connected to 10K resistors that can be configured for either pull up or pull down All resistors are configured in the same way Jumper block J8 in the lower left corner of the board is used for configuration To set the pull direction install a jumper above the mark 5 or GND as desired The 5 and Ground signals are wired to opposite corners of J8 to prevent accidentally shorting out the power supply by inserting the jumper incorrectly DO NOT install jumpers in both 5 and GND locations simultaneously 16 Bit Data Bus The board can be configured for 16 bit read operations when reading the A D data To do this installa jumper in the 16 location on J7 A 16 bit transfer will only occur during a 16 bit read instruction from the base address A D data when a jumper is in the 16 position and the board is in a 16 bit bus both PC 104 J1 and J2 connectors are connected to the CPU Otherwise the A D board and host CPU will ignore the 16 bit setting and or instruction and convert the 16 bit operation into two 8 bit read operations from Base 0 and Base 1 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 12 6 I O REGISTER MAP Diamond MM 32DX
6. AT uses a 1024 sample FIFO First In First Out memory buffer to manage A D conversion data It is used to store A D data between the time it is generated by the A D converter and the time it is read by the user program In enhanced mode the entire 1024 sample FIFO is available and in normal mode only 512 samples are available The FIFO may be enabled and disabled under software control In single conversion mode the FIFO features are not generally needed so FIFO use should not be selected However the FIFO is still actually being used Each A D sample is stored in the FIFO and when the software reads the data it reads it out of the FIFO In low speed sampling each time a conversion occurs the program reads the data so there is always a one to one correspondence between sampling and reading Thus the FIFO contents never exceed one sample For high speed sampling or interrupt operation the FIFO substantially reduces the amount of software overhead in responding to A D conversions as well as the interrupt rate on the bus since it enables the program to read a number of samples all at once rather than one at a time In addition the FIFO is required for sampling rates in excess of the maximum interrupt rate possible on the bus Generally the fastest sustainable interrupt rate on the ISA bus running DOS is around 40 000 per second Since Diamond MM 32DX AT can sample up to 250 000 times per second the FIFO is needed to reduce the interrupt rate at
7. DIRCL Page 2 FIFO Control Enhanced Feature Page 12 FT9 13 14 15 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 14 Page 3 Autocalibration Registers 12 D7 D6 D5 D4 D3 D2 D1 DO 13 A6 A5 A4 A3 A2 A1 AO 14 EE EN EE RW RUNCAL CMUXEN TDACEN 15 FPGA Feature Unlock Register Page 4 dsPIC Interface Enhanced Feature Page 12 PICD7 PICD6 PICD5 PICD4 PICD3 PICD2 PICD1 PICDO 13 2 4 2 PICA1 PICAO 14 ACHOLD ACREL PICRST ACABT ACTRIG 15 PSTART PSTOP PGDOUT PGDIN PGDW1 PGDWO PGCW1 PGCWO Page 5 D A Waveform Generator Enhanced Feature Page 12 DACA7 DACA6 DACA5 DACA4 DACA3 DACA2 DACA1 DACAO 13 DACA9 DACA8 14 DEPTH3 DEPTH2 DEPTH1 DEPTHO WGCH 1 WGCHO WGSRC1 WGSRCO 15 WGINC WGRST WGPS WGSTRT Page 6 CPLD I O Window Enhanced Feature Page 12 13 14 This page is a window to the CPLD I O and should not be accessed under normal operation 15 Page 7 D A Channel Control Enhanced Feature Page When Enabled by DAC_CONT 12 D A D A D A D A D A D A D A D A BIT 07 BIT 06 BIT 05 BIT 04 BIT 03 BIT 02 BIT 01 BIT 00 13 D A D A D A D A D A D A D A D A BIT 15 BIT 14 BIT 13 BIT 12 BIT 11 BIT 10 BIT 09 BIT 08 14 D A REG D A D A D A D A D A ONE ALL SELECT JPOVRD FX VR GAIN1 GA
8. FIFO has not overflowed since the last A D data read FIFOEN SCANEN Read back of control bits from above PAGE1 0 Read back of the current page register setting see Base 8 below www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 20 Base 8 Write Miscellaneous Control Register RESETA Writing a 1 to this bit causes a full reset of all features of the board including the DACs the FIFO the digital I O and all internal registers The counter timers are not affected by this reset RESETD Writinga 1 to this bit causes a reset identical to above except the analog outputs are not affected INTRST Writing a 1 to this bit resets the interrupt request circuit on the board The programmer must write a 1 to this bit during the interrupt service routine or further interrupts will not occur Writing a 1 to this bit does not disturb the values of the PAGE bits P2 0 Three bit value that selects which I O device is accessible through the registers at locations Base 12 through Base 15 P lt 2 0 gt Page Device 000 0 8254 001 1 8255 On FIFO Control 011 3 EEPROM TrimDAC 100 4 dsPIC 101 5 D A Waveform Generator 110 6 Factory use only 111 D A Channel Control Gray pages 2 4 5 6 and 7 are only accessible when the enhanced features are enabled Note that P2 is an enhanced feature bit Writing to the page bits will not generate a board reset or interrupt reset as long as those bits ar
9. In Out In A B C D Agnd 1 2 Agnd Agnd 1 2 Agnd Agnd 1 2 Agnd 1 2 Agnd 0 3 4 16 0 3 4 0 0 3 4 0 0 3 4 16 1 5 6 17 1 5 6 1 1 5 6 1 1 5 6 17 2 7 8 18 24 7 8 2 24 7 8 2 2 7 8 18 3 9 10 19 3 9 10 3 3 9 10 3 3 9 10 19 4 11 12 20 4 11 12 4 4 11 12 4 4 11 12 20 5 13 14 21 5 13 14 5 5 13 14 5 5 13 14 21 6 15 16 22 6 15 16 6 6 15 16 6 6 15 16 22 7 17 18 23 7 17 18 7 7 17 18 7 7 17 18 23 8 19 20 24 8 19 20 8 8 19 20 24 8 19 20 8 9 21 22 25 9 21 22 9 9 21 22 25 94 21 22 9 10 23 24 26 10 23 24 10 10 23 24 26 10 23 24 10 11 25 26 27 11 25 26 11 11 25 26 27 11 25 26 11 12 27 28 28 12 27 28 12 12 27 28 28 12 27 28 12 13 29 30 29 13 29 30 13 13 29 30 29 13 29 30 13 14 31 32 30 14 31 32 14 14 31 32 30 14 31 32 14 15 33 34 31 15 33 34 15 15 33 34 31 15 33 34 15 35 50 35 50 35 50 35 50 Same as Same as Same as Same as 7 7 7 7 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 11 5 5 5 6 5 7 D A Configuration The four analog outputs on DMM 32DX AT can be set individually or all at once to operate in bipolar both and or unipolar
10. J3 pin 46 is connected to a 10KQ pull up resistor The interrupt operation begins immediately once it is set up and the selected clock source begins with no external triggering or gating www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 23 Base 11 Write Analog Configuration Register This register controls the analog input range for all channels on the board SCINT1 0 Scan interval This is the time between A D samples when performing a scan SCANEN 1 The driver sets a default of 10us Note that a new interval has been added 4Vs This interval is valid even if enhanced features are disabled It has been adjusted from the DMM 32 AT value of 5Vs to allow A D conversions up to the new higher limit of 250KHz SCINT1 SCINTO Interval 0 0 20us 0 1 15us 1 0 10us 1 1 4us RANGE 5V or 10V A D positive full scale voltage 0 5V 1 10V ADBU A D bipolar unipolar setting O bipolar 1 unipolar RANGE ADBU A D Range 0 0 5V 0 1 0 5V 1 0 10V 1 1 0 10V These two control bits define the A D input range for a gain setting of 1 G1 0 A D programmable gain amplifier setting G1 GO Gain 0 0 1 0 1 2 1 0 4 1 1 8 The gain setting is the ratio between the full scale voltage range at the A D converter and the full scale voltage range at the input to the board The gain should never cause the input signal to exceed the ran
11. LED www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 6 4 I O HEADERS PINOUT AND PIN DESCRIPTION 4 1 Analog I O Header J3 Diamond MM 32DX AT provides a 50 pin header on the right edge of the board labeled J3 for all I O relating to analog functions Pin 1 is in the upper left corner J3 Analog I O Header AGND 1 2 AGND Vin 0 0 3 4 Vin 16 0 Vin 1 14 5 6 Vin 17 1 Vin 2 24 7 8 Vin 18 2 Vin 3 34 9 10 Vin 19 3 Vin 4 4 11 12 Vin 20 4 Vin 5 54 18 14 Vin 21 5 Vin 6 6 15 16 Vin 22 6 Vin 7 7 17 18 Vin 23 7 Vin 8 8 19 20 Vin 24 8 Vin 9 9 21 22 Vin 25 9 Vin 10 10 23 24 Vin 26 10 Vin 11 114 25 26 Vin 27 11 Vin 12 12 27 28 Vin 28 12 Vin 13 134 29 30 Vin 29 13 Vin 14 14 31 32 Vin 30 14 Vin 15 15 33 34 Vin 31 15 Vout 3 35 36 Vout 2 Vout 1 37 38 Vout 0 Vref Out 39 40 Agnd A D Convert 41 42 Ctr 2 Out Dout 2 Dout 1 43 44 Ctr 0 Out Dout 0 Extclk Din 3 45 46 Extgate Din 2 Gate 0 Din 1 47 48 Clk 0 Din O 45V 49 50 Dgnd Signal Name Definition Vin 15 154 Vin 0 04 Analog input channels 15 0 in single ended mode High side of input channels 15 0 in differential mode Vin 31 16 Vin 15 0 Analog input channels 31 16 in both single ended mode Low side of input channels 15 0 in differential mode Vref
12. PROGZ high PGDOUT FPGA makes PIC PGD line an output but leave at current level i e perform input to find current level set line as an output at same level PGDIN FPGA makes PIC PGD line an input PGDW1 If PIC_PGD line is in output mode set high PGDWO If PIC_PGD line is in output mode set low PGCW1 Set PIC_PGC line high PGCWO Set PIC_PGC line low www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 30 Page 4 Base 15 Read dsPIC Programming Register Bit No Name PGDR Reads back current level of PIC PGD line low 0 high 1 6 9 Page 5 D A Waveform Generator This is an enhanced features page It is inaccessible unless enhanced features are enabled Page 5 Base 12 Write Store D A Code at Address LSB Bit No DACA7 0 LSB of address to store D A code in D A waveform buffer Page 5 Base 13 Write Store D A Code at Address MSB DACA9 8 MSB of address to store D A code in D A waveform buffer Page 5 Base 14 Read Write Waveform Generator Control Register DEPTH3 0 These bits define the size of the D A waveform buffer The depth is based on this equation Depth DEPTH3 0 1 64 This allows valid depth values from 64 to 1024 samples The waveform generator frame pointer will return to 0 whenever it hits either 1024 or the depth value indicated above WGCH1 0 These two bits combine to choose how many codes are output on each frame WGCH WGCH Description 1 0 0 0 1 code per f
13. Page 33 7 ENABLING ENHANCED FEATURES The DMM 32DX AT has many newly added features that are only accessible when enhanced features is enabled These features include D A wave form generator access to Page 5 larger FIFO size of 1024 access to Page 2 dsPIC and auto autocalibration access to Page 4 and various others 7 1 Enabling Enhanced Features Enhanced Mode Two steps are required to enable enhanced features 1 Set page bits to Page 3 2 Write code to unlock enhanced features Below is the code demonstrating how to enable enhanced features without using the driver software The page bit can be set at Base 8 see page 21 outp Base 8 0x3 Write OxA6 to Base 15 to unlock enhanced features see page 28 outp Base 15 0xA6 7 2 Disabling Enhanced Features Normal Mode To disable enhanced features follow the same instructions as above except write OxA7 instead of OxA6 to Base 15 outp Base 15 0xA7 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 34 8 8 8 2 ANALOG INPUT RANGES AND RESOLUTION Diamond MM 32DX AT uses a 16 bit A D converter This means that the analog input voltage can be measured to the precision of a 16 bit binary number The maximum value of a 16 bit binary number is 2 6 1 or 65535 so the full range of numerical values that you can get from a Diamond MM 32DX AT analog input channel is O 65535 The smallest change in input voltage that can be
14. Tx RS 232 Rx NIJA Signal Name Definition Vin Unregulated Power Input This allows the board to operate in standalone mode fed through an unregulated power supply ranging from 7 to 12VDC This pin requires an optional voltage regulator installed on the bottom side of the board Do not attempt to use this pin unless the regulator is installed 5V This pin can be connected to a regulated 5VDC power supply to power the board for standalone operation Digital GND Connected to the digital ground plane of the board RS 232 Rx Tx RS 232 receive transmit lines to communicate with onboard dsPIC RS 485 RS 485 receive transmit lines to communicate with onboard dsPIC www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 9 5 5 5 2 5 3 BOARD CONFIGURATION Refer to the Drawing of Diamond MM 32DX AT on page 6 for locations of the configuration items mentioned here Base Address Each board in a PC 104 system must have its own unique block of addresses that does not overlap with any other board in the system or feature on the CPU The lowest address of this address block is called the base address Diamond MM 32DX AT s base address is set with 3 pairs of pins marked ADDR on pin header J7 located near the PC 104 bus connectors The table below lists the 8 possible jumper configurations and the corresponding base addresses Base Address Configuration Base Address P
15. level Jumper block J7 contains pins for selecting the DMA level between channels 1 and 3 To select channel 1 both jumpers labeled 1 must be on To select channel 3 both jumpers labeled 3 must be on DMA is supported in the hardware however it is not currently supported in Diamond Systems Universal Driver software On boards without FIFOs or memory buffers DMA is required to support high speed sampling at rates above the maximum sustainable interrupt rate which may vary from 1 000 to 20 000 depending on the CPU and operating system However DMM 32DX AT contains a 1024 sample FIFO for A D data that allows the interrupt rate to be much slower than the sample rate The board can support full speed sampling at up to 250 000 samples per second without the use of DMA www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 10 5 4 Single Ended Differential A D Channels The input channels on DMM 32DX AT can be configured as 32 single ended 16 differential or 16 single ended 8 differential Four different configurations are possible as described below A single ended input is a single wire input plus ground that is measured with reference to the board s analog ground In order for the measurement to be accurate the board s ground must be at the same potential as the source signal s ground Usually this is accomplished by connecting the two grounds together at some point for example by connecting to one of the analog gr
16. nnen 12 5 7 M6 Bit D ta Bussi aed nep ee Rer ERU sigh ea EE aede d nee ee dieere Na RR 12 6 T OXJREGISTER MAP tur RARE ete n iieri od te e 13 6 1 I O M p Description aco ee eq ein I rb tte reete e agre ee i eae osi ee E ER EE ed 13 6 2 J OMap Reference Write ortie nrden ed eei derer iie e 14 J O Map Reference ior a er edt e Reiter aper e ee oA 15 0 3 VO Map Details doe RE Re e RE ge epe 17 6 4 P ge 0 82C54 Counter Timer Accessi iiid e ide ede Rb eie Uie Pe lente de 25 6 5 Pag 1 82C55 Digital VO Circuit ons ess eate ed dee aee Hee ere eH arte dede 26 6 6 Page 2 Expanded FIFO Control eser re cosbedssesaptavasestsasasuastssasvebessuaees 27 6 7 Page 3 Autocalibration Registers e 27 6 5 P ge 4 ds PIC Interface s ete caa DO E qu i ve ette ode leenen 29 6 9 Page 5 D A Waveform Generator nene tren trennen eren ene 31 6 10 Page6 CPLD MO Window eee eb tr dassashacddesboecasessbssasarbueoaseaabgcdensveecaseiees 32 OAL Page 7 D A Output Channel Control aou E 32 7 ENABLING ENHANCED FEATURES eese ener 34 7 1 Enabling Enhanced Features Enhanced 34 7 2 Disabling Enhanced Features Normal Mode eese eese eee eene nnne enhn enne nennen
17. pin 0 This pin is controlled by bit DOUT2 at Base 1 bit 2 Dout 1 J3 pin 43 This pin is always the value written to DOUT1 at Base 1 bit 1 Ctr 0 Out Dout 0 J3 pin 44 The function of this pin is determined by OUTOEN Base 10 bit 4 1 Counter 0 output is routed to this pin 0 This pin is controlled by bit DOUTO at Base 1 bit 0 Inputs Extclk Din3 J3 pin 45 This signal may always be read at Base 4 bit 3 It may function as an external clock to control A D conversion timing when CLKEN 1 and CLKSEL 0 in Base 9 Extgate Din2 J3 pin 46 This signal may always be read at Base 4 bit 2 It may function as an external gate to enable and disable A D conversions when GT12EN 1 in Base 10 bit 0 Gate 0 Dini J3 pin 47 This signal may always be read at Base 4 bit 1 It may function as an external gate for Counter 0 when GTOEN 1 in Base 10 bit 2 When used as a gate it is active high meaning that Counter 0 will count as long as it is high and will not count when it is low Cik 0 Din0 J3 pin 48 This signal may always be read at Base 4 bit 0 It may function as an external clock for counter 0 when SRCO 0 in Base 10 bit 1 When used as a clock for Counter 0 the rising edge is active www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 53 17 COUNTER TIMER OPERATION 17 1 Counter Timer Features and Configuration Options Diamond MM 32DX AT emulates an 82C54 counter timer chip providing 3 16 bit cou
18. the board to tell the external circuit when it has read the current input data and when new output data is ready Only Port A may be operated in Mode 1 In all cases the starting resting conditions are Latch input low and Acknowledge output low Mode 1 Input Non Interrupt Operation When the Latch input is brought high Port A will latch the data on the I O header pins and the Acknowledge output will go high The latches are D type flip flops with positive edge triggered clocks so just the rising edge of the Latch signal is used If a second rising edge occurs on the Latch input before the board reads the current data the current data will be overwritten by whatever is then appearing on the input pins The register s input latches are reset upon reading the register After the register has been read the Acknowledge signal goes low to indicate that data has been accepted and new data may be latched Mode 1 Output Non Interrupt Operation When data is written to Port A in mode 1 output the Acknowledge output will go high indicating that new data is available When the Latch input is driven high by the external circuit the Acknowledge output will go low The external circuit may drive the Latch input low anytime after this happens Mode 1 Input Interrupt Operation When the Latch input is brought high Port A will latch the data on the I O header pins the Acknowledge output will go high and an interrupt request will be gene
19. 0 DASIM D A simultaneous update when P2 is set to 0 If DASIM 1 when writing to this register the D A conversion is latched i e the 16 bit or 12 bit value will be loaded into the D A converter but the output will not change until this register is written to again with DASIM set to 0 at which point all latched D A channels written to previously will update Note that this is an enhanced feature If enhanced features are disabled DASIM will always be considered a 0 for backwards compatibility causing D A outputs to update on every write to this register DAGEN If this bit is 1 no data is transferred to the DAC chip This is used in conjunction with the D A waveform generator to store the DAC code that will be written into the waveform memory block If enhanced features are disabled this bit is always considered 0 and the data will be transferred to the DAC chip Base 5 Read Update All D A Channels Reading from this address causes all 4 D A channels to update with the values loaded into their load registers Any channel which has had a new value written to it since the last update command will switch to its new value Any channel which has not had a new value written will maintain its present value without glitching Base 6 Read Write FIFO Depth Register Bit No Name FT8 1 FIFO threshold This is the level at which the board will generate an interrupt request when the FIFO is enabled FIFOEN 1 in Base 7
20. 04 Module With Autocalibration 1 DESCRIPTION DMM 32DX AT is a PC 104 format data acquisition board with a full set of analog and digital I O features It offers 32 analog inputs with 16 bit resolution and programmable input range 250 000 samples per second maximum sampling rate with FIFO operation 4 analog outputs with 16 bit or 12 bit resolution user adjustable analog output ranges 31 lines of digital I O one 32 bit counter timer for A D conversion and interrupt timing and one 16 bit counter timer for general purpose use The DMM 32DX AT is designed to be a fully backwards compatible upgrade for the DMM 32 AT board In addition to all DMM 32 AT features the DMM 32DX AT includes the following upgrades 1024 sample FIFO for A D samples versus 512 samples on DMM 32 AT 1024 sample data buffer for D A waveform generation Software reprogrammable FPGA and dsPIC microcontroller for future feature enhancements Ability to issue commands to DMM 32DX AT through a serial port Patented auto autocalibration feature that provides fully autonomous calibration in hardware BLOCK DIAGRAM PC 104 BUS 1 42 ANALOG 5VA 5 REG DC DC 1 ONVERTER 15V dsPIC 5232 SERIAL AUT O AUTO RS485 3 3V CALBRATION XCVR PORT J10 REG 25 2 5V REG ADDR NTR LADUFLUNTHD m CPLD S lentes FPGA a m 0 31 SE IRG DMA DATA 0 15 DIFF DATA D A NN HQ 1446BITS BUS e DATA ANALOG BUFFER OUTPUTS 03
21. A0 Digital I O port A B7 BO Digital I O port B C7 C0 Digital I O port C Latch Latch control input active high Ack Acknowledge output for interrupt based I O active high RS 232 Rx Tx RS 232 transceiver terminals to communicate with onboard dsPIC RS 485 Rx Tx RS 485 transceiver terminals to communicate with onboard dsPIC 5V Connected to PC 104 bus 5V power supply Dgnd Digital ground connected to PC 104 bus ground Note The operation of digital I O Latch and Ack signals is detailed in Chapter 16 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 8 4 3 Serial I O Header J11 Diamond MM 32DX AT provides a 7 pin right angle friction lock header on the left edge of the board labeled J11 for the auxiliary serial and power connections The serial connections provide an alternate means to communicate with the board instead of the PC 104 bus Only one serial protocol may be used at a time The board will respond to either protocol without any configuration required The serial port may also be used when the board is installed in a PC 104 stack The power pins may be used to provide power to the board in standalone operation not used in a PC 104 stack When the board is installed in a PC 104 stack the 5V pin may be used as a source of 5V for auxiliary devices maximum current 1 Amp but should NOT be used for power input J11 Serial I O Header Vin 5V Digital GND RS 485 RS 485 RS 232
22. AT occupies 16 bytes in the system I O address space Direct register access is not required if you are using the Universal Driver software that ships with the board The driver handles all board access and provides a high level set of functions to simplify programming The information presented here and in the next chapter is intended to provide a detailed description of the board s features and operation as well as for programmers who are not using the Universal Driver software The DMM 32DX AT FPGA I O register map while remaining backwards compatible with the DMM 32 AT offers more features to the user New features that did not exist in the DMM 32 AT are marked boldface or noted as an enhanced feature Registers 12 15 provide a window into several pages for access to additional registers without requiring additional I O address space Page selection is done via control bits in register 8 6 1 I O Map Description Base Write Function Read Function Main Registers 0 Start A D Conversion A D LSB bits 7 0 1 Auxiliary digital output A D MSB bits 15 8 2 A D low channel register A D low channel read back 3 A D high channel register A D high channel read back 4 D A LSB register Auxiliary digital input 5 D A MSB channel register 6 FIFO threshold register FIFO depth register 7 FIFO control register FIFO status register 8 Miscellaneous and page control register Status register 9 Operation control register Operation status reg
23. Bipolar Input Ranges FS full scale voltage e g 5V for 5V range If using a 16 bit signed integer in C Input voltage A D code 32768 x FS Example 5V range selected A D code 17762 Hex 4560 Input voltage 17762 32768 x 5V 2 7103V Example 5V range selected A D code 15008 Hex C560 Input voltage 15008 32768 x 5V 2 2900V If using a 32 bit signed integer in C or unsigned or floating value in C or Basic Input voltage A D code 32768 x FS If input voltage gt FS then input voltage input voltage 2 x FS Example 5V range selected A D code 17762 Hex 4560 Input voltage 17762 32768 x 5V 2 7103V Example 5V range selected A D code 50528 Hex C560 Input voltage 50528 32768 x 5V 7 7100V Since 7 7100V gt 5V we must subtract Input voltage 7 7100V 2 x 5V 2 2900V For Unipolar Input Ranges FS full scale voltage e g 10 for 0 10V range Input voltage A D code 32768 65536 x FS Example 0 10V range selected A D code 17762 Hex 4560 Input voltage 17762 32768 65536 x 10V 7 7103V Note that this is simply the result for the 5V range shifted up by 5V 8 4 Correlation between A D Code and Input Voltage The two tables below illustrate the correlation between the A D code and the corresponding input voltage Use these tables as guides to help think about how to convert between the voltage domain and the A D code domain www di
24. Bit No DOUT2 0 Auxiliary digital output bits on analog I O header J3 Two pins also serve as optional counter outputs based on control register bits at Base 10 DOUT2 J3 pin 42 Counter 2 output when OUT2EN 1 Base 10 bit 5 DOUT1 J3 pin 43 DOUTO J3 pin 44 Counter 0 output when OUTOEN 1 Base 10 bit 4 LED This bit toggles the onboard user LED 1 on 0 off Base 1 Read A D MSB AD15 8 A D data bits 15 8 AD15 is the MSB Base 2 Read Write A D Low Channel Register L4 0 The low channel number setting in the A D channel scan range Channel numbers range from 0 to 31 in single ended mode Writing to this register updates the current channel internal register Base 3 Read Write A D High Channel Register Bit No Name Definitions H4 0 The high channel number setting in the A D channel scan range Channel numbers range from 0 to 31 in single ended mode www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 17 Base 4 Write DAC LSB Bit No Name This register is used to write the lower bits of a 12 bit data value to the D A If data is written to page 7 base 13 then the next time base 5 is written the FPGA will send the data from page 7 base 12 amp 13 to the channel selected by the channel bits in base 5 After one such cycle the FPGA will revert to using base 4 amp 5 written to sin for the D A data until page 7 base 13 is written to again If page 7 base 13 has n
25. CDO 13 I2CBSY PICA4 PICA3 PICA2 PICA1 PICAO 14 ACHOLD PICPRST ACERR ACACT PICBSY 15 PGDR Page 5 D A Waveform Generator Enhanced Feature Page 12 DACA7 DACA6 DACA5 DACA4 DACA3 DACA2 DACA1 DACAO 13 DACA9 DACA8 14 DEPTH3 DEPTH2 DEPTH1 DEPTHO WGCH 1 WGCHO WGSRC1 WGSRCO 15 Page 6 CPLD I O Window Enhanced Feature Page 12 13 This page is a window to the CPLD I O and should not be accessed under normal operation 14 15 Page 7 D A Channel Control Enhanced Feature Page When Enabled by DAC_CONT 12 D A D A D A D A D A D A D A D A BIT 07 BIT 06 BIT 05 BIT 04 BIT 03 BIT 02 BIT 01 BIT 00 13 D A D A D A D A D A D A D A D A BIT 15 BIT 14 BIT 13 BIT 12 BIT 11 BIT 10 BIT 09 BIT 08 14 J DAC J DAC D A D A D A D A D A SZ1 SZ0 JPOVRD FX VR GAIN1 GAINO POL 15 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 16 6 3 I O Map Details This section describes the location and general behavior of specific bits in each I O map register In all register definitions below a bit named X is not defined and serves no function Base 0 Write Start A D Conversion Writing to Base 0 starts an A D conversion unless a conversion is already in progress AD BUSY high The value written does not matter Writing to Base 0 will start an A D conversion even if the board is set up for interrupt DMA or external trigger mode Base 0 Read A D LSB Bit No Name AD7 0 A D data bits 7 0 ADO is the LSB Base 1 Write Auxiliary Digital Output
26. D converter is busy performing an A D conversion this bit is 1 and when the A D converter is idle conversion is done and data is available this bit is O Read the A D data Once the conversion is complete you can read the data back from the A D converter in two 8 bit bytes at Base 0 and Base 1 see page 17 The low byte must be read first The following pseudocode illustrates how to construct the 16 bit A D value from these two bytes LSB read Base Get low 8 bits first MSB read Base 1 Get high 8 bits last Data MSB 256 LSB Combine the 2 bytes into a 16 bit value The final data ranges from 0 to 65535 0 to nies 1 as an unsigned integer This value must be interpreted as a signed integer ranging from 32768 to 32767 As noted above all A D conversions are stored in an on board FIFO which can hold up to 1024 samples in enhanced mode or 512 samples in normal mode Whenever you read A D data you are actually reading it out of the FIFO Therefore you can read each A D sample as soon as it is ready or you can wait until you take a collection of samples up to 1024 maximum and then read them all out in sequence 9 7 Convert the numerical data to a meaningful value Once you have the A D value you need to convert it to a meaningful value The formulas on page 36 show you how to convert the A D data back to the original input voltage You may want to convert it into engineering units afterwards or instead The two conve
27. DMM 32DX AT User Manual 16 Bit Analog I O PC 104 Module with Autocalibration Rev A 03 March 2011 Copyright 2011 Diamond Systems Corporation 555 Ellis Street Mountain View CA 94043 Tel 650 810 2500 www diamondsystems com DMM 32DX AT 16 Bit Analog I O PC 104 Module With Autocalibration TABLE OF CONTENTS 1 DESCRIPTION cos It tete EUR ER UR I Ee ee D wennen ERN C E XEA 4 2 1 ELLE 5 3 DMM 32DX AT BOARD DRAWING zz 5 rre nr re RT ERE DR re SR E re 6 4 I O HEADERS PINOUT AND PIN DESCRIPTION noses oonvensenvenserseeneenensvensenvenvereenveenennvenvenvenveneenvennennvenvenvense 7 41 Analog MO Header JS nr neren i eR e Seen beren ie e He eye bte BA 7 42 Digital VO He der Jf iman i E R ee eed eet ie dehet edis 8 4 3 Seria IO Header ada eee e rer E REPRE 9 3 BOARD CONFIGURATION etie rea re dre ere e edere ied t en eee rib ne 10 5 1 Base Address eR pO T EU E XR ERE ERE FUSE RUNE ERO v Dia cS EUER 10 2 2 Anterrupt level i i eie vinee sabes Fee ee Y Reed Ye y 10 5 3 DIMA level as RT reas eee RR ve tabbed RERUM RERO RENE UAR ETSI EYE TTE S 10 5 4 Single Ended Differential A D Channels eese eee enne ener nennen rennen 11 5 5 JVAXConfiguration n ier E d eye ae ede Meet edem Ra ede d iei eter er 12 5 6 Digital I O Pull Up Pull Down
28. EBUSY 0 The TrimDAC data cannot be read back Page 3 Base 13 Read Write EEPROM TrimDAC Address Register Bit No Name A6 A0 EEPROM TrimDAC address The EEPROM recognizes address 0 127 using address bits A6 AO of this register The TrimDAC only recognizes addresses 0 7 using bits A2 AO In each case remaining address bits will be ignored www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 27 Page 3 Base 14 Write Calibration Control Register This register is used to initiate various commands related to autocalibration More detailed information on autocalibration may be found elsewhere in this manual EE EN EEPROM Enable Writing a 1 to this bit will initiate a transfer to from the EEPROM as indicated by the EE RW bit EE RW Selects read or write operation for the EEPROM 0 Write 1 Read RUNCAL Writing 1 to this bit causes the board to reload the calibration settings from EEPROM CMUXEN Calibration multiplexor enable The cal mux is used to read precision on board reference voltages that are used in the autocalibration process It also can be used to read back the value of analog output 0 1 enable cal mux and disable user analog input channels 0 disable cal mux enable user inputs TDACEN TrimDAC Enable Writing 1 to this bit will initiate a transfer to the TrimDAC used in the autocalibration process Page 3 Base 14 Read Calibration Status Register Bit No Name 0 TDBU
29. GO Read back of control bit described above 6 4 Page 0 82C54 Counter Timer Access This section is included as a reference to the page 0 counter timer registers Behavior of these registers should be identical to the 82C54 counter timer chip Please read reference 12 the 82C54 datasheet for this behavior More info on counter timer signals can be found later in this document Page 0 Base 12 Read Write Counter 0 data CTROD7 0 Counter 0 data Page 0 Base 13 Read Write Counter 1 data CTR1D7 0 Counter 1 data Page 0 Base 14 Read Write Counter 2 data CTR2D7 0 Counter 2 data www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 25 Page 0 Base 15 Read Write Counter timer Control Register SC1 0 Counter Select RW1 0 Read Write Mode M2 0 Timer Mode BCD Binary Coded Decimal Count For more information see the 82C54 Datasheet 6 5 Page 1 82C55 Digital I O Circuit This section is included as a reference to the page 1 82C55 like digital I O registers More info on the behavior of these digital I O signals be found later in this document Page 1 Base 12 Read Write Digital I O Port A Page 1 Base 13 Read Write Digital I O Port B Page 1 Base 14 Read Write Digital I O Port C Page 1 Base 15 Read Write Digital I O Control Register Bit No 1 Bit 7 must be set to 1 This indicates port configure mode in the 8255 as opposed to bit set mode which is not supported
30. INO POL 15 Map Reference Read Base 7 6 5 4 3 2 1 0 Main Registers 0 AD7 AD6 AD5 AD4 AD3 AD2 AD1 ADO 1 AD15 AD14 AD13 AD12 AD11 AD10 AD9 AD8 2 L4 L3 L2 L1 LO 3 H4 H3 H2 H1 HO 4 DACBUSY CALBUSY ACACT USRDEF DIN3 DIN2 DIN1 DINO 5 FD9 6 FD8 FD7 FD6 FD5 FD4 FD3 FD2 FD1 7 EF TF FF OVF FIFOEN SCANEN PAGE1 PAGEO 8 STS S D1 S DO ADCH4 ADCH3 ADCH2 ADCH1 ADCHO 9 ADINT DINT TINT X DMAEN P2 CLKEN CLKSEL 10 FREQ12 FREQO OUT2EN OUTOEN RSVD GTOEN SRCO GT12EN 11 WAIT RSVD SCINT1 SCINTO RANGE ADBU G1 GO Page 0 82C54 Counter Timer Access 12 Ctr0D7 CtrOD6 CtroD5 CtroD4 CtrOD3 CtroD2 CtroD1 13 Ctr1D7 Ctr1D6 Ctr1D5 Ctr1D4 Ctr1D3 Ctr1D2 Ctr1D1 Ctr1DO 14 Ctr2D7 Ctr2D6 Ctr2D5 Ctr2D4 Ctr2D3 Ctr2D2 Ctr2D1 Ctr2D0 15 SC1 SCO RW1 RWO M2 M1 MO BCD www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 15 Page 1 82C55 Type Digital I O 12 A7 A6 A5 A4 A3 A2 Al AO 13 B7 B6 B5 B4 B3 B2 B1 BO 14 C7 C6 C5 C4 C3 C2 C1 CO 15 1 ModeC ModeA DIRA DIRCH ModeB DIRB DIRCL Page 2 FIFO Control Enhanced Feature Page 12 FD9 13 14 15 Page 3 Autocalibration Registers 12 D7 D6 D5 D4 D3 D2 D1 DO 13 A6 A5 A4 A3 A2 Al AO 14 TDBUSY EEBUSY CMUXEN TDACEN 15 FPGA Revision Code Page 4 dsPIC Interface Enhanced Feature Page 12 PICD7 PICD6 PICD5 PICD4 PICD3 PICD2 PICD1 PI
31. LSB less than the full scale reference voltage 13 2 Compute the LSB and MSB values Use the following formulas to compute the LSB and MSB values LSB D A Code AND 255 keep only the low 8 bits MSB int D A code 256 strip off low 8 bits keep 4 high bits Example Output code 1776 LSB 1776 AND 255 240 FO Hex MSB int 1776 256 int 6 9375 6 In other words 1776 6 256 240 13 3 Add the channel number to the MSB The channel no is 0 3 It must be inserted in bits 7 6 of the D A MSB byte written to Base 5 see page 18 Here is an example of how to do it MSB MSB Channel 64 13 4 Set D A Simultaneous Update bit To update the DAC set DASIM bit to 0 This will perform an update of the current channel and all previously latched channels causing a simultaneous update If no other channels were previously latched then this will only update the current channel To latch channel set DASIM bit to 1 To update MSB MSB amp OxDF To latch MSB MSB 32 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 44 13 5 Write the LSB and MSB to the board The LSB is written to Base 4 and the MSB channel no is written to Base 5 If using enhanced features make sure to enable enhanced features before writing to Base 4 and Base 5 13 6 Monitor the DACBUSY status bit DACBUSY 1 for 10uS while the data in registers 4 and 5 are serially shifted into the D A chip After DACBUSY returns to 0 us
32. ModeA C Mode configuration bits These must be set to 0 DIRA DIRB DIRCH DIRCL Direction control bits On ports A and b all the bits in each port must be the same direction On port C the upper half C7 C4 can have a different direction than the lower half C3 CO 0 Output 1 Input www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 26 6 6 Page 2 Expanded FIFO Control This is an enhanced features page It is inaccessible unless enhanced features are enabled Page 1 Base 12 Read Write Expanded FIFO Depth Register Bit No Name FT9 This bit is used when setting the FIFO threshold See the documentation for Base 6 for more information 6 7 Page 3 Autocalibration Registers These registers are used to control the autocalibration process For user software controlled autocalibration as with the DMM 32 AT these registers are used by the Universal Driver software or the users software to manage the calibration process For auto autocalibration the onboard dsPIC microcontroller uses these registers to manage the autocalibration automatically Page 3 Base 12 Read Write EEPROM TrimDAC Data Register Bit No Name D7 0 Calibration data to be read or written to the EEPROM and or TrimDAC During EEPROM or TrimDAC write operations the data written to this register will be written to the selected device During EEPROM read operations this register contains the data to be read from the EEPROM and is valid after E
33. Out Vout 0 3 A D Convert Dout 2 Dout 0 Din 3 Din 0 Extclk Extgate Gate 0 Clk 0 45V Agnd Precision 5V signal for reference only Do not use for power 16 bit standard 12 bit optional analog output channels A D convert signal output can be used to synchronize multiple boards Digital output port with counter timer functions Digital input port with counter timer and external trigger functions External A D trigger input Also used for digital interrupt DINT input Pin to control gating of Ctrs 1 amp 2 for A D timing Pin to control gating of Ctr 0 Input source to Ctr 0 Connected to PC 104 bus power supply Analog ground connected to digital ground at a single point at DC DC converter PS1 on board Dgnd www diamondsystems com DMM 32DX AT User Manual Rev A 03 Digital ground connected to PC 104 bus ground Page 7 4 2 Digital l O Header J4 Diamond MM 32DX AT provides a 34 pin header on the left edge of the board labeled J4 for the 24 8255 type digital I O lines Pin 1 is in the lower left corner J4 Digital I O Header A7 1 2 A6 A5 3 4 A4 A3 5 6 A2 A1 7 8 B7 9 10 B6 B5 13 12 B4 B3 13 14 B2 B1 15 16 BO C7 17 18 C6 C5 19 20 C4 C3 21 22 C2 C1 23 24 CO Latch 25 26 Ack NC 27 28 NC RS 232 Tx 29 30 Rx RS 232 RS 485 Rx Tx 31 32 Rx Tx RS 485 5V 33 34 Dgnd Signal Name Definition A7
34. SY EEBUSYICMUXEN TDAGEN o o o TDBUSY TrimDAC busy indicator 0 User may access TrimDAC 1 TrimDAC is being accessed user must wait EEBUSY EEPROM busy indicator 0 User may access EEPROM 1 EEPROM is being accessed user must wait CMUXEN Calmux enable status 0 Calibration multiplexor is not currently enabled 1 Calibration multiplexor is enabled and may be updated TDACEN TrimDAC enable status 0 TrimDAC is not enabled 1 TrimDAC is enabled and may be updated Page 3 Base 15 Write Advanced Feature Access Register After entering page 3 by setting the Page bits the user must write the value 0xA5 binary 10100101 to this register in order to get access to the EEPROM This helps prevent accidental corruption of the EEPROM contents Once the page is set and this value is written you can make unlimited reads and writes to the EEPROM without resending this key as long as you stay on page 3 Writing OxA6 to this register enables enhanced mode and writing 0xA7 to this register disables enhanced mode The default power on state is disabled Enhanced mode consists of the following e Pages 2 4 5 and 6 are accessible www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 28 Writing 0xA7 to this register disables all enhanced features This is the default power on state Writing OxA7 to this register automatically halts any enhanced feature currently running internally clears all enhanced registers to their default s
35. al Sampling tree e eit ile desen reet rade dn Wieden res 41 11 HOWTO PERFORM A D CONVERSIONS USING INTERRUPTS ns ansenvenvensenseeneenvensenvenvenvenseenennvenvenvenvend 42 12 ANALOG OUTPUT RANGES AND RESOLUTION sn anaenven vennen eneenvenvenvenvensenneenvenvensenvenvenvenveenvenvenvenvenvend 43 2 BLASI 0 ORE En 43 12 2 Resolution renner bate teneatis ede a I ie Remedies e EE 43 12 3 Full Scale Range Selection ce nei e eee tee e e nee dete tdt 43 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 2 13 GENERATING AN ANALOG OUTPUT een eund EE 44 13 1 Compute the D A code for the desired output voltage esee eee 44 13 2 Compute the LSB and MSB values annen robenie 44 13 3 Add the channel number to the sees eene enne nennen rene ene 44 13 4 Set D A Simultaneous Update 44 13 5 Write the LSB and MSB to the board esses enne rennen 45 13 6 Monitor the DACBUSY status 45 14 D A WAVEFORM GENERATOR 46 TAL Description uit de ete etate ete ge RR det 46 14 2 Programming the D A wave form generator eese eee enne enne eene 46 14 3 Endble enhanced features ni tet etre e RI d e tee 46 14 4 Reset D A wave form pointer tee re n
36. amondsystems com DMM 32DX AT User Manual Rev A 03 Page 36 Bipolar Input Ranges A D Code Input voltage formula Input voltage 5V range 32768 Vrs 5 0000V 32767 Ves 1 LSB 4 9998V 1 1 LSB 0 153mV 0 OV 0 0000V 1 1 LSB 0 153mV 32767 Ves 1 LSB 4 9998V Unipolar Input Ranges A D Code Input voltage formula Input voltage 0 10V range 32768 OV 0 0000V 32767 1 LSB Ves 65536 0 153mV 1 Ves 2 1 LSB 4 99985V 0 Veg 2 5 0000V 1 Ves 2 1 LSB 5 00015V 32767 Ves 1 LSB 9 9998V www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 37 9 PERFORMING AN A D CONVERSION 9 ak This chapter describes the steps involved in performing an A D conversion on a selected input channel using direct programming not with the driver software The A D FIFO All A D conversions are stored in an on board FIFO first in first out memory The FIFO can hold up to 1024 samples Each time an A D conversion is finished the data is stored in the FIFO and the FIFO counter increments by 1 Each time you read A D data you are actually reading it out of the FIFO and the FIFO counter decrements by 1 When the FIFO is empty the data read from it is undefined you may continue to read the last sample or you may read all 1s You can read each A D sample as soon as it is ready or you can wait until you take a collection of samples up to 1024 maximum and then read them all out at once To be sure that you are getting o
37. ase 0 will not start an A D conversion Disable hardware clocking for A D A D conversions occur with software command only Hardware clock select enabled only when CLKEN 1 above Internal clock Falling edges on the output of counter timer 2 generate A D conversions Counter 2 is in turn driven by counter 1 which is driven by the clock selected by bit FREQ12 in Base 10 below External trigger Falling edges on the DINS EXTCLK pin on the I O header generate A D conversions Interrupt and A D Clock Status Register Name ADINT www diamondsystems com sour on rr omen oven forse A D interrupt status A D interrupt request has occured No interrupt request Digital interrupt status Digital interrupt request has occured No interrupt request Timer interrupt status Timer interrupt request has occured No interrupt request DMM 32DX AT User Manual Rev A 03 Page 22 DMAEN P2 CLKEN CLKSEL Read back of control register bit defined above Read back of P2 register bit defined at Base 8 write Read back of control register bit defined above Read back of control register bit defined above ADINT DINT and TINT are cleared by writing to INTRST base 8 Base 10 Read Write Counter and Digital I O Configuration Register FREQ12 OUT2EN 1 0 OUTOEN 1 0 RSVD GTOEN GT12EN Input frequency select for the counter 1 2 cascade Input to counter 1 is a 100KHz one hundred not ten frequency derive
38. aveform configuration register Waveform configuration read back Waveform command register Page 6 CPLD I O Window Enhanced Feature Page This page is a window to the CPLD I O This page should not be accessed under normal operation Page 7 D A Channel Control Enhanced Feature Page When Enabled by DAC CONT D A Channel A Control D A Channel A Control D A Channel B Control D A Channel B Control D A Channel C Control D A Channel C Control D A Channel D Control D A Channel D Control 6 2 I O Map Reference Write d 7 6 5 4 3 2 1 0 Main Registers 0 Start A D Conversion 1 LED DOUT2 DOUT1 DOUTO 2 L4 L3 L2 L1 LO 3 H4 H3 H2 H1 HO 4 DA7 DA6 DA5 DA4 DA3 DA2 DA1 DAO 5 DACH1 DACHO DASIM DAGEN DA11 DA10 DA9 DA8 6 FT8 FT7 FT6 FT5 FT4 FT3 FT2 FT1 7 FIFOEN SCANEN FIFORST 8 RESETA RESETD INTRST P2 P1 PO 9 ADINTE DINTE TINTE RSVD1 DMAEN CLKEN CLKSEL 10 FREQ12 FREQO OUT2EN OUTOEN RSVD GTOEN SRCO GT12EN 11 SCINT1 SCINTO RANGE ADBU G1 GO Page 0 82C54 Counter Timer Access 12 Ctr0D7 CtrOD6 CtrOD5 CtroD4 CtrOD3 CtroD2 CtrOD1 13 Ctr1D7 Ctr1D6 Ctr1D5 Ctr1D4 Ctr1D3 Ctr1D2 Ctr1D1 Ctr1DO 14 Ctr2D7 Ctr2D6 Ctr2D5 Ctr2D4 Ctr2D3 Ctr2D2 Ctr2D1 Ctr2DO 15 SC1 SCO RW1 RWO M2 M1 MO BCD Page 1 82C55 Type Digital I O 12 A7 A6 A5 A4 A3 A2 A1 AO 13 B7 B6 B5 B4 B3 B2 B1 BO 14 C7 C6 C5 C4 C3 C2 C1 CO 15 1 ModeC ModeA DIRA DIRCH ModeB DIRB
39. bit must be checked before any calibration or EEPROM operation is attempted This is a copy of the value found at Page 4 Base 14 bit 1 Itis mirrored at this location to provide a page independent means of seeing the AC status since AC uses Page 3 USRDEF User Defined Jumper Input Reports the state of the option jumper signal J USR DEF Base 5 Write DAC MSB Channel No This register is used to write the upper bits of a 12 bit data value to the D A and to select the D A channel If data is written to page 7 base 13 then the next time base 5 is written the FPGA will send the data from page 7 the FPGA w page 7 base base 12 amp 13 to the channel selected by the channel bits in base 5 After one such cycle ill revert to using base 4 amp 5 for the D A data until page 7 base 13 is written to again If 13 has not been written to since the last time base 5 was written then when base 5 is written the FPGA will assemble the D A data packet using the data in base 4 amp 5 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 18 Definitions DA11 8 D A bits 15 8 for the selected output channel DA15 is the MSB for a 16 bit D A output DA13 is the MSB for a 14 bit D A output and DA11 is the MSB for a 12 bit D A output when optional 12 bit D A converter is installed Bits 15 12 are enabled when P2 is set to 1 DACH1 0 Binary number of the D A channel 0 when P2 is set to
40. can Sampling A scan is defined as a quick burst of samples of multiple consecutive channels For example you may want to sample channels 0 15 all at once and repeat the operation each second This would be a scan at a frequency of 1Hz Each time the A D clock occurs software command timer or external trigger all 16 channels are sampled in high speed succession There is a short delay of 4 20 microseconds between each sample in the scan Since each clock pulse causes all channels to be sampled the effective sampling rate for each channel is the same as the programmed rate and the total sampling rate is the programmed sampling rate times the number of channels in the scan range Scan sampling is independent of FIFO operation Either or both can be enabled independently 10 4 Sequential Sampling In sequential sampling each clock pulse results in a single A D conversion on the current channel If the channel range is set to a single channel high channel low channel each conversion is performed on the same input channel If the channel range is set to more than one channel high channel low channel then the channel counter increments to the next channel in the range and the next conversion is performed on that channel When a conversion is performed on the high channel the channel counter resets to the low channel for the next conversion The intervals between all samples are equal Since each clock pulse results in only one channe
41. d and if so bit CLKSEL selects whether it is the output of counter timer 2 or the external clock input at Extclk Din3 on J3 17 3 Counter Timer Access and Programming The emulated 8254 counter timer chip is accessed through page 0 at addresses Base 12 through Base 15 Address 0 on the chip is equivalent to address 12 in the register map etc Before performing any access to the chip you must set the current page to page 0 with the miscellaneous control register at Base 8 to ensure that the proper page is enabled See page 21 for the format of this register Note that writing page bits to the miscellaneous control register will not implement a board reset or interrupt reset operation as long as the two reset bits are left at 0 Also writing a 1 to either reset bit in this register will not change the contents of the page bits The current page may be determined by reading the page bits at Base 7 see page 20 Once you write the proper page value you can read and write to the 82C54 registers www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 54 18 SPECIFICATIONS Analog Inputs Number of inputs A D resolution Input ranges Input bias current Maximum input voltage Overvoltage protection Input Impedance Nonlinearity Conversion rate Conversion trigger Analog Outputs Number of outputs D A resolution Full scale output ranges Output current Settling time Relative accuracy No linearity Output referenc
42. d from the on board 10MHz oscillator Input to counter 1 is 10MHz from the on board oscillator Input frequency select for counter 0 when SRCO 1 bit 1 Input to counter 0 is a 10KHz ten not one hundred frequency derived from the on board 10MHz oscillator Input to counter 0 is 10MHz from the on board oscillator Counter timer 2 output enable Counter 2 output appears on I O header J3 pin 42 OUT 2 DOUT 2 OUT 2 DOUT 2 pin is set by bit DOUT2 at Base 1 Counter timer 0 output enable Counter 0 output appears on I O header J3 pin 44 OUT 0 DOUT 0 OUT 0 DOUT 0 pin is set by bit DOUTO at Base 1 Reserved for future use Counter timer 0 gate enable Gate 0 DIN 1 J3 pin 47 acts as an active high gate for counter timer 0 This pin is connected to a 10KQ pull up resistor Counter timer 0 runs freely with no gating Counter 0 input source Input to Counter 0 is the clock determined by FREQO bit 6 Input to Counter 0 is J3 pin 48 CLK 0 DIN 0 The falling edge is active This pin is connected to a 10KQ pull up resistor Counter timer 1 2 and external trigger gate enable This bit enables gating for A D sampling for both internal and external clocking When J3 pin 46 EXTGATE DIN 2 is low prior to the start of A D conversions A D conversions will not begin until it is brought high trigger mode If the pin is brought low while conversions are occurring conversions will pause until it is brought high gate mode
43. detected is 1 25 or 1 65536 of the full scale input range This smallest change results in an increase or decrease of 1 in the A D code and so this change is referred to as 1 LSB or 1 least significant bit Unipolar and Bipolar Inputs Diamond MM 32DX AT can measure both unipolar positive only and bipolar positive and negative analog voltages The full scale input voltage range depends on the Gain Range and Polarity bit settings in the Analog Configuration Register at Base 11 In front of the A D converter is a programmable gain amplifier that multiplies the input signal before it reaches the A D This gain circuit has the effect of scaling the input voltage range to match the A D converter for better resolution In general you should select the highest gain you can that will allow the A D converter to read the full range of voltages over which your input signals will vary If you pick too high a gain then the A D converter will clip at either the high end or low end and you will not be able to read the full range of voltages on your input signals Input Ranges and Resolution The table below lists the full scale input range for each valid analog input configuration The parameters Polarity Range and Gain are combined to create the value Code which is the value that you must write to the analog configuration register at Base 11 to get the input range shown A total of 9 different input ranges are possible Note that the range pr
44. e Autocalibration Circuits calibrated A D error after calibration D A error after calibration Digital I O Number of lines Handshaking Input voltage Input current Output voltage Output current Auxiliary DIO 32 single ended 16 differential or 16 SE and 8 DI 16 bits 1 65536 of full scale Bipolar 10V 5V 2 5V 1 25V 0 625V Unipolar 0 10V 0 5V 0 2 5V 0 1 25V 100pA max 10V for linear operation 35V on any analog input without damage 10 13 ohms 10 000 Gohms within normal input ranges 3LSB no missing codes 250 000 samples per second max single channel Software command internal pacer clock or external TTL signal 4 16 bits 1 4096 of full scale Fixed Unipolar Fixed Bipolar Programmable 0 5VorO0 10V 2 5V 5V or 10V 0 10V or 10V in 01V steps 5mA max per channel 6uS max to 1 2 LSB 1 LSB 1 LSB monotonic 5V 005V A D all 9 input ranges and D A 2LSB 1LSB 24 using 8255 type circuit Latch input acknowledge output available in 8255 mode 1 configuration Logic 0 0 0V min 0 8V max Logic 1 2 0V min 5 0V max 1uA max Logic 0 0 0V min 0 33V max Logic 1 2 4V min at 15mA load 5 0V max 15 64mA max per line 4 inputs 3 outputs TTL compatible Specifications continued on next page www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 55 Specifications Continued A D Pacer clock Clock sources General purpose Clock sources Interr
45. e ert en o snede ile den edes 46 14 Lateh DIA value iege ire e t dent 46 14 6 Store D A values into etcetera ER OR a a aE aE Re torte 46 4 7 Setup D A wave form SAND ssi sot OR RUE e RR E EO RE p E a 47 14 8 Start D A waveform generator cie e ee ede hd eed be ree Hae Pe eti een 47 Bs JAUTOCAPIBRATION neen epe aee hee RAGA RAL Rain ahd htt 48 16 2 DIGITAET O OPERATION i hennen rn eme pede Pepsi pide opio E er e eem 50 16 1 Main Digital 1 0 on J4 Internal 82C55 Circuit esee eene nennen rennen 50 16 2 Digital VO Configuration Registers i e i ere be re toti derden 51 16 3 Mode 0 MO nva iiie p Ye EL tete veo pre dte aco E R pee 52 16 4 Mode I Digital I O With 52 16 5 Auxiliary Digital I O 09 JI enn OU US 53 17 COUNTER TIMER OPERATION 54 17 1 Counter Timer Features and Configuration Options eese eene nennen nennen rennen 54 17 2 Count er Timer Configuration t ere t e P ORO IUIS SP ro eE PETES eeta EAEE SEEE 54 17 3 Counter Timer Access and Programmi ng eese 54 I8 SPECIFICATIONS zs cese esee demere ee vim EU e CR PEE d e is 55 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 3 DMM 32DX AT 16 Bit Analog VO PC 1
46. e kept at 0 in the data written to this register Base 8 Read A D Status Register STS A D chip status 1 A D conversion or A D scan in progress 0 A D idle S D1 0 Single ended Differential A D input mode indicator S D1 controls the channels 8 15 and 24 31 5 00 controls 0 7 and 16 23 1 Single ended default 0 Differential ADCH4 0 Current A D channel this is the channel currently selected on board and is the channel that will be used for the next A D conversion unless a new value is written to the low channel register www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 21 Base 9 Write Interrupt and A D Clock Control Register Name ADINTE CLKEN CLKSEL 1 Base 9 Read mone mre sevo omen x cue A D interrupt enable Enable A D interrupt operation Disable A D interrupt operation Digital interrupt enable Enable digital I O interrupt operation Disable digital I O interrupt operation Timer 0 interrupt enable Enable counter timer 0 interrupt operation Disable counter timer O interrupt operation Reserved for future use DMA Enable This bit is ignored if enhanced features are disabled See DMA signal definition for more detail on DMA behavior DMA Enabled DMA Disabled Enable hardware clock for A D sampling Enable hardware clock for A D source is selected with CLKSEL bit below NOTE When this bit is 1 software triggers are disabled i e writing to B
47. er polarity to unipolar when 0 or bipolar when 1 See table below D A D A D A Description GAIN1 GAINO POL 0 0 0 5V span 0 to 5V unipolar 0 0 1 5V span 2 5V to 2 5V biplolar 0 1 0 10V span 0 to 10V unipolar 0 1 1 10V span 5V to 5V bipolar 1 0 0 Not Used Sets output to OV 1 0 1 20V span 10V to 10V only 1 1 0 Not Used Sets output to OV 1 1 1 D A converter shut down Page 7 Base 14 Read D A Hardware Jumper Configuration Name J me D A D A D A D A D A SZ1 JPOVRD FX VR GAIN1 GAINO POL J DAC SZ1 Indicates the D A converter size as indicated in the table below J DAC SZ1 Description 0 16 bits 1 12 bits D A JPOVRD Indicates status of the control of the D A converter between the hardware jumper settings of signals D A FX VR J_D A GAIN1 J D A GAINO and J D A POL or the register bits D A FX VR D A GAIN1 D A GAINO and D A POL here in Register 14 When set to 1 use the write contents of this register When set to 0 use the jumpers on the board D A FX VR Set the D A converter reference voltage to variable when 0 or fixed when 1 D A GAIN1 Indicates the D A converter output voltage gain setting See table above D A GAINO Indicates the D A converter output voltage gain setting See table above D A POL Indicates the D A converter polarity is set to unipolar when 0 or bipolar when 1 See table above www diamondsystems com DMM 32DX AT User Manual Rev A 03
48. ers can write to register 4 and 5 Registers 4 and 5 should NOT be written to while DACBUSY 1 If updating multiple channels for simultaneous update repeat steps 1 to 6 Example D A is set to 5V range Set channel 1 to 3 000V 1 Compute D A code Using the bipolar mode formula we compute D A code 3V 5V 2048 2048 3276 8 Round this up to 3277 Binary value 1100 1100 1101 2 Compute LSB and MSB LSB 3277 amp 255 205 Binary value 2 1100 1101 MSB int 3277 256 12 Binary value 1100 3 Add channel number to MSB MSB 12 1 64 76 4 Check DASIM For non simultaneous update DASIM 0 for latching DASIM 1 To update MSB MSB amp OxDF To latch MSB MSB 32 5 Write LSB and MSB to board enable enhanced features if using latching outp Base 8 3 Ahis is for enabling enhanced features Set page bit to 3 outp Base 15 0xA6 enable enhanced features outp Base 4 LSB outp Base 5 MSB 6 Monitor DACBUSY bit Base 4 bit 7 while inp Base 4 amp 0x80 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 45 14 D A WAVEFORM GENERATOR 14 1 Description Page 5 of the upper I O map provides control for the D A waveform generator The D A waveform generator uses an in FPGA memory block of 1024 words to store D A codes The FPGA parses through this memory at a user programmable speed or through manual external trigger while sending codes to the D A converter The generator automa
49. ge of the A D because incorrect measurements will result clipping On DMM 32DX AT the A D full scale voltage range is defined by the RANGE and ADBU bits above To calculate the optimum gain setting select the highest gain that does not allow the input signal to exceed the selected A D range over its entire expected fluctuation range Note that these settings can be changed at any time even between A D conversions so you can tune the board s settings to each input signal Note On power up or system reset the board is configured for A D bipolar mode input range 5V and gain 1 corresponding to all zeroes in this register www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 24 Base 11 Read Analog I O Readback Register WAIT Analog input circuit settling time holdoff indicator 1 The analog input circuit is settling on a new signal and is not yet ready for a new conversion to start this will occur each time you change the channel gain or input range on the board The wait time is approximately 10uS 0 The analog input circuit has settled and a new A D conversion may begin SCINT1 Read back of control bit described above Not available unless enhanced features are enabled SCINTO Read back of control bit described above Not available unless enhanced features are enabled RANGE Read back of control bit described above ADBU Read back of control bit described above G1 Read back of control bit described above
50. ge the contents of the page bits The current page may be determined by reading the page bits at Base 7 see page 20 This digital I O circuit functions like 82C55 in Mode 0 direct I O or Mode 1 latched I O In Mode 1 latch and acknowledge signals are provided Each port A B and C can be programmed for input or output Port C additionally can be split into two halves with each half programmed for a different direction All 24 lines have 10KQ resistors connected to them that can be configured for either pull up or pull down operation with jumper block J8 In addition all lines are buffered by 74FCT245 line drivers between the controller chip and the I O header These line drivers change direction automatically in response to the control word written On power up all ports are set to input mode and can be used as inputs immediately Before using any port as an output the port direction register must be programmed appropriately 82C55 Circuit Register Map Page 1 Base 12 through Base 15 A7 A0 Digital port A B7 BO Digital port B C7 CO0 Digital I O port C Base 15 Configuration register see next page www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 50 16 2 Digital I O Configuration Register The direction control register is programmed by writing to Base 15 using the format below Once you have set the port directions with this register you can read and write to the ports as desired D
51. hannels in rapid succession under software or external control The time between samples in a scan is programmable between 5 to 20 microseconds while the time between scans depends on the software or external trigger and may be very short or very long but is usually less than about 100Hz above this rate use interrupt scans below Used for controlled rate sampling of single channels or multiple channels in round robin fashion where the frequency of sampling must be precise but is relatively slow less than 100Hz The sampling clock comes from the on board counter timer or from an external signal The interval between all A D samples is identical Used for controlled rate sampling a group of channels in low speed mode less than 500Hz per channel Each sampling event consists of a group of channels sampled in rapid succession The time between scans is determined by the sample rate Intended for medium to high speed operation recommended above about 500Hz Can support sampling rates up to the board s maximum of 250 000Hz May also be used at slower rates if desired The sampling clock comes from the on board counter timer or from an external signal Used for high speed sampling of a group of channels where the scan rate is high The sampling clock comes from the on board counter timer or from an external signal www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 40 10 2 FIFO Description Diamond MM 32DX
52. high speeds When the interrupt routine runs it reads multiple samples from the FIFO The interrupt rate is equal to the sample rate divided by the number of samples read each interrupt On Diamond MM 32DX AT this number is programmable using the register at Base 6 The usual value is 1 2 the maximum FIFO depth or 512 samples Therefore the maximum interrupt rate for Diamond MM 32DX AT is reduced to 488 per second easily sustainable on any popular operating system IMPORTANT NOTE If both Scan and FIFO operation are enabled then the interrupt will still occur atthe programmed FIFO threshold and the interrupt routine will read the indicated number or samples and then exit This will happen even if the number of samples is not an integral number of scans For example if you have a scan size of 10 and a FIFO threshold of 256 then the first time the interrupt routine runs it will read 256 samples consisting of 25 full scans of all 10 channels and then 6 samples from the next scan The next time the interrupt routine runs it will read the next 256 samples consisting of the remaining 4 samples from the last scan it started to read the next 25 full scans of 10 samples and then the first 2 samples of the next scan This continues until the interrupt routine ends in either one shot or recycle mode In one shot mode the last time the interrupt routine runs it will read the entire contents of the FIFO so that all data will be made available 10 3 S
53. igital I O Configuration Register Page 1 Base 15 Name Measc Dra oren woe oe oc Definitions 1 Bit 7 must be set to 1 to indicate port mode set operation DirA Direction control for bits A7 AO 0 output 1 input DirB Direction control for bits B7 BO 0 output 1 input DirCL Direction control for bits C3 CO 0 output 1 input DirCH Direction control for bits C7 C4 0 output 1 input ModeA ModeB ModeC I O Mode for each port 0 or 1 Here is a list of common configuration register values Configuration Byte Hex Decimal Port A Port B Port C both halves 9B 155 Input Input Input 92 146 Input Input Output 99 153 Input Output Input 90 144 Input Output Output 8B 139 Output Input Input 82 130 Output Input Output 89 137 Output Output Input 80 128 Output Output Output www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 51 16 3 Mode 0 Digital I O This is the simpler of the two I O modes and works well for most uses In mode 0 the handshaking signals Latch and Ack are not used When reading any port in input mode the data at the I O pins at the time of the read command will be returned 16 4 Mode 1 Digital I O With Handshaking In Mode 1 a Latch input and an Acknowledge output signal are provided for handshaking operation This allows the external circuit to tell the board when new input data is ready or when it has accepted the current output data and it allows
54. imes as desired Diamond Systems also provides sample register level code downloadable at http diamondsystems com files binaries SourceCodeExamples zip Select the input channel or input channel range Diamond MM 32DX AT contains a channel counter circuit that controls which channel will be sampled on each A D conversion command The circuit uses two channel numbers called the low channel and high channel These are stored in registers at Base 2 and Base 3 see page 17 The circuit starts at the low channel and automatically increments after each A D conversion until the high channel is reached When an A D conversion is performed on the high channel the circuit resets to the low channel and starts over again This behavior enables you simplify your software by setting the channel range just once To read continuously from a single channel write the same channel number to both the low channel and high channel registers To read from a series of consecutively numbered channels write the starting channel to Base 2 and the ending channel to Base 3 To read from a group of non consecutive channels you must treat each as a single channel described above www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 38 9 2 9 3 9 4 9 5 9 6 Select the analog input range Select the code from page 35 corresponding to the desired input range and write it to the analog I O control register at Base 11 You only need to wri
55. in Header J7 Configuration Hex Decimal C B A 140 320 Installed Installed Installed 340 832 Installed Installed Open 100 256 Installed Open Installed 180 384 Installed Open Open 200 512 Open Installed Installed 280 640 Open Installed Open 300 768 Open Open Installed Default Setting 380 896 Open Open Open Interrupt level Interrupts are used for hardware I O operations that are independent of normal program flow Diamond MM 32DX AT can be set up to generate interrupts under several circumstances The most common use of interrupts is to transfer A D data from the board to system memory during high speed A D sampling The board can also generate interrupts to transfer digital data into or out of the board as well as at regular intervals according to a programmable timer on the board Individual control bits are used to enable each type of interrupt Jumper block J7 contains pins for selecting the interrupt level To set the desired level install a jumper under that level s IRQ number and also in the R position The R position connects a 1KQ pull down resistor to the selected IRQ line to allow the board to share the IRQ level with another board in the system Note that only one pulldown resistor should be installed on any IRQ level If you have another board in the system using the same IRQ level as Diamond MM 32DX AT and that board has the pulldown resistor already configured then remove the jumper from the R position on J7 DMA
56. interrupt based A D conversions the input voltage range must be the same for all channels Select the input range from the list of codes on page 35 This parameter is set with the function dscADSetSettings prior to calling dscADSamplelnt 3 A D Clock source internal or external For internal clocking the on board 32 bit counter timer is programmed to the desired sample rate For external clocking the signal EXTCLK DIN3 on I O header J3 pin 45 controls sampling Falling edges on this pin will generate A D conversions The signal is edge sensitive so holding it low will generate only one conversion 4 A D conversion rate if using internal clock If internal clocking is selected provide the desired sample rate in Hz as a floating value The maximum sample rate is 250 000 per second maximum A D operating speed and the slowest rate is 000024383Hz 100KHz input 232 or approximately 1 sample every 42 950 seconds approximately 11 9 hours 5 External gating enable You can choose whether to allow an external signal on J3 pin 46 to control the sampling If so then when this signal is high sampling will occur and when it is low sampling will pause External gating works with both internal and external clocking This pin is connected to a 4 7K pull up resistor 6 One shot vs recycle mode In one shot mode the operation occurs one time and then stops and the parameter num conversions determines the number of samples taken I
57. ister 10 Counter timer control register Counter timer control read back 11 Analog configuration register Analog configuration read back Page 0 82C54 Counter Timer Access 12 Counter 0 data Counter 0 data read back 13 Counter 1 data Counter 1 data read back 14 Counter 2 data Counter 2 data read back 15 82C54 control register 82C54 control register read back Page 1 82C55 Type Digital I O 12 Port A Output Port A Input 13 Port B Output Port B Input 14 Port C Output Port C Input 15 DIO control register DIO control register read back Page 2 FIFO Control Enhanced Feature Page 12 Expanded FIFO depth register Expanded FIFO depth read back 13 14 15 Page 3 Autocalibration Registers 12 EEPROWM TrimDAC data latch EEPROM TrimDAC data read back 13 EEPROM TrimDAC address latch EEPROM TrimDAC address read back 14 EEPROM TrimDAC control register EEPROM TrimDAC status register 15 Special features unlock registerO FPGA revision code www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 13 12 13 14 15 12 13 14 15 12 13 14 15 12 13 14 15 Page 4 dsPIC Interface Enhanced Feature Page dsPIC data latch dsPIC data latch dsPIC address latch dsPIC address latch dsPIC control register dsPIC status register dsPIC programming control dsPIC programming status Page 5 D A Waveform Generator Enhanced Feature Page Waveform address latch LSB Waveform address latch LSB Waveform address latch MSB Waveform address latch MSB W
58. l being sampled the effective sampling rate is the programmed sampling rate divided by the number of channels in the channel range www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 41 11 HOW TO PERFORM A D CONVERSIONS USING INTERRUPTS Diamond MM 32 contains the ability to generate hardware interrupts to manage A D conversions Interrupt based A D conversions are used in several situations e High speed sampling e Applications where the sampling rate must be precise e Applications where the sampling rate is based on an external clock The Diamond Systems Universal Driver functions dscADSamplelnt and dscADSetSettings manage all of the required parameters to generate interrupt based A D conversions Below is a checklist to help you configure the function call properly All parameters are passed in the data structure of type DSCAIOINT for function dscADSamplelnt except for the input range 1 A D channel range low channel high channel On Diamond MM 32DX AT the channel numbers range from 0 to 31 Some channel numbers may not be available depending on the single ended differential configuration mode as explained on page 11 During interrupt based A D conversions the channels being sampled must be consecutive in number To sample only a single channel set the low channel and high channel to the same channel number To sample a range of channels set the low and high channels accordingly 2 Input voltage range During
59. m DMM 32DX AT User Manual Rev A 03 Page 19 Base 7 Write FIFO Control Register FIFOEN FIFO enable 1 Enable FIFO operation if interrupts are enabled interrupts will occur when the FIFO hits threshold TF 1 This slows down the interrupt rate dramatically compared to the actual A D sample rate 0 Disable FIFO operation if interrupts are enabled interrupts will occur after each A D conversion SCANEN Scan enable 1 Scan mode enabled FIFO will fill up with data for a single scan and STS will stay high until entire scan is complete if interrupts are enabled interrupts will occur on integral multiples of scans 0 Scan mode disabled The STS bit will correspond directly to the status indicator from the A D converter FIFORST FIFO reset 1 Reset FIFO after this command is issued EF 1 TF 0 FF 0 0 No function See the FIFO chapter later in this manual for a complete description of FIFO operation Base 7 Read FIFO Status Register Bit No EF Empty flag 1 FIFO is empty 0 FIFO is not empty TF Threshold flag 1 FIFO is at or beyond threshold if the FIFO threshold is 256 words this flag is set when the FIFO contains at least 256 words of A D data 0 FIFO is less than threshold FF Full flag 1 FIFO is full the next A D conversion will result in an overflow 0 FIFO is less than full OVF Overflow flag 1 FIFO has overflowed data has been lost This flag is cleared on the next successful A D read 0
60. n be set to 1 at once Bits are processed MSB to LSB The first 1 determines which command is carried out ACHOLD 1 Auto autocal process is disabled Autocalibration must be triggered by software ACREL 1 Auto autocal process is enabled Auto autocalibration will occur whenever the board requires it PICRST 1 Reset dsPIC device This command is normally not needed ACABT 1 Abort any currently running auto autocal operation immediately ACTRIG 1 Initiate an auto autocal process immediately Page 4 Base 14 Read Auto Autocalibration Status Register ACHOLD 1 dsPIC in holdoff mode auto autocal disabled PICPRST 1 dsPIC device present on board ACERR 1 dsPIC detected errors during last Auto autocal process ACACT 1 Auto autocal process currently in progress PICBSY 1 dsPIC busy either with auto autocal or some other activity Details concerning auto autocalibration can be found at in chapter 15 on page 48 Page 4 Base 15 Write dsPIC Programming Register This register is used to control the on board dsPIC microcontroller The dsPIC controls the auto autocalibration process and it also provides the communication link between the board and its serial port The bits in this register are control bits not register bits Only one bit can be set to 1 at once Bits are processed MSB to LSB The first 1 determines which command is carried out PSTART Drive EN_PROG signal low PSTOP Drive EN
61. n recycle mode the operation runs repeatedly until you stop the operation with dscCancelOp In this case the parameter num conversions indicates the size of the memory buffer or array used to store the samples Once the buffer is filled the data is stored starting at the beginning again causing the old data to be overwritten In this situation you only have access to the latest number of samples equal to num conversions and you must read the data out of the buffer before it is overwritten The function dscGetStatus can be used to indicate the current buffer position which is the location at which the next data value will be stored www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 42 12 ANALOG OUTPUT RANGES AND RESOLUTION 12 1 Description Diamond MM 32DX AT uses a four channel 16 bit standard 12 bit optional D A converter DAC to provide four analog outputs A 16 bit DAC can generate output voltages with the precision of a 16 bit binary number The maximum value of a 16 bit binary number is 2 1 or 65535 so the full range of numerical values that you can write to the analog outputs on Diamond MM 32DX AT is 0 65535 or 0 4095 Note In this manual the terms analog output D A and DAC are all used interchangeably to mean the same thing 12 2 Resolution The resolution is the smallest possible change in output voltage For a 16 bit DAC the resolution is 1 2 or 1 65536 of the full scale output
62. nly current A D data be sure to reset the FIFO each time before you start any A D operation This will prevent errors caused by leaving data in from a previous operation To reset the FIFO write a 1 to bit 2 of register 7 see page 20 This bit is not a real register bit instead it triggers a command in the board s controller chip Therefore you do not need to write a 1 and then a 0 just write a 1 However writing to the FIFORST bit affects the values of other bits in this register as well outp Base 7 0x02 resets the FIFO and clears SCANEN and FIFOEN outp Base 7 0x0A resets the FIFO and SCANEN but leaves FIFOEN set Note that this register also contains a FIFO enable bit FIFOEN This bit only has meaning during A D interrupt operations The FIFO is always enabled and is always in use during A D conversions There are seven steps involved in performing an A D conversion Select the input channel or input channel range Select the analog input range Range Polarity and Gain codes Wait for analog input circuit to settle Start an A D conversion on the current channel Wait for the conversion to finish Read the A D data Convert the numerical data to a meaningful value gt If you are going to sample the same channel multiple times or sample multiple consecutive channels with the same input range you only need to perform steps 1 3 once and then you can repeat steps 4 6 or 4 7 as many t
63. nter starts over The threshold must be set in multiples of 64 up to 1024 When the threshold is hit the pointer wraps around and start at the beginning Threshold is set by bits 4 5 6 and 7 at Page 5 Base 14 14 8 Start D A waveform generator Initialize D A waveform output by writing 1 to bit O at Page 5 Base 15 The generator will continue to output the periodic waveform until you disable it www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 47 15 AUTOCALIBRATION Diamond MM 32DX AT features automatic calibration of both analog inputs and outputs The potentiometers which are subject to tampering vibration and maladjustment have been completely eliminated Instead all calibration adjustments are performed using an octal 8 bit TrimDAC and precision low drift reference voltages on the board The optimum TrimDAC values for each input range are stored in an EEPROM and recalled automatically on power up As an upgrade from the DMM 32 AT the DMM 32DX AT now has the A D autocalibration algorithm programmed into the dsPIC featuring a faster autonomous autocalibration To calibrate the board through software a calibration utility program and software driver function enables you to calibrate the analog inputs and outputs at any time for any range and store the settings in the EEPROM This feature dramatically improves the accuracy and reliability of the board since you can calibrate the board as often as desired without wor
64. nter timers Counters 1 and 2 are cascaded together to form a 32 bit counter timer for use as a programmable A D sampling clock The output of counter 1 provides the input for counter 2 and the output of counter 2 is fed to the A D triggering circuit as well as the I O header J3 If not being used for A D sampling these counter timers may be used for other functions Counter timer 0 is always available for user applications The inputs of the counter timers are programmable and the outputs may be routed to the I O header under software control The table below lists the key features of each counter timer Counter Timer Configuration Options Counter Input Gate Output 0 e 10MHz on board e Gate 0 Din 1 J3 pin 47 e Ctr 0 Out Dout 0 J3 pin 44 e 10KHz on board e Clk 0 Din 0 J3 pin 48 1 e 10MHz e Extgate Din 2 J3 pin 46 e Not available to user e 100KHz 2 e Counter 1 out e Extgate Din 2 J3 pin 46 e Ctr 2 Out Dout 2 J3 pin 44 e Used internally for A D sampling control 17 2 Counter Timer Configuration The counter timer configuration is determined by the control register at Base 10 described on page 23 Note that the outputs of counters 0 and 2 are routed to pins on I O header J3 under software control rather than being hardwired Configuring the A D sampling clock is done with the control register at Base 9 described on page 22 Bit CLKEN selects whether the A D hardware clocking is enable
65. ogramming codes 4 5 6 and 7 are invalid and that range codes 9 11 are equivalent to range codes 0 2 Diamond MM 32DX AT Analog Input Ranges Polarit Range Gain Code Full Scale Range Resolution 1 LSB Bipolar 5V 1 0 5V 153 uV Bipolar 5V 2 1 2 5V 76 uV Bipolar 5V 4 2 1 25V 38 uV Bipolar 5V 8 3 0 625V 19 uV Unipolar 5V 1 4 Invalid setting Unipolar 5V 2 5 Invalid setting Unipolar 5V 4 6 Invalid setting Unipolar 5V 8 7 Invalid setting Bipolar 10V 1 8 10V 305 uV Bipolar 10V 2 9 5V 153 uV Bipolar 10V 4 10 2 5V 76 uV Bipolar 10V 8 11 1 25V 38 uV Unipolar 10V 1 12 0 10V 153 uV Unipolar 10V 2 13 0 5V 76 uV Unipolar 10V 4 14 0 2 5V 38 uV Unipolar 10V 8 15 0 1 25V 19 uV www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 35 8 3 A D Conversion Formulas The 16 bit value returned by the A D converter is always a twos complement number ranging from 32768 to 32767 regardless of the input range This is because the input range of the A D is fixed at 10V The input signal is actually magnified and shifted to match this range before it reaches the A D For example for an input range of 0 10V the signal is first shifted down by 5V to 5V and then amplified by 2 to become 10 Therefore two different formulas are needed to convert the A D value back to a voltage one for bipolar ranges and one for unipolar ranges Tables showing the correlation between A D code and input voltage are shown on the following page For
66. ot been ce the last time base 5 was written then when base 5 is written the FPGA will assemble the D A data packet using the data in base 4 amp 5 Definitions DA7 0 Base 4 D A data bits 7 0 for the channel currently being accessed This register is a holding register Writing to it does not affect any D A channel until the MSB is written When the MSB is written see below Base 5 the value written to that register along with the value written to this register are simultaneously written to the D A chip s load register for the selected channel See Base 5 write for more details Read Status Auxiliary digital inputs USROEF Definitions DIN3 0 DINS3 DIN2 DIN1 DINO Auxiliary digital inputs on analog I O header J3 These pins have multiple functions based on control bits at Base 9 and Base 10 J3 pin 45 External A D clock when CLKSEL 1 Base 9 bit 0 J3 pin 46 Gate for counters 1 and 2 when GT12EN 1 Base 10 bit 0 J3 pin 47 Gate for counter 0 when GTOEN 1 Base 10 bit 2 J3 pin 48 Clock for counter 0 when SRCO 1 Base 10 bit1 DACBUSY The D A serial transfer is in progress Do not attempt to write to the D A converters at Base 4 or Base 5 while this bit is high This bit must be checked before any write to these registers CALBUSY Calibration is in progress or EEPROM is being accessed Do not attempt ACACT calibration or EEPROM access while this bit is high This
67. ound pins on the I O header J3 A differential input is a two wire input plus ground that is measured by subtracting the low input from the high input This type of connection offers two advantages It allows for greater noise immunity because the noise which is present in equal amounts and equal phase on both the high and low inputs is subtracted out when the low input is subtracted from the high input and it allows for the signal to float away from ground Normally the ground of the signal source is still connected to the ground on the A D board in order to keep the signal from straying out of the common mode range of the A D board s input circuitry To configure the input channels set jumpers in jumper block J5 according to the table below For safety reasons do not modify J5 while the board is powered on The corresponding channel numbering on the I O header J3 is shown in drawings A D only the first 17 rows are shown the remaining rows are the same as shown on page 7 A D Channel Mode Configuration Header Jumper Settings Configuration Drawing 1 2 3 4 5 6 0 31 SE A In In Out Out Out Out 0 15 DI B Out Out In In In In 0 7 DI 8 15 SE 24 81 SE C Out In In Out In Out 0 7 SE 8 15 DI 16 23 SE D In Out Out
68. rame 0 1 2 codes per frame 1 X 4 codes per frame WGSRC1 0 These two bits combine to choose which trigger source is used to increment the waveform by one frame WGSRC WGSRCO Description 1 0 0 Manual using WGINC 0 1 Counter 0 output 1 0 Counter 1 2 output 1 1 External trigger J3 pin 45 www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 31 Page 5 Base 15 Write Waveform Generator Command Register Bit No Name ee wasr Only one bit be set to 1 at once Bits are processed MSB to LSB The first 1 determines which command is carried out WGSTRT Begin or resume the waveform generator WGPS Pause stop the waveform generator The current position in memory is saved for the next begin resume or can be reset using WGRST WGRST Reset the waveform generator to output from the beginning of the D A code buffer WGINC Force the waveform generator to increment one frame Details concerning D A waveform generator can be found in Chapter 14 on page 46 6 10 Page 6 CPLD I O Window The CPLD I O is an internal device and should not be used under standard operation If more information on this device is required please contact Diamond Systems 6 11 Page 7 D A Output Channel Control Page 7 Base 12 Write D A Output Low Byte SaNa 7 6 5 4 3 2 1 0 Name D A D A D A D A D A D A D A D A BIT 07 BIT 06 BIT 05 BIT 04 BIT 03 BIT 02 BIT 01 BIT 00 D A BIT 07 00 LSB of Da
69. range or 1 2 or 1 4096 of full scale for optional 12 bit D A This smallest change results from an increase or decrease of 1 in the D A code and so this change is referred to as 1 LSB or 1 least significant bit The value of this LSB is calculated as follows 1LSB Maximum voltage swing 65536 16 Bit z Maximum voltage swing 4096 12 Bit The maximum voltage swing is defined as the difference between the highest nominal output voltage and the lowest output voltage For an output range of 0 10V or 5V the maximum voltage swing is 10V Example Output range 5V Maximum voltage swing 10V 1LSB 10V 65536 152 6uV 16 Bit 10V 4096 2 44mV 12 Bit 12 3 Full Scale Range Selection The D A converter chip on Diamond MM 32DX AT requires two references one for the low end and one for the high end of the range The high end can be set to 5V 10V or Programmable and the low end can be either OV for unipolar output ranges or minus the high end voltage See page 12 for information on configuring the D A range All channels are set to the same output range On power up the D A automatically resets to the range and polarity set by the hardware jumpers and with the output voltage set to OV www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 43 13 GENERATING AN ANALOG OUTPUT This chapter describes the steps involved in generating an analog output also called performing a D A conversion on a selected ou
70. rated When the data has been read from within the interrupt routine the Acknowledge signal goes low to indicate that new data may be latched The interrupt routine is responsible for clearing the interrupt request signal from the board by writing a 1 to bit 3 of Base 8 Mode 1 Output Interrupt Operation When data is written to Port A in mode 1 output the Acknowledge output will go high indicating that new data is available After the external devices latches the data it drives the Latch input high causing the Acknowledge output to go low and a new interrupt request to be generated The interrupt routine then writes new data to Port A to restart the cycle Note that in this mode the program should write the first output value to Port A prior to the first interrupt being generated so that the data is available to the external circuit before the first low to high Acknowledge transition At the last interrupt the program has no more data and simply terminates the operation www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 52 16 5 Auxiliary Digital I O on J3 J3 contains 3 digital outputs and 4 digital inputs that can be used for general purpose digital I O or for A D and counter timer functions The operation of these bits is controlled with various bits in two control registers Outputs Ctr 2 Out Dout 2 J3 pin 42 The function of this pin is determined by OUT2EN Base 10 bit 5 1 Counter 2 output is routed to this
71. ration timing 1 16 bit general purpose counter timer Programmable input sources for each counter timer External A D triggering and gating inputs Multiple board synchronization capability using A D convert pulse out and external trigger in Interrupts may be generated by counter timer Miscellaneous Extended temperature 40 C to 85 C operation No trimpots or user adjustments required for calibration Auto autocalibration will automatically adjust the A D without user input Calibration time for all modes is approximately 2 seconds Auto autocalibration of one A D mode using the onboard dsPIC requires approx 0 5 seconds www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 5 3 DMM 32DX AT BOARD DRAWING LN u J73 3 1 11514121110 7 Connectors and Features J1 PC 104 8 bit bus header J2 PC 104 16 bit bus header only used for interrupt level J3 Analog I O header includes trigger and ctr timer signals J4 Digital I O header 5 Analog input single ended differential configuration J6 D A unipolar bipolar full scale range configuration J7 Base address DMA level interrupt level bus width J8 Digital I O pull up pull down configuration J9 Test connector not used in normal operation J10 JTAG programming cable not used in normal operation J11 Auxiliary power serial connector LED User programmable
72. rsions can be done sequentially or the formulas can be combined into a single formula www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 39 10 A D SAMPLING METHODS 10 1 Sampling Modes There are several different A D sampling modes available on Diamond MM 32DX AT The mode in use is selected with the FIFO enable and Scan enable bits at the FIFO control register at Base 7 as well as the A D interrupt enable bit in the Interrupt control register at Base 9 Note that the FIFO should not be enabled if interrupts are not enabled as the FIFO storage is only useful when interrupts are being used and will have no effect otherwise All these features may be selected as arguments to function calls in the driver software The control register details are provided for completeness and for programmers not using the driver SCAN FIFO Interrupt Yes Yes Yes Yes Mode Single conversions Scan conversions Interrupt single conversions low speed Interrupt scans low speed Interrupt single conversions how speed Interrupt scan conversions Description The most basic sampling method Used for low speed sampling typically up to about 100Hz under software control where a precise rate is not required or under external control where the rate is slow Consists of either one channel or multiple channels sampled one at a time Used to sample a group of consecutively numbered c
73. rying about temperature or time drift On the analog outputs the full scale output range is programmable to any voltage up to 10V and the board will calibrate to the programmed range The analog outputs are fed back to the A D converter so that they too can be calibrated without user intervention How it Works The DMM 32DX AT autocalibration circuit uses an octal 8 bit TrimDAC IC to provide small adjustments to the offset and gain at various points in the circuit Four of the DACs are used for the A D calibration and the other four are used for the D A The 8 bit TrimDAC values are stored in an on board EEPROM and are recalled automatically on power up An on board ultra stable 5V reference chip with 5ppm offset drift is used as the voltage reference for all calibration operations From this reference several intermediate values are derived that are used for the calibration One is just under 5V and one is just above OV These values are measured at the factory and their values are stored in the on board EEPROM for use by the calibration program Note that the actual values of the reference signals does not matter as long as they are stable since the calibration routine knows the values and can adjust the calibration circuit to achieve them An extra input multiplexor chip is used to feed the calibration voltages into the A D circuit during the process For bipolar A D calibration first OV is measured and the TrimDAC is adjusted until the
74. software may not interact with the A D circuit When performing regular A D functions users should set ACHOLD bit high to turn off auto autocalibration www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 49 16 DIGITAL I O OPERATION Diamond MM 32DX AT contains two sets of digital I O lines e An internal 82C55 type digital I O circuit provides 24 digital I O lines that emulate the function of Mode 0 of an 8255 chip These lines are buffered to provide extra drive current in output mode and are available on digital I O header J4 on the left side of the board e Analog I O header J3 on the right side of the board contains 4 inputs and 3 outputs that can be used for general purpose DIO as long as they are not used for any special functions 16 1 Main Digital I O on J4 Internal 82C55 Circuit The 82C55 type digital I O circuit is accessed through page 1 at addresses Base 12 through Base 15 Address 0 on the chip is equivalent to address 12 in the register map etc Before performing any access to the digital I O circuit you must set the current page to page 1 with the miscellaneous control register at Base 8 to ensure that the proper page is enabled See page 21 for the format of this register Note that writing page bits to the miscellaneous control register will not implement a board reset or interrupt reset operation as long as the two reset bits are left at Also writing a 1 to either reset bit in this register will not chan
75. ss the feature Details of the D A waveform register map can be found at page 31 There are 6 steps to programming the D A waveform generator 1 Enable enhanced features Reset D A waveform pointer Latch D A value Store D A values into buffer m Fe Setup D A wave form settings 6 Start D A waveform generator 14 3 Enable enhanced features To enable enhanced features please consult page 32 14 4 Reset D A wave form pointer Reset the D A waveform pointer by accessing Page 5 Base 15 bit 2 Writing a 1 to this bit and cause the pointer to start at the beginning address 0 14 5 Latch D A value Procedure for latching a D A value is nearly identical to the formula in chapter 13 Generating An Analog Output page 44 The D A value code must be computed for the desired voltage from that obtain the LSB and MSB add the channel number and set DAGEN bit Write final LSB and MSB to registers 4 and 5 The only difference from the formula in the previous chapter is instead of setting the DASIM bit to 1 set DAGEN bit to 1 By setting the DAGEN bit to 1 the D A value written will be latched to internal memory instead of the DAC chip 14 6 Store D A values into buffer Once the D A code is latched it must be stored in the waveform buffer Set Page to 5 and write the buffer address 0 to 1023 for the latched D A value into Base 12 and 13 When Base 13 is written to the latched D A value at Base 4 and 5 will be loaded and stored in
76. stored in the EEPROM so that the next time power is cycled to the board the values will be loaded automatically www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 48 How to perform autocalibration with software The Universal Driver software provides two functions dscADAutocal and dscDAAutocal that can be called from within a user program to calibrate the board at any time In addition a standalone DOS program DMM32CAL EXE is provided to enable calibration without requiring any programming How to perform autocalibration with dsPIC The Diamond MM 32DX AT has an onboard microprocessor that can perform autocalibration for you automatically The microprocessor can be configured to trigger calibration because of temperature changes or it can be manually triggered by software Temperature triggered auto autocalibration is enabled by writing a 1 to Page 4 Base 14 bit 3 ACREL When this bit is set the Autocal holdoff line is released The dsPIC will monitor temperature changes and autocalibrate the board every 5 C If users want more control over auto autocalibration they can set the ACHOLD bit to stop the temperature trigger this is the default state and use the ACTRIG bit to engage autocalibration when desired While the dsPIC is running auto autocalibration Base 4 bit 5 ACACT will be high Users should monitor this bit whenever they have enabled auto autocalibration While the dsPIC is autocalibrating user
77. ta sent to the D A converter Page 7 Base 13 Write D A Output High Byte 7 6 5 4 3 2 1 0 Name D A D A D A D A D A D A D A D A BIT 15 BIT 14 BIT 13 BIT 12 BIT 11 BIT 10 BIT 09 BIT 08 D A BIT 15 08 MSB of Data sent to the D A converter These registers are used to write 16 bit data to the D A These registers function correctly regardless of whether the installed D A is 12 bits or 16 bits If data is written to page 7 base 13 then the next time base 5 is written the FPGA will send the data from page 7 base 12 amp 13 to the channel selected by the channel bits in base 5 After one such cycle the FPGA will revert to using base 4 amp 5 for the D A data until page 7 base 13 is written to again Page 7 Base 14 Write D A Output Low Byte D A JPOVRD Selects control of the D A converter between the hardware jumper settings of signals J D A FX VR J_D A GAIN1 J D A GAINO and J D A POL or the register bits D A FX VR D A GAIN1 D A GAINO and D A POL here in Register 14 When set to 1 use the contents of this register When set to 0 use the jumpers on board www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 32 D A FX VR Sets the D A converter reference voltage to variable when 0 or fixed when 1 D A GAIN1 Sets the D A converter output voltage gain See table below D A GAINO Sets the D A converter output voltage gain See table below D A POL Sets the D A convert
78. target A D reading is achieved For unipolar calibration the voltage just above 0 is used as the first measurement value Two TrimDAC channels are used for the offset The first channel provides a coarse adjustment to bring the A D readings into range and then the second channel provides a fine adjustment for maximum accuracy The use of both coarse and fine adjustments provides a wider range of total adjustment capability The range of the fine adjustment exceeds the smallest change in the coarse adjustment so there is no gap in the adjustment range After the offset is adjusted the full scale is adjusted in a similar manner The reference value just under 5V is fed into the A D and two additional TrimDACs provide coarse and fine adjustments to achieve the target A D near full scale reading Once the A D is completely calibrated the 16 bit or 12 bit D A channels can be calibrated Unlike the A D circuit which uses a single A D for all input channels the D A circuit actually contains a single D A converter for each of the 4 output channels These channels are fed into the calibration multiplexor and the remaining 4 TrimDAC channels are used to calibrate them in a similar manner to the A D A single adjustment is used for the high reference and both coarse and fine adjustments are used for the low reference The entire process takes about one second for each input range Once it is complete the board is ready to run All 8 TrimDAC values are
79. tate and resets the A D FIFO depth to 512 Page 3 Base 15 Read FPGA Revision Code This register indicates the revision level of the FPGA design This value may change with new revisions of the FPGA so its value cannot be predicted It is provided as a way to distinguish between different versions of FPGA code 6 8 Page 4 dsPIC Interface This is an enhanced features page It is inaccessible unless enhanced features are enabled Page 4 Base 12 Read Write dsPIC Data Register PICD7 0 Data to read write to from the PIC microcontroller The data must be written to this register before the address and read write bit is written to Base 13 below Page 4 Base 13 Write dsPIC Address Register PICR W Read write control O 2 write 1 read PICA4 0 internal address Writing a byte with R W 0 will cause the dsPIC to write the data contained in the dsPIC Data Register above to the dsPIC internal address indicated by PICA4 0 Writing a byte with R W 1 will cause the dsPIC to read the data at dsPIC internal address PICA4 0 and place the received data in the dsPIC Data Register Page 4 Base 13 Read dsPIC status register I2CBSY 12C port status bit 0 Last I2C operation completed 1 Last I2C operation in progress 4 0 dsPIC address last accessed www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 29 Page 4 Base 14 Write Auto Autocalibration Command Register Only one bit ca
80. te to this register if you want to select a different input range from the one used for the previous conversion If all channels will be using the same input range you can configure this register just once at the beginning of your procedure You can read the current value of this register by reading from Base 11 Wait for the analog circuit to settle After changing either the input channel or the input range you must allow the circuit to settle on the new value before performing an A D conversion The settling time is long compared to software execution times so a timer is provided on board to indicate when it is safe to proceed with A D sampling The WAIT bit at Base 11 see page 24 indicates when the circuit is settling and when it is safe to sample the input When WAIT is 1 the board is settling when WAIT is 0 the board is ready for an A D conversion Start an A D conversion on the current channel To generate an A D conversion simply write to Base 0 to start the conversion The value you write does not matter and is ignored Wait for the conversion to finish The A D converter takes about 4 microseconds to complete a conversion If you try to read the A D converter data immediately after starting a conversion you will get invalid data Therefore the A D converter provides a status signal to indicate whether it is busy or idle This signal can be read back as the STS bit in the status register at Base 8 see page 21 When the A
81. tically stops if enhanced features are disabled The generator works in frames A new frame is triggered from a programmable source manual counters external etc For each frame the FPGA sends a programmable 1 2 or 4 number of D A codes from the generator s memory bank straight to the DAC This transfer is done in latched mode and the DAC is updated after all codes in a frame are sent The generator continues this process incrementing through the memory until it reaches the end of the buffer or hits a programmable depth at which point it will wrap back to the beginning of the buffer and continue operation The generator can be paused resumed or reset to the beginning of the memory bank at any time With the use of the memory block the D A waveform generator can output consistent waveforms at a maximum frequency of 100KHz There are four different input sources available for the D A waveform generator manual software trigger counter 0 output counters 1 2 output and external trigger The memory block also allows a programmable depth which when hit will wrap and return to the beginning The threshold ranges from 64 to 1024 and is programmable in multiples of 64 14 2 Programming the D A wave form generator This section details how to program the D A waveform generator through direct I O without using the driver software Please note that the D A waveform generator is an enhanced feature and users must enabled enhanced features to acce
82. to the waveform memory Both the D A output code and D A output channel would be stored www diamondsystems com DMM 32DX AT User Manual Rev A 03 Page 46 14 7 Setup D A wave form settings D A waveform settings include input source number of code per frame and threshold Each can be set individually and in any combination There are four different input sources to choose from manual software trigger counter O output counters 1 2 output and external trigger Manual trigger should be used when the rate is slow or inconsistent and needs be controlled in software Counter 0 output should be used when a consistent rate is desired and counter 1 2 is used for A D interrupts Counter 1 2 should be used when a consistent rate is desired and counter 0 is used for other interrupt functions or if you wantto synchronize the waveform generator to A D interrupt functionality External trigger should be used when an external signal is desired to generate D A waveform Input source is set by bits 0 and 1 on Page 5 Base 14 Number of code per frame determines the number of buffer values that will be output per frame Each code is determined by the value set at its address For example if the codes per frame option is set at 2 the first frame will output the codes at address 0 and 1 then 2 and 3 then 4 and 5 and so on Number of code per frame is set by bits 2 and 3 on Page 5 Base 14 Threshold determines the number of code to output before the poi
83. tput channel using direct programming not with the driver software There are six steps involved in performing a D A conversion Compute the D A output value for the desired output voltage Compute the LSB and MSB values Add the channel number to the MSB Set D A Simultaneous Update bit Write the LSB and MSB to the board Monitor the DACBUSY status bit 13 1 Compute the D A code for the desired output voltage oo PON A different formula is required for bipolar and unipolar output ranges Unipolar Mode D A Formula Output value Output voltage Full scale voltage 65536 Standard 4096 Optional Example Desired output voltage 2 168V full scale voltage 5V unipolar mode 0 5V Output code 2 168V 5V 65536 28416 16 Bit 2 168V 5V 4096 1776 12 Bit Bipolar Mode D A Formula Output value Output voltage Full scale voltage 32768 32768 16 Bit Output voltage Full scale voltage 2048 2048 12 Bit Example Desired output voltage 2 168V full scale voltage 5V bipolar mode 5V 2 168V 5V 32768 32768 18560 16 Bit 2 168V 5V 2048 2048 1160 12 bit Output code Note The DAC cannot generate the actual full scale reference voltage to do so would require an output code of 65536 or 4096 with 12 bit option which is not possible with a 16 bit or 12 bit number The maximum output value is 65535 or 4095 Therefore the maximum possible output voltage is 1
84. upt triggers Connectors J1 J2 J3 J4 Bus Interface Compliance General Power supply Current consumption Operating temperature Operating humidity Weight MTBF RoHS www diamondsystems com Counter Timers and Interrupts 32 bit down counter 2 82C54 counters cascaded 10MHz on board clock oscillator 100KHz derived frequency External signal 16 bit down counter 1 82C54 counter 10MHz on board clock oscillator 10KHz derived frequency External signal End of A D conversion Latch input on digital I O header Timer 0 output gt 104 8 bit bus PC 104 16 bit bus Analog I O Digital I O gt Digital I O Serial Port PC 104 Spec Rev 2 5 Selectable 8 16 bit data bus gt bus slave device DMA supported PCB Dmensions in mm 3 550 90 17 x 3 775 95 89 x 0 062 1 57 5VDC 10 410mA typical 40 C to 85 C 5 to 95 noncondensing 3 40z 96g 58 574 hours Compliant DMM 32DX AT User Manual Rev A 03 Page 56

Download Pdf Manuals

image

Related Search

Related Contents

GE DSC-X600-BK-US-1 User's Manual  user manual  Samsung HG48ED690DB 48" Full HD Smart TV Wi-Fi Black LED TV  Windows Terminal Services for Staff  Memorex PurePlay™    Philips 7FF2CMI MP3 Player User Manual  GP Batteries Super Alkaline SR48  

Copyright © All rights reserved.
Failed to retrieve file