Created Sun, 08 Dec 2013 16:12:50 +0000 by blackstealth
Sun, 08 Dec 2013 16:12:50 +0000
Using a Chipkit DP32 board, when I compile any built in SD examples, they all produce a compiler error. Tested on both MPIDE 2130626 and the latest MPIDE 20131118.
I then included the mapPps function, but it made no difference.
Sun, 08 Dec 2013 17:01:35 +0000
The SD library is pure evil.
Everything in it is, rather stupidly, hard coded, and it hasn't got anything in there for the DP32.
I have a modified version of the library that uses proper SPI interfacing and the real DSPI device than I have bundled with the chipKIT core of UECIDE. It should work with any hardware SPI device, or any other pins through internal emulated software SPI (using shiftIn / shiftOut).
I'll attach it to this post, but I can't guarantee it'll work in MPIDE - note, you have to modify any sketches to include the DSPI.h library.
Sun, 08 Dec 2013 22:38:10 +0000
Thank you very much majenko, I'll will give it a try. Thanks.
Mon, 09 Dec 2013 02:01:20 +0000
Same issue, trying to set up HW config instead of the default sw spi for a fubarino.
See that you set mega_soft_spi to 0.
Where are you setting the mosi,miso, CD and clk pins ( fubarino has clk on 24, mosi on 25, miso on 26 and CD on 27)
Mon, 09 Dec 2013 16:18:14 +0000
Straight SPI works for me on the DP32 defined as follows:
#define chipBUS_an 11 #define chipBUS_rst 12 #define chipBUS_cs 9 #define chipBUS_sck 7 #define chipBUS_miso 10 #define chipBUS_mosi 18 #define chipBUS_pwm 13 #define chipBUS_rx 6 #define chipBUS_tx 4 #define chipBUS_scl 2 #define chipBUS_sda 3 // #include <LCD5110_Basic.h>
LCD5110 GLCD ( chipBUS_sck, chipBUS_mosi, chipBUS_an, chipBUS_rst, chipBUS_cs );
That is to drive a display but should work fine for any other SPI device.