please dont rip this site

Regulus Berdin's  PIC DTMF Encoder

;********************************************************************** 
;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. 
 


file: /Techref/microchip/dtmf-de-rb.htm, 2KB, , updated: 2009/2/13 14:27, local time: 2024/12/26 22:13,
TOP NEW HELP FIND: 
3.21.244.240:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://ecomorder.com/Techref/microchip/dtmf-de-rb.htm"> Regulus Berdin's,&nbsp;PIC DTMF Encoder</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .