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 ??
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
-
4.5 KB Views: 24