Searching \ for '[PIC]: A/D spectrum analyzer' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=a%2Fd
Search entire site for: 'A/D spectrum analyzer'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: A/D spectrum analyzer'
2001\06\26@114453 by Douglas Butler

flavicon
face
If he were asking for realtime digital filtering I would agree, but he
is only asking for a spectrum analyzer.  He can digitize a chunk, then
chew on it for a while before outputting the result and grabbing another
chunk.  I don't have an answer for him, but somewhere there must be some
FFT code for a PIC.

Sherpa Doug

>This is going to sound odd, but this sort of thing is usually best left with
>analog electronics. You CAN do it digitally but the amount of hardware
>(and/or software) needed to accomplish the same thing a mess of op amps and
>passive components can do is simply overkill. Unless of couse you NEED to do
>it digitally, in which case a PIC could not do it alone in real time, you
>would need something like a DSP to do it. TTYL
>
>{Original Message removed}

2001\06\26@150617 by Olin Lathrop

face picon face
> If he were asking for realtime digital filtering I would agree, but he
> is only asking for a spectrum analyzer.  He can digitize a chunk, then
> chew on it for a while before outputting the result and grabbing another
> chunk.  I don't have an answer for him, but somewhere there must be some
> FFT code for a PIC.

This sounds like a job for the DSPics that are coming out.  Some DSPs (I'm
not sure about the DSPics) have special support for doing the butterfly
addressing for doing power of 2 FFTs.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, spam_OUTolinTakeThisOuTspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\06\26@164547 by Bob Ammerman

picon face
----- Original Message -----
From: "Olin Lathrop" <.....olin_piclistKILLspamspam@spam@EMBEDINC.COM>
To: <PICLISTspamKILLspamMITVMA.MIT.EDU>
Sent: Tuesday, June 26, 2001 3:05 PM
Subject: Re: [PIC]: A/D spectrum analyzer


{Quote hidden}

The dsPIC (note the strange capitalization) does supposedly handle butterfly
addressing, tho' for the life of me I can't figure out how based on the
publicly released information on the mChip site.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\06\26@170329 by Joe Denehan

flavicon
face
I would like to use a pic to function as an Audio Spectrum Analyzer, does
anyone know what Pic I could use or where I could find more info.

Re-posting as forgot topic indicator

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\06\26@171736 by jamesnewton

face picon face
www.piclist.com/techref/microchip/math/filter.htm
http://www.piclist.com/techref/microchip/fft/picspect.htm

