• AVR Freaks

Hot!dspic33ep 512MC806 : QEI in external count with external up/down Mode

Author
EngSam
New Member
  • Total Posts : 18
  • Reward points : 0
  • Joined: 2019/04/17 09:28:54
  • Location: 0
  • Status: offline
2020/06/03 07:23:24 (permalink)
5 (1)

dspic33ep 512MC806 : QEI in external count with external up/down Mode

Hi
In Section 15. Quadrature Encoder interface FRM: the part 3.1.2 is attached .

I am using this mode for counting Step/Dir ( common in stepper motors)
The problem is that the Image shows that for every pulse the count is incremented or decremented by 2.
while in reality ( testing ) i found that it counts by 1. 
The testing sounds more reasonable since , sometimes you want to move 1 step , why would it increment 2.
However the Figure 15-3 in this section puzzled me , maybe i am interpreting  the figure wrongly ??
 
 
 
 
 

Attached Image(s)

#1

2 Replies Related Threads

    du00000001
    Just Some Member
    • Total Posts : 3942
    • Reward points : 0
    • Joined: 2016/05/03 13:52:42
    • Location: Germany
    • Status: offline
    Re: dspic33ep 512MC806 : QEI in external count with external up/down Mode 2020/06/03 18:07:46 (permalink)
    0
    (I haven't used QEI to date, so the following is from an engineer's theoretical point of view.)
     
    Not sure whether the figure is wrong or you've set your prescaler to 1:2. Both might apply.
    Basically, the QEI module might be able to increment on both edges of the input signal (it does exactly this when operated in QEI mode). Cons8dering the simplicity of scaling down the counter, I personally would prefer a counter incrementing on both edges. But this is personal preference.

    PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
    #2
    EngSam
    New Member
    • Total Posts : 18
    • Reward points : 0
    • Joined: 2019/04/17 09:28:54
    • Location: 0
    • Status: offline
    Re: dspic33ep 512MC806 : QEI in external count with external up/down Mode 2020/06/04 06:00:49 (permalink)
    0
    thank u for your opinion , The good thing now is that we both understand the figure correctly . ( it shows incrementing on both edges )
     
    I have used this module alot usually in 4x mode in encoder counting. so i am sure the prescale is correct , since the prescale of the input clock here doesn't relate to the way it counts. it relates to the maximum  frequency that the module can read. 
     
    Hopefully someone from microchip can confirm 
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5