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.
InteruptPort problem
Started by Ryan Mick, Mar 28 2011 02:36 AM
22 replies to this topic
#21
Posted 05 April 2011 - 02:34 AM
#22
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
Posted 16 April 2011 - 02:01 AM
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.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.
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