title: Setting An ADC sample rate. trouble reading datasheet
body: <p>I am currently working an atmel micro controller, the EVK1104s, which house the <a href="http://www.atmel.com/Images/doc32072.pdf" rel="nofollow">UC32 Data Sheet</a>. We have actually planted this chip on a custom PCB and are inthe process of writting more firmware. </p>
  
  <p>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 and I was looking for some clarification. </p>
  
  <p>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 change the sample/hold time/ start up time, and the ADCclock.</p>
  
  <pre><code>EX(from pg 799): 
  Sample &amp; Hold Time = (SHTIM+3) / ADCClock
  ADCClock = CLK_ADC / ( (PRESCAL+1) * 2 )
  </code></pre>
  
  <p>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. </p>
  
  <p>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. </p>
  
  <p>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?</p>