Ask For Help


Closed Thread
Results 1 to 19 of 19

Thread: Ask For Help

  1. #1
    Bakari's Avatar
    Bakari Guest

    Smile Ask For Help

    Dear Memebers,

    Just I have starred with PIC microcontrollers and I'd to know how to write on EEPROM of PIC16F877. Also is it Possible to generate sound using PIC16F877 and how ???

    Best regards,
    Bakari

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


    Did you find this post helpful? Yes | No

    Default

    in the PBP manual, look for DATA, WRITE, READ statement

    For the sound... HPWM, SOUND, FREQOUT
    Steve

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

  3. #3
    Bakari's Avatar
    Bakari Guest


    Did you find this post helpful? Yes | No

    Red face Correcting the question

    Dear Memebers,

    Thank you for helping me in writing on EEPROM. Regarding the sound, I am sorry because my question wasn't clear. I mean to generate words like Hi, Bye, Good, Bad, Hot ....
    In fact I am working on robot and I'd like it to talk. Thanks for your support.

    Best regards,

    Mohammad

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


    Did you find this post helpful? Yes | No

    Default

    could be done using an external EEPROM and dumping the WAV files into... but you may also look at some dedicated Chips like ISD4002 or some others like that.

    HTH
    Steve

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

  5. #5
    Bakari's Avatar
    Bakari Guest


    Did you find this post helpful? Yes | No

    Red face Sorry for disturbance

    Dear Member,

    I am really sorry for disturbing you with my questions and I am completely appreciating your help. Final question about this point, could you please give me the steps for dumping the wav. file in EEPROM and replaying it back using PIC16F877 microcontroller. Also, what is a typical memory size for the EEPROM recommended to replay for 2 minutes?

    Best regards,

    Bakari

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


    Did you find this post helpful? Yes | No

    Default

    for two minutes... you'll probably need a Flash Card instead or use few 24LC512 on the same I2C bus. For 2 minutes i would suggest to use any ISD chip as i previously suggest.

    Basically you may record the Wav file in your computer with a decent Sampling rate, rename it as .BIN then dump it to your EEPROM. Knowing the file size, you'll know the EEPROM size...

    The wav output is pretty simple, you will read your EEPROM, send it to DAC. It could be as simple as a resistor network and a OP-amp

    Now, you can also use the same method but use MP3 format instead and use a MP3 decoder IC like VS1001K

    Or if you have some guts, you may try the following
    http://www.romanblack.com/picsound.htm

    good luck!
    Steve

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

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


    Did you find this post helpful? Yes | No

    Wink Make it simple ...

    Hi,

    Here to find an oldie : http://www.speechchips.com/shop/

    Yesss ... the SPO 256 !!! Hatari !!!

    just REALLY easy to use ... now, may be difficult to find, but worth it !!!

    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 " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    Yup that's an oldie... how about finding an old Texas Instrumens ti-99/4a speech module

    If it's just human words, there's probably some text-to-speech ICs somehow somewhere over the web... sure it must exist. If my memory is good Winbond do some.. but... DUH! Google!

    EDIT: nice link Alain..
    Last edited by mister_e; - 16th July 2006 at 16:12.
    Steve

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

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


    Did you find this post helpful? Yes | No

    Talking Oldies

    Hi, Steve

    My HP86 with all its peripherals is still alive ...

    Ti doesn't speak HP language !!! No Ti home ...

    Still useful at home: Unicom 202SR , HP29 ... and the first HP Scientific calculator !!! ( The model 34 ? )

    Winbond = $$$$$$ ...

    maybe, if not too much words used, an ISD could be used here ...

    Cheers, Alain

    PS: I found another juke-box "asm include" program ... straight from HTTTP format !!! converter utility comes with.
    Last edited by Acetronics2; - 16th July 2006 at 18:16.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  10. #10
    Bakari's Avatar
    Bakari Guest


    Did you find this post helpful? Yes | No

    Red face Thanks for support

    Dear members,

    Thanks a lot for your support. In fact I have started with the suggestions of mister_e to use ISD4002 with PIC16F877. In fact, while I am reading about it, I faced a lot of difficulties in the part of programming it and interfacing it with PIC16F877. Therefore, it will be great if you provide me with an illustration about these points and detailed steps for recording and playing saved voice messages.

    Best regards,

    Bakari

  11. #11
    Bakari's Avatar
    Bakari Guest


    Did you find this post helpful? Yes | No

    Default Help me, I am in trouble.

    Dear Members,

    Can any body show me the connection between PIC16F877 and ISD4002. I connected them and nothing is working. I have decided to start the troubleshooting with the connection. My connection was as follow (both have ICs DIP pachaging):

    PIC16F877 ISD4002

    Pin 18 Pin 28

    Pin 23 Pin3

    Pin 24 Pin 2

    Pin 1 in ISD4002 is connected to ground because I need it always in slave mode. Pin 7 in PIC16F877 is connected to Vcc since I need it always in master mode.

    Looking for any help.

    Best regards,
    Bakari

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


    Did you find this post helpful? Yes | No

    Default

    To make things simple, you'll need to use SHIFTIN/SHIFTOUT in PBP. so it doesn't really matter the PIC I/O you use.

    A while back i used a PIC16F628, Bellow is the hardware assignement i used.
    Code:
        ' I/O Definition
        ' ===============
        '
        TRISA = %00110000    ' PORTA Output on :
                             '         PORTA<3:0> : LCD data 
                             '         PORTA<7:6> : LCD RS & E bit
                             '
                             ' PORTA Input on :
                             '         PORTA.4 : "ALT PLAY" Button
                             '         PORTA.5 : "PLAY" button    
                             '
        TRISB = %11110001    ' PORTB Output on : 
                             '         PORTB.1 : ISD4002 SS pin 
                             '         PORTB.2 : ISD4002 SCLK pin 
                             '         PORTB.3 : ISD4002 MOSI pin
                             '
                             ' PORTB Input on :
                             '         PORTB.0 : ISD4002 INT pin
                             '         PORTB.4 : ISD4002 MISO pin
                             '         PORTB.5 : ISD4002 RAC pin
                             '         PORTB.6 : "SETUP" button
                             '         PORTB.7 : "RECORD" button
    Later to write to the ISD chip, i used
    Code:
        ss = 0
        shiftout MOSI,SCLK,LSBFIRST,[ISDword\16]
        ss = 1
    to read from
    Code:
            ss=0
            shiftin miso,sclk,lsbpre,[isdpointer\16]
            ss=1
    HTH
    Last edited by mister_e; - 22nd July 2006 at 21:53.
    Steve

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

  13. #13
    Bakari's Avatar
    Bakari Guest


    Did you find this post helpful? Yes | No

    Default Asking for Code

    Dear mister_e,

    Thanks for your support. Could you please send me your code that used for controlling ISD4002. The one that includes the recording and playing back as well as the interrupt routine and the EOM one.

    Waiting for your help, please

    Best regards,
    Bakari

  14. #14
    Bakari's Avatar
    Bakari Guest


    Did you find this post helpful? Yes | No

    Default Asking for additional support

    Dear Member,

    Could you please tell me why you need to connect the interrupt pin from ISD4002 to the microcontroller while you can read the EOM or OVF flag from the MISO register? Also, why are you connecting the RAC pin? I think it’s possible to keep it floating. Finally, is it required to set a frequency for the SCLK pin from the microcontroller or they will communicate by default without setting any clock?

    All my questions are based on my understanding. If there is any thing wrong please inform me. I am sorry for disturbing you. Thanks again for your help.

    Best regards,
    Bakari

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


    Did you find this post helpful? Yes | No

    Default

    for the code... sorry i can't post this one. It's prop to a customer but i remind to see some example here... do a search and you'll find them

    Yes you can skip the INT pin and read the EOM instead, same for RAC.

    I used them to make things simple and retrieve the begin and end address of each message.

    ISDs chips are close to be great, the only kind of bug if those 4002, is the pop sound at the begining and at the end... wich can be resolved in hardware... one reason of the RAC and INT.

    You don't need to bother about the SCLK frequency... it will work. It's a synchronous communication, not like a simple SERIN/SEROUT where the baudrate is important.
    Steve

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

  16. #16
    Bakari's Avatar
    Bakari Guest


    Did you find this post helpful? Yes | No

    Default ...... Thanks ......

    Dear mister_e,

    I am sending this email for you to say thanks a lot for your great efforts (no other questions up to now)... Thaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aanks.

    Yours,
    Bakari

  17. #17
    Join Date
    Nov 2005
    Location
    Cambridge UK
    Posts
    45


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    ISDs chips are close to be great, the only kind of bug if those 4002, is the pop sound at the begining and at the end... wich can be resolved in hardware... one reason of the RAC and INT.
    Hi,
    I am having problems with the pop sound can you let me know how you resolved it please? I found a data sheet from winbond giving a solution to the pop when recording, but not during the play back.

    Thanks
    Nick

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


    Did you find this post helpful? Yes | No

    Default

    That's a pain, the only way i found was to monitor the address and use a extra mute circuit just before the EOF Interrupt.
    Steve

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

  19. #19
    Join Date
    Nov 2005
    Location
    Cambridge UK
    Posts
    45


    Did you find this post helpful? Yes | No

    Default

    I was thinking of turning the audio amp off a few milli seconds before the pop,
    If I record the output audio of the 4002 back to my laptop I can use audio software to determine the average pop time and power down the lm386 before it happens.

    When I saw the bit about RAC and INT I thought you might have a way controlling it via the software.

    Regards
    Nick
    Last edited by Agent36; - 22nd September 2006 at 16:46.

Members who have read this thread : 1

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