Add your comments about the Circuit Note found at http://www.analog.com/en/circuits-from-the-lab/CN0065/vc.html.
Questions or comments about CN0065, leave us your feedback here.
I can't understand how to write/read data to/from AD5422. Functions like
temp=WriteToAD5422(0x560001);
temp=WriteToAD5422(0x551003);
temp=WriteToAD5422(0x020002);
temp=WriteToAD5422(0x00);
returns 0x01000000, 0x03000000, 0x02000000 and 0x00000000 respectively
Hi Natali,
From your commands that you've outlined you are trying to perform the following sequence
1) Reset the part
2) Write to Control Register to enable the output and select the +/- 10V range
3) Issue the readback command to read back from the Control Register
4) Flush the data out on the SDO pin
The first 3 commands are correct. However you must clock out 24 bits as part of the NOP
operation to shift the correct data out. See Figure 3 of the AD5412_5422 datasheet.
Each command to be issued to the part must contain 24 clocks. The only valid data
that will be returned is after you flush the data out after issuing the read command.
So in your case the last data.
I hope this clarifies the read operation.
Regards,
Michael Collins,
PDA Applications
Ah, it's all right/ there where some problems with the board.
Hi Natali,
I have confirmed these instructions here on the bench. So I'd like to find out what our differences are.
So for all commands you mention that you that you give 24 clocks (including the NOP) which is correct.
One NOP is only required. If you send a second NOP all 0's will flush out of the SDO pin.
Let's work with the Control Register Write, Read, Flush
So
1) 0x560001 (Reset)
2) 0x551003
3) 0x020002
4) 0x000000 (should results in data 0xXX1003) flushing out the SDO pin
Similarly for a Data Register Write, Read, Flush
So
1) 0x560001 (Reset)
2) 0x01FFFF
3) 0x020001
4) 0x000000 (should results in data 0xXXFFFF) flushing out the SDO pin
If you are not getting these results from the readback, is your part getting the commands?
Is a write working for you in updating the output for example? Or resetting the part?
Do you have values of current from the part to show that is has been powered up correctly?
Regards,
Michael Collins
PDA Applications
I did voltage output in AD5422. But I can't make current output. I send the next sequense:
WriteToAD5422(0x560001);//reset dac
WriteToAD5422(0x551005);//enable current 4-20mA output
WriteToAD5422(0x01ffff);//write to set current 20 mA
But there is no signsl on output.
What I'm doing wrong?
Hi Natali,
So you are performing a correct write and read to your voltage output.
Now you are trying to perform similar with the Iout.
So your commands are correct.
So what I suggest is that you first perform a readback from the corresponding 4 - 20mA data register.
Next question I have is how do you know it is not operating correctly? What I'd suggest is that you
load I out with 300ohm and measure the voltage across this load resistor.
What may be of benefit to you is a Apps board for this product with a working GUI etc which should
aid in your development and understanding of the part. We can send on of these to you if don't have
one already.
Regards,
Michael Collins
PDA Applications