caramoan tour package

caramoan tour package

Author Topic: help..dtmf generator application..  (Read 568 times)

Offline novice_bino

  • CR2032 Battery
  • **
  • Posts: 10
  • Pogi/Ganda Points: 0
help..dtmf generator application..
« on: November 23, 2008, 07:36:28 PM »
i would to create a "DTMF generator application(software)" na illagay ko sa fone ko...anyone knows how to start with it??

Philippine Electronics Forum

help..dtmf generator application..
« on: November 23, 2008, 07:36:28 PM »

Offline maldihtah13

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4671
  • Pogi/Ganda Points: 120
  • Gender: Female
  • Everyday is a learning process so try to learn ;D
    • Blogspot
Re: help..dtmf generator application..
« Reply #1 on: November 23, 2008, 10:22:47 PM »
i would to create a "DTMF generator application(software)" na illagay ko sa fone ko...anyone knows how to start with it??

You do not need to generate DTMF. I think you just need to call the function.

Philippine Electronics Forum

Re: help..dtmf generator application..
« Reply #1 on: November 23, 2008, 10:22:47 PM »

Offline trilobugz

  • Size AA Battery
  • ****
  • Posts: 110
  • Pogi/Ganda Points: 2
Re: help..dtmf generator application..
« Reply #2 on: November 23, 2008, 10:41:09 PM »
i would to create a "DTMF generator application(software)" na illagay ko sa fone ko...anyone knows how to start with it??

pwede siguro dyan java mobile programming like netbeans for j2me.

Philippine Electronics Forum

Re: help..dtmf generator application..
« Reply #2 on: November 23, 2008, 10:41:09 PM »

Offline zer0w1ng

  • Technical People
  • Gas Turbine
  • *****
  • Posts: 2179
  • Pogi/Ganda Points: 305
  • Gender: Male
  • Enter any 11-digit prime number to continue...
    • The Cebuano Geek
Re: help..dtmf generator application..
« Reply #3 on: November 24, 2008, 05:34:19 AM »
I have an old DTMF generator function in PIC assembly found at my old website. See here http://www.microelektronics.com/index.php?sel=snippets

I will just post it here to be easier:
Code: [Select]
;**********************************************************************
;DTMF GENERATION
; by Regulus Berdin
; W holds the key to send
; 10-A  11-B  12-C  13-D  14-*  15-#
; uses 18 cycles per count optimized for 4MHz crystal
;
;DTMF                           ERROR
;TONE   DELAY   TONE GENERATED  (Hx)    %
;697    40      694.4444444     2.56    0.37
;770    36      771.6049383     1.60    0.21
;852    33      841.7508418     10.25   1.20
;941    30      925.9259259     15.07   1.60
;1209   23      1207.729469     1.27    0.11
;1336   21      1322.751323     13.25   0.99
;1477   19      1461.988304     15.01   1.02
;1633   17      1633.986928     0.99    0.06
        cblock  LASTVAR
                lowcnt
                highcnt
                slowcnt
                shighcnt
                hdcnt
                ldcnt
        endc

tlowcnt
        addwf   PCL,f
        dt      30, 40, 40, 40
        dt      36, 36, 36, 33
        dt      33, 33, 40, 36
        dt      33, 30, 30, 30

thighcnt
        addwf   PCL,f
        dt      21, 23, 21, 19
        dt      23, 21, 19, 23
        dt      21, 19, 17, 17
        dt      17, 17, 23, 19

dtmfsend:
        andlw   0x0f
        movwf   tmp
        call    tlowcnt
        movwf   slowcnt
        movwf   lowcnt

        movf    tmp,w
        call    thighcnt
        movwf   shighcnt
        movwf   highcnt

        clrf    ldcnt
;       movlw   .22                     ;adjust here for delay
        movlw   MTXLENGTH
        call    EE_read
        addlw   1
        movwf   hdcnt                   ;approx. 100 ms

dloop0  clrwdt                          ;2
        nop                             ;
dloop   movlw   (DHI_PIN + DLOW_PIN)
        decfsz  lowcnt,f
         andlw  DHI_PIN
        decfsz  highcnt,f
         andlw  DLOW_PIN
        movwf   tmp
        xorwf   PORTB,f

        movf    slowcnt,w
        btfsc   tmp,0
         movwf  lowcnt

        movf    shighcnt,w
        btfsc   tmp,1
         movwf  highcnt                 ;13

        IF      DTMFTESTING
        nop
        goto    dloop0
        ENDIF

        decfsz  ldcnt,f                 ;2/1
         goto   dloop0                  ;2
        decfsz  hdcnt,f                 ;2/1
         goto   dloop                   ;2      ;5

        return

This routine uses 2 pic pins for high and low tones.  Just add 2 stage
low pass filters the each of the pins and combine both.  This works well
and has a low error less than dtmf receiver specs.
The Cebuano Geek

Philippine Electronics Forum

Re: help..dtmf generator application..
« Reply #3 on: November 24, 2008, 05:34:19 AM »

 

Privacy Policy

Contact Us: elabph@yahoo.com