Jump to content

Speakjet - A PIC ready sound chip?


herr_prof
 Share

Recommended Posts

  • Replies 345
  • Created
  • Last Reply

Top Posters In This Topic

I have a question about the MAX232 IC, because I wonder if I ordered the right ones:

a MAX232 EPE and a MAX232 EEPE. Now I question myself if I should have ordered a MAX232 A EPE instead...  ::)

This is quite confusing, because Reichelt has 7 MAX232 DIL-16 ICs, and after 3 days searching, I still can't figure out the differences, except their temperature range: 0° to 70°C and -40° to 85°C...

huu, this confuses me... ???

anyone knows if I can take these?

Thanks!!!

btw: don't we have -50°C in the luggage-area of a plane?

Link to comment
Share on other sites

Any of those MAX232s are functionally equivalent for Your application. Temperature ranges are guaranteed "working conditions". Please folks, learn to READ datasheets before reading them and confusing yourselves..  ;)

Moebius

Link to comment
Share on other sites

  • 2 weeks later...

I worked on a breadboard layout of the mbhp_iic_speakjet_v1_0 layout incl. LowPass filter.

Maybe someone wants to take a look?

http://www.audiocommander.de/pics/sonst/mbhp_iic_speakjet_05.board.printout.pdf

(Edit: this link is outdated, see later postings!)

It's not yet tested, I hope I can build and test it this weekend,

Regards,

Michael

Link to comment
Share on other sites

mind if I ask, what app did you use for that?

I tried with Eagle but failed and because X11 is sooo ugly on the mac  :-X , I switched to the program I know best (what doesn't keep me from hating it  ;D) it's FreeHand.

As I cannot etch anyway - and fh supports symbols and layers - it's just perfect for designing and printing...

If anyone wants to have the .fh or .eps, pm me!  Michael

Link to comment
Share on other sites

hehehe it's always some graphics app when I go "Oooh that's pretty"

So while we're building stuff... What are you guys planning on doing with these exactly? Speech only? Synth stuff? bit of both?

I'm going to get mine doing kototama and some zen chants (Kannon sutra for example) and mangle it by modulating and sequencing according to frequencies and intervals related to the sounds.. Uhm some kind of algorithmically assisted user programmable robot generating chants to the deities... Nothing too unusual  ;D

I'm sure you're not all just building it for the sake of it, what are your plans? :)

Link to comment
Share on other sites

I just got mine working today.. I had breadboarded up a tiny solution and got some time to test it today.  It sounds awesome! (even with no filter, just direct off chip to line into mixer.. I like the rawness ;) ).

Using the software available through the Yahoo SpeakJet group I was able to get the synth working.. I couldn't use the MSA architecture, unsure why.  I'm using a MAX232 to convert RS232 to TTL levels.  This thing is going to be a lot of fun! :)

Link to comment
Share on other sites

well, apparently I've not gone this far. The speakJet sais R-E-A-D-Y (lucky me it does not say E-X-T-E-R-M-I-N-A-T-E  ;D), but apart from that, the lowPass filter as described in the manual seems to pass out the whole signal and I go no luck sending serial data yet, not even succeeded to exit the demo mode yet (neither by RS232 nor via IIC).

hummm, I think I'll have to take a break and then check my breadboard again.

:'(

I think the lowPass filter is really needed because there is a steady noise in the low frequencies (if I listen closely to the mini-loudspeaker)

@stryd_one: I got the feeling it's better to run a few test, before revealing what I'm trying to do... but my head is full of nice sensoric ideas about glibberish yodling voices apparently gone crazy ;D

Link to comment
Share on other sites

AC: don't forget the bypass caps, when I made the first try it turned out that they are essential!

Current state of my plans: I had a nice talk with Lorin, he will publish the analog circuit at the audio out of his board. I will take his firmware has inspiration, but will work on a different one (more focused on MIDI)

Main features that I'm planning to do: an easy to use "learn mode" which allows to prepare speech sequences by pushing a button and recording the speach elements from a MIDI keyboard.

Another mode, which allows to trigger these sequences from the keyboard, and another one, which allows to split the keyboard into four (or more) zones in order to play selected speech sequences with transponation

I've also some modulation possibilities (LFO, ENV on pitch, sequencer?, etc) in mind, but haven't evaluated yet, if the SpeakJet can handle OSC parameter changes properly during a voice element is played.

The implementation itself isn't so difficult, the challenge will be to develop an easy to use "human-machine interface"

Best Regards, Thorsten.

Link to comment
Share on other sites

haha, so you found it ;D

