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

InteruptPort problem


  • Please log in to reply
22 replies to this topic

#21 Ryan Mick

Ryan Mick

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts
  • LocationSacramento, CA

Posted 05 April 2011 - 02:34 AM

So using a single 4017 to take the frequency down to around 690 Hz still fills the event queue and throws an out of memory exception but now the debugger can actually catch it. Luckily I picked up a couple of these so I'm going to add another one and then it should be able to handle it.

#22 Ryan Mick

Ryan Mick

    Advanced Member

  • Members
  • PipPipPip
  • 36 posts
  • LocationSacramento, CA

Posted 06 April 2011 - 02:22 PM

I had to chain 2 4017's together to drop it down to a level that didn't crash the app. Now if I can just get the rest of the sensor to cooperate then I can move on with my life.

#23 DoesNotCompute

DoesNotCompute

    New Member

  • Members
  • Pip
  • 5 posts

Posted 16 April 2011 - 02:01 AM

It doesn't crash until the OnInterupt event is bound. That is when the I believe the event queue is filled up faster than it can be processed causing the out of memory situation. FOUT is running at about 6.9 KHz which is pretty fast.

Having a similar problem with a Netduino plus. I'm controlling a gearmotor with a servo output signal and attempting to count the pulses from the motor's quadrature output using an interrupt routine. I do set up the port only once, and everything works fine in the very early stages of starting the motor. As soon as I start ramping up the motor, the app crashes with an out of memory exception. I also suspect it's a frequency issue - the interrupt processing code is not up to real time (in this case c. 10KHz pulses at top speed) processing. I'm going to try using a variable freq. pulse generator to see I can confirm that this is what is happening. I'll post when I know more.
I had previously used an HC6811 to do this kind of work - it had excellent hardware counters, but really needed assembly language to get the most from them. I've also got a few Arduinos lying around (the Netduino is supposed to replace them) and I'll see if I can get one of those to do this task.




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.