+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Newbie level 1
    Points: 15, Level: 1

    Join Date
    Nov 2019
    Posts
    1
    Helped
    0 / 0
    Points
    15
    Level
    1

    Pic32 qei interrupts

    Hi, I am using PIC32MK1024MCF100 custom board. I was able to get QEI 1,2,3,4 working.
    I want to use the same on Interrupts. I saw there are certain register u can set to generate interrupts and check certain registers to see if bit was set. But I don't know how to write the interrupt routine for the same(Like we open a driver for timer interrupt or usart interrupt). Please help with the interrupt routine what functions to call or how to open interrupt drivers or how to call the callback functions for such interrupts. Thankyou.

    If u need any more details or something I haven't mentioned please let me know.Thanks for the help.

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 29,849, Level: 42
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,911
    Helped
    1128 / 1128
    Points
    29,849
    Level
    42
    Blog Entries
    9

    Re: Pic32 qei interrupts

    In general interupts are not used with QEI registers, but rather with Timers; we want to take the current position at fixed intervals and then calculate the speed or just check whether certain position were reached or not.
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



    •   AltAdvertisement

        
       

  3. #3
    Advanced Member level 4
    Points: 7,900, Level: 21

    Join Date
    Jan 2015
    Posts
    1,108
    Helped
    348 / 348
    Points
    7,900
    Level
    21

    Re: Pic32 qei interrupts

    Which compiler are you using?
    If it is XC32, then the User Guide will show you very clearly how to write an ISR.
    If it is some other compiler then I a pretty certain that its User Guide (or similar document) will show how to write an ISR.
    There is nothing special about any ISR in the PIC32 devices (possibly with the exception of the traps, but you can still handle them in much the same way).
    Susan



--[[ ]]--