hai,
i have to interface ad7796 ic which is Low Power, 16-/24-Bit Sigma-Delta ADC for Bridge Sensors to ATmega 16. The interface is with spi protocol.i am not strong in ATmega. request help from others.
hai,
i have to interface ad7796 ic which is Low Power, 16-/24-Bit Sigma-Delta ADC for Bridge Sensors to ATmega 16. The interface is with spi protocol.i am not strong in ATmega. request help from others.
You need to tell us a bit more about what you are trying to do and where you are stuck.
Are you coding in C or assembler.
Do you have a hardware set up to test.
Is it a commercial project.
Do you have a specification for the code you need to write ot for the performance of the finished article.
Michael Kellett
Sir,
I doing my main project. I have to make the hardware setup for sensing motion of human body. The motion is sensed by using two strain gauges. The output of the strain gauge is connected to the input of ad7796. ad7796 is a Low Power, 16-/24-Bit Sigma-Delta ADC for Bridge Sensors.The output from the ad7796 is connected to the atmega 16. The interfacing of ad7796 and atmega 16 is by using spi protocol. For that i have to write code for spi in embedded C. Sir i need help.
Step 1:
Read the AD7796 data sheet and look carefully at the timing diagrams and digital interface description on pages 17,18 and 19
Read the SPI section of the atMega16 data (page 135 onwards)
Step 2:
Work out what you need to do to the AD7796 registers to make it work the way you want (you'll need to read the whoel data sheet carefully).
Step 3:
High level description of your code
Step 4:
Work out the C functions you will need like write byte to spi, read byte from spi, write x bytes to register y of AD7796, read x bytes from register y of AD7796
Step 5:
Write the code for step 4 and a set of little test functions.(You'll need a debugger to see what results your tests give).
HINT: The atMega16 SPI port leaves control of the SS (slave select) of the SPI port to your code - this is good because as you will see in the AD7796 description it uses SS to tell it when commands start and stop.
If you have any specific problems with any of these steps then ask again.
Michael Kellett
Step 1:
Read the AD7796 data sheet and look carefully at the timing diagrams and digital interface description on pages 17,18 and 19
Read the SPI section of the atMega16 data (page 135 onwards)
Step 2:
Work out what you need to do to the AD7796 registers to make it work the way you want (you'll need to read the whoel data sheet carefully).
Step 3:
High level description of your code
Step 4:
Work out the C functions you will need like write byte to spi, read byte from spi, write x bytes to register y of AD7796, read x bytes from register y of AD7796
Step 5:
Write the code for step 4 and a set of little test functions.(You'll need a debugger to see what results your tests give).
HINT: The atMega16 SPI port leaves control of the SS (slave select) of the SPI port to your code - this is good because as you will see in the AD7796 description it uses SS to tell it when commands start and stop.
If you have any specific problems with any of these steps then ask again.
Michael Kellett
thankyou sir