Emic 2 help.
babo18
Posts: 5
Hello, I am new to electronics and I am trying to learn on my own. I do fairly well with th basic stamp basics but need some help with Emic 2 board troubleshooting. I cannot get any output from the Emic2 board. I hooked it up as per the instructions (gnd, 5V, sin, sout, and 2 speaker leads) but get no output. The orange led lights during start up and then the green led stays lit. I am using the sample code from the Parallax Emic2 page for the basic stamp. The program executes but I never see the red led light, so I assume there is no communication between the stamp and Emic2. Below is the program I am using.
' {$STAMP BS2}
' {$PBASIC 2.5}
EmicBaud VAR Word
EMIC_TX PIN 0
EMIC_RX PIN 1
Init:
DEBUG CLS, "Emic 2 Text-to-Speech Module Demonstration", CR, CR
EmicBaud = 16468
SEROUT EMIC_TX, EmicBaud, [CR]
SERIN EMIC_RX, EmicBaud, 5000, No_Response, [WAIT(":")]: DEBUG "Ready!", CR '
Main:
DEBUG "Speaking some text..."
SEROUT EMIC_TX, EmicBaud, ["S", "Hello. My name is the Emic 2 Text-to-Speech module. I would like to sing you a song.", CR]
SERIN EMIC_RX, EmicBaud, [WAIT(":")]
PAUSE 500
SEROUT EMIC_TX, EmicBaud, ["D1", CR]
SERIN EMIC_RX, EmicBaud, [WAIT(":")]
DEBUG CR, "Demonstration complete!"
END
'
[ Subroutines ]
No_Response:
DEBUG "Ending demonstration!"
END
I run the program and I get the message:" Emic 2 Text-to-Speech Module Demonstration", followed by a pause(5000), then the message "Ending demonstration!"
I am using p0 and p1 on the basic stamp. I have reversed these just in case I had them in the wrong place, but the result is still the same. I am not sure what I am doing wrong?
Any help would be greatly appriciated.
Thank You.
' {$STAMP BS2}
' {$PBASIC 2.5}
EmicBaud VAR Word
EMIC_TX PIN 0
EMIC_RX PIN 1
Init:
DEBUG CLS, "Emic 2 Text-to-Speech Module Demonstration", CR, CR
EmicBaud = 16468
SEROUT EMIC_TX, EmicBaud, [CR]
SERIN EMIC_RX, EmicBaud, 5000, No_Response, [WAIT(":")]: DEBUG "Ready!", CR '
Main:
DEBUG "Speaking some text..."
SEROUT EMIC_TX, EmicBaud, ["S", "Hello. My name is the Emic 2 Text-to-Speech module. I would like to sing you a song.", CR]
SERIN EMIC_RX, EmicBaud, [WAIT(":")]
PAUSE 500
SEROUT EMIC_TX, EmicBaud, ["D1", CR]
SERIN EMIC_RX, EmicBaud, [WAIT(":")]
DEBUG CR, "Demonstration complete!"
END
'
[ Subroutines ]
No_Response:
DEBUG "Ending demonstration!"
END
I run the program and I get the message:" Emic 2 Text-to-Speech Module Demonstration", followed by a pause(5000), then the message "Ending demonstration!"
I am using p0 and p1 on the basic stamp. I have reversed these just in case I had them in the wrong place, but the result is still the same. I am not sure what I am doing wrong?
Any help would be greatly appriciated.
Thank You.
Comments
Just curious, are you sure your Emic board works? Have you ever heard it speak?
Red & green LEDs are both on initially for 2 seconds, then red only while speaking, then green only after speech ends.
EmicBaud = 16468
The correct value is 84.
Sorry it took so long to reply, I had to give it up for the night. I used your code and it works great. I agree that the parallax sample code was confusing to decode as printed in the sample. I came up with the number 16468 by an online formula: (1000000/9600)-20, covert to binary, add 1 or 0 to the 13th, 14th,and 15th places, then convert back to a number. I found this formula in multiple places so I assumed it was correct. I really really appriciate your help on this because it was getting very frustrating.
Thanks Again,
Babo18
https://www.youtube.com/watch?v=inM04mo9D8Q and
Both chips are a lot of fun to play with. As soon as you get speech down, all sorts of new project ideas will pop into your head. Here's one of my faves: