Author Topic: Pulse to DTMF converter project questions (ATTINY85V)  (Read 1358 times)

0 Members and 1 Guest are viewing this topic.

Offline agent_powerTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: it
Pulse to DTMF converter project questions (ATTINY85V)
« on: May 19, 2026, 08:31:34 pm »
Hi all

I have built this project with the goal to attach an old phone or modem to an ATA device, but I can't figure out some things regarding the microcontroller.

https://www.mattmillman.com/projects/building-your-own-pulse-to-tone-converter/

There are two unknowns for me:

1. How do I verify the device is working correctly? When powered up on a lab supply, I can see the voltages but not a clock signal. Is the clock supposed to be present all the time on power up for ATTINY85V? I tried setting the fuses but now I can't read it back anymore and a second ATTINY that I haven't touched fuses settings still reads back but also doesn't work.

LFUSE: 0xFD
HFUSE: 0xDF
EFUSE: 0xFF

I tried to match this on a TL866II+ and XGPro, but I'm not sure. Do I need another type of programming device?

2. Next is one of the phones I want to attach this device to isn't a traditional rotary phone, but a wall phone with electronics in it for pulse generation. The pulses are arount 50 V. I assume I can't just hook it up to the inputs of the microcontroller without additional measures?


See attachment:
- Schematic of module as in the blog post
- Phone schematic
- Pulses from the phone circuit

Thanks for your help
 

Online MarkF

  • Super Contributor
  • ***
  • Posts: 3270
  • Country: us
Re: Pulse to DTMF converter project questions (ATTINY85V)
« Reply #1 on: May 19, 2026, 10:02:37 pm »
You do know (at least here in the USA) that the old rotary phones will
still work on modern phone lines?  The phone company's hardware still
detects the dialing pulses as well as the tones.

Nothing extra needed.  Just plug the phone in.
 

Online squadchannel

  • Super Contributor
  • ***
  • Posts: 1257
  • Country: jp
  • deepl translate user
Re: Pulse to DTMF converter project questions (ATTINY85V)
« Reply #2 on: May 19, 2026, 10:45:50 pm »
In Japan, contact to the telephone company will have them switch to pulse dialling.

Ahh, connect to the ATA?
Isn’t it in the settings menu?
« Last Edit: May 19, 2026, 11:00:02 pm by squadchannel »
 

Offline agent_powerTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: it
Re: Pulse to DTMF converter project questions (ATTINY85V)
« Reply #3 on: May 20, 2026, 06:23:47 am »
Not all VoIP hardware supports pulse dialing, otherwise this project and others like the Rotatone would have been superfluous. The times of copper landlines are kind of over where I live.

Any ideas if I should have a clock signal on power up and do I understand correctly that the port B shall not exceed VCC of the microcontroller?
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 4119
  • Country: us
Re: Pulse to DTMF converter project questions (ATTINY85V)
« Reply #4 on: May 20, 2026, 07:48:01 am »
Your programmer should be able to communicate with the MCU -- i.e. download its flash memory, read and set the fuse bits, ...

However, it is possible to "brick" AVR chips if you happen to disable the RESET pin or SPI programming.  In that case you need to use high voltage programming as described in this article:

https://ericdraken.com/hvsp/

I believe the TL866 and XGecu can use high-voltage programming on AVR chips. I actually downloaded and installed Xgpro but couldn't figure out how to do it. Maybe you have to select "ICSP Port".  (And maybe you actually need a XGecu programmer attached.)

About high-voltage programming and the TL866... found this post from 2016:

https://www.eevblog.com/forum/microcontrollers/hobbyist-avr-programmer/msg952432/#msg952432

The MiniPro TL866A supports high voltage programming either ICSP or in the 40-pin ZIF socket. (The TL866CS does not have the ICSP header but this is a problem easily solved). It supports at least ATMega and ATTiny, but you will need to check if you other specific ones in mind. I do not suggest it is the best overall solution here but I mention it for the high voltage programming capability which has been noted as lacking in many other tools.  The TL866 is an affordable universal programmer that supports many types of devices, I find it indispensable. It might be worth having in addition to another ICSP/debugger, especially if that can't do HV programming.
« Last Edit: May 23, 2026, 04:10:20 am by ledtester »
 

Offline agent_powerTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: it
Re: Pulse to DTMF converter project questions (ATTINY85V)
« Reply #5 on: May 24, 2026, 07:11:56 pm »
This is interesting, but I have to brick many ATTINYs to make it worthwile.

Shouldn't I have a clock signal on power-up? I'm still trying to figure out what the desired condition of this device is when power is applied.

I assumed this crystal and capacitor arrangement should be oscillating.
 

Online ledtester

  • Super Contributor
  • ***
  • Posts: 4119
  • Country: us
Re: Pulse to DTMF converter project questions (ATTINY85V)
« Reply #6 on: May 24, 2026, 08:03:16 pm »
I assumed this crystal and capacitor arrangement should be oscillating.

If the fuse bits set the clock to the internal RC oscillator you will not see oscillation on pins 2 and 3.

I would first get the code working on an Arduino board - like a Uno or Nano. You won't have any crystal oscillator or fuse problems with those boards.

Quote
2. Next is one of the phones I want to attach this device to isn't a traditional rotary phone, but a wall phone with electronics in it for pulse generation. The pulses are arount 50 V. I assume I can't just hook it up to the inputs of the microcontroller without additional measures?

In the project you linked to the voltage from the switches is just 5 volts. To have the microcontroller safely sense 50V signals you will need additional circuitry.

« Last Edit: May 24, 2026, 08:22:51 pm by ledtester »
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1944
  • Country: gb
Re: Pulse to DTMF converter project questions (ATTINY85V)
« Reply #7 on: May 25, 2026, 05:14:19 am »
Checked the fuse bytes on the datsheet - set for external oscillator 0.8-3.0MHz  - probably fine for 4MHz - but one this is set, it requires an external clock to program it.  So if you have this chip in a socket, with a crystal osc, but remove it from circuit and plug it into a programmer that doesn't supply a clock to its clock IN pin (pin 2 I think) and it won't respond.

So once those fuses are set, you're stuck with the conditions those fuses put the chip in for progrmaming.  As mentioned, if you accidently disable the external reset or the "SPIEN" fuse, that disables serial programming so you have to use a HV programmer.  But the fuse bytes you provided do neither of those.  They do however change the default "internal osc" to external Xtal driver - so the cihp needs to be clocked to write/read to/from the flash.

It's been a couple of decades since I've used any of the Attiny series, and I remember this being somewhat annoying.

Edit: just remembered - the fuse settings also enable CKDIV8 - divide external clock by 8.  I *think* (its been 20 years!) that means the serial programming clock must be at least 1/8 of the external clock.  That is, if you provide say 4MHz to pin 2 during programming, the serial clock can't be greater than 500kHz.  Its a small device with not that much memory so just run the serial clock at its lowest speed - 125kHz is nice and relaible, and hopefully your programmer can also supply an external clock.
« Last Edit: May 25, 2026, 05:18:53 am by Buriedcode »
 
The following users thanked this post: neillnz


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf