Go Down

Topic: (micro)SD card with Nokia LCD Shield possible? (Read 1 time) previous topic - next topic

SpacyRicochet

I'm currently prototyping a mobile gadget that makes use of Nokia LCD Shield (schematics), an 3-axis accelerometer, a light sensor and a Zigbee wireless module. All this on a Duemilanove.
It gets crowded.

Now I want to try to get a proper amount of images on the display and thus I want to have some extra space. I was thinking of adding an SD or microSD (schematics) card reader to the prototype.

My problem is however, that the Nokia shield uses the digital inputs 8-13 and GND and AREF. The Zigbee shield takes up the digital pins 0 and 1. That leaves me with digital pin 2-7 (six in total) to use with the sd card reader. Looking at the schematic for the microSD card, I should be able to to this, since it appears not to need the NC pin connected and the GND can be wired to another ground on the Arduino.

Am I correct in this? Or am I overlooking something? It would be a shame to order the readers and then discovering that it won't fit.

Grumpy_Mike

Quote
Nokia shield uses the digital inputs 8-13 and GND and AREF.

Where do you get the Aref from? I can't see it and there is no reason why it should need it. Also the GND doesn't get used up just because it is connected to one circuit, it should be commoned up to all external circuits.

That being said it matters if the software driving the two devices need any of the functions that are tied to specific pins. Like the SPI or I2C, while these two are buses and can be made to share accross sevral devices you have to make provision (for the SPI) to only enable one device at a time.

So look at the software libraries you are going to use and see how portable the pins are.

SpacyRicochet

Indeed, I just lumped the AREF together with the other pins in that same block. I doesn't appear to use it.

What do you mean with the SP1 and the I2C? I can't seem to find those in the schematics and I'm not well-versed enough yet in embedded programming to know if you're just taking an example.

Looking at the software libraries is something I'm going to have to do. Hopefully I'll be able to figure it out from there. Do you know a good software library for SD card reading?

Grumpy_Mike

Quote
mean with the SP1 and the I2C


SPI (not 1) is Serial Interface Protocol these are mapped out as pins 10 to 13. The can be used either as a straight I/O bit or they can be used to clock data into and out of internal shift registers. This function is hardware based and as such is much faster than anything you could do in software by waggling the line.
The same goes for I2C (pronounced 'eye squared cee') [stands for Inter Integrated Circuit] which is another form of transferring data between devices.

There can be a conflict if the software expects to have these pins all to it's self.

Quote
Do you know a good software library for SD card reading?

The playground is a good place to start:- http://www.arduino.cc/playground/Learning/SDMMC

florinc

Both Nokia LCD shield and SD card shield use SPI (Arduino pins 11, 12, 13). You should be able to use them both in the same time if you use separate CS (chip select), one for each device. For example, use pin 10 as CS for LCD shield and pin 9 as CS for SD card shield. When you want to talk to the LCD shield, set pin 10 low, when you talk to SD card shield, set pin 9 low.
I hope that helps.

SpacyRicochet

Well, I was going to use an SD or microSD breakout board. The amount of shields on my Arduino's would be called overkill if I get another shield.

So it would just be a matter of figuring out whether the Nokia LCD uses digital pins 2-7 (which I believe it doesn't) and whether those pins plus a GND is sufficient to work with the SD reader.

florinc

#6
Aug 06, 2009, 05:58 pm Last Edit: Aug 06, 2009, 05:58 pm by florinc Reason: 1
If you want to use pins 2-7 for the SD card, you would have to modify the SD library as well, and I don't know how difficult that is, but it does not look easy since it uses direct port access (check out mmc.cpp file).

Go Up