RabbitNet Peripheral Cards
User's Manual
PREV INDEX NEXT


4. D/A Converter Card

Chapter 4 describes the features and the use of the D/A Converter Card, one of the peripheral cards designed for use with the RabbitNet expansion ports on selected Rabbit Semiconductor single-board computers, operator interfaces, and RabbitCore Prototyping Boards.

Figure 27 shows a conceptual view of the D/A Converter Card connected to a master.


Figure 27. A/D Converter Card (Slave) Connected to Master

NOTE The OP7200 master and the RabbitCore Prototyping Boards do not supply any power to the slave.

4.1 Features

4.1.1 Software

The D/A Converter Card is a slave; the master to which it is connected is programmed using version 8.01 or later of Rabbit Semiconductor's Dynamic C. If you are using a BL2500 or an OP7200 as your master with an earlier version of Dynamic C, Rabbit Semiconductor recommends that you upgrade your Dynamic C installation. Contact your authorized Rabbit Semiconductor distributor or your Rabbit Semiconductor Sales Representative for more information on Dynamic C upgrades.

4.2 Connections

Use a straight-through CAT 5/6 Ethernet cable to connect the D/A Converter Card's RJ-45 RabbitNet jack to a RabbitNet port on the master. You may use either port if you are connecting to a master such as the BL2500 that has more than one RabbitNet port.

NOTE The RJ-45 RabbitNet jacks are serial I/O ports for use with a master and a network of peripheral boards. The RabbitNet jacks do not support Ethernet connections.


Figure 28. Connect D/A Converter Card to Master

You will also have to provide two separate DC power supplies to your D/A Converter Card: +5 V and a DCIN of 9-32 V. These power supplies are connected via the polarized friction-lock terminal at header J1. You may assemble a suitable cable using the friction-lock connectors from the Connectivity Kit described in Section 1.1.3. If you are using a BL2500 or BL2600 as your master, you may draw this power from the BL2500 or BL2600 as shown in Figure 28.

When selecting DCIN, note that DCIN must be at least 3 V more than the voltage of the D/A converter output. For example, if AOUT0 is configured for 0-20 V, DCIN must be at least 23 V, otherwise the maximum D/A converter output will be DCIN - 3 V.

NOTE Even if you are not drawing power from a master, you will need to connect the D/A Converter Card ground to the ground on your master. The GND pin on header J3 should be used.

4.2.1 Power Supply

Figure 29 illustrates the assembled friction-lock connector wiring diagram for the power supplies used to supply power to the D/A Converter Card.


Figure 29. Power-Supply Connections

4.3 Pinout

The D/A Converter Card pinouts are shown in Figure 30.


Figure 30. D/A Converter Card Pinouts

4.3.1 Headers

D/A Converter Cards are equipped with one polarized 1 × 9 friction-lock terminals at J4, a 1 × 4 friction-lock terminal at J1 (DCIN and +5 V power supplies), and an RJ-45 RabbitNet jack.

No header is installed at J3, which is used to program the D/A Converter Card at the factory.

4.3.2 Indicator LED

An indicator LED (DS1) located near the header J3 location turns on when the D/A Converter Card is powered up, then goes off when the D/A Converter Card has completed its initialization process and is running. The LED will be on while the D/A Converter Card is receiving a transmission from the master.

4.4 D/A Converter Outputs

Figure 31 shows the D/A converter outputs.


Figure 31. D/A Converter Outputs

The D/A converter outputs are buffered and scaled to provide outputs that are software-configurable for voltage ranges of 0-10 V and 0-20 V. Channels AOUT0 and AOUT1 can also be configured in software to provide output ranges of 0-5 V.

NOTE The D/A converter output voltage depends on the original power-supply voltage, DCIN, which must be at least 3 V more than the voltage of the D/A converter output. For example, if AOUT0 is configured for 0-20 V, DCIN must be at least 23 V, otherwise the maximum D/A converter output will be DCIN - 3 V.

While each D/A converter channel can output up to 10 mA, the total power dissipation by the LM324 op-amp at any instant must be kept below 400 mW, or (400 mW)/(DCIN × 4) mA per channel.

The D/A Converter Card outputs can be updated asynchronously as raw data are processed and written, or they may be updated simultaneously by executing the rn_anaOutStrobe() function call with the opmode parameter in the rn_anaOutConfig() function call set for synchronous operation. Further details are provided in Section 4.5.3, "D/A Converter Card Function Calls."

4.4.1 Calibration

The D/A converter outputs are factory-calibrated for the 0-10 V output range, and typical calibration constants are stored in the flash memory for the other voltage ranges. You may recalibrate the D/A converter outputs at a later time using the rn_anaOutCalib() software function described in Section 4.5.3, "D/A Converter Card Function Calls."

The calibration constants are stored in flash memory in a table form. When you recalibrate your D/A Converter Card, only the calibration constants related to the voltage range you recalibrated will be overwritten.

The DAC_CAL.C sample program illustrates how to perform the calibration and save the calibration data. The sample program is found in the in the SAMPLES\RABBITNET\RN1300 directory. See Section 4.5.2, "Sample Programs," for more information on sample programs and how to use them.

4.5 Software

This section provides the libraries, function calls, and sample programs related to the D/A Converter Card.

4.5.1 Dynamic C Libraries

In addition to the library associated with the master single-board computer such as the BL2500 or OP7200, one other library is needed to provide function calls for the D/A Converter Card.

Functions relevant to RabbitNet peripheral cards in general are described in Section 1.3.4. Other functions applicable to all devices based on Rabbit microprocessors are described in the Dynamic C Function Reference User's Manual.

4.5.2 Sample Programs

Sample programs are provided in the Dynamic C SAMPLES folder.

The various folders contain specific sample programs that illustrate the use of the corresponding Dynamic C libraries. For example, the sample program PONG.C demonstrates the output to the STDIO window.

To run a sample program, open it with the File menu (if it is not still open), then compile and run it by pressing F9 or by selecting Run in the Run menu. The RabbitNet peripheral card must be connected to a master such as the BL2500 with its Demonstration Board connected as explained in the Coyote (BL2500) User's Manual or other user's manual. The BL2500 or other master must be in Program Mode, and must be connected via the programming cable to a PC.

The SAMPLES\RABBITNET\RN1300 subdirectory contains the following sample programs. When running these sample programs, the D/A Converter Card may be connected to either RabbitNet port on a master such as the BL2500 that has two RabbitNet ports. The sample program will use rn_find() and the product RN1300 as the search criteria to first find any D/A Converter Cards connected to the master. The first D/A Converter Card found will run the sample program.


NOTE This sample program must be compiled to flash.



NOTE This sample program must be compiled to flash.



NOTE The calibration constants set at the factory will be overwritten when you run this sample program.

4.5.3 D/A Converter Card Function Calls

int rn_anaOutConfig(int handle, char config, int opmode, int reserved);


Configures the D/A Converter Card to the desired voltage range. Once the D/A Converter Card has been configured, use rn_anaOut(), rn_anaOutVolts(), and rn_anaOutStrobe() to control the D/A Converter Card outputs.
Parameters
handle is an address index to device information. Use rn_device() or rn_find() to establish the handle.
config is a configuration code used to set the voltage ranges for the D/A Converter Card channels. Make sure that the DCIN for the D/A Converter Card is at least 3 V more than the maximum voltage of the D/A converter output voltage range you will be selecting.
Configuration Code Voltage Ranges
Channels 0-1 Channels 2-7
0
0-2.5 V
0-10 V
1
0-5 V
0-10 V
21
0-10 V
0-10 V
3
0-5 V
0-20 V
4
0-10 V
0-20 V
5
0-20 V
0-20 V
1 Default setting after reset


opmode is the mode of operation
0 = asynchronous--outputs are updated at the time raw data are written (default mode after reset)
1 = synchronous--outputs are updated when rn_anaOutStrobe is executed
reserved is reserved for future use. Set to 0.
Return Value
The status byte from the previous command. -1 means that device information indicates the D/A Converter Card is not connected to the master.
See Also

