setCalibration()

Description

Sets a fixed voltage offset on a given channel to correct for the AD5754R DAC's bipolar zero error (see datasheet table 2).

The calibration is stored in EEPROM, and will persist even after the device is unplugged.

This function requires Pulse Pal 3 and newer. Earlier models lacked the voltage resolution to make meaningful corrections.

Syntax

setCalibration(channel, voltageOffset)

Parameters

Returns

None

Examples

% 1. This produces a -1mV offset to compensate for the zero code error of channel 3

%    The +1mV offset at 0V was measured with an oscilloscope's Vavg (voltage average) measurement function.


% Before measuring the offest run: 

P.setVoltage(3, 0); % Ensure that the resting voltage of Ch3 is set to 0V


% After measuring the offset, run:

P.setCalibration(3, -0.001);