Time interval between two pulses (CTMU in PIC18F45K22)

Status
Not open for further replies.

Thread Starter

Lokheshkumar A

Joined Oct 16, 2016
13
Hi
I'm trying to use CTMU module present in PIC18F45K22 to find the time difference between two pulses on CTED1 and CTED2. I have attached my code here. I would like you all to review it and say whether it works to find time interval between two signals. My plan is to declare CTED 1 and 2 as inputs and initiate the transmitter using CTMUCONLbits.EDG1STAT = 1 and current source stops when while(!CTMUCONLbits.EDG2STAT) become false. Will my flow of code works or what am I missing in this ??
 

Attachments

Status
Not open for further replies.
Top