PIC16F876 + QV306m4 Problems


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    May 2005
    Location
    Cesena - Italy
    Posts
    13

    Question PIC16F876 + QV306m4 Problems

    Hi All.
    I'm Paolo from Italy ...a new member! I read threads on this great forum and I think I learn very much, but I'm a novice ... and the solution of some problems aren't write in manuals and datasheets but only with much esperience.
    I'm sorry for my bad english but I hope you can understand my problem:
    What the software must do:
    I read serially a signal from a wether station
    Some values are stored and when I press one button, I send serially commands to control a quadravox QV306m4 sound module to speach all values.
    The problem is great and only one! When I push the button the QV306m4 sound well only some world or number...and not all.
    I can say:
    1 The qv306m4 works ok (tested with my PC directly)
    2 The software of the peek read perfectly the input serial port
    3 The output code to control the qv306m4 aren't totally correct...as I can ear in the speacker of the qv306m4 but the software seem to be ok..HI
    In the attachment you can see my terrible software..plase don't kill me ..it's my first software on pic.

    I think the problem is in my software for the compatibility with a PIC ...too much gosubs routines, or too much var word or con...I don't know!
    Thanks for reading and help
    Paolo
    Attached Files Attached Files

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi pcaccia,

    With SEROUT2 you can't use the t2400 type constants for the Mode value. They can only be used with SEROUT.

    For True 2400 use a mode value of 396.

    SEROUT2 QV_RX,396,[frase]

    HTH,
       Darrel

    P.S. For a complete list of SEROUT2 modes, see this page at melabs
    http://www.melabs.com/resources/ser2modes.htm
    Last edited by Darrel Taylor; - 26th May 2005 at 21:05.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by taken from code
    t2400 con 396 ' Velocità della seriale 2440/8/n/1 con Max 232
    Darrel are you saying that we can't define our own variable with serout2 ?
    Steve

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

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    No, of course you can.

    He had t2400 listed in 2 different places in the program, one commented one not. I didn't see the second one.

    My error.

    Darrel

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


    Did you find this post helpful? Yes | No

    Default

    mmm i think i've found the problem. You said that some are ok, some not... what about if you change your message constants to
    Code:
    _zero           con 0
    _uno            con 1
    _due            con 2
    _tre            con 3
    _quattro        con 4
    _cinque         con 5
    _sei            con 6
    _sette          con 7
    _otto           con 8
    _nove           con 9
    _dieci          con $10
    _undici         con $11
    _dodici         con $12
    _tredici        con $13
    _quattordici    con $14
    _quindici       con $15
    _sedici         con $16
    _diciassette    con $17
    and so on for the others.. just add an $ befor your number. Post your results after that.
    Steve

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

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Let's try this again.

    According to the datasheet for the qv306m4.
    To select one of the fixed phrases, issue a set mode command for “direct” (0f0h), then send the number of the phrase to be played.
    I see that you've defined a constant for the command

    QV_Direct con $F0 '240 dec

    but it doesn't get sent prior to sending the phrases.

    Darrel

  7. #7
    Join Date
    May 2005
    Location
    Cesena - Italy
    Posts
    13


    Did you find this post helpful? Yes | No

    Default Thanks for the reply!

    OK today I test my software with a ICD debugger.
    The software work perfectly.
    All value sent are exactly...but the qv306m4 doesn't work perfectly.
    In some case when I send the address 011 he speack the correct word (eleven) with others address he speack wrong word..(but the address number is correct!)
    I add the direct command $f0, but the problem is the same.
    In the qv306m4 datasheet manual I read it's possible to create a string of max 32 characters and speack all in the same time...I will try this...
    All new ideas will be accepted!
    I will try also to reprogram the qv306m4...
    In the next reply I send you the result.
    Thanks

Similar Threads

  1. 2 PWM in 16F690 problems
    By ciendavila in forum mel PIC BASIC
    Replies: 9
    Last Post: - 27th April 2008, 09:03
  2. Input problems
    By ALFRED in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 23rd July 2006, 21:02
  3. Goto inside a gosub??? Problems...
    By leonel in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 13th October 2005, 12:17
  4. How to make working one HCTL2016 and a PIC16F876
    By hawk72501 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 9th July 2005, 13:46
  5. USART problems
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 47
    Last Post: - 6th March 2005, 21:45

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