Dale Botkin wrote: > Correct me if I'm wrong, but it looks to me like the most audio horsepower > I could count on from a 20MHz PIC would be ADC sampling at around 33kHz: 33kHz 8 bit sampling sounds reasonable, amd with a slowly changing analog signal (like audio) you can go even faster as the PIC ADC internal capacitor does not need to change that much per sample. > around 33kHz sample rate, give or take a bit, which would be quite > adequate for normal speech, would it not? Telephone quality is 56Kbit/sec > or 8K samples/sec., so even if I tried for 10-20K samples per second I'd > be getting relatively good quality sound, right? Or did I miss anything? > > The idea is to use the ADC to sample incoming sound and Roman's 1-bit > sound for output, with a delay in between. Well recorded 8bit speech will be excellent even at low bitrates like 8kHz. Playback using 1bit sound like my BTc 1bit or 1.5bit system will need slightly higher bitrates. 19.5kHz is 256 insts with a 20MHz PIC clock, so you only have to encode or decode one sound sample per 256 PIC instructions. 19.5kHz playback sounds quite ok with speech. Full analog recording, and instant compression to 1bit sound are easily possible on a 20mHz PIC. The 1bit playback does contain some sampling noise, but this is reduced a lot at higher sample rates. Your suggestion of 33kHz will give good speech playback, but only gives 151 instructions to get the 8bit ADC sample, do the BTc encoding, and send that one bit to the eeprom. It does seem do-able. :o) At 33kHz the bulk of the aliasing noise will be at 16.5kHz and 11kHz, these are high enough to enable use of some harsh low-pass playback filtering and give good speech recording and playback. My choice would be to go with the 256 insts/sample rate of 19.5kHz, and then try making it work at that "sensible" bitrate. :o) I haven't done any PIC encoding using the BTc system but the algorithm is quite simple and I can send you the C source for the BTc encoding as used in the dos and windows versions. Looking at my C-- source code I have a feeling you can do it in, say, 12 PIC instructions! ;o) The new Windows version of my BTc sound encoder is also finished (and now gives playback of the BTc encoded sound on the PC soundcard!) I've been (slowly) working on the help file in between other recent projects. :o) -Roman -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads