leostick & sd card

A shrunk down Leonardo-compatible board, thumb drive sized with native USB support. [Product info]
Post Reply
leo_stuck
Posts: 26
Joined: Sun Jun 16, 2013 11:57 pm

leostick & sd card

Post by leo_stuck » Tue Oct 29, 2013 11:44 pm

OK guys are you ready for my next question? After i get all the peripherals sorted i wish to connect an SD card to my leo' ,however it requires MISO, MOSI & SCK (if my memory serves me right) are these the same MISO,MOSI & SCK that appear on the ICSP connections ??
Just thought of another question. I have 2 devices - a 16g accelerometer/gyroscope & an RTC that both require connection to the same 2 pins SDA (?) & CLK (?) any ideas? can they both be connected to the same 2 pins? Apologies for the details being a bit scanty but i forgot to bring my notes & i can't make it back out to civilization for another week or so.

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: leostick & sd card

Post by angusgr » Wed Oct 30, 2013 4:17 am

Hi Leo,
leo_stuck wrote:OK guys are you ready for my next question? After i get all the peripherals sorted i wish to connect an SD card to my leo' ,however it requires MISO, MOSI & SCK (if my memory serves me right) are these the same MISO,MOSI & SCK that appear on the ICSP connections ??
Correct, those are the pins!
leo_stuck wrote: Just thought of another question. I have 2 devices - a 16g accelerometer/gyroscope & an RTC that both require connection to the same 2 pins SDA (?) & CLK (?) any ideas? can they both be connected to the same 2 pins? Apologies for the details being a bit scanty but i forgot to bring my notes & i can't make it back out to civilization for another week or so.
The SDA & SCL (aka CLK, different to SCK used for SPI) pins make up an "i2c bus" also called a "twi bus" (two wire interface) bus. You can connect as many "slave" devices (like your gyro and RTC) to those two pins as you like, as long as they all use different i2c addresses.

You'll need to check the documentation for the devices you have to make sure they're on separate i2c addresses.

On the LeoStick, SDA is pin D2 and SCL is pin D3. This is shown on the schematic but I realised it's not on the specs summary on the LeoStick page, I'll add it on there as well.

Post Reply