• AVR Freaks

Hot!Input capture both time and state?

Author
realexander
Super Member
  • Total Posts : 235
  • Reward points : 0
  • Joined: 2006/04/08 09:50:42
  • Location: 0
  • Status: offline
2020/07/11 11:38:42 (permalink)
0

Input capture both time and state?

Hi,
 
The Input Capture peripheral can capture the time transitions occur on a pin. Is there a good way to capture both the time and the state of the pin?
 
Thanks,
   Bob
 
#1

4 Replies Related Threads

    RISC
    Super Member
    • Total Posts : 5776
    • Reward points : 0
    • Status: offline
    Re: Input capture both time and state? 2020/07/11 14:30:32 (permalink)
    0
    Hi,
    Which device do you use out of several hundreds....wink: wink?
    Regards

    For support make sure to check first here : http://microchipdeveloper.com
    There are hundreds of PIC, AVR, SAM...which one do YOU use ?
    #2
    realexander
    Super Member
    • Total Posts : 235
    • Reward points : 0
    • Joined: 2006/04/08 09:50:42
    • Location: 0
    • Status: offline
    Re: Input capture both time and state? 2020/07/11 14:41:44 (permalink)
    0
    RISC
    Which device do you use out of several hundreds....wink: wink?
     



    I'm flexible, but probably a PIC32MZ or MK.
     
    - Bob
     
    #3
    davea
    Super Member
    • Total Posts : 278
    • Reward points : 0
    • Joined: 2016/01/28 13:12:13
    • Location: Tampa Bay FL USA
    • Status: offline
    Re: Input capture both time and state? 2020/07/11 17:57:13 (permalink)
    0
    you can only use one edge at a time
    you know what edge you started with so switch edge in ISR
    read the CCP reg first
    then clear IF
     
    #4
    NorthGuy
    Super Member
    • Total Posts : 6228
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: Input capture both time and state? 2020/07/11 20:40:26 (permalink)
    4 (1)
    You can use one input capture module for rising edges and another one for falling edges.
    #5
    Jump to:
    © 2020 APG vNext Commercial Version 4.5