# Problem using both SPI library and SD library in Arduino UNO program

**URL:** <https://forum.arduino.cc/t/problem-using-both-spi-library-and-sd-library-in-arduino-uno-program/149775>\
**Category:** Networking, Protocols, and Devices\
**Created:** [March 10, 2013, 8:38pm UTC](https://forum.arduino.cc/t/problem-using-both-spi-library-and-sd-library-in-arduino-uno-program/149775 "2013-03-10T20:38:33Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [March 26, 2013, 9:18pm UTC](https://forum.arduino.cc/t/problem-using-both-spi-library-and-sd-library-in-arduino-uno-program/149775/16 "2013-03-26T21:18:50Z")

</div>

Hi Dave2Satellite - I read your thread with great interest as I am in the same position. In my case I'm using the SD library with an A/D on the SPI line - an LTC1859CG#PBF to be precise. The SD card works fine but the A/D returns all 1's. I placed a data analyzer on the lines and it appears like the SD card is sending garbage on the MISO line after the file is closed and the A/D interprets the garbage as 1's. The A/D still doesn't work properly when I upload a sketch that contains only the A/D and SPI - without the SD stuff. I have to remove power to the arduino to get the A/D working properly by itself with no SD references. Also - if I remove the SD card while the A/D is reading garbage then the A/D starts working magically (the MISO line settles back to normal operation). I went back and tried to implement the SdFat library but it didn't work - same results. You mentioned you only made a few modifications - were any of them to the SdFat library by chance? Any help is greatly appreciated! - -Leah

---

_[View the full topic](https://forum.arduino.cc/t/problem-using-both-spi-library-and-sd-library-in-arduino-uno-program/149775)._
