MC-9S08-QG8 ADC sampling rate

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC-9S08-QG8 ADC sampling rate

3,052 Views
manishk
Contributor I
Hi,

    I need to sample an audio signal at 8 kHz and wanted to know if the MC9S08QG8 can achieve this rate? How will I even know of the sampling is happening at this rate??

    As of now, I have set the ADC clock to the highest using the Device Initialization Tool, but when I plot the data received from the ADC using the Virtualization Tool I can see only about 3 samples per second.

P.S: I'm new to this controller and am comfortable only with the Device Initialization Tool.

Labels (1)
0 Kudos
Reply
6 Replies

923 Views
manishk
Contributor I
Thanks for your reply :smileyhappy:.

The clock frequency is 32 kHz.

Can you also tell me if I can use a -Vref of -3V? And is there any precautions I must take while connecting the microphone to the ADC input, like impendance matching,  loading etc.


0 Kudos
Reply

923 Views
peg
Senior Contributor IV
Hi,
 
Your crystal is perhaps 32kHz. The clock I was refering to is the bus clock. You would be using the FLL to increase this up to max 20MHz for the bus clock. This is the clock that is important for faster ADC speeds. Perhaps an incorrectly setup ICG module is causing your problems.
The "out of reset" clock selection is for direct buss clock for the ADC.
The ADC reference in the QG8 is tied to the supply rails. You can't do anything about this.
As the ADC needs a fairly low impedance source, you will need to have a buffer/amplifier in between your microphone and the ADC input. This will also allow you to scale up the voltage to better use the available range.
You seem to have a fair way to go with this....
 


Message Edited by peg on 2007-11-13 07:23 AM
0 Kudos
Reply

923 Views
manishk
Contributor I
The bus clock is about 4.1 MHz.

Thanks for the information about Vref and input impedance. I really needed it :smileywink:.

What is the ICS module?

Will the Visualization tool be able to plot the ADC input at  the sampling rate or will it slow down the effective sampling rate?


0 Kudos
Reply

923 Views
peg
Senior Contributor IV
Hi,
 
ICS is Internal Clock Source, see chapter 10 of the QG8 datasheet.
 
I have never used this visualisation tool, so can't help there. I would post a seperate post into the 8-bit Codewarrior forum to find out about this.
 
I really would take a good look at the QG8 datasheet it has all the details you need (including the Vref and input impedance details).
 
 
0 Kudos
Reply

923 Views
manishk
Contributor I
I'm really sorry that I hadn't read the datasheet thoroughly, I just did and looks like most of my doubts had the answers in it.


0 Kudos
Reply

923 Views
peg
Senior Contributor IV
Hello and welcome manishk,
 
The QG8 should be able to sample quite easily at this rate. In the data sheet in the ADC section there is table 9-12 which gives you the conversion times in clock cycles. You have not told us what clock rate you have but the result you have is extremely low.
The best way to tell what rate you are achieving would be to toggle a spare output pin on each sample and measure it there.
 
 
0 Kudos
Reply