Loading...
Pages: [1]   Go Down
Author Topic: Multiple I2C, shields, and Uno Board  (Read 471 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I have picked up a few shields that i need for a project from adafruit:

https://www.adafruit.com/products/255
https://www.adafruit.com/products/94
https://www.adafruit.com/products/714

For a project for much I need to play a sound file on each hour. I had a question about how the pins should be wired here is what each item needs:

RTC
    VCC, GND, SDA, SCL
LCD + buttons
    VCC, GND, SDA, SCL
Wave Shield
    Pins 13, 12, 11, 10, 2, 3, 4 and 5

so the wave shield should be wired to those pins as needed, for the RTC and lcd+ buttons, should i wire both to the SDA (Analog 4) and SCL (Analog 5)? I know they are both I2C interfaces but i wasnt sure if i should just use a Y in the wire and put both in the one pin out on the board.

Nat
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 247
Posts: 16535
Available for Design & Build services
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Waveshield, those look more like SPI pins (10-11-12-13) and not I2C pins. 2,3,4,5 are not I2C either.
I2C is located at A4, A5 on the Uno.

I2C, all devices are wired in parallel with 4.7K pullup resistors. Each device watches for it address to come over the line.
SPI, all devices are wired in parallel for SCK, MISO, MOSI, and each device gets a unique chip select/slave select to know when it is selected.
Logged

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

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

yes, the wave shild does not use I2C so that will be in the digital pins as needed.

the other two divices do use I2C though so to wire them it should look like this:


A4------4.7K pullup resistor-----RTC----4.7K pullup resistor-------lcd+buttons
                                                                                           
A5------4.7K pullup resistor-----RTC----4.7K pullup resistor-------lcd+buttons

(the ------ is the connections, wire)

is this the correct way to wire the pins?

Logged

0
Offline Offline
Edison Member
*
Karma: 6
Posts: 1399
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You only need one pull-up resistor (4k7) per I2C pin: one for A4 and one for A5.
Logged

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

Ah, so like this?


A4------4.7K pullup resistor-----RTC-------lcd+buttons
                                                                                           
A5------4.7K pullup resistor-----RTC-------lcd+buttons
Logged

0
Offline Offline
Edison Member
*
Karma: 6
Posts: 1399
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Each of the 4k7 resistor has one terminal connected to A4/A5 and the other to Vcc.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 247
Posts: 16535
Available for Design & Build services
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


A4------RTC-------lcd+buttons-----4.7K pullup resistor---Vcc (5V typically)
                                                                                           
A5-----RTC--------lcd+buttons-----4.7K pullup resistor---Vcc (5V typically)
Logged

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

Pages: [1]   Go Up
Print
 
Jump to: