I have a problem with Input capture on mc9s12xs128 (a proto board with crystal frequency of 16MHz) controller.Iam trying to capture signals from a function generator on two input capture channels. The registers for capturing are configured in steps as below
- Timer overflow enabled and Timer prescalar set to 8 (i.e.timer clock=Busclock/8)
- Input capture channels selected
- Capture on rising edges only
- Clear the flags(TFLG1)
- Enable the timer
ISR pending, timer overflow below a specific frequency, min value issues have been handled in the program. My problem is, when my initial frequency(min frequency) is set, the output values do not show up.
I have another program where I have CAN messages to be published.I shall acquire the above signals and publish the output values on the CAN bus. CAN bus is also running on 16Mhz crystal with 250K baud. This time the output values do not run at all. What could be the poblem, unable to trace. Iam attatching my program , any quick response is highly appreciable.
Thanx in advance