Go Down

Topic: LCD Display + MicroSD Breakout Board (Read 698 times) previous topic - next topic

evans123

Nov 08, 2012, 08:22 pm Last Edit: Nov 08, 2012, 08:34 pm by evans123 Reason: 1
I have an application which requires both an LCD display and a MicroSD breakout board connected to a arduino nano.

The problem I have is that both of these components require the use of digital pins 11 (MOSI) and 12 (MISO), therefore is it possible to have both of these components in the same circuit and if yes, how would I go about doing it?

I have provided the links to the components below:

http://proto-pic.co.uk/basic-16x2-character-lcd-white-on-black-5v/
http://proto-pic.co.uk/microsd-card-breakout-board/

MichaelMeissner

Add either an i2c or spi backpack to your LCD which will convert the LCD to being a serial device.  Here is a tutorial from ladyada, on the I2C/SPI backpack that they sell: http://learn.adafruit.com/i2c-spi-lcd-backpack.

evans123

Thanks. I think I'll need to use the SPI protocol then as I've got a BMP085 barometric pressure sensor connected using the I2C pins.

MichaelMeissner


Thanks. I think I'll need to use the SPI protocol then as I've got a BMP085 barometric pressure sensor connected using the I2C pins.

Actually you can't.  I believe on the Nano, SPI uses pins 10-13.  However, I2C is a bus, and you can connect multiple devices on the bus, as long as each device has a different address.

evans123



Thanks. I think I'll need to use the SPI protocol then as I've got a BMP085 barometric pressure sensor connected using the I2C pins.

Actually you can't.  I believe on the Nano, SPI uses pins 10-13.  However, I2C is a bus, and you can connect multiple devices on the bus, as long as each device has a different address.


How do you connect multiple devices to the bus?

MichaelMeissner


How do you connect multiple devices to the bus?

I haven't done it myself, but I believe you just connect all of the like wires together (all grounds, all 5 volts, all SDAs, all SCLs).  Because each device has an address, it will only return the data, when the Arduino sends its address over the wire.

LROBBINS

Actually you can connect multiple devices via SPI if they have CS pins, you connect each device to a different digital pin, and your sketch pulls one or the other CS pin down to alternate between the devices.
Ciao,
Lenny

fungus


I have an application which requires both an LCD display and a MicroSD breakout board connected to a arduino nano.

The problem I have is that both of these components require the use of digital pins 11 (MOSI) and 12 (MISO), therefore is it possible to have both of these components in the same circuit and if yes, how would I go about doing it?


Yes. This is what the 'slave select' part of SPI is all about - you select the device you want to talk to out of the multiple devices connected to MOSI/MISO/CLOCK

.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Go Up