Menu

Question about interrupts IOC PORTChange

Mike Varn
2025-07-01
2025-07-02
  • Mike Varn

    Mike Varn - 2025-07-01

    Say I'm using pic16f17126
    How do you setup On Interrupt PORTChange to interrupt on both rising and falling edge?

    Back story if needed. I'm creating a quadrature encoder and I would like to read both rising and falling edge of both channels A and B to create x4 resolution.

     
  • Fabrice Engel

    Fabrice Engel - 2025-07-02

    Hello,
    my first assumption is for example you are setting on PortA IOC on both edges, you set IOCAP for positif edge, and IOCAN for negative edge. So, you can catch both event.

     
  • Mike Varn

    Mike Varn - 2025-07-02

    Thank you.

     

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.