Page 1 of 1
Generating a tone
Posted: 24 May 2010, 4:42 AM
by FFMan
Is it possible with the zx to generate a tone whilst receiving serial data or does the resources required mean this is not possible.
I'd like to generate simple tones like those used in a variometer.
Re: Generating a tone
Posted: 24 May 2010, 6:39 AM
by dkinzer
FFMan wrote:Is it possible with the zx to generate a tone whilst receiving serial data or does the resources required mean this is not possible.
FreqOut() disables interrupts for the entire duration of the tone. To avoid interfering with serial transmission/reception on one of the software UART channels (Com3 to Com6) interrupts must be disabled for no more than about 25% of a bit time. For a hardware UART, transmission is not affected by interrupts (other than possibly delaying the beginning of the next character transmission) but reception may be affected if interrupts are disabled for more than about 1.9 character times (a character time is 10 to 12 bit times).