Jump to content

Decoding multiple quadrature rotary encoders


houly
 Share

Recommended Posts

Hello Thorsten,

Thanks for your link. You notice that for 64 encoders the scan timing is about 32us @72MHz, but at which frequency do you call the scanning routine in the main loop (I suppose...) ?

for the moment the code is too complex for me (I try to switch from ASM PIC to ARM C), but it gives me a good challenge to try to understand it !

 

thanks again

 

regards

Link to comment
Share on other sites

The shift registers (to which the encoders are connected) are scanned each mS.

Higher scan rates don't make a difference for encoders with up to 100 pulses per rotation.

 

Here is btw. a tutorial for the encoder usage in MIOS32: http://svnmios.midibox.org/listing.php?repname=svn.mios32&path=%2Ftrunk%2Fapps%2Ftutorials%2F014_enc_relative%2F

 

And here is an older PIC ASM based solution, which might help you to understand the migration from ASM to C ;-)

-> http://svnmios.midibox.org/filedetails.php?repname=svn.mios&path=%2Ftrunk%2Fmios%2Fmios_enc.inc

 

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...