PIC based CTCSS generator for an FT290R

Nowadays most repeaters in the Netherlands require a CTCSS subcarrier to be used. My 30 years old FT290R however does not include this feature.
On the internet I found an excellent description of a CTCSS generator which could be build into the FT290R and supported multiple CTCSS frequencies by reading the memory channel setting of this set.

G7AQA's excellent description of how to modify the FT290R can be found here.

This generator uses square waves for the CTCSS tones, so it is possible that the 3rd or 5th harmonic ends up (audible) in the voice signal. Due to the simple filter the output level will also vary with the selected frequency, a 113 Hz signal is attenuated a lot more than a 71.9 Hz signal.

I therefore modified the software to use a software DDS generator which will output a nice sinus. The D/A conversion is achieved by an 8bit converter using PWM modulation. The PWM carrier is 15625 Hz. Separating the 15 kHz PWM carrier from the CTCSS tone (+/- 100 Hz) is achieved with a 2stage RC filter. The outputlevel is independend of the selected CTCSS frequency.

The DDS itself runs at 3906.25 Hz. A 16 bit DDS is used giving a step of approximately 0.06 Hz which is sufficient.

I also replaced the 18pin 16F628A with the smaller 14pin 16F684 microcontroller.


The Schematic

Some results

The filter needs at least 2 stages, below you can see the output with 1 and 2 stages of the PWM filter:

Output after 1st RC stage
Output after 2nd stage

According to LTSPICE the PWM filter has the following curve:

The CTCSS tones have the same output independend of the selected frequency, the carrier is suppressed 100dB.

The frequency is, even when the exact crystal frequency is not known, within the 0.8% margin:

The display indicates 88.515 Hz when a frequency of 88.5 Hz was selected.

Usage with other trancievers

A BCD switch, or 4 dipswitches can be used to select up to 16 different frequencies.

You can also separate the DC offet from the PWM signal by using the following PWM filter:

Depending on the impedance of the insertionpoint you could alter the value of C1.


Specifying additional/other CTCSS frequencies

In the published source code only 4 frequencies are specified. In the Netherlands no other carriers were used (in 2009).
To add a CTCSS frequency the phase increment should be calculated:

The DDS step is the crystal frequency divided by 2^26 (67108864). You can measure the actual xtal frequency or just
assume it is 4 MHz. The latter will give a step of (4000000/67108864) = 0.059604644775390625 Hz.

The phase increment is the required frequency divided by the step, e.g. for a frequency of 77.0 Hz
the phase increment should be 77.0 / 0.059604644775390625 = 1291.85. The increment in the table should be 1295.



Assembly source for the CTCSS encoder

HEX file for use in The Netherlands (4 programmed frequencies on Memory1 to Memory 4)


2011-01-07 - Initial publication of this project
2011-01-11 - Improved version

Any questions or remarks: mail to PE1GRL