Rotary encoder with DT interrupts


Results 1 to 34 of 34

Threaded View

  1. #28
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: Rotary encoder with DT interrupts

    would seem that way , although his dt_ints may be altered.
    only changes i made

    latc.6 = 1 ' reversed polarity tty
    serout2 PORTC.6,84,[13,10,"I'm Alive",13,10,10]





    although code has a few weird things they don't cause the problems, if i use a nice clean optical re the code fails to count up or down as per reply 9
    a filtered mechanical re also miscounts , no filter gives a semblance of functionality. i will keep to my code



    OPTION_REG.6 = 0 ' INTEDG set to interrupt on falling edge. ?
    ' OPTION_REG.6 = 1 ' INTEDG set to interrupt on rising edge.

    IOCBN = %01110000 ; REa portb.6, REb portb.5, REsw portb.4 neg edge trigger - falling edge only.
    why set the sw to cause an interrupt
    Last edited by richard; - 12th February 2021 at 07:33.
    Warning I'm not a teacher

Similar Threads

  1. Rotary encoder subroutine
    By Fanias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th October 2018, 13:13
  2. Using an incremental rotary encoder?
    By keithv in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th January 2016, 22:23
  3. Instant Interrupts for rotary encoder
    By fnovau in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th August 2014, 08:24
  4. New approach to Rotary Encoder
    By Ioannis in forum Code Examples
    Replies: 90
    Last Post: - 11th July 2013, 21:05

Members who have read this thread : 4

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