Shop OBEX P1 Docs P2 Docs Learn Events
e6b2-cwz3e rotary encoder with BS2 problems — Parallax Forums

e6b2-cwz3e rotary encoder with BS2 problems

Kurt WeimerKurt Weimer Posts: 2
edited 2013-02-11 19:15 in BASIC Stamp
Hello there. Super-new to this forum. I used the BS2 pbasic 2.5 code mentioned to read my encoder. I have a e6b2-cwz3e rotary encoder that has 1200+ ppr. I am able to read numbers that ascend and descend relative to the rotation of the shaft, but instead of getting a steady ascending (infinite) count, it goes to 16 and resets. Any way to get infinite counting?

Thanks!

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-02-11 16:29
    Welcome to the forums. A standard 2 phase encoder with only 16 ppr can overwhelm the BASIC Stamp code if you spin it too fast. 1200 ppr seems improbable for the BS2. The code would not be able to keep up with that many pulses changing so quickly. As for why your code is doing, without seeing the code it would be hard to say, though I am surprised it count to 16. If you could post your code by attaching it we could see what it is doing.
  • davejamesdavejames Posts: 4,047
    edited 2013-02-11 19:15
    Kurt - what is the size of variable you're using to hold the "count" from the encoder?

    If it's "nib", then 0 to 15 is all that it can represent. On counts above 15, it'll reset back to zero.
Sign In or Register to comment.