Go Down

Topic: SD card and Arduino Due (Read 495 times) previous topic - next topic


Forgive me for asking a very general question, because I know I should be posting code and the like. However, I have a graphics package that I've developed (github.com/edringel/SSGUI) that works just great on a Teensy 3.6 and fails on a Due clone. The library works by opening a file on an SD card which has configuration information for various screen objects, and then draws them.(The code posted at github would need altering for pins, etc. on a Due or other non-Teensy beast, but the code for a Teensy 3.5 or 3.6 and a pjrc.com 3.5" color graphics TFT screen is mature)
I keep getting a message that the variable SPDR (and some similar items) has not been declared and this failure occurs as the SD library is being compiled.

My initial investigations indicate that the SPDR variable is actually an SPI related variable. Teensy has its own hardware libraries, and AVR has its libraries. I can't seem to find a due specific library for either SD or SPI.

I'm probably not being clear, but if anyone can shed some light on SD/SPI on the due, I'd appreciate it. This is NOT about pin-out; I understand that stuff. This is a library/compilation issue.

Thank you all in advance.


Jul 08, 2018, 06:40 am Last Edit: Jul 08, 2018, 07:09 am by ard_newbie
Did you try the simple example sketch which comes with ths SD library for DUE in Menu>File>Example>SD>ReadWrite ?

An SD library and an SPI library for DUE are "natively" uploaded when you select Arduino DUE board in File>Tools>Type of board.


Excellent suggestion. I'm quite familiar with the AVR, ChipKit, and Teensy flavors and just assumed I could plunge ahead. Ignored my own advice--go back to basics when things don't go according to plan. Thanks!! We'll see how things turn out.

Go Up