Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

D13 - LED On Screwshield- Issue with SPI?

SPI

  • Please log in to reply
4 replies to this topic

#1 iced98lx

iced98lx

    Advanced Member

  • Members
  • PipPipPip
  • 134 posts
  • LocationSouth Dakota

Posted 31 December 2014 - 06:53 PM

Using this screwshield: http://www.ebay.com/...5-/271334265468/ http://proto-pic.co.uk/protoscrewshield/

 

It has an LED hooked up to D13 (I can blink it etc with no issue) but I need to use D13 for SPI as I want to set up a chain of shift registers. Is having the LED on the shield going to mess up my SPI usage?

 

Thanks!

 

Chris



#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 01 January 2015 - 10:26 AM

Hello Chris, and have a happy new year, as well as your family.

 

The led shouldn't be an issue, because the current flowing is low. I'd recommend to keep the SPI speed relatively low, let's say 1-2 MHz max. Also try to keep the SPI wiring short (6 inches max) and, possibly, of the same length (SCLK, MISO, MOSI, SS).

The general rule is: the slower the signals are, the easier will be everything work fine.

 

Have a nice holidays.

Mario


Biggest fault of Netduino? It runs by electricity.

#3 iced98lx

iced98lx

    Advanced Member

  • Members
  • PipPipPip
  • 134 posts
  • LocationSouth Dakota

Posted 01 January 2015 - 03:25 PM

Hello Chris, and have a happy new year, as well as your family.

 

The led shouldn't be an issue, because the current flowing is low. I'd recommend to keep the SPI speed relatively low, let's say 1-2 MHz max. Also try to keep the SPI wiring short (6 inches max) and, possibly, of the same length (SCLK, MISO, MOSI, SS).

The general rule is: the slower the signals are, the easier will be everything work fine.

 

Have a nice holidays.

Mario

 

Mario-

   I hope you and yours have a happy new year, and had a wonderful holiday season as well, thank you for the kind wishes.

 

Thank you also for confirming my suspicions on the LED. Based on my application i have no need for fast reacting control of my shift register, slower is more than fine. I'll do some testing and let you know how it turns out.



#4 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 01 January 2015 - 04:03 PM

Very appreciated, thanks.

 

Just a small note more, although maybe you won't face this case.

You know, the SPI must be "opened" (enabled), and of course can be "closed". When it's closed, the D13 pin (as well as the others involved) can be used as a normal I/O. That is, whenever you set that pin as "input-with-pullup", the led+res act instead as a pull-down. Thus, you should "avoid" this (let's call) collision, because the resulting (floating) voltage may be at an intermediate level, which results in an unstable read.

 

Again, just an alert than a concrete issue. However, if the led+res were connected to the I2C pin that would have been a very annoying trouble, because I2C leverage the pull-up resistors.

 

Hope it's clear.

Cheers


Biggest fault of Netduino? It runs by electricity.

#5 iced98lx

iced98lx

    Advanced Member

  • Members
  • PipPipPip
  • 134 posts
  • LocationSouth Dakota

Posted 01 January 2015 - 06:43 PM

Won't be using the pin for anything but SPI but I will keep that in mind. Worst case scenario I modify the shield and remove the LED / Resistor.







Also tagged with one or more of these keywords: SPI

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.