AnsweredAssumed Answered

Using the PWM Capability of the 908JL16 to Generate CTCSS Tones

Question asked by Joe Burch on Sep 9, 2010
Latest reply on Sep 21, 2010 by Joe Burch

Hello folks,


I was wondering if someone would be good enough to give me some general help on the following topic:


Using a 908JL16, 28 pin device, I'm attempting to use it to both generate and (later) decode the sub audible tone frequencies that range from 67 Hz to 250.3 Hz.  If I can get the generation capability working, I believe that I can make the decoding portion work on my own.


I've read some of the posts here on using PWM to generate the tones in other processors.  Using an XCEL spead sheet, I computed (and plotted) an accurate sine wave in a 256 byte table.


The tones (of a predetermined frequency) will be generated continuously when the M/P is in the transmit mode, and I would like to use Timer 1 for this purpose, and will be using a 9.8304 Mhz external oscillator.


Some questions:


1) Must I use the buffered mode when stepping through the SineTable?


2) How should the timers be set up / serviced?


3) What interruots are required?


4) How do I compute the 'time slices' as a function of the desired frequency (e.g. 100.0 Hz, 250.3, etc)?


Any code specific examples will be most appreciated.


I did try reading through AN-1777, but unfortunately got lost when trying to figure out the HC-08 code for dual chord tone synthesis.


Thanks, in advance, for any help.


Joe Burch