Des Bromilow wrote: > > Folks, > > I've been trying to get the BTC sound code going from Roman Black's website. > > Has anyone has success with the code? With the circuit as supplied in the .ZIP file? > > I've built it (changed a couple of the pins to suit my specific application) and altered the code to suit my needs. > Last night was the first go at running it, and instead of speech, I got a very short series of static and tones. I suspect that the approx 17seconds of sound was compressed into about 2-3 seconds, and as such the RC didn't have time to decay etc. Hi Des, the .asm code was supplied by a piclist member (I believe). I haven't used it as such. > So, has anyone had success using it? Anyone willing to correspond with me about it (sharing code etc?) > > FWIW, I've recommented the IIC routines for my own understanding, so if anyone want it with english comments, please let me know. Cool. I'd like a copy. :o) Re playback problems, one thing i've told people that will help is to fill a byte with FF and the next byte with 00, and either fill the whole eeprom with this or just repeat the 2 bytes. Then run your playback routine and put a cro on the output pin, this should be a nice squarewave of 1/16th your sample freq, as you have 8 1's and 8 0's repeated. That should allow you to see that the playback code IS doing what it is supposed to do, and you are not getting any pin state changes between bits etc. Also try checking his "ack" code, I think it might have an error? Once you can write ANY pattern to eeprom and check with the cro that it is DIGITALLY playing ok, try the same FF 00 wave into your RC filter and check that you are getting a triangly wave at the filter, and have enough headroom etc so it is not clipping. The Win BTc program shows roughly what it should look like. Finally if you want it to sound any good, you need some decent low pass filtering and normally it relies somewhat on the low pass nature of the cheap speaker. Using a piezo (or worst of all) the PC soundcard amp, sounds terrible as they have good high freq response and they amplify the switching freq as well as the base sound. My new Win BTc encoder; http://www.romanblack.com/btc_wzip.zip has the facility to play the BTc sound back through windows sound card, and i've written in the help file that windows is NOT a good way to critique the result as it brings out the aliasing HF noise. One day i'll finish the help file but it's not included at the moment. Remember this is a minimalist system, it's very cheap to implement and gives excellent 8:1 sound compression. The drawback is low(ish) sound quality, and it really needs attention to your low pass filter in hardware to get good sound. A little 2.2mH inductor after the output in series, and into another small cap can help a lot if you are using an amp. Or see the web for "low pass filter" design there are loads of circuits and formulae. Something else that is very important is to MAXIMISE the volume of the sound wave before doing the BTc conversion, even some clipping etc of the orig mono wave will sound a LOT better than a low-volume wave. The aliasing noise is generally a fixed volume so you need to maximise the signal to noise ratio. > PS. Roman, I will pay the hippyware licence fee once I get this running. :P Yippee! I'll get extra lentils this month and maybe a couple of mung beans. Aye luxury. -Roman -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.