Analog to Digital Converter with Arduino Uno and ADS7883

Hello, I made my Analog to Digital Converter few hours ago. However, it doesn’t work. It just print 0 all the time. Please give me any suggestion.

I refered the code from here. " " In there, same IC chip and same content.

Here is my code.

#include <SPI.h>

const byte slaveSelectPin = 10; //CS

void setup() {
  digitalWrite(slaveSelectPin,HIGH); //chip active LOW

void loop() {
  long readADC = SpiRead();

long SpiRead(void) {
  byte result;
  byte b;
  result = SPI.transfer(0xFF);
  result <<= 8;
  b = SPI.transfer(0xFF);
  result |= b;
  result = result>>2; 


Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.. :slight_smile:

In the function SpiRead You need to change the variable result from byte to word, unsigned int, or maybe unsigned long.