pic16f88 ccp module

Discussion in 'Embedded Systems and Microcontrollers' started by wynie, Feb 5, 2013.

  1. wynie

    Thread Starter New Member

    Feb 5, 2013
    hi im using a pic16f88 im using the ccp module in capture mode ,i want to measure the pulsewidht of a incoming signal the range is 30khz and 40khz
    Ts = 30us to about 20us

    my setup is
    ccpcon1=0x05 // capture mode every rising edge
    my CCPIE bit is set my GIE bit is set

    the ccpr1 register consists of ccpr1l and ccpr1h , 2 8bit registers
    the capture data will be present in the ccpr1 register

    can someone show me how to write a interrupt routine on how to read this value from the ccpr1 register i want to use this value in my main program
    thanks in advanced:)
  2. t06afre

    AAC Fanatic!

    May 11, 2009