Reading incremental encoder interupt


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Oct 2013
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Re: Reading incremental encoder interupt

    Hi I have a problem with interrupts code in pbp.I want to count encoder ticks in both directions,I have done the code without interrupt routine and it works fine but it is to slow for greater speeds.So I tryed with INT on port B.0 but it is not working.I am useing PIC 16F877A, compiler 2.5. Here is the code which is not working.Where was I wrong?
    proba.txt

  2. #2
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default Re: Reading incremental encoder interupt

    I used the interrupt for my low cost mechanical encoder to control my power supply.
    You can find the whole code in the attachement.
    The interrupt service routin is the following:
    '---[INT - interrupt handler]---------------------------------------------------
    ToggleLED1:
    if EB=0 then INC_DEC=2
    IF EB=1 THEN INC_DEC=1
    @ INT_RETURN

    Thanks to Darrel Taylor work.

    Bye
    Ambrogio
    Iw2fvo
    Attached Files Attached Files

Similar Threads

  1. decoding quadrature encoders
    By ice in forum mel PIC BASIC Pro
    Replies: 93
    Last Post: - 28th February 2017, 09:02
  2. Quadrature encoder and ASM Interrupts. questions..
    By godfodder in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th March 2013, 14:45
  3. Instant Int and encoder (Elect. Gearing)
    By boroko in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 29th November 2009, 02:29
  4. encoder HEDL 5540
    By kutsi in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th June 2007, 14:00
  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 : 1

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

Tags for this Thread

Posting Permissions

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