I am currently working an Atmel micro controller, the EVK1104S, which has the UC32 Data Sheet. We have actually planted this chip on a custom PCB and are in the process of writing more firmware.
Currently, I need to tell the ADC on the Micro Controller Unit(MCU) to sample at 8k samples / second. In reality this is for sampling a microphone. Either way, the documentation is quite unclear (from my perspective) and I was looking for some clarification.
I know that to change the sampling rate I need to change what is called the Mode Register, the register used to configure the ADC for use (pg 799 in the link above). This is the register which allows me to modify the
Example (from pg 799):
ADCClock = CLK_ADC / ( (PRESCAL+1) * 2 )
From what I gather, I will only need to change the
PRESCAL to make the
ADCClock operate at 8Khz. The problem is that
PRESCAL is limited to 8 bits of resolution.
For example, if the controller is set at 12Mhz/x = 8Khz then x would need to be 1500. Because x is limited to 8 bits as I said before this would appear to be impossible, because the max is 255.
I feel that I am doing something wrong here, or not understanding what the datasheet wants me to. Can anyone confirm what I have just talked about or help direct me?
Basically, how can I specify the
ADCclock to run at 8KHz if the
PRESCAL is only an 8 bit value assuming the CPU is running at 12MHz?