Go Down

Topic: ATMEL Mega1284P evaluation board avalible (Read 76 times) previous topic - next topic

CrossRoads

I am running the SDFat Quickstart file.

It starts, I get the messages, I enter my pin #, then nothing happens.
Should I be doing something else?

Quote
SD chip select is the key hardware option.
Common values are:
Arduino Ethernet shield, pin 4
Sparkfun SD shield, pin 8
Adafruit SD shields and modules, pin 10
The default chip select pin number is pin 4

Enter the chip select pin number: 30

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

pito

..you have to add to the  sd2pinmap.h (in the sdfat lib folder) the 1284p definitions..

...for example

//------------------------------------------------------------------------------
#elif defined(__AVR_ATmega1284P__)

// Two Wire (aka I2C) ports
uint8_t const SDA_PIN = 17;
uint8_t const SCL_PIN = 16;

// SPI port
uint8_t const SS_PIN   = 4; //12;
uint8_t const MOSI_PIN = 5; //13;
uint8_t const MISO_PIN = 6; //14;
uint8_t const SCK_PIN  = 7; //15;

static const pin_map_t digitalPinMap[] = {
  {&DDRA, &PINA, &PORTA, 0},  // A0  0   ADC0
  {&DDRA, &PINA,...................


pito

@crossroads: maybe off the topic:
1. which microsdcard socket you use (the TFP09-12-2B ?)
2. the two positioning holes are large enough ?
(looking for the eagle lib part so asking whether it worked fine..).P.

CrossRoads

pito,
Thanks for #351, fat16lib wrote back to me also that sd2pinmap.h would need to change. Will check that out when I get home.  Looks like I need to mimic the contents of what I put in pins_arduino.c (all 32 IO pins ? Or just the 4 pins used for SPI ?)

uSD connecter, I used the Molex connecter that dipmicro sells, they have a library symbol for it also.
http://www.dipmicro.com/store/CON-MICROSD1
"MicroSD/TransFlash push/push connector. This connector is designed for SMT PCB mount, extensive use without mounting may loosen the pins. The free Eagle library provided by Roman Vaughan from Auckland, New Zealand is with his permission available here. " (actual link shows up on page)

Mounted nicely, even tho it was hand soldered (by my wife, very nice touch).  Haven't tried it with a card yet.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

pito

..put there everything as you may see with the other mcu's there..
the sdcard shall then work when connected properly.. those demos wait on "type any character to start" so you have to push the button  :)
Run sdinfo.pde and you may see then what is your card like. In the older sdfat versions there is sdfatbench.pde - it measures the r/w speeds.. I would recommend you to have a look on the examples from older versions of sdfat as well..

Thanks for sdcard socket info, I've seen tons of those sockets on ebay and it seems it is the one I'll order.
P.

Go Up