Pages: [1]   Go Down
Author Topic: LCD Display + MicroSD Breakout Board  (Read 667 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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/
« Last Edit: November 08, 2012, 02:34:53 pm by evans123 » Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1857
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1857
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 54
Posts: 1857
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Siena Italia
Offline Offline
Full Member
***
Karma: 2
Posts: 149
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 152
Posts: 5761
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

.
Logged

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

Pages: [1]   Go Up
Jump to: