Hi,
I am using sample code supplied by TI "msp430g2xx3_ta_21.c" to produce a PWM (3.2KHz) and then Capture the signal on Pin 1.2. this seems to work fine. I have verified 3.2K on a scope. But i am having trouble interrupting how to read the frequency.
The way i am approaching this is to put a brake point at this line "ON_Period = FEdge-REdge1; // On period" and then i view the DEC value of "Period" which reads 2436. The trouble i have is converting this value to frequency. I assumed it to be 65535/2436 but this is not the case.
any help would be good:
thanks,
Period = REdge2 - REdge1; // Calculate Period
ON_Period = FEdge-REdge1; // On period