SEROUT command (single byte value not string)


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default

    For starters, Decimal 15 does not equal 0x0D
    Hexidecimal 0x0F equals Decimal 15,
    but this isn't C. For Picbasic (Pro at least) the Hex is represented $0F.

    From reading the PBP manual (that's PicBasic Pro),
    It appears to me that serout cannot send raw data.

    The example you were given before:
    "SEROUT 0,N2400,[#B0,10] ‘ Send the ASCII value of B0 followed by a linefeed out Pin0 serially"
    is only sending a string because a linefeed is the ASCII control code associated with the decimal value 10,
    and the command line is going to send the ASCII representation of variable B0 before that (still a string).

    That being said I'm suprised even the plain vanilla PicBasic can't send proper serial data.
    I can't be sure since I don't have the manual for it.
    I am sure that PBP can send raw serial data... I do it all the time.
    Art.

  2. #2
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default

    Why do you think a decimal 15 value will make the Speakjet stop repeating itself?
    There is nothing in the datasheet to suggest that. It say that value will make the voice
    sound relaxed.

    You say this makes the Speakjet repeat the string over and over
    Code:
    Main:
    
    serout 7, T9600, ("at your command\15")
    
    goto Main
    but if you leave out the goto cammand it will never say anything?

    Might I suggest that the Microchip pic has powered up and sent the serial command
    before the Speakjet has become ready to receive it?

    Try this:

    Code:
    Main:
    
    PAUSE 5000
    
    serout 7, T9600, ("at your command\15")
    
    End
    and if that works, see how low you can adjust the pause value.
    Art.

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