(It's not yet complete, I may add address ranges)

I was still about to type my answer (for two days now ;D ...that's a slow type!), but wanted to run a few tests before...

I am currently stumbling upon these two questions I cannot answer by myself:

- is it right to set jumpers for the ID#20 in the same way as described of the IIC_MIDI page (both jumpers set)? I think, I have a problem with the IIC connection somewhere, seems the core module just cannot find the appropriate slave, although both PICs have 0x20 set in code...

As I see from my simulator, the code should work, but in reality the PIC18F hangs up (doesn't react to anything anymore, not even application updates) as soon as [tt]IIC_SpeakJet_Init()[/tt] is called...

(I have not changed the firmware of the PIC16F).

- I wonder if that 1k Resistor on J4 of Core between VD and SC (as seen on the IIC_MIDI_interconnections) is also required for the SpeakJet?

Thanks, everyone!

Link to comment
Share on other sites

I wonder if that 1k Resistor on J4 of Core between VD and SC (as seen on the IIC_MIDI_interconnections) is also required for the SpeakJet?

Yes, especially if IIC_SpeakJet_Init() hangs up - this means, that the IIC clock is stretched endless just because of the missing pull-up resistor.

The jumpers should be closed for ID offset 0

Best Regards, Thorsten.

Link to comment
Share on other sites

thank you Thorsten!

Now at least I can upload again  :D

I'll keep you updated and post useful stuff to the wiki -> http://www.midibox.org/dokuwiki/doku.php?id=iic_modules

btw: I don't recommend using my breadboard design until I succeeded ;)

There are some minor errors, anyway... but I'll fix that soon!

Cheers, Michael

Link to comment
Share on other sites

  • 2 weeks later...

hmmm, I'm really puzzled.

I have massive problems getting the speakJet to function properly with SCP.

Here's the thing:

- If I plug out the PIC16F, I get a full demo starting with READY, then all phonemes and beebing, whistling and DTMF sounds

- If the PIC16F is in it's socket, it just sais READY, which probably means, that the Speakjet is constantly resetted. Can't measure a low-bit on the Reset pin, but I have a quite slow multimeter. Lorin's plan sais, that RCX (pin10 of SJ) should be below 5V, but I get ~5.02V from the PIC16F.

- When I remove the PIC16F and ground pin M0 of SJ to GND (M0:GND + M1:5V => normal mode), the demo mode stops, but I cannot send anything via RS232.

- If I remove the MAX232EEPE and/or connect to RS232 (PC/Mac) this does not change the situation. Except that I'm hearing some gentle "brrrzzzles" (via line-out with low-pass-filter). I measured the RS232 pins but they seem okay.

Here are all the facts:

- checked all the connections twice

- compared my curcuit again with the plan

- compared both with Lorin's circuit plan

- checked all solderings

- read the speakjet manual at least three times ;D

- checked the supply voltage (9V 800mA; tested also with 6V and 12V)

- power the speakjet/pic16-board with J2 of the core (although I noticed it's already powered by IIC?)

- added resistor to IIC (Sc & Vd) on core

- LED on PIC16F is always on (no flickering or anything)

- temporarily removed the MAX232EEPE without any different results

- measured the voltages of the speakjet-pins, AFAIK OK:

1-9: grounded, 0V

10(VOut): 0~5V,

11(D0/Ready): 5V

12+13(D1+D2): 0V

15(V+): 5V

16(M0): 0V

17+17+19(M1+Reset+RCX): 5V

- my application is receiving the notes, shows them on LCD*

- implemented errorhandling tells me that the Speakjet IIC transmission functions always return 0 (means no error occurs ??? ), but the thing is: if the PIC 16F is not in its socket, I don't get any errors either, wich is a bit stunning, isn't it?

- I can neither send nor retreive any values via (19200 baud) PC (or Mac RS232 via USB connection). Tried different programs (ZTerm, PortTerm, goSerial SerialPortTool), no success :(

The serial port can be opened when connected but that's all.

But I admit than I'm really confused about these serial access programs like ZTerm. There are so many options besides the baud-rate and the parity/stop-bits, that I don't really know what I should select. I tried lots of them, without success... must be kermit and the pigs from outer-space ;D

I also updated my plan, if required:

http://www.audiocommander.de/pics/sonst/mbhp_iic_speakjet_08.board.pdf (Edit: see newer postings!)

How can I test the PIC16 is working right?

I don't hear any baud-configuration sounds as described in the speakjet manual?

(I got no warnings nor errors when I programmed the chip)

Or is the Quartz damaged? This is the only sensitive part which I had to desolder and solder again?

Here is the code I am using:

void Init(void) __wparam {

	// Init vars
	zsapp.showSplash = 1;
	zsapp.displayNeedsUpdate = 1;
	zsapp.error = 0;
	zs_errorcode = 0;

	// Init core
	MIOS_AIN_NumberSet(0);
	MIOS_AIN_UnMuxed();
	MIOS_AIN_DeadbandSet(7);

	// init interface to MBHP_IIC_SPEAKJET
	IIC_SPEAKJET_Init();

}


void DISPLAY_Tick(void) __wparam {
	if(zsapp.displayNeedsUpdate) {
		if(zsapp.showSplash) {
			MIOS_LCD_Clear();
			// display your splash screen here
			MIOS_LCD_CursorSet(0x00);
			MIOS_LCD_PrintCString("<<< k.2 _0x1 >>>");
			MIOS_LCD_CursorSet(0x40);
			MIOS_LCD_PrintCString("mbhpIIC_speakjet");
			// delay Display Refresh
			MIOS_LCD_MessageStart(0xFF);	// show for 2 seconds
			zsapp.showSplash = 0;
		} else {
			if(zsapp.error) {
				// an error occured!
				MIOS_LCD_Clear();
				MIOS_LCD_CursorSet(0x00);
				MIOS_LCD_PrintCString("**** ERROR ****");
				MIOS_LCD_CursorSet(0x40);
				MIOS_LCD_PrintCString(" code#         ");
				MIOS_LCD_CursorSet(0x40 + 7);
				MIOS_LCD_PrintBCD3(zs_errorcode);
				MIOS_LCD_PrintChar(' ');
				MIOS_LCD_MessageStart(0xFF);	// show for 2 seconds
				zsapp.error = 0;
			} else {
				// display your content here
				// show last forwarded message to IIC
				MIOS_LCD_CursorSet(0x40 + 5);
				MIOS_LCD_PrintBCD3(iic_lastValue);
				// update done
				zsapp.displayNeedsUpdate = 0;
			}
		}
	}
}

void MPROC_NotifyReceivedEvnt(unsigned char evnt0, unsigned char evnt1, unsigned char evnt2) __wparam {

	// Example which just forwards incoming Note Events to the SpeakJet:
	switch(evnt0) {
		case MIDI_NOTE_ON:	// NOTE_ON, CH1: 0x90
			zsapp.error = IIC_SPEAKJET_TransmitStart(0);
			if(zsapp.error) { zs_errorcode = 1; }
			// set speakjet to serial control mode
			zsapp.error = IIC_SPEAKJET_TransmitByte('\\');
			if(zsapp.error) { zs_errorcode = 2; }
			zsapp.error = IIC_SPEAKJET_TransmitByte('0'); // 0 for all speakjets, 1-7 for addressable!
			if(zsapp.error) { zs_errorcode = 3; }
			// tranmit buffer
			zsapp.error = IIC_SPEAKJET_TransmitByte(evnt1 | 0x80);	// | 0x80 => soundcodes 128..254
			if(zsapp.error) { zs_errorcode = 4; }
			// start immediate enunciation of buffer
			zsapp.error = IIC_SPEAKJET_TransmitByte('T');
			if(zsapp.error) { zs_errorcode = 5; }
			// put speakjet out of serial control mode
			zsapp.error = IIC_SPEAKJET_TransmitByte('X');
			if(zsapp.error) { zs_errorcode = 6; }
			IIC_SPEAKJET_TransmitStop();
			// store last value
			iic_lastValue = evnt1;
			break;			
	}

	// update display
	zsapp.displayNeedsUpdate = 1;
}

I ran totally out of options at this point, I haven't even an idea how to bug down the area of the error; any hint is really appreciated!!!

And herewith I'm volunteering for any documentation jobs if I get this little intractable thing going ;D

I'm sorry for this horrible long posting :-\

Thanks for your time!

Michael

*another thing I have to mention, is that my LCD-Display got very (very) dark over the last weeks. I switched Cores and LCDs and it's the LCD; think the background illumination is dying. I measured the voltages on the LCD-pins of the core, but they all seem normal to me (5V max, exact 5V on B-/B+ and Vs/Vd).

Link to comment
Share on other sites

The power LED identicates, that the PIC is up&running

The voltage at the RCX pin is 5V when nothing is received

It's not required to power the board via J2, the IIC port connection is enough

The auto baud rate configuration is very fast and ends with a "Ready" like if you would use the SpeakJet in normal mode.

Maybe you should try to send some simple speach elements (0x80-0xff), this is less error prone.

E.g., just use my example which forwards incoming MIDI notes to the SpeakJet, each MIDI key should trigger another sound.

You could also connect the MAX232 directly to the Receive Input of the SpeakJet, Reset, M0 and M1 must be tied like shown in the datasheet in this case ("minimum connection for serial control"), baudrate must be 9600

This allows you to troubleshoot your terminal programs without using the PIC (always try to reduce the number of possible error sources)

Best Regards, Thorsten.

Link to comment
Share on other sites

You could also connect the MAX232 directly to the Receive Input of the SpeakJet, Reset, M0 and M1 must be tied like shown in the datasheet in this case ("minimum connection for serial control"), baudrate must be 9600

This allows you to troubleshoot your terminal programs without using the PIC (always try to reduce the number of possible error sources)

This is how I currently have mine set up to play around with.

A way you can double-check that your MAX232 circuit is correct is by shorting the TTL Rx/Tx pins, open the serial port in a terminal application, and enter some data - if it's running properly, the short will act as a loopback and you will see the bytes you've entered being received on the serial port.

Link to comment
Share on other sites

Thanks TK and Th0mas you for your help and suggestions :)

I have made some progress, although no too much  :-\

Maybe you should try to send some simple speach elements (0x80-0xff), this is less error prone.

E.g., just use my example which forwards incoming MIDI notes to the SpeakJet, each MIDI key should trigger another sound.

Does that mean, that sending the SerialControlMode commands "[tt]\0[/tt]" (and "[tt]X[/tt]" to exit) as well as "[tt]T[/tt]" for immediate enounciation is not necessary and handled by [tt]IIC_SPEAKJET_TransmitStart(0);[/tt]? I peeked into the PIC16 Firmware for the SpeakJet-Module, but found no hint to any ’\0’ or 0x5C  ???

Anyway, it won't work either this nor the other way...

I succeeded with Th0mas suggestion to short RX and TX and finally got something coming out when I use a Win-PC (think my USB-Serial device is not working properly on the mac). Athough it's nothing to do with "\0VX" (should enounciate ready), but at least there's coming sound when I press a key :D

But once the PIC16 is in it's socket, it enounciates "ready - ii - ready - ii - ee - readyiiiaa" and then starts again, the same loop, 1 word/phoneme per second, sometimes the pattern is changing and specialFX sounds are hearable  ???  

And I cannot control anything by RS232 if the PIC16 is active. The LED is slightly flickering once the READY is enounciated and I can hear a slight "clicking" (indicates something is sent via RS232) ??

I read in the speakJet forum, that the RST-pin should be tied to +5V with a resistor to avoid constant resetting, but that didn't work either. I got the feeling, that it's more about garbage Tx than a reset issue.

But although I can't send anything, I'm receiving an RX-Signal on my PC ('U'), whenever the Chip enounciates something, so one way seems to work  :-\

Against all expectations, this is one of the hardest walls I ever knocked my head against, but I've invested so many hours now, I can't waste 'em totally by giving up at this point (although I must admit that I'm very close to  :'( )

Cheers,

Michael

btw: The preliminary MBHP_IIC_SPEAKJET Circuit Plan shows the RS232 Sub D Female Plug from the upper side, while the rest of the plan is shown from above, right? Currently I wired the RS232 plug only by number-references (2:RX, 3:TX, 4:DTR, 5:GND, 6:DSR)...

Link to comment
Share on other sites

For playing speach elements it is not required to enter serial control mode. Just send bytes >= 0x80 to the SpeakJet after reset, I would avoid the control mode for the first checks to avoid any side effects.

The IIC_SpeakJet firmware just forwards incoming bytes to the serial out, it doesn't need to know which kind of data is sent (ok, it would be nice for proper merging of the Rx and IIC stream, but I think that this would only be nice-to-have, but no must)

To continue debugging, you could do the following: don't connect the SpeakJet Rx line to the PIC16F88 Tx output, but just connect the PIC with your RS232 interface:

PC RS232 -> PIC Rx -> PIC Tx -> PC RS232

Now the data should be forwarded directly to your terminal like with the direct loopback test.

And - this is important - you should be able to send additional characters from the MIOS core via IIC!

This should also allow you to check, if the RS232 connections to the MAX232/PIC are ok.

Best Regards, Thorsten.

Link to comment
Share on other sites

But once the PIC16 is in it's socket, it enounciates "ready - ii - ready - ii - ee - readyiiiaa" and then starts again, the same loop, 1 word/phoneme per second, sometimes the pattern is changing and specialFX sounds are hearable  ??? 

Sounds like, between the M0, M1, and RESET pins on the speakjet, something is amiss - I can't remember at the moment what the right configuration is, but it sounds like you are in DEMO mode and you want to be in normal operational mode.  Check the SpeakJet datasheet (or maybe someone else knows quicker than I)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...