dtmfout problem


Closed Thread
Results 1 to 23 of 23

Thread: dtmfout problem

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747

    Default dtmfout problem

    Hello,

    I finally got my circuit working... well almost.
    I use a pic chip with picbasic pro, I output DTMF and this goes through a filter shown in picbasic manual:
    http://www.melabs.com/resources/pbpmanual/5_17-5_21.htm
    From my scope I can see some 40v spike at the pin output and after the filter I do not see much maybe a few volts.
    This goes directly to an audio transformer.
    Is it normal to have 40v spike (the signal looks pretty nice). WHen I put a modem speaker at the pin output I can hear the dialing and maybe a third in strenght (sound) after the filter. At the output of the transformer I have an AC 250v capacitor. The pichip dials my phone, and I receive maybe 50% of the calls.
    Should I be using the filter? (I am not using an amplifier as mentionned in the manual)
    Is the 40v good to put directly on the transformer?
    Also from the speaker I hear a lot of background noise

    thanks
    k

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Any real circuit and code of that? Are you using 20MHz crystal?

    The noise is always there?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Lightbulb

    Hi,

    From the data I have here,...

    I see a damping 680 Ohm res. on the Pic side of the line trafo. ( // with the winding !!! )

    On the line side :

    in series with the primary :

    750 Ohms 2W // 1µF // TPJ ( to limit current to ~ 35 mA )

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Hi,
    I am using 20Mz
    I think the problem is more hardware than software..



    code:/
    '*************************
    '* Alarm system dialer *
    '*************************


    '//////////////////////////////
    '// Pic chip configuration //
    '//////////////////////////////

    INCLUDE "modedefs.bas" 'Includes supoprt for PicBasic language
    @ DEVICE pic16F88,CCPMX_ON

    ' Setup Crystal oscillator Frequency to be used by PIC chip in MHz
    DEFINE OSC 20 'use external 20mhz crystal

    ANSEL = 1
    CMCON = 7 ' Turn OFF the comparators so pins can be used as digital I/O-pins

    '///////////////////////////////////////
    '// Screen initialization //
    '///////////////////////////////////////


    DEFINE LCD_DREG PORTB ' Set LCD Data port
    DEFINE LCD_DBIT 4 ' Set starting Data bit (0 or 4) if 4-bit bus
    DEFINE LCD_RSREG PORTA ' Set LCD Register Select port
    DEFINE LCD_RSBIT 2 ' Set LCD Register Select bit
    DEFINE LCD_EREG PORTA ' Set LCD Enable port
    DEFINE LCD_EBIT 3 ' Set LCD Enable bit
    DEFINE LCD_BITS 4 ' Set LCD bus size (4 or 8 bits)
    DEFINE LCD_LINES 2 ' Set number of lines on LCD

    DEFINE LCD_COMMANDUS 2500
    DEFINE LCD_DATAUS 250
    DEFINE CHAR_PACING 2000
    pause 2000


    '/////////////////////////
    '// PIN configuration //
    '/////////////////////////

    TRISA = %00011000 ' Set PORTA to all input
    TRISB = %11111111 ' Set PORTB to all output
    PortA = 0


    '///////////////////////////////////////////////
    '// Variable Declaration and initialization //
    '///////////////////////////////////////////////


    counter var byte
    i var byte
    counter=0


    '//////////////////////////
    '// Program starts here //
    '//////////////////////////

    Main:
    lcdout $FE,1, "Counter:",dec counter
    Pause 500

    if PortA.4=1 then
    counter=counter +1 'Counter at 1 dials phone number
    goto Dial
    endif

    if PortA.4=0 then
    counter=0
    goto Main
    endif

    '//////////////////////////
    '// End of program here //
    '//////////////////////////

    Dial:
    'Determine which number to dial and dials it

    lcdout $FE,1, "Dial:",dec counter
    Pause 500

    if counter =1 then 'begin counter loop
    if PortB.0 = 1 then GOSUB Dial1760 'cel
    if PortB.1 = 1 then GOSUB Dial4392 'Ken
    if PortB.2 = 1 then GOSUB Dial9130 'Donald
    if PortB.3 = 1 then GOSUB Dial758 'Lyne
    Else
    counter =1
    goto Main
    endif 'end counter loop

    Pause 1000 'pause for 1 seconds
    if (counter > 1) or (counter =0) then counter =1

    'Keep counter to 1 after dialing, otherwise the program will keep dialing the number
    ' Will only redial if counter goes back to 0, that is alarm siren off

    goto Main



    '*************** subroutine here ********************
    Dial1760: 'cel
    lcdout $FE,1, "dialing1760 ",dec counter
    Pause 500
    PortA.1 = 1
    pause 3000
    DTMFOUT PortA.0, [5,1,4,4,4,4,4,4,4,2]
    pause 4000 'Pause 4 seconds
    DTMFOUT PortA.0, 20000,0, [5]
    pause 2000 'Pause 2 seconds
    PortA.1 = 0
    return

    end

    /end code

  5. #5
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    I think I might got the probe switch to 10x instead of 1x.. that would explain the 40v. I will check it once I get home...
    if so I guess I would have would have something like 3.7v output peaks on the pin.

  6. #6
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Ok , the scoipe was set at 100x. now I read 4v at the output, but still a lot of noise after the filter, and only dials 50% of the times

    k

Similar Threads

  1. Button problem driving me crazy!! Please help!
    By bearpawz in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 20th November 2007, 14:46
  2. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  3. Microcode Studio 18f2455 problem?????
    By volkan in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 21st May 2007, 21:04
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. PORTA.PinNo = 1 ' problem
    By frank small in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th May 2004, 14:30

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts