Quote Originally Posted by CuriousOne View Post
Hello. I want to build a audio spectrum analyzer using this chip. The picture below is from datasheet:

Attachment 8263

Below is the sample code I've created for reading the chip:

Code:
'INIT

HIGH RESET 
HIGH STROBE 
PAUSEUS 18 
LOW STROBE
PAUSEUS 18
LOW RESET
HIGH STROBE
PAUSEUS 18

'READING

LOW STROBE
ADCIN 1, VALUE
BAND=1
GOSUB DISPLAY
PAUSEUS 18
HIGH STROBE
PAUSEUS 18

LOW STROBE
ADCIN 1, VALUE
BAND=2
GOSUB DISPLAY
PAUSEUS 18
HIGH STROBE
PAUSEUS 18

LOW STROBE
ADCIN 1, VALUE
BAND=3
GOSUB DISPLAY
PAUSEUS 18
HIGH STROBE
PAUSEUS 18
To simplify the things, code above reads only data for 3 frequencies, full code will read 7 frequencies, then repeat in loop. Is above code correct, how do you think?

Just thought i'd mention you're using 18uSecs for your strobe pulses....

Looking at the diagram, 18uS is the MINIMUM duration, so you're right on the edge of it not strobing, or being intermittent about strobing the chip or not.
I'd be inclined to make your strobes 20,25 or even 30uSecs duration to be certain it'll trigger the chip consistently.

Just my 2cents ;-)