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

Configure TIMER to count pulses.


  • Please log in to reply
2 replies to this topic

#1 rgavrilov

rgavrilov

    New Member

  • Members
  • Pip
  • 4 posts

Posted 23 April 2015 - 08:02 PM

Is there a way to count number of pulses using a timer? Preferably using a strobe. I want to count number of pulses over a period of time, and get an interrupt at the end.

 

Is there an API for that?

 



#2 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 25 April 2015 - 08:12 AM

I do not know of any API which will allow you to do this.  If I needed this functionality I'd think about either using two interrupts (one for the timer and one for the signal) and do all of the work in software or use an external counter and a timer and read the value from that when the timer triggers.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#3 Sukasa

Sukasa

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts
  • LocationNanaimo, BC

Posted 30 April 2015 - 01:22 AM

How fast do the pulses come?  If they're more than a couple Hertz, a more reliable idea might be to use a 555 timer set up as monostable in conjunction with a low-pass filter and then read the result using an analog input.






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.