Rotary Encoder on 20x4 LCD with pushbutton digit select and other features


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,156


    Did you find this post helpful? Yes | No

    Default Re: Rotary Encoder on 20x4 LCD with pushbutton digit select and other features

    I tried to re-use Richards code, but I have encoder on PORTB.3 and PORTB.4 and not using button. I've changed enc_a to portb.4
    and enc_b to portb.3, but I guess I also have to modify re = porta&12 ? to what it set?

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,695


    Did you find this post helpful? Yes | No

    Default Re: Rotary Encoder on 20x4 LCD with pushbutton digit select and other features

    I've changed enc_a to portb.4 and enc_b to portb.3, but I guess I also have to modify re = porta&12 ? to what it set?
    its a simple binary mask used to select only the port pin data from the two pins of interest
    the mask value is 2 to power of enc_a.bit + 2 to power of enc_b.bit.


    you also need to shift the data gathered into bits 0 and 1 for proper evaluation
    Warning I'm not a teacher

Similar Threads

  1. Using an incremental rotary encoder?
    By keithv in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th January 2016, 23:23
  2. Instant Interrupts for rotary encoder
    By fnovau in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th August 2014, 09:24
  3. New approach to Rotary Encoder
    By Ioannis in forum Code Examples
    Replies: 90
    Last Post: - 11th July 2013, 22:05
  4. Automotive quality rotary encoder
    By d1camero in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th October 2004, 16:46

Members who have read this thread : 3

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