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

Simultaneous Interrupt Processing

Interrupt Simultaneous concurrent

  • Please log in to reply
1 reply to this topic

#1 Jarrod Sinclair

Jarrod Sinclair

    Advanced Member

  • Members
  • PipPipPip
  • 50 posts
  • LocationSF Bay Area, CA

Posted 24 December 2013 - 12:49 AM

Hi all,

Been ages since I posted, but I have not forgotten about you all even though i did cross over to the "dark side" for a while.

 

I am working on a new project (netduino 2 based this time) and need some info. In the project I am doing I need to control the AC phase (for dimming). Using some Arduino projects as templates I have the Zero Cross signal coming in as an interrupt (this was the easy part) but I have hit upon an issue. For each channel I want to dim I have to attach a separate interrupt, as the dimming level for each might be different and I need to pause for the time equal to the delay needed. I pause in my breadboarding cause I think I will run into a timing issue. so here are my questions:

  • Has anyone tried to do AC phase control with a netduino? when I did my Track Timer I do remember a lag in interrupts but as i was using the interrupt timestamp and for my offset calculations it did not matter.
  • In order for this to work I need to have 8+ Interrupts attached to the same pin, is that possible?
  • Then I need each of those to process at the same time (multi-threaded) is that possible given that the interrupt will fire every 16.6ms (1000/60)?

Any other thoughts would be helpful.

Thanks!

 



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 24 December 2013 - 02:24 AM

Hi Jarrod,

 

.NET MF will give each thread up to 20ms by default to finish execution before forcibly switching to another thread.  You can hook up several interrupt events to a pin--but they'll effectively run one after the other (or sort-of-simultaneously if the event handlers take longer than 20ms each).

 

If you minimize the amount of code run in each interrupt event, these can all fire and execute very quickly.

 

Does that help?

 

Chris







Also tagged with one or more of these keywords: Interrupt, Simultaneous, concurrent

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.