Here is the error i get when i do this
include "modedefs.bas"
ERROR Line 12: ':' or '=' Expected (Token 'modedefs.bas') (Speech test.pbc)
Any ideas?
Here is the error i get when i do this
include "modedefs.bas"
ERROR Line 12: ':' or '=' Expected (Token 'modedefs.bas') (Speech test.pbc)
Any ideas?
You do not need "modedefs.bas" in Pic Basic. It is part of it, sorta.
You also said the chip tries to talk so that is a good sign, IT IS ALIVE
Any way.
From the data sheet.
http://www.speechchips.com/downloads...eet_prelim.pdf
So.For example, the pistol shot sound is 253. Create a string with text and include the
value 253 somewhere in it. The text will be read back and the gunshot sound will
play. In a string constant in C, the value can be either octal or hexadecimal and is
preceded by an escape character.
Octal Value Encoded in String “This is a gunshot\375”
Decimal Value Encoded in String “This is a gunshot \xFD”
The two byte commands (volume, pitch, etc.) will only pass through correctly if the
second byte is a non-text character. Otherwise the TTS256 will process the second
byte as text and incorrect data will be sent to the SpeakJet. Two byte commands
can be sent without this restriction by placing the TTS256 in pass through mode.
or try the exampleCode:serout 7, T9600, ("at your command\15")
Code:serout 7, T9600, ( “This is a gunshot \xFD”)
Dave
Always wear safety glasses while programming.
I tried both, if i put in inside the quotes, it will actually attempt to say backslash 15
and another thing, if I do this, it doesnt say anything
Main:
serout 7, T9600, ("at your command\15")
End
-----
But if I do this this(below), it works, but repeats itself over and over again with the backslash 15 ,--that is why I think it is with the buffer, i just need to know how to send a data byte in PICBASIC and not a string.
Main:
serout 7, T9600, ("at your command\15")
goto Main
---
Any help????
The data sheet for this part could tell more, it is not much help...
Have you tried this? From the data sheet:
Pass Through Mode
In cases where the host processor needs to communicate directly with the SpeakJet,
the TTS256 offers a pass though mode that will send any received codes from the
host directly to the SpeakJet without translation of any kind.
This is accomplished by sending the text "passthruon" and an end-of-line character.
All characters sent to the TTS256 will be sent directly to the SpeakJet without
translation. An "X" ($58) will terminate the pass through mode. Note that this
character cannot be used as the second byte of a two-byte command as it will
terminate the pass through mode. An "X" is also used to terminate the SCP mode for
communication directly with the SpeakJet internal registers. An alternate \A may be
used to terminate SCP mode and not pass through.
Dave
Always wear safety glasses while programming.
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.
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
but if you leave out the goto cammand it will never say anything?Code:Main: serout 7, T9600, ("at your command\15") goto Main
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:
and if that works, see how low you can adjust the pause value.Code:Main: PAUSE 5000 serout 7, T9600, ("at your command\15") End
Art.
Bookmarks