[VoIP] 12F683 PIC for Tone Generation
Donald Froula
dfroula at sbcglobal.net
Fri Mar 21 12:19:38 CDT 2008
I tinkered with this blue box circuit some more.
I added DTMF mode back, storage of tone mode along
with digits in dialing memories, and configurable
eeprom storage of default tone mode (MF/DTMF) and tone
duration/spacing (75 ms./120ms.). 2038 out of 2048
available program bytes were used. I had to shut off
the automatic compiler watchdog timer refresh and the
on-chip watchdog timer to get additional code space
for the enhancements.
Features:
- Supports a 12 digit keypad, plus an additonal 2600
button. All keys are SPST switch closures with a
common connection. (See schematic in this thread.)
- Both MF and DTMF are supported. When initially
programmed, the chip defaults to MF mode on powerup.
The powerup mode is stored in eeprom. This may be
temporarily toggled to the opposite mode by holding
down the 2600 key while powering up. The next powerup
reverts to the default tone mode. The default tone
mode may be persistently toggled by holding down the
"*" while powering up. This will toggle the tone mode,
but also write the new setting to eeprom so subsequent
powerups will default to the opposite tone mode. A
tone confirms the write to eeprom.
- Two tone durations/spacings are supported, 75 ms.
(default) and 120 ms. The tone duration/spacing is
stored in eeprom. The duration/spacing may be
permanently toggled by holding down the "#" key at
power up. This will toggle the duration/spacing and
write the new value to eeprom for subsequent powerups.
A tone confirms the write to eeprom. The
duration/spacing value is used in manual mode and also
in memory playback mode. The KP tone is always 120 ms.
duration, regardless of this setting. The 2600 tone
duration is always 1.5 seconds.
- There are two operating modes, normal and playback.
The chip always powers up in normal mode. Operating
modes are toggled by holding down the 2600 key for 1
second. Tones confirm the mode change. In normal mode,
dialing is manual using the current tone mode and
duration settings. In playback mode, each keypad key
will play back any stored dialing sequences.
- There are 12-32 digit dialing memories, one for each
keypad key. On power-up, a playback to normal mode
change, or a dialing memory write the chip stores the
next 32 key presses in a RAM buffer. At any point,
this buffer may be saved to one of the 12 dialing
memories by pressing and holding the corresponding key
for 2 seconds. (The digit played when initiating a
write to the memory will not be saved.) A tone
confirms the eeprom write. Memories are cleared by
storing to memory immediately after a power-up, mode
change from playback to normal, or after a previous
dialing memory save. The MF/DTMF tone mode is saved in
memory, so the dialing memories may contain a mix of
MF and DTMF sequences. If a 2600 tone is saved, a 1.5
second fixed delay will be added after the tone to
allow for a wink ack from the trunk. Then, any
additional tones will play.
Source
http://www.geocities.com/donfroula/ADC_blue_box_12.pbp.txt
.hex file for programmer
http://www.geocities.com/donfroula/ADC_blue_box_12.hex.txt
"schematic" :-)
http://www.geocities.com/donfroula/pwm_bb_schematic.gif
--- Donald Froula <dfroula at sbcglobal.net> wrote:
> Other versions of code using the same circuit
> schematic at:
>
> http://www.geocities.com/donfroula/
>
> in the ADC_blue_box... files.
>
> Note, the circuit uses a single pin and resistor
> voltage divider to interface all 13 keys of the
> keypad.
>
> Other stuff from my older 68HC705C8 design as well.
>
> Don
>
> --- Donald Froula <dfroula at sbcglobal.net> wrote:
>
> > Sorry, Jerry. I guess you have to be logged in to
> > access the files.
> >
> > Here are the direct links:
> >
> > schematic:
> >
>
http://www.geocities.com/donfroula/pwm_bb_schematic.gif
> >
> > prototype pic:
> > http://www.geocities.com/donfroula/IMG_3313.JPG
> >
> > programmer pic:
> > http://www.geocities.com/donfroula/IMG_3317.JPG
> >
> > source code:
> >
>
http://www.geocities.com/donfroula/ADC_blue_box_09.txt
> >
> > hex file for programmer:
> >
>
http://www.geocities.com/donfroula/ADC_blue_box_09.hex.txt
> >
> > Don
> >
> > --- Jerry Petrizze <t2600 at sbcglobal.net> wrote:
> >
> > > Yo Don: How does one access this stuff???
> > > I got an error message when trying.
> > > Jerry Petrizze
> > >
> > >
> > > ----- Original Message -----
> > > From: "Donald Froula" <dfroula at sbcglobal.net>
> > > To: <voip at ckts.info>
> > > Sent: Thursday, March 13, 2008 5:59 PM
> > > Subject: [VoIP] 12F683 PIC for Tone Generation
> > >
> > >
> > > > I've been fooling around with the 12F683 PIC
> > > > microcontroller for a few months. I am using
> the
> > > > PicBasic Pro compiler, which makes development
> > > quick
> > > > and easy, compared to assembly language.
> > > >
> > > > I coded up and built a blue box circuit with
> 12
> > > > non-volatile memories. It uses the PicBasic
> Pro
> > > > "FREQOUT" command that can generate single or
> > dual
> > > > tones using Pulse Width Modulation. With
> proper
> > > > filtering of the PWM, it could have all sorts
> of
> > > > interesting telephony applications.
> > > >
> > > > Schematic, source code, and programmer hex
> files
> > > are
> > > > at the Binrev board:
> > > >
> > > >
> > >
> >
>
http://www.binrev.com/forums/index.php?showtopic=36307
> > > >
> > > > Don
> > > >
> _______________________________________________
> > > > VoIP mailing list
> > > > VoIP at ckts.info
> > > > http://lists.ckts.info/mailman/listinfo/voip
> > > > Project Web Page: http://www.ckts.info/
> > > _______________________________________________
> > > VoIP mailing list
> > > VoIP at ckts.info
> > > http://lists.ckts.info/mailman/listinfo/voip
> > > Project Web Page: http://www.ckts.info/
> > >
> >
> > _______________________________________________
> > VoIP mailing list
> > VoIP at ckts.info
> > http://lists.ckts.info/mailman/listinfo/voip
> > Project Web Page: http://www.ckts.info/
> >
>
>
More information about the VoIP
mailing list