Electronics > Microcontrollers

Quadrature Decoder - For Reference

<< < (3/3)

ehughes:
Check out this logic.    I have not run a k-map but I *THINK* this is the "table" in a minimal form.

I have not simulated or tested this approach but it looks correct on 1st inspection.




*From fpgas4fun.com

With the fully synchronous version:


Benta:

--- Quote from: hamster_nz on February 09, 2017, 12:37:08 am ---
--- Quote from: Benta on February 08, 2017, 09:35:05 pm ---In my opinion, overengineered.

Using one of the quadrature input signals as interrupt/clock, simply sampling the other input at this point will give you direction information.
The first input will give you relative position and speed.

--- End quote ---
In an ideal world, where switches never go noisy, and contacts never bounce there are lots of easy answers.


--- End quote ---

My apologies for a too brief answer. I imagined it would be obvious to other engineers that only properly debounced signals can be used with this method.

Concerning the "interrupt", I would of course not bang the signal directly into the IRQ pin! But most MCUs have edge triggered I/O ports, which in turn request interrupt service.

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod