Pages: [1]   Go Down
Author Topic: VoiceBox: how to implement serial flow control?  (Read 1159 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I stacked a voicebox shield on my Arduino and and XBEE shield on that. I wrote a small Delphi program to send the phonemes to the arduino which plays the phonemes. This all works great untill the text gets too long. The VoiceBox has a buffer 64 bytes and that easily overflows in my setup (I am sending it complete poems :-D).

I guess that I should use the Data Out pins to check the status of the VoiceBox. Read out D0, when it is HIGH the buffer is half full, wait until the VoiceBox is ready (D2 HIGH) and continue.
- is that the correct approach?
- if so, how can I access those pins?

Thanks for any help!

Rnold
Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 71
Posts: 2612
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess that I should use the Data Out pins to check the status of the VoiceBox. Read out D0, when it is HIGH the buffer is half full, wait until the VoiceBox is ready (D2 HIGH) and continue.
- is that the correct approach?
- if so, how can I access those pins?
Links to the relevant Voicebox and XBee shield would help but assuming your using the Sparkfun shield (https://www.sparkfun.com/products/10661?) then manual for the chip it uses says what to do
Quote
D2 / Buffer Half Full : Data Out 2 / Buffer Half Full 
 
Data Out 2 / Buffer Half Full output is used for flow control
with a serial port by connecting to the CTS line back to the
computer or controller.   Or it may be used as a general-
purpose output.  This line is a logical output with either a High
or Low logic level.  Which function this output uses is
determined by a configuration bit stored in the EEPROM and
the factory default configurations is: “Buffer Half Full” and is
Active High.
Only problem is the D2/BHF pin is not broken out to any arduino pins so you would need to solder a wire to it and cut a trace to one of the E pins so you could hijack it. Or maybe just wire it directly to the CTS pin on the XBee (if it has one).
Another approach would be to monitor D1 and when it goes low send <64 bytes of data to the shield and so on. You would have to buffer or control serial data flow from PC using arduino.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah, that explains i could not find an arduino pin for the D? because there is none . I will  try your hijack suggestion in the weekend. I guess I have to solder a wire to the speakjet  chip. Interesting experiment for me :-).

Thanks , Arnold.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some late addition. I finally decided not solder the VoiceBox, just a bit too scary for me :-) But I *did* find out that the SPK pin (pin 4) of the voicebox goes high when it is speaking and low when it ceases speaking. I implemented an interrupt service routine for this pin that sends a signal to the computer when the pin goes low and the computer sends the next 64 bytes of code. This leads to an audible interrupt though.

You can connect a LED to SPK so you see exactly when the Voicebox speaks.
Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 71
Posts: 2612
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm glad you got something working. It's just a shame the D2/BHF did not get broken out somewhere to make the process smoother.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i agree it,You can connect a LED to SPK so you see exactly when the Voicebox speaks. good info 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Riva,agree with you completely. It's another shame that the SPK pin is not documented. Your remarks about breaking out the pins led me to very careful examination of the voicebox PCB. It was than that I detected some lanes communicating between the speakjet and some low number pins. After some experimenting I detected the SPK pin. So your remarks led me to the correct answer :-). Thanks!
Logged

Pages: [1]   Go Up
Jump to: