Quad encoder problems


Closed Thread
Results 1 to 40 of 52

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    Ok, I did just use the code by itself and I understand setting the variables to =0. Off to a good start

    The encoders are optical with no data sheet since I pulled them out of a ball mouse. There is an emitter, wheel with 36 slots, and reciever for each encoder. They are in the same mounting positions as when the mouse was a mouse. I just chopped off the pc board behind them and attached my wires. The emitters only have 2 pins, +5v and ground. The recievers have 3 pins, A,B, & +5v. I know this because I traced them back on the mouse board before cutting. I also checked another mouse to be sure. (I bought 4 of them to play with).

    With my original code (the really simple one a few posts back) nothing happened until I put in the resistors to ground. Thats the only reason they are in the circuit. The read out on the lcd also displayed channel A and B status and I could see 00 01 11 10 00 when rotated very slowly.

    I did try your code without the resistors and it didnt make any difference.

    I agree with you when you say we need to walk before we run. So I checked the outputs of the encoders with a logic probe. I am getting a high/low pulse out of each of the channels when they are rotated.

    Smitty

  2. #2
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by smitty505000
    So I checked the outputs of the encoders with a logic probe. I am getting a high/low pulse out of each of the channels when they are rotated.
    What voltage do they output on the channels? I haven't hacked any mouse encoders, so a google on that (or someone else on this forum who has could chime in) could help make sure the hardware portion is working properly.

    I do know the code is working now. I scared up 2 mech encoders, and hooked them up to an 18F4620 I have. Using the internal pull-ups on port B, worked without a hitch. I see no reason it wouldn't work on the 16F628.

    Steve

Similar Threads

  1. Quadrature encoder and ASM Interrupts. questions..
    By godfodder in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th March 2013, 14:45
  2. Instant Int and encoder (Elect. Gearing)
    By boroko in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 29th November 2009, 02:29
  3. encoder HEDL 5540
    By kutsi in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th June 2007, 14:00
  4. quad encoders
    By cpayne in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 13th March 2007, 17:49
  5. encoder wowes
    By wallaby in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 6th December 2005, 21:56

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