You can use a timer interrupt, calibrated to generate one interrupt each one millisecond (this is your granularity, or resolution, isn't?). You need to specify 3 x 16 bits reload counters, each one would contain exactly half the value from each one of the 3 frequencies (double frequency), necessary to flip the output pin twice per complete frequency cycle. Then, the reload counters are loaded into 3 decrement counters (16 bits each). Each loop through the interrupt routine will decrement each one of the decrement counters, when any reaches zero its correspondent port pin output should flip level, then this decrement counter is load with its correspondent reload counter value. If your instrument only job is generate those 3 frequencies, *and nothing else*, this can be done with a one millisecond timer routine, but in this case you should have the same number of instruction cycles executed with or without the "flip output and reload timers" steps, so the routine would run steady without any jitter. Remember that in all cirscunstances involving software, you will never have the 3 wave forms happening at exactly the same time, if your specify the same frequency for all of them. They will always have some microseconds between edges. Boa sorte e depois nos diga como resolveu... :) Wagner.