SPI backpack with other SPI devices

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

SPI backpack with other SPI devices

Postby JackSmiling » Fri Apr 13, 2012 3:57 pm

I've been using your lcd backpack, in SPI mode, successfully with Arduino 22. I'm trying to convert over to Uno. I'm using your latest library. I can get your example programs to work. My problem is that I need to interface with more SPI devices than just the backpack in a sketch. When I include the SPI library my sketch, the sketch still compiles and loads but the backpack no longer works.

Looking thru your library, I notice that it looks like you don't use the SPI library for SPI comm. Is there some reason for this. How can i access other SPI devices in the same sketch when accessing your backpack?
JackSmiling
 
Posts: 7
Joined: Tue May 03, 2011 6:05 pm

Re: SPI backpack with other SPI devices

Postby adafruit_support_bill » Sat Apr 14, 2012 5:29 am

There is a tutorial for reading infrared pulse trains from a remote control. These pulses are much shorter that what you are looking at, but the basic principles should apply:
http://www.ladyada.net/learn/sensors/ir.html#ir_remote_signals
User avatar
adafruit_support_bill
 
Posts: 16054
Joined: Sat Feb 07, 2009 9:11 am

Re: SPI backpack with other SPI devices

Postby JackSmiling » Sat Apr 14, 2012 6:23 pm

I went thru this exercise before and forgot. In case anybody is interested - to convert this library to use hardware SPI - you have to #include <SPI.h>, replace shiftOut(_SPIdata, _SPIclock, MSBFIRST,_SPIbuff); with SPI.transfer(_SPIbuff); and finally delete the begin(16,1); from the SPI setup routine. This worked with the old library and it seems to work just fine with the new library and Arduino 1.0
JackSmiling
 
Posts: 7
Joined: Tue May 03, 2011 6:05 pm

Re: SPI backpack with other SPI devices

Postby adafruit_support_bill » Sun Apr 15, 2012 4:54 am

Sorry about the previous post. It was intended for a different thread. :oops:
User avatar
adafruit_support_bill
 
Posts: 16054
Joined: Sat Feb 07, 2009 9:11 am


Return to Glowy things (LCD, LED, TFT, EL) purchased at Adafruit

Who is online

Users browsing this forum: mibignistinly, VeleBookSot and 5 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [103]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[61]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]