InterruptPort input = new InterruptPort(Pins.GPIO_PIN_D0, true, Port.ResistorMode.PullDown, Port.InterruptMode.InterruptEdgeLow);
It doesnt like the pulldown for some reason.
Thanks!
  | ||||||||||||||
ArgumentExecption on Port.ResistorMode.PullDown
Started by sebastianpatten, Feb 19 2011 08:28 PM
3 replies to this topic
#1Posted 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! #2Posted 19 February 2011 - 09:18 PM Unfortunately, the Netduino microcontroller does not have pull-down resistors, you have to use external ones. #3Posted 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
#4Posted 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 topic0 members, 0 guests, 0 anonymous users | ||||||||||||||
|
||||||||||||||
This webpage is licensed under a Creative Commons Attribution-ShareAlike License. | ||||||||||||||