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

How to access hardware timers/counters?


  • Please log in to reply
23 replies to this topic

#21 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 18 April 2011 - 10:33 AM

In certain cases, such as frequency measurement, there is no need for a managed event handler at all - the calculation (in either timer overflow or pin state change interrupt service routine) just needs to divide number of events by time period and store the result in a variable, accessible via the managed wrapper property (locking/atomic assignments assumed). Then it is possible to avoid the delay imposed by HAL completions.

I agree, but in that case you are consider having a fixed period over counting pulses.
At the moment I haven't the data sheet of the MCU, but on many MCUs there is a full featured timer section, that offers period between edges, pulses within a period, etc.
That would be pretty easy, I guess, but if that is not available would be an hell.

Are you able to write/insert a sampler class as above in the N+ firmware?
I have lost any hope on the last weekend, because there's no way to cut parts of the TinyCLR or anything else...Without RVDS the N+ firmware is totally off to be open!

Mario
Biggest fault of Netduino? It runs by electricity.

#22 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 18 April 2011 - 10:57 AM

At the moment I haven't the data sheet of the MCU, but on many MCUs there is a full featured timer section, that offers period between edges, pulses within a period, etc.

Yes, hardware timers have capture unit. I was thinking about software implementation (despite its limits) mainly because there is only one hardware timer available for such things on the current Netduino/Plus boards: timer #0 is already used by CLR for scheduling and timer #1 capture input pins are not broken out, which leaves only timer #2 (TIOA2, TIOB2 accessible via AD0, AD1).

Are you able to write/insert a sampler class as above in the N+ firmware?
I have lost any hope on the last weekend, because there's no way to cut parts of the TinyCLR or anything else...Without RVDS the N+ firmware is totally off to be open!

Well, probably yes, but unfortunately I cannot promise anything right now. Could it be possible for you to use Netduino firmware during development and then integrate the source into Netduino+, perhaps asking Chris Walker to do final build with RVDS?

#23 BotDuino

BotDuino

    New Member

  • Members
  • Pip
  • 7 posts

Posted 30 June 2011 - 09:15 PM

I found a library that someone else wrote that works with the tlc5940.

Netduino TLC5940 Library

I do not yet have a tlc5940, but I am a robotics hobbyist, and if this code works could really be very helpful for PWM development on arduino.

Hope this helps.

#24 deimos

deimos

    New Member

  • Members
  • Pip
  • 1 posts

Posted 30 August 2012 - 10:19 PM

I found a library that someone else wrote that works with the tlc5940.

Netduino TLC5940 Library

I do not yet have a tlc5940, but I am a robotics hobbyist, and if this code works could really be very helpful for PWM development on arduino.

Hope this helps.


It appears that this library has disappeared completely.

Has anyone found a solution to support the TLC5940 timing requirements on the MF ?




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.