ATMEL Mega1284P evaluation board avalible

pito,

Sd2PinMap.h has nothing to do with chip select.

You don't need to edit any files for chip select.

It is set in the init call. See the sketch I posted.

@fat16lib: nope, I am not going to edit any file!! One year ago I spent so much time/effort/stress to get my atmega32 and atmega1284p running arduino (bootloader, pinmappings, etc) that I am still under medication (post traumatic stress disorder symptoms..) :wink:

I am not going to edit any file!! One year ago I spent so much time to get my atmega32 and atmega1284p running arduino (bootloader, pinmappings, etc) that I am still under medication (post traumatic stress disorder symptoms..)

I hope this Bobuino project doesn't suffer such a outcome. :smiley:

@fat16lib;

"I think you had SS_PIN wrong. It looks like it should be pin 10 if that is PB4."

PB4 is physical pin 5 (part of SPI group of pins 5-6-7-8), mapped to arduino D10.
Do I use the physical pin, or the mapped pin?

I am leaving work in a couple minutes, hope to try this around 6PM (east coast).

I have not changed other files (undid changes in SD2card.h I think it was), am using stock files with only changes in Sd2PinMap.h.

@lefty, I think I am close! After getting this to work, will get the uSD to work on its own chip select line.
Then will ask about how to select one or the other in a sketch.

"PB4 is physical pin 5 ..mapped to arduino D10" - this is like "at four o'clock the five o'clock tea will be served.." :~

You use the Arduino pin number for SS_PIN.

So this will set the SS pin high in output mode.

pinMode(SS_PIN, OUTPUT);
digitalWrite(SS_PIN, HIGH);

Same for SCK_PIN, MISO_PIN, and MOSI_PIN.

Hello World works!

// Two Wire (aka I2C) ports
uint8_t const SDA_PIN = 23; // C1 23
uint8_t const SCL_PIN = 22; // C0 22

// SPI port
uint8_t const SS_PIN = 10; // physical 5, D 10 SS
uint8_t const MOSI_PIN = 11; // physical 6, D 11 MOSI
uint8_t const MISO_PIN = 12; // physical 7, D 12 MISO
uint8_t const SCK_PIN = 13; // physical 8, D 13 SCK

Thanks very much for all the help :slight_smile: :slight_smile:
Going to try some of the other example now...

Congratulation! :slight_smile:
That's one small step for you, one giant leap for arduino community!
What the bench.pde says?

The thread title has been annoying me for ages - if people now reply to this one then it's spelt right :smiley:

Still nice work on it all.

Full speed Bench test:
Card is 16 GB Sandisk Ultra SDHC, 15 MB/S

Settings: SPI_FULL_SPEED

How do these results look? I have nothing to compare to.
Need to get a uSD card to test the other socket.

Type any character to start
Free RAM: 15252
Type is FAT32
File size 5MB
Starting write test. Please wait up to a minute
Write 150.37 KB/sec

Starting read test. Please wait up to a minute
Read 280.82 KB/sec
Done

Can't run Quickstart - it won't accept a 2 digit ChipSelect entry, it tries using 3 instead of 30.

QuickStart expects line at a time input like the Arduino IDE. If no characters are available after 10 ms it assumes it has read the line.

So I need to type 3-enter-0-enter really quick? :wink:

No, your terminal emulator needs to send line at a time.

The Arduino IDE collects the line in the PC as you type it. When you hit send it sends the characters with no delay between characters. By default it does not send a new line so I just wait for no characters available for 10 ms.

I first waited for a new line but you never see one.

I made QuickStart work with the Arduino defaults so it would be easy for new users.

What are you using for a terminal?

..the speeds seems to be normal, the limitation is the spi_clk speed (max 9MHz on your board) and fcpu, sandisk is the fastest as I can see some results (see http://www.microchip.com/forums/m574511-print.aspx with some nice pictures on comparision of various sdcards vs. fstypes vs. spi speeds, run on pic32 - but the mcu does not matter here)..

I am using the IDE serial monitor.
Must have been the way I typed, as its working now.
Or maybe I needed one more enter to restart when it didn't work.

SdFormatter works!
Kinda disappointed - my "16 GB" card is ony 15.915GB
and only 14.8 GB in "real" gigabytes (2^32 or whatever a G is)

I feel much better about proceeding with the building of up tp 8 more on Sunday (maybe 9, If I have enough parts).

tastewar:

skyjumper:
...The least we can all do is buy one from him!

Sign me up!

If there is a list I would like to be on the list 2!

Mark

@pito,
Are the pins for uSD pretty much the same as SD?
I went out & bought a 2GB uSD card. It works in the adapter it came with in the SD socket, but does not work in the uSD socket.
I am starting to think the eagle library is not correct.

Here's the way the library has the pins - yet on the SD card, the pins are more or less flipped the other way,

You guys ok with just one working SD socket? I am pretty sure the library for the uSD has the pins swapped end for end.

Can anyone confirm?

Here's a blog with definition of the pins.

http://elasticsheep.com/2010/01/reading-an-sd-card-with-an-atmega168/

DE1594.lbr (2.61 KB)