Jump to content

Recommended Posts

Posted

Hello all,

 

I'm interesting in quadrature encoder decoding in (for example) SEQ4 project. Do you know how does the code function ? does it function with interrupt or polling ?

 

thanks for your help

 

Posted

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

Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...