??? 11/20/06 21:40 Read: times |
#128326 - Why are you... Responding to: ???'s previous message |
Mohammed, why are you disabling the HSO mode then loading a new value? If what I'm understanding is correct, you want to start at 1khz, output 100 pulses, go to 2khz,output 100 pulses...up to 40khz.
Personally, the way I'd achieve this is to have a table of the frequency values and in the PCA interrupt count the pulses then get the next frequency value from the table. This gets away from having to wait in your main loop. As for connecting cooledit - use the line input on your sound card. Due to the ac coupling, square waves get distorted but nevertheless you can see what is being output and measure the frequency/period at a given instant. |