DAC7612 Digital to Analog converter, only 11 bit resolution
K de Jong
Posts: 154
Hi all,
I have built a prototype with the DAC7612 DA converter.
The datasheet specifies 12 bit resolution, =4096 steps from 0 to 4.095 Volts (1 mVolt each). But I only get out 2048 steps = 2 mVolt for each step.
Below is the routine I use. I have to devide my variable OutDAC by two because of the resolution problem.
WriteDAC:
HIGH LOADDACS
LOW CSDAC
SHIFTOUT Dout,Sclk,MSBFIRST,[noparse][[/noparse]ChDAC\2,(OutDAC/2)\11]
HIGH CSDAC
LOW LOADDACS
RETURN
Also a graph of the DAC output versus time is atached.
Does anybody have a good idea where to find the missing bit ??
Thanks in advance,
Klaus
I have built a prototype with the DAC7612 DA converter.
The datasheet specifies 12 bit resolution, =4096 steps from 0 to 4.095 Volts (1 mVolt each). But I only get out 2048 steps = 2 mVolt for each step.
Below is the routine I use. I have to devide my variable OutDAC by two because of the resolution problem.
WriteDAC:
HIGH LOADDACS
LOW CSDAC
SHIFTOUT Dout,Sclk,MSBFIRST,[noparse][[/noparse]ChDAC\2,(OutDAC/2)\11]
HIGH CSDAC
LOW LOADDACS
RETURN
Also a graph of the DAC output versus time is atached.
Does anybody have a good idea where to find the missing bit ??
Thanks in advance,
Klaus
Comments
SHIFTOUT Dout,Sclk,MSBFIRST,[noparse][[/noparse]ChDAC\2,(OutDAC/2)\12]
Sid
OutDAC VAR Word
ChDAC VAR Nib
OutDAC=0
ChDAC=2
DO
IF OutDAC>4095 THEN OutDAC=0
OutDAC=OutDAC+2
ChDAC=2
IF OutDAC>4095 THEN OutDAC=0
OutDAC=OutDAC+2
ChDAC=2
GOSUB WriteDAC
ChDAC=3
OutDAC=OutDAC-500
GOSUB WriteDAC
OutDAC=OutDAC+500
PAUSE 200
DEBUG CR,DEC OutDAC
LOOP
Klaus