Quadrature Decoder Count Interrupt?

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The AU datasheet says that the angle can be read directly from the count register but could a counter interrupt be set up to trigger at a specific angle? For example, if a 720 PPR encoder were connected (2880 quadrature counts/revolution), could the compare register be set to 8 to give an interrupt at one degree? And by extension, update the compare register to interrupt every degree instead of polling the counter register for each angle count?

"The base counter can be used to count clock cycles or events" - in this case the encoder is the clock, yes?

The reason for this is to start the ADC at specific angles of the encoder and it would be more accurate to start it by interrupt at the angle rather than polling the counter. Also the program would not be stuck in a polling loop and can do other operations.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The interrupt will cause a delay.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

More or variable delay than polling?