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

N2+ analog channel as input


  • Please log in to reply
6 replies to this topic

#1 per123

per123

    Member

  • Members
  • PipPip
  • 12 posts

Posted 06 December 2012 - 02:58 PM

How do I configure Analog0 as an inputport (N2+) for using it as an interrupt port as I did on N+. Or can I configure Analog0 as an Inputport ? Is that possible.

#2 Arron Chapman

Arron Chapman

    Advanced Member

  • Members
  • PipPipPip
  • 289 posts
  • LocationOregon, USA

Posted 06 December 2012 - 05:43 PM

How do I configure Analog0 as an inputport (N2+) for using it as an interrupt port as I did on N+.
Or can I configure Analog0 as an Inputport ?
Is that possible.


You can create an InputPort for all of the analog channels in exactly the same way it was done on 4.1;
InputPort inputPort = new InputPort(Pins.GPIO_PIN_A1, false, Port.ResistorMode.Disabled);

However the Analog pins are not interrupt enabled, this was also true on the N+.

When you talk EE use small words, I'm just a Software Developer :)
My Blog/Site and Everything Else

If my post helped you please consider pressing the "Like This" button in the bottom right-hand corner.

 

Oh my. So many things, so little money!!

 


#3 NooM

NooM

    Advanced Member

  • Members
  • PipPipPip
  • 490 posts
  • LocationAustria

Posted 06 December 2012 - 06:27 PM

on my mini interrupts work with analog pins! so should it be for netduino and netduino+ //edit: i meant they work as digital InterruptPort

#4 Arron Chapman

Arron Chapman

    Advanced Member

  • Members
  • PipPipPip
  • 289 posts
  • LocationOregon, USA

Posted 06 December 2012 - 06:32 PM

on my mini interrupts work with analog pins!
so should it be for netduino and netduino+

//edit: i meant they work as digital InterruptPort


The mini is the exception to the rule, I know that on the Netduino and as far as I'm aware the N+/+2 Interrupts are not supported on Analog pins.

When you talk EE use small words, I'm just a Software Developer :)
My Blog/Site and Everything Else

If my post helped you please consider pressing the "Like This" button in the bottom right-hand corner.

 

Oh my. So many things, so little money!!

 


#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 06 December 2012 - 07:31 PM

Hi per123, For Netduino Plus 2: Officially, pins D0 and D2-D13 have hardware interrupt support and can be used as InterruptPorts. We're also working on a software interrupt feature for pins D1 and the analog pins (and the new SDA/SCL pins). This will enable you to use InterruptPort simultaneously on all pins at once. BTW you _can_ technically use InterruptPort with any of the 22 analog and digital pins today. There are some microcontroller-silicon reasons why all of the pins can't be used simultaneously as InterruptPorts (which is why we officially spec pins D0 and D2-D13 as interrupt-enabled pins). If you use one of the not-officially-supported-interrupts you could have adverse effects; in particular I'd avoid using pins A4 and A5 as InterruptPorts (as they will conflict with the SD and Ethernet interrupts). Chris

#6 dwinant

dwinant

    New Member

  • Members
  • Pip
  • 2 posts

Posted 19 February 2013 - 08:38 PM

Do the analog pins support pullups?

 

I'm getting an argument exception on the code below when 'pin' specifies an analog pin. 

 

port = new InputPort(pin, true, Port.ResistorMode.PullUp);

 

[font="arial, helvetica, sans-serif;"]or maybe they don't support glitch filtering?[/font]

 

[font="arial, helvetica, sans-serif;"]Thanks,[/font]

[font="arial, helvetica, sans-serif;"]David[/font]



#7 dwinant

dwinant

    New Member

  • Members
  • Pip
  • 2 posts

Posted 19 February 2013 - 09:59 PM

The exception was due to the glitch filter.






1 user(s) are reading this topic

0 members, 1 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.