The purpose I wish to use the Spectrum Analyzer is just for a visual effect for use with any line input for music use. I would hope to use a 15-wide by 10-high LED matrix ( Lot of LED's ) and possible scroll text also, which shouldn't be too much of a problem. Can it be done? -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Robert A. LaBudde Sent: Wednesday, June 27, 2001 3:46 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: A/D spectrum analyzer At 08:56 PM 6/26/01 -0600, Dan wrote: >Ages ago.... > >There was the Radio Shack Color Computer (AKA the "CoCo"), which ran at a >mere 1/4 of the >frequency of a common color burst crystal. (a 6809 @ less than 1 Mhz!). >It had >an R2R resistor ladder style D/A converter and a single analog comparator >with which one could implement an A/D in software. They sold a ROM cartridge >which contained an audio spectrum analyzer program. Does anyone else >remember this? I have a hard time believing that a clever programmer could >not achieve the same with a PIC (at 20Mhz + hardware A/D) today. The key to the whole audio spectrum analyzer question is the required bandwidth and the required frequency resolution. The RS Color Computer only measured up to 5KSPS as I recollect, and the microprocessor had an 8-bit hardware multiply. An FFT is an orthogonal transformation, so it would be possible to do a reasonable job with low accuracy fixed point arithmetic. The real killer is the memory needed for the job. A 16F877 or the like with a static ram attached would probably allow a small-scale FFT to be done. So: 1. What bandwidth? If audio, one would assume 20Hz-20kHz would be necessary. This is tough to do as a 'continuum' on a PIC. 2. What resolution in frequency? If only 8-16 individual frequencies were needed (sort of like the LED bar graph spectrum displays), then fixed frequency transforms might be viable. 3. What accuracy is needed? If only 4-bits or so, then memory requirements are much easier. If 8-bits, you need an external memory. In summary, it should be possible to do a 32-, 64- or even 128-sample DFT on a PIC, if you're willing to tolerate a less than 8-bit resulting accuracy. The maximum sampling rate would probably be only 1-2 kSPS real-time, expandable if delays in reporting are allowed (1st record, then analyze). This kind of application is much better suited to a microcomputer with a larger address space and hardware 8-bit multiply at least. E.g., 8051, etc., or better. ================================================================ Robert A. LaBudde, PhD, PAS, Dpl. ACAFS e-mail: ral@lcfltd.com Least Cost Formulations, Ltd. URL: http://lcfltd.com/ 824 Timberlake Drive Tel: 757-467-0954 Virginia Beach, VA 23464-3239 Fax: 757-467-2947 "Vere scire est per causas scire" ================================================================ -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu