Actually I'm not good at English ;-) trying to ask to you. please understand me :)
I needed connect SD card Shield and TFT LCD Screen to Arduino Micro.
successfully finished compile at source code but when i connect MISO together
it doesn't work. only SS pin is connected separate Pin's to Micro
How can i make it work together to Micro..
i've checked each device perfectly work at Micro
Plese Help me!!
Regards and Thanks
-
So you have determined that they both work properly individually? When it doesn't work, do they both fail to work or only one?Majenko– Majenko2015年12月02日 11:27:14 +00:00Commented Dec 2, 2015 at 11:27
-
yes. i've perfectly check both work properly. it doesn't work both.. when i put MISO pin together.Jin– Jin2015年12月02日 15:02:05 +00:00Commented Dec 2, 2015 at 15:02
-
MISO -> MOSI on the other device, as well as the other way around.TheDoctor– TheDoctor2015年12月26日 20:42:43 +00:00Commented Dec 26, 2015 at 20:42
1 Answer 1
Each SPI device must have a separate device/slave select pin. The device must disconnect (high impedance state) when not selected. The SD shield will have a level shifter. It may not correctly disconnect from MISO.
Depending on what libraries you are using you might also need to check that they set the SPI hardware attributes correctly (clock, mode, etc).
For more help please post code and references to the shields and libraries.
Cheers!
-
i did it. you means do like 'digitalWrite(lcdCS,HIGH)' when i use SD Card Shield right?.. i don't know my code is wrong or not i wonder is this possible to work at the same time two SPI device in Micro??Jin– Jin2015年12月02日 15:20:31 +00:00Commented Dec 2, 2015 at 15:20
-
That is correct but you also need to check that the SD Card Shield does not drive the SPI MISO pin due to level shifter (such as resistors). The same goes for the LCD. It is possible; here is an example sketch, CosaCanvasBMP that loads a BMP file from SD and displays it on a ST7735.Mikael Patel– Mikael Patel2015年12月02日 15:28:05 +00:00Commented Dec 2, 2015 at 15:28