When transmitting data over an audio link there are many advantages in using frequency modulating. Modem chips that can operate over audio bandwidths are becoming harder to source and more expensive but (if you can find them) they provide excellent performance, at typical data rates of 300-2400bps. However for applications that are able to use a lower data rate, the following PICAXE generated FSK modulation technique might be of interest.
The attached schematic shows a 14M that produces an eight-segment waveform that, with the addition of a low-pass capacitor, provides an approximation of a sign wave. This has the advantage, over a square wave, of producing less troublesome harmonics. The example code below produces a constant frequency of 550Hz (8MHz clock). One way to add modulation is to place an if..Then pause command between each new DAC value, which can modulate the frequency depending on the status of an input pin. This extra code does of course reduce the maximum frequency. For example, using a pause value of 2 gives requires of 265Hz and 143Hz, which is able to support a maximum data rate of about 50Hz (maybe Stan could recommend some free software to decode these signals with a PC sound card). Faster PICAXE chips could produce proportionately higher frequencies/data rates.
The PICAXE is of course fully committed whilst generating FSK modulation and is unable to perform other tasks. However, for many low-speed telemetry applications, it would still be possible to alternate between measuring input parameters and transmitting data.
setfreq m8
main:
pins = 8
pins = 12
pins = 14
pins = 12
pins = 8
pins = 2
pins = 0
pins = 2
goto main
The attached schematic shows a 14M that produces an eight-segment waveform that, with the addition of a low-pass capacitor, provides an approximation of a sign wave. This has the advantage, over a square wave, of producing less troublesome harmonics. The example code below produces a constant frequency of 550Hz (8MHz clock). One way to add modulation is to place an if..Then pause command between each new DAC value, which can modulate the frequency depending on the status of an input pin. This extra code does of course reduce the maximum frequency. For example, using a pause value of 2 gives requires of 265Hz and 143Hz, which is able to support a maximum data rate of about 50Hz (maybe Stan could recommend some free software to decode these signals with a PC sound card). Faster PICAXE chips could produce proportionately higher frequencies/data rates.
The PICAXE is of course fully committed whilst generating FSK modulation and is unable to perform other tasks. However, for many low-speed telemetry applications, it would still be possible to alternate between measuring input parameters and transmitting data.
setfreq m8
main:
pins = 8
pins = 12
pins = 14
pins = 12
pins = 8
pins = 2
pins = 0
pins = 2
goto main