1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

!!!NEED HELP!!!add in recorder voice in 18f4520

Discussion in 'Microcontrollers' started by caltex, Oct 10, 2007.

  1. caltex

    caltex New Member

    Joined:
    Oct 10, 2007
    Messages:
    3
    Likes:
    0
    hi guys,


    how do i add in a pre-recorder voice in the pic....and output it out through a speaker???


    many thanks for your replies......
     
  2. blinkstar88

    blinkstar88 New Member

    Joined:
    Jul 27, 2006
    Messages:
    45
    Likes:
    1
    i;m absolutely no idea, anyone?
     
  3. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    Store the audio data as a table in the program memory, them read it sequentially and play it back out through a digital to analogue converter. Don't forget the low pass filter after the D2A.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. caltex

    caltex New Member

    Joined:
    Oct 10, 2007
    Messages:
    3
    Likes:
    0

    has Anyone comes across this?
     
  6. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    What part of my explanation didn't you understand?.
     
  7. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
  8. kjennejohn

    kjennejohn New Member

    Joined:
    Mar 19, 2006
    Messages:
    338
    Likes:
    8
    Location:
    Bay Area, California
    Thanks, 3v0, that was a good solution for Q&D audio messages.
    kenjj
     
  9. caltex

    caltex New Member

    Joined:
    Oct 10, 2007
    Messages:
    3
    Likes:
    0

    hi, i've converted the audio data to .asm table already. The problem now is, what is the code to play the audio? how shld i write it?

    sorry about it.. im quite new to programming PIC
     
  10. bananasiong

    bananasiong New Member

    Joined:
    Mar 7, 2006
    Messages:
    1,893
    Likes:
    7
    Location:
    Malaysia
    Read from where you store the audio data, then use external DAC, either serial or parallel interface. You may need to amplify the converter's output.
     
  11. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,331
    Likes:
    653
    Location:
    Derbyshire, UK
    Read first entry, output to D2A, delay for next byte.
    Read second entry, output to D2A, delay for next byte.
    Repeat until all done.

    The delay time is dependent on your sampling rate.
     
  12. waytronic

    waytronic New Member

    Joined:
    Feb 4, 2010
    Messages:
    2
    Likes:
    0
    Location:
    Guangzhou, China

Share This Page