int rn_anaOut(int handle, int channel, int rawdata, int reserved);


Sets an analog output channel to a voltage that corresponds to the raw data value.
If the D/A Converter Card is set to the asynchronous mode of operation (the default mode), the output channel will be updated at the time the raw data are being written.
If the D/A Converter Card is set to the synchronous mode of operation, all the D/A converter outputs will be updated with the raw data values previously written (or default value of zero) when the rn_anaOutStrobe function is executed.
The voltage range of the D/A converter outputs will be 0-10 V (default) or one of the other voltage range options previously set with the rn_anaInConfig() function. Make sure that the DCIN for the D/A Converter Card is at least 3 V more than the maximum voltage of the D/A converter output voltage range you will be selecting.
Configuration Code Voltage Ranges
Channels 0-1 Channels 2-7
0
0-2.5 V
0-10 V
1
0-5 V
0-10 V
21
0-10 V
0-10 V
3
0-5 V
0-20 V
4
0-10 V
0-20 V
5
0-20 V
0-20 V
1 Default setting after reset


Parameters
handle is an address index to device information. Use rn_device() or rn_find() to establish the handle.
channel is the channel number (0 to 7) corresponding to AOUT0-AOUT7
rawdata is the raw-data value (2 bytes)
reserved is reserved for future use. Set to 0.
Return Value
The status byte from the previous command and a return pointer to the raw input data. -1 means that device information indicates the D/A Converter Card is not connected to the master.
See Also

int rn_anaOutVolts(int handle, int channel, float voltage, struct rn_dacCalTable *tables, int reserved);


Sets an analog output channel to a voltage using previously set calibration constants to obtain the desired voltage. Remember to run the rn_anaOutRdCalib() function before executing this function so the calibration table will contain valid data. Here's an example.
If the D/A Converter Card is set to the asynchronous mode of operation (the default mode), the output channel will be updated at the time the raw data are being written.
If the D/A Converter Card is set to the synchronous mode of operation, all the D/A converter outputs will be updated with the raw data values previously written (or default value of zero) when the rn_anaOutStrobe function is executed.
The voltage range of the D/A converter outputs will be 0-10 V (default) or one of the other voltage range options previously set with the rn_anaInConfig() function. Make sure that the DCIN for the D/A Converter Card is at least 3 V more than the maximum voltage of the D/A converter output voltage range you will be selecting.
Configuration Code Voltage Ranges
Channels 0-1 Channels 2-7
0
0-2.5 V
0-10 V
1
0-5 V
0-10 V
21
0-10 V
0-10 V
3
0-5 V
0-20 V
4
0-10 V
0-20 V
5
0-20 V
0-20 V
1 Default setting after reset


Parameters
handle is an address index to device information. Use rn_device() or rn_find() to establish the handle.
channel is the channel number (0 to 7) corresponding to AOUT0-AOUT7
voltage is the desired output voltage, which must be less than or equal to the maximum voltage in the voltage range specified by the rn_anaInConfig() function
rn_dacCalTable *tables is a pointer to a table structure that contains the calibration constants for channels 0-7 for the selected mode
reserved is reserved for future use. Set to 0.
Return Value
The status byte from the previous command and a return pointer to the voltage input data. -1 means that device information indicates the D/A Converter Card is not connected to the master.
See Also

int rn_anaOutStrobe(int handle, int reserved);


Strobes the D/A Converter Card to update all the D/A converter outputs with the raw data values previously written (or a default value of zero).

NOTE This function is only valid if the D/A Converter Card is set to the synchronous mode of operation using the rn_anaOutConfig function call.

Parameters
handle is an address index to device information. Use rn_device() or rn_find() to establish the handle.
reserved is reserved for future use. Set to 0.
Return Value
The status byte from the previous command and a return pointer to the voltage input data. -1 means that device information indicates the D/A Converter Card is not connected to the master.
See Also

int rn_anaOutCalib(int channel, int value1, float volts1, int value2, float volts2, DacCal *table, int reserved);


Calibrates the response of the desired analog output channel as a linear function using the two conversion points provided. Values are calculated and the results are sent to the analog output device using the function anaOutWrCalib().
Each channel will have the following information:
linear constant or gain
voltage offset

NOTE Typical calibration constants are loaded at the factory. This function should be used when you need more precise calibration or recalibration, or the calibration constants in the device were corrupted.

Parameters
channel is the channel number (0 to 7) corresponding to AOUT0-AOUT7
value1 is the first raw analog output value (0-4095)
volts1 is the voltage corresponding to the first output value
value2 is the second raw analog output value (0-4095)
volts2 is the voltage corresponding to the second output value
DacCal *table is a pointer to a table structure that contains the calibration constants
reserved is reserved for future use. Set to 0.
Return Value
0, if successful.
-1 if not able to make calibration constants.
See Also

int rn_anaOutWrCalib(int handle, int channel, DacCal *table, int reserved);


Writes the calibration constants, gain, and offset previously calculated by rn_anaOutCalib() into the device flash memory.

NOTE Typical calibration constants are loaded at the factory. This function should be used when you need more precise calibration or recalibration, or the calibration constants in the device were corrupted.

Parameters
handle is an address index to device information. Use rn_device() or rn_find() to establish the handle.
channel is the channel number (0 to 7) corresponding to AOUT0-AOUT7
DacCal *table is a pointer to a table structure that contains the calibration constants
reserved is reserved for future use. Set to 0.
Return Value
The status byte from the previous command and a return pointer to the raw input data. -1 means that device information indicates the D/A Converter Card is not connected to the master.
See Also

int rn_anaOutRdCalib(int handle, int channel, DacCal *table, int reserved);


Reads the calibration constants, gain, and offset into a calibration descriptor table rn_dacCalTable.
Parameters
handle is an address index to device information. Use rn_device() or rn_find() to establish the handle.
channel is the channel number (0 to 7) corresponding to AOUT0-AOUT7
DacCal *table is a pointer to a table structure that contains the calibration constants
reserved is reserved for future use. Set to 0.
Return Value
The status byte from the previous command and a return pointer to the raw input data. -1 means that device information indicates the D/A Converter Card is not connected to the master.
See Also

4.5.4 Status Byte

Section 1.3.5 provides information on the status bytes returned by various function calls.

4.6 Specifications

4.6.1 Electrical and Mechanical Specifications

Figure 32 shows the mechanical dimensions for the D/A Converter Card.


Figure 32. D/A Converter Card Dimensions

NOTE All diagram and graphic measurements are in inches followed by millimeters enclosed in parentheses.

Table 9 lists the electrical, mechanical, and environmental specifications for the D/A Converter Card.

Table 9. D/A Converter Card Specifications 
Feature Specification
Analog Outputs
8 channels of 12-bit analog outputs, 8 W output impedance, 2.5 kHz update rate

  • software-controlled output-voltage ranges:
    0-2.5 V, 0-5 V, 0-10 V, 0-20 V DC (channels AOUT0-AOUT1)
    0-10 V, 0-20 V DC (channels AOUT2-AOUT7)

RabbitNet™ Serial Port
RS-422 SPI, 1 Mbits/s
Power
Vcc: +5 V DC, 20 mA
DCIN: 9-32 V, 100 mA
Temperature
-40°C to +85°C
Humidity
5% to 95%, noncondensing
Connectors
Friction-lock connectors:
one polarized 9-position terminals with 0.1" pitch
one 4-position terminal with 0.156" pitch
One RJ-45 RabbitNet™ jack
Board Size
1.97" × 3.94" × 0.67"
(50 mm × 100 mm × 17 mm)

4.6.2 Physical Mounting

Figure 33 shows position information to assist with interfacing other boards with the D/A Converter Card.


Figure 33. User Board Footprint for D/A Converter Card

Rabbit Semiconductor
www.rabbit.com
PREV INDEX NEXT