I am a newbie to the world of Arduino, so excuse me for this very basic question.
I am trying to communicate with an external ADC (ADS124S08) and SD card using Arduino UNO. The goal is to read from an analog sensor using the ADC and store data to the SD card. I have connected the ADC, datalogger and the sensor to arduino and reading from the ADC and writing to the SD card works separately without any issue.
I connected MISO, MOSI and SCLK of arduino to the corrosponding pins of SD card and ADC, only the chip select pin different for both the devices (Pin 4 for ADC, 10 for SD card). Please see the sketch in the attachment.
Inside the loop function, if I comment out the 3rd line, which calls the sd card setup- the ADC works fine. But when that function is active, the ADC doesn't work. I am thinking somehow I am messing up while trying to switch the chip select pins. Any help will be appreciated.
ADCONECHANNEL.ino (3.3 KB)