Interrupts based quadrature encoder counter


Results 1 to 2 of 2

Threaded View

  1. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Interrupts based quadrature encoder counter

    I keep this comment in my code that uses encoders:

    Code:
    '  Wiper Chart:
    '  ============
    '     A   B
    '    --- ---
    '     0   0
    '     1   0  /\ CCW
    '     1   1
    '     0   1  \/ CW
    '     0   0
    You can check position by reading the Port, and you can check rotation by checking previous position of the two wipers.


    I suggest you keep a log of the two Port pins (send a HSEROUT to your PC if you don't have tools like the Saleae Logic probe), and see if your encoder sends the same pulses.

    Note that "some" encoders send pulses between the clicks that you feel on the shaft, so don't trust your fingertips.
    Last edited by Demon; - 12th October 2024 at 19:28.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. Quadrature encoder and ASM Interrupts. questions..
    By godfodder in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th March 2013, 15:45
  2. emulator quadrature encoder
    By volcane in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 13th August 2012, 16:53
  3. Best quadrature encoder for buck?
    By jrprogrammer in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 23rd June 2009, 14:58
  4. Replies: 1
    Last Post: - 16th May 2008, 18:14
  5. Quadrature Encoder
    By Plasmajocky in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th June 2004, 18:35

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts