AnsweredAssumed Answered

Ad7787 Questions on setup and usage

Question asked by langster on Jun 19, 2012
Latest reply on Sep 4, 2012 by DanTech

Hi people,

 

I have just bought an AD7787 and am looking to interface it to a Microcontroller.   Does anyone have any example code for getting the device up and running. 

 

I have had a look at the datasheet and there isn't a section with some example code.  I also couldn't find what SPI mode the device is - I'm guessing it's mode 2 (CPOL=1 and CPHA = 0) from the timing diagrams.  What is the Bit order - MSB or LSB first?

 

What I would like is some example code to do the following:

 

1.  Set the SPI Mode, Bit order and SPI clock speed for the AD7787

2.  Set the device up for unipolar operation with the buffer activated.

3.  Read from the AN0 input and display the result in decimal.

 

I am using an Atmel AVR328p with an arduino bootloader as the micro with a 2.5V reference supplied from a REF03. 

 

Cheers

 

Alex

Outcomes