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

ArgumentExecption on Port.ResistorMode.PullDown


  • Please log in to reply
3 replies to this topic

#1 sebastianpatten

sebastianpatten

    Member

  • Members
  • PipPip
  • 21 posts

Posted 19 February 2011 - 08:28 PM

Why is my code throwing an ArgumentException when I use the following?
InterruptPort input = new InterruptPort(Pins.GPIO_PIN_D0, true, Port.ResistorMode.PullDown, Port.InterruptMode.InterruptEdgeLow);

It doesnt like the pulldown for some reason.
Thanks!

#2 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 19 February 2011 - 09:18 PM

It doesnt like the pulldown for some reason.

Unfortunately, the Netduino microcontroller does not have pull-down resistors, you have to use external ones.

#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 25 February 2011 - 02:53 AM

As CW2 mentioned... some microcontroller have integrated pull-down resistors; others have pull-up resistors; others may have both or neither. The SAM7X microcontroller on the Netduino has pull-ups. If you need pull-down resistors, just follow CW2's advice and add an external pull-down. Chris

#4 Arbiter

Arbiter

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationBrisbane, Australia

Posted 24 February 2012 - 03:10 AM

As I recall the point of a pull-up resistor is to stop a signal line from floating by tying it to (int this case) 3.3V through a large resistance, such that a switch shorting the pin to earth will pull it low but otherwise it will be pulled to high. Is this the behaviour we can expect from the Netduino: inputs report high unless shorted to ground? "ArgumentException" is an atrocious way to report a not-supported condition. Especially when there is a NotSupportedException. You could also say something useful like "Netduino hardware does not support PullDown mode." Is there any literature on using the Netduino other than this forum and that IoT book?
One day, all this too shall parse.




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.