I would like to input a clock signal into a gpio pin on the dsp56f827 which has been generated from timer_A2. (Timer A2 physically wired to the GPIO pin) I then want to compare the clock signal input to the GPIO, to a clock signal on timer_A3. If the signals have the same frequency - Then light an led If the signals have the same amplitude - Then light another led Currently i am able to generate the clock signal on timer_A2 and receive it through a port D GPIO pin. The clock signal is input in the following way: while(1) { temp = (Word16)periphMemRead(&ArchIO.PortB.DataReg); /* read portB data register */ data[0] = 0x0001 & temp; /* place signal input into port D pin0, to data[0] */ } Basically what happens is that data[0] is constantly updated with the new value received by the GPIO pin. I then need to compare this signal with a signal on timer_A3. Can people give me some ideas on how i could now compare the signals as this problem is really getting me bogged down? |
Comparing two clock signals
Started by ●September 25, 2003