I am working on dac 0800 interfaced with atmega32. But when I run a simple counter then dac 0800 not give expected output. connection between microcontroller and dac is correct and digital output of microcontroller is also correct. And I am getting all supply properly. Only at +Vref of dac I getting no voltage but before 4.7k resistance it is 5V. And I use 2k on i to v converter in place of 4.7k. My circuit and wave from is attached.So please guide me to solve this.
Code:
/**********************************************************************************************************************************************/
int main(void)
{
unsigned char i=0;
PORTD=0XFF;
DDRD=0XFF;
/* Replace with your application code */
while (1)
{
i=i+1;
if (i>=250)
{
i=0;
}
_delay_ms(50);
PORTD=i;
}
}
I also give fix value by putting "PORTD=254" or "PORTD=128" but on 254 it give full output (this is correct) but on 128 it give 0.7V. So and DSO also show correct voltage level on microcontroller port pins and there is no voltage drop portd pin.Please see the reference voltage pin. As I told I getting 0V on +Vref pin of DAC but before 4.7K it is 5V. So this is correct??