---
James Newton (PICList Admin #3)
.....jamesnewtonKILLspamspam.....piclist.com 1-619-652-0593
PIC/PICList FAQ: http://www.piclist.com or .org

{Original Message removed}

2001\06\26@171950 by jamesnewton

face picon face
www.piclist.com/techref/microchip/math/filter.htm
http://www.piclist.com/techref/microchip/fft/picspect.htm

---
James Newton (PICList Admin #3)
EraseMEjamesnewtonspam_OUTspamTakeThisOuTpiclist.com 1-619-652-0593
PIC/PICList FAQ: http://www.piclist.com or .org

{Original Message removed}

2001\06\26@210704 by Olin Lathrop

face picon face
> I would like to use a pic to function as an Audio Spectrum Analyzer, does
> anyone know what Pic I could use or where I could find more info.

What is your highest frequency, 20KHz?  Does it need to be real time, or can
you sample a snapshot of the audio signal and do post processing on it?
Does all the signal need to be sampled, or only occasionally?

If it needs to be real time or you are expecting it to keep up with a
continuous "audio" stream of reasonable bandwith, then a PIC isn't going to
do it.  You will need a DSP.  Note that Microchip is coming out with the new
dsPIC line, which is PIC-flavored DSPs.

At best you can expect a PIC to sample a chunk of audio, go "off line" while
is runs an FFT to find the frequencies in the chunk, output those somehow,
then do the next chunk.  PICs and other general purpose microcontrollers are
not well suited to this kind of task.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, olinspamspam_OUTembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\06\26@215139 by Dan Larson
flavicon
face
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.

Dan (a Radio Shack "CoCo" owner!)



On Tue, 26 Jun 2001 18:25:24 -0400, Olin Lathrop wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\06\26@224631 by Robert A. LaBudde

flavicon
face
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: KILLspamralKILLspamspamlcfltd.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


2001\06\26@233917 by Dan Larson

flavicon
face
On Tue, 26 Jun 2001 22:45:49 -0400, Robert A. LaBudde wrote:

{Quote hidden}

Yes, I agree with you.  A 17Cxx part with external RAM *might* be enough.

It could certainly be done with an AVR AT90S8515 or ATMega161 with external
RAM with ease. Even an ATMega103 with external RAM might be enough, though
it has no hardware multiply.

I still get the feeling that the Audio Spectrum Analyzer program on the CoCo was
cheating some how. Perhaps some sort of "Binning" of samples or zero-crossing
times may have been used. I was only a kid then, so I was not sophisticated enough
to really analyze it very well at the time.

[SNIP]

>
>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.
>

Are there any 18FXX or 18CXX parts that can interface external RAM?

In either case, a top end device with 1.5K  RAM might be enough.

The CoCo orignally only had 4K of RAM. Back in those days we really
had to sequeeze all we could out of expensive hardware. Much like with
MCU's today.

Dan

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\06\27@020959 by dr. Imre Bartfai

flavicon
face
Ubicom has (at least, Scenix had) an AN dealing with this subject,
AFAIK. I got it, too. Unfortunately, it is not public as I should sign an
Undisclosure Agreement before. It is free from them, though.

Regards,

Imre


On Tue, 26 Jun 2001, Olin Lathrop wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@021621 by Kari Lehikko

flavicon
face
Joe,

I have also decided to do a simple spectrum analyzer as my first DSP
project. (Just something to install in my car to make friends jealous :)

What I have thought so far:

- I'll use PIC18C452, because:
 - We already have emulators and chips here in my work (free tools and
chips :)
 - Chip is capable of 40MHz max (10 MIPS), has hardware multiply,
buildin ADC, three indirect registers and 1,5k ram (organized in nice
256 long circular buffers :)

- I'll use the maximum sample rate possible, whatever it is (PIC's ADC
is capable of doing 52ksps, the maximum sample rate will probably be
defined by the speed of my DSP-code)

- I'll probably write the FFT-code myself, because I like to believe
that 18 years of assembler-coding experience will allow me to optimize
the code tighter than using libraries.

- I'll probably use very rude filtering, output device for my analyzer
is a bunch of leds, and it just have to look cool, not to be very
accurate.

Some of these thoughts may and probably will change as I learn more
about DSP. First I was thinking of using sample rate as high as 44.1k
(same as CD's), but that would only have given me 227 instructions per
sample and I already know that that is too few.

Good luck with your project :)

- Kari -


Joe Denehan wrote:
>
> I would like to use a pic to function as an Audio Spectrum Analyzer, does
> anyone know what Pic I could use or where I could find more info.
>
> Re-posting as forgot topic indicator
>
> --
> 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: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@042857 by Raymond Choat

flavicon
face
part 1 3593 bytes content-type:text/plain; (decoded 7bit)

I do pic chips now and did CoCo years ago. 16-18 yrs ago I built a carving
machine using the coco (when it first came out) and programmed it in basic.
It only had 4 k when I got it and upgraded to 16k. Boy was that a lot of
programing space....ha. Yes the 6809E has a lot in common with the pics. But
at 20Mhz these pics can do laps around the old coco. The CoCo had no hard
drive but did have 4 single sided low density 4.25 drives. The ROM Packs
were most of the time just an eprom with a program in it. Here is picture of
carve machine made from a COCO and a radial arm saw......(me in mask)  You
can read the code from the old ROM Packs by putting a piece of tape over the
clock pin on the ROM Pack edge. This stops the Rom from self starting and
you can use PEEK command to see the code in the ROM Pack. If I remember the
program you are talking about it was just a ROM Pack.
Wrong Way Ray (Raymond Choat)

{Original Message removed}
part 2 16409 bytes content-type:image/jpeg; (decode)


part 3 144 bytes
--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@090712 by Olin Lathrop

face picon face
> 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.
>
> Dan (a Radio Shack "CoCo" owner!)

But again, until we know the frequency range, whether it's OK to sample
occasional bursts, the frequency resolution, etc, there is no way to know
what the compute requirements are.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, spamBeGoneolinspamBeGonespamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@090716 by Olin Lathrop

face picon face
> Are there any 18FXX or 18CXX parts that can interface external RAM?

Any PIC can interface to an external RAM with enough I/O pins.  There 18xx
parts that use external program memory: 18C601, 18C801.  I haven't looked at
these parts enough to know how easy it is to read/write to this memory under
program control when it is implemented as RAM.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, TakeThisOuTolinEraseMEspamspam_OUTembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@092952 by Silvio Borges

flavicon
face
Robert:

I was looking for this kind of analyzer for a while, could you point me some piece
of code?
A 20Hz-20KHz bandwidth, 10-16 frequencies and 4 bit resolution would be great for
this aplication, if some realtime could be achieved, like 3 chunks/s better.
I just need the basics for DFT calculation if someone could help me...


{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@094028 by Russell McMahon

picon face
> ....ha. Yes the 6809E has a lot in common with the pics.


Heresy!
How can you compare the near ultimate 8 bit microprocessor (and I don't mean
the PIC :-) ) with one of the most abominably ornery processors know to man
(or woman). Mind you, the PIC looks quite good and almost normal next to say
an F8. Anyone remember *them*???

RM

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@103644 by Silvio Borges

flavicon
face
Are you saying that we could not download this AN from Scenix?

"dr. Imre Bartfai" gravada:

> Ubicom has (at least, Scenix had) an AN dealing with this subject,
> AFAIK. I got it, too. Unfortunately, it is not public as I should sign an
> Undisclosure Agreement before. It is free from them, though.
>
> Regards,
>
> Imre
>

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@104059 by Bob Barr

picon face
Russell McMahon wrote:

>
>Heresy!
>How can you compare the near ultimate 8 bit microprocessor (and I don't
>mean
>the PIC :-) ) with one of the most abominably ornery processors know to man
>(or woman). Mind you, the PIC looks quite good and almost normal next to
>say
>an F8. Anyone remember *them*???
>

