Diamond Systems 16-Channel 12-Bit Analog Output PC/104 Module Examples Single channel output

Page 17

Examples

Single channel output

Assume channels 0 - 7 are configured for 0-5V. To set channel 0 to 3V, do the following: D/A code is 3V / 5V x 4096 = 2458 (value is rounded to nearest integer)

LSB = 2458 AND 255 = 154

MSB = (2458 AND 3840) / 256 = 9

Step 1. Write 154 to base + 0 (LSB register).

Step 2. Write 0 to base + 2 (Channel register).

Step 3. Write 9 to base + 1 (MSB register). The value 2458 is written to DAC 0. Step 4. Read from base + 0. DAC 0 now outputs 3.000V.

Two channel output

Assume channels 0 - 7 are configured for 0-5V. To set channel 0 to 3.8V and channel 3 to 1.5V, do the following:

D/A code for channel 0 = 3.8 / 5 x 4096 = 3113 LSB = 3113 AND 255 = 41

MSB = (3113 AND 3840) / 256 = 12

D/A code for channel 1 = 1.5 / 5 x 4096 = 1229 LSB = 1229 AND 255 = 205

MSB = (1229 AND 3840) / 256 = 4

Step 1. Write 41 to base + 0 (LSB register).

Step 2. Write 0 to base + 2 (Channel register).

Step 3. Write 12 to base + 1 (MSB register). The value 3113 is written to DAC 0. Step 4. Write 205 to base + 0 (LSB register).

Step 5. Write 0 to base + 2 (Channel register).

Step 6. Write 4 to base + 1 (MSB register). The value 1229 is written to DAC 1.

Step 7. Read from base + 0. DAC 0 and DAC3 are both updated to their new output voltages. All other channels remain at their existing output voltages.

Copyright 2001 Diamond Systems Corp.

Ruby-MM-1612 User Manual V1.1 P. 17

Image 17 Contents
RUBY-MM-1612 Table of Contents Description O Header Pinout Signal Name DefinitionBase Address Board ConfigurationBase Address Configuration Header J5 Position Hex Decimal Adjustable Reference Voltage Analog Output Range ConfigurationOn-Board Reference Full-Scale Voltage Selection Full-Scale VoltageAnalog Output Configuration Header J4 Range RUBY-MM-1612 Board Drawing Base + Write Function Read Function Reset informationRuby-MM-1612 I/O Map Register Definitions Base + 0 or 1, Read Update DACsBase + 0, Write DAC LSB register Base + 1, Write DAC MSB registerBase + 3, Write External trigger register 82C55 Digital I/O Chip Operation Configuration Register82C55 Register Map DefinitionsFull Scale Analog Output Ranges and ResolutionFull Scale 1LSB 10. D/A Code Computation Output Code Explanation Output Voltage for ±5V Range Offset Binary Coding for bipolar output rangesLSB = 1/2048 x Full-Scale Voltage To generate an analog output on one or more channels HOW to Generate AN Analog OutputHardware Update Command Two channel output Examples Single channel outputCalibration Procedure Miscellaneous SpecificationsOrdering Information FeaturesDescription Pinouts82C55A Pin Description Functional DiagramData Bus Buffer 82C55A Functional DescriptionRead/Write and Control Logic Group a and Group B Controls82C55A Mode SelectionOperational Description Ports A, B, and COperating Modes Single Bit Set/Reset Feature FigureInterrupt Control Functions Inte Flip-Flop DefinitionMode 0 Configurations Mode 0 Basic InputMode 0 Basic Output Control Word #4 Control Word #8 IBF Input Buffer Full F/F Input Control Signal DefinitionSTB Strobe Input Intr Interrupt Request Output Control Signal DefinitionBi-Directional Bus I/O Control Signal Definition Mode 2 Strobed Bi-Directional Bus I/OOutput Operations Input OperationsMode Control Word Mode 2 Combinations Current Drive Capability Special Mode Combination ConsiderationsReading Port C Status Figures 15 Applications of the 82C55A