Buy an Axon, Axon II, or Axon Mote and build a great robot, while helping to support SoR.
0 Members and 1 Guest are viewing this topic.
It will be interesting to see how well the webbotlib handles the number of interrupts that will be generated by these encoders: 200RPM * 30Gear reduction * 100 Encoder events * 2 edges / 60 seconds per minute = 20000 interrupts per seconds per encoder at full speed.
I'm just curious, but was any code I wrote inspiration for your new fastquad code? It's exactly the way I did it in my Arduino Motorcontroller, so either I gave you inspiration, or I did it the same way an expert would do it, either way I'm proud of myself.
I knew that PCINT interrupts required some overhead to work out what pin caused the event. Hence INTxx are faster. ...PCINT interrupts are still very useful in less stressful environments.
I knew that PCINT interrupts required some overhead to work out what pin caused the event. Hence INTxx are faster. The next thing is that registering call back routines causes the ISR to push/pop every register which is slow. So my goal was to get the ISR to process the event in the minimum of time. So apart from all that jiggery-interrupt-pokery the code that actually drives the encoder is identical to my original code.PCINT interrupts are still very useful in less stressful environments.At the end of the day:- quadrature encoders work the same way so I'm sure that all solutions converge on the same code.
One question I have is if the ISR is a lot faster than the PCINT for the reasons you mentioned. Are you thinking of providing some standard ways to hook these interrupts?