Menu

dual alps-ec11

Help
Dirk
2024-02-21
2024-02-27
  • Dirk

    Dirk - 2024-02-21

    Hello everybody,

    I want to use 2 of the ec11 rotary encoders, one is not an issue but the second one...?

    Any bright ideas, or am I just too stupid?

     
  • Anobium

    Anobium - 2024-02-21

    Should be simple to extend the existing library to support another encoder.

     
  • Dirk

    Dirk - 2024-02-21

    Yes, thank you Anobium,

    that was one of my questions.
    Is there any way without messing up the excisting library?
    I was thinking about something like labeling incoming calls from the first event event
    and then calling a sub.......

    thanks in advace
    Dirk

     
  • Anobium

    Anobium - 2024-02-21

    I would use the same approach as the current library but extent to the additional inputs,

    Then, plan to call the routines with an optional parameter like Alps_ENCODER_SW_Pressed( 1 or 2 ). So, in the new library you would do this... Sub Alps_ENCODER_SW_Pressed ( Optional _encoderselected as Byte = 1 ) This means you add the program code to support _encoderselected equals 1 or 2.

    You would add this capability to most subs/functions.

    Ask questions if you get stuck.

     
  • Dirk

    Dirk - 2024-02-24

    Hello Anobium,
    sorry to bother you again....
    mis en route, almost there
    I created two headers.
    AAlps and BAlps, brute force copy, paste and replace.
    The AAlps works fine, accept escaping the sub.
    BAlps behaves strange, starting at 1635 positive and causes hard resets although its also decoupled with 10k both lines and pulled up. Perhaps that one is buggy.
    According to the data sheet my external interrupts are RB.0, RB.1 and RB.3.
    Since i abused these ports elsewhere, is there another option to escape from the loop?
    Can i temporarely "lend" an external interrupt ?
    Thanks in advance
    Have a nice weekend

    Dirk

     
  • Dirk

    Dirk - 2024-02-24

    the gcb got lost :-)

     
  • Dirk

    Dirk - 2024-02-25

    Success !

    sometimes reading helps a lot.

    excuse me, I am on sick leave and the antibiotics are making me nuts

     
  • Anobium

    Anobium - 2024-02-27

    Excellent. Well done!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.