jackobian
Member level 1
- Joined
- Sep 18, 2011
- Messages
- 37
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Activity points
- 1,542
this cc code below for measure signal phase. i assign 4 square signals with freq=500 Hz,duty=25% to portb1,portb2,portb3,portb4.
i use portb0/int as trigger input.
when interrupt occurs at portb0 i read portb1...3 status. since for example portb1 is high i activate timer1 (T1CON.f0=1 when portb0 becomes low i put T1CON.f0=0 ;.
then read c0= TMR1L; i0= TMR1H << 8; z0= c0+i0; but its all zero at lcd
i use portb0/int as trigger input.
when interrupt occurs at portb0 i read portb1...3 status. since for example portb1 is high i activate timer1 (T1CON.f0=1 when portb0 becomes low i put T1CON.f0=0 ;.
then read c0= TMR1L; i0= TMR1H << 8; z0= c0+i0; but its all zero at lcd