Ahhh, yes. That goes back a ways. As I recall, it only took 3 40-pin dips to
implement one of those beasties. My first 'home computer' was a salvaged
Fairchild F8 demo board.

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\27@234459 by Robert A. LaBudde

flavicon
face
At 10:25 AM 6/27/01 -0300, Silvio wrote:
>I was looking for this kind of analyzer for a while, could you point me
>some piece
>of code?
>A 20Hz-20KHz bandwidth, 10-16 frequencies and 4 bit resolution would be
>great for
>this aplication, if some realtime could be achieved, like 3 chunks/s better.
>I just need the basics for DFT calculation if someone could help me...

If you want to do this real-time for an audio LED bargraph-type display,
and only need 10 frequency points (octaves from 20 Hz, 40 Hz, ... , 20 kHz)
and only need 4 bits of accuracy, then the simplest approach might be to
just create 10 bandpass digital filters centered at the frequencies of
interest.

Or, you can do a 16-point FFT and then treat it as a fixed transform (i.e.,
a fixed linear transformation of the samples.

You can approximate the multiplies (losing accuracy in the process) in
order to avoid full multiplies.

There has been an implementation of a 256-pt FFT on a 17C756 by Robert
LaCoste. It should be available in the Piclist archives. It was called the
"PIC'Scope Audio Spectrum Analyzer".


================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: ralEraseMEspam.....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: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\28@054749 by dr. Imre Bartfai

flavicon
face
Hi,

as I did it, I must register myself or so (accept LA etc). It was a long
time ago, sorry.

Imre

On Wed, 27 Jun 2001, Silvio Borges wrote:

{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\29@010509 by HEV

picon face
Silvio, you  can   find a PIC based audio spectrum analyzer in the September
1998 (issue 98) of Circuit Cellar  INK (http://www.circuitcellar.com). Both the PDF
and the source code are available.  If you experience any prob in finding it
just let me know and I'll send them to you.

Regards, HEV

{Original Message removed}

2001\06\30@123248 by Joe Denehan

flavicon
face
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 removed}

2001\06\30@123837 by Herbert Graf

flavicon
face
As per my previous post I still recommend you do the spectrum part with
analog parts (an op amp and a few passive components are all that you need
for each frequency you wish to display, if you want to go REALLY cheap then
just a few passive components are all that is needed, along of course with a
bargraph driver IC, but you can multiplex that), it's just much easier. You
can use the pic to blank the screen's spectrum display and drive it's own
sort of message. Just my opinion, but unless you WANT to do this completely
digitally this is a case of the analog method simply being easier. TTYL

{Original Message removed}

2001\06\30@144414 by Dan Michaels

flavicon
face
Joe Denehan wrote:

>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?


Joe, something like this might be much more easily done, and
also produce a real-time display, with a set of very cheap and
easy to build bandpass filters made out of opamps. You can use
the PIC to sample filter outputs and control the LED matrix.

- dan michaels
==================

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspammitvma.mit.edu


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...