This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TINA-TI or Spice Models
Hello
i am new member and new to DAC101sS101.
i am using DAC101S101 with Arduino SPI but the problem is i am not getting the data at output which has been sent as an input.
forexample through arduino code i am entering SPI.transfer16(oxaa00) which means it should give me output of 4.88*(160/1024)=0.76v
but instead i am getting 3.79v
will this forum helps me to have a test code or something i might be doing wrong.
i will be really thankful.
Hi
Thank You so much for help it was really urgent.
Please find below the required configuration in Proteus 8.Once i set the polarity to SPIMODE-1 which has required characteristics as you mentioned
it is giving me correct output. Decimal 640 means Vout=5*(640/1024)=3.1v. please check and confirm whether it is ok now?
and also if i want to send two different bytes through SPI to DAC how it can be done?
Can you please help me out this issue as well.
i shall be very thankful to you.
Kevin,
i am sorry let me explain the situation.
yes you are right regarding your first question the problem has been solved.
My second question is related to below situation.
I am trying to make SAR ADC with arduino and using DAC101S101.
Please find attached SAR ADC schematic.
and below is my code which i am trying to achieve with help of Arduino and DAC101S101 and a comparator.
for(int i=9; i>=0; i--)
{
SAR = SAR | ((uint16_t)1 << i);
// set current DAC output
digitalWrite(SS, HIGH);
digitalWrite(SS, LOW);
byte mode = 0b00000001; //put the mode number here.
byte firstbyte=(mode << 4)|(SAR>>6); // making it exactly like 2 bits dont care-10 power down mode -10 bits -10 2 bits dont care
byte secondbyte=SAR<<2 ;
SPI.transfer(firstbyte);
SPI.transfer(secondbyte);
digitalWrite(SS, HIGH);
Please correct me if i am sending the data from SAR to DAC wrongly.
Sarmad,
To this point I don't know anything about the SAR ADC or it's output data format so it is not possible for me to provide you any guidance on this translation. If it's a straightforward 16-bit SPI transaction with 16-bits of data then this needs to be shifted such that the bottom 6 LSBs are truncated before it is communicated to the DAC. Given that the 2 LSBs in the SPI transaction to the DAC are don't care bits you could get away with just a 4 bit shift.