Arduino issues using multiple shields

Electronics related to CNC

Arduino issues using multiple shields

Postby gfc62 » Thu Dec 06, 2012 11:02 pm

All,

Hope this isn't too far off topic, it is Arduino-related but not a CNC application.

I'm working on a project using an Arduino Uno, a Sparkfun micro SD shield and Ocean Controls thermocouple mux shield.

I am able to get each working independently, the SD shield with a sample program and the KTA-259 with my own program. When I stack both shields on the arduino my KTA-259 program still works fine, but the sample program for the Sparkfun SD shield does nothing when the other shield is installed.

Even if no one out there has used these same two shields together I'm hoping someone has worked through a similar problem with two other shields. Any ideas? Is using multiple shields more complicated if both are using SPI? What should I look for?

Gordon
gfc62
 
Posts: 4
Joined: Wed Jul 28, 2010 5:52 pm

Re: Arduino issues using multiple shields

Postby cvoinescu » Fri Dec 07, 2012 12:01 am

More than one shield using SPI is usually fine, as long as they use different pins for select (CS). If both are fighting for the same pin, they won't work together. I don't know about these particular shields, but on some shields you have a choice of which pin to use as a select (and a jumper or two to change it), on some you don't. For instance, the Ethernet shield uses pin 4 as select for the SD card and pin 10 as select for the Ethernet, and they are fixed. If want to add another shield that requires one of those pins, you're out of luck. Of course, you can cut a pin on the upper shield and wire it to a different one, and change the code to use that for select, but I assume you don't want to mutilate your shields.

Edit: On a quick reading of the specs, it seems that the SparkFun shield uses D8 as chip select (CS), and the Ocean Controls shield is selectable with a solder bridge, by default on... D8. :?

So, open that solder bridge and use D9 instead.
cvoinescu
 
Posts: 501
Joined: Thu Aug 09, 2012 9:12 am
Location: Camberley, Surrey, UK

Re: Arduino issues using multiple shields

Postby gfc62 » Fri Dec 07, 2012 4:08 am

Thanks for the reply and for checking the defaults. I moved the jumper from D8 to D9 on the ocean board before coding began.

I guess I should double check with a multimeter to verify that I didn't leave a solder trail behind on D8. It looks clear when inspected visually through a magnifier. In addition I'll try the ocean board alone with the code set to D8. If it works i'll know I failed to completely remove that jumper.

I appreciate your reply, anything else I should look at?
gfc62
 
Posts: 4
Joined: Wed Jul 28, 2010 5:52 pm

Re: Arduino issues using multiple shields

Postby cvoinescu » Fri Dec 07, 2012 2:01 pm

Sorry, nothing else comes to mind...
cvoinescu
 
Posts: 501
Joined: Thu Aug 09, 2012 9:12 am
Location: Camberley, Surrey, UK


Return to Electronics

Who is online

Users browsing this forum: No registered users and 20 guests

cron