Other Parts Discussed in Thread: DAC8581
I used a PIC24FJ128GA to interface with DAC8581, SPI protocol was setup a followed in ccs compiler:
while(1)
{
for(i=0;i<32767;i++)
{output_low(PIN_A7);
spi_write2(i);
delay_ms(1);
output_high(PIN_A7);
}
}
pin CLR was tied to DVDD, while CS is pin RA7, power supply and voltage reference was double checked to make sure everything is corrct. However,instead of getting the saw waveform im simply getting 0 and occasionally square wave(!) at Vout pin. I checked the SCLK pin and CS pin and make sured that there are more tha 16 clocks while cs is active low.
Could anyone tell me what is the problem?