I know this is slightly off topic, and I am cross posting it to the AT91.com forum, but I'm hoping that someone who frequents this forum can help. With the below code running on my AT91SAM7S32 board, the A/D timings are loaded into a string and dumped out the debug UART to my dumb terminal. The results confirm what I got when I computed them with a calculator. The problem is that when I instrument my code to set an I/O pin high when the A/D converter is started, and set that I/O pin low when the A/D ISR executes, that the results I get when I measure the pulsewidth of that I/O pin with my oscilloscope are significantly different from what I expected. I expected the 1st scanned conversion of all eight A/D channels to complete in ~ 503 usec's, but it actually takes ~ 540 usec's, which equates to an error of about 7% (37 usec's). I expected the remaining scanned conversions of all eight A/D channels to complete in ~ 484 usec's, but it actually takes ~ 520 usec's, which again, equates to an error of about 7% (36 usec's). I've confirmed that there's about 1 usec of latency from when the event occurs that should generate an ISR in my system, and when that ISR really occurs. Since the error in elapsed time between the two scenarios is about the same, this leads me to believe that the error is associated with the time to convert a channel, rather than the time to start the A/D converter. Can anyone help me to determine what this additional ~ 36 usec's is due to...? The signals on my oscilloscope are very solid, almost no perceptible jitter. That, combined with the fact that this test code is doing almost nothing else leads me to believe that these symptoms are not due to the effect of some other interrupt, etc, but rather that they're due to the way the A/D actually works, as opposed to how it's documented. Of course, I'm hoping that I'm wrong, and the differences between what I expect and what I get are due to an error on my part. Thanks !! //----------------------------------------------------------------------------- #define CRYSTAL (20000000.0) #define MUL (1401.0) #define DIV (255.0) #define MCK (CRYSTAL*(MUL+1.0)/(DIV*2.0)) //----------------------------------------------------------------------------- double adc_GetClock(void) { double PRESCAL = (double)((ADC_MR >> 8) & 0x3F); double ADCLK = (MCK / (2.0 * (PRESCAL + 1.0))); return(ADCLK); } //----------------------------------------------------------------------------- double adc_GetStartupTime(double ADCLK) { double STARTUP = (double)((ADC_MR >> 16) & 0x1F); double tStartup = ((STARTUP + 1.0) * 8.0) / ADCLK; return(tStartup); } //----------------------------------------------------------------------------- double adc_GetSampleTime(double ADCLK) { double SHTIM = (double)((ADC_MR >> 24) & 0xF); double tSample = (SHTIM + 1.0) / ADCLK; return(tSample); } //----------------------------------------------------------------------------- double adc_GetConvertTime(double ADCLK) { double tSample = adc_GetSampleTime(ADCLK); double tConvert = (10.0 / ADCLK) + tSample; return(tConvert); } //----------------------------------------------------------------------------- char s[132]; double ADCLK; double tStartup; double tSample; double tConvert; double tScan; sprintf(s,"MCK = %1.0f Hz\r\n",MCK); // s = "MCK = 54980400 Hz" <-- sprintf BUG ??? sprintf(s,"MCK = %u Hz\r\n",(unsigned int)MCK); // s = "MCK = 54980392 Hz" <-- correct result ADCLK = adc_GetClock(); sprintf(s,"ADCLK = %1.0f Hz\r\n",ADCLK); // s = "ADCLK = 429534 Hz" tStartup = adc_GetStartupTime(ADCLK)*1000000.0; sprintf(s,"tStartup = %05.03f usec's\r\n",tStartup); // s = "tStartup = 18.625 usec's" tSample = adc_GetSampleTime(ADCLK)*1000000.0; sprintf(s,"tSample = %05.03f usec's\r\n",tSample); // s = "tSample = 37.250 usec's" tConvert = adc_GetConvertTime(ADCLK)*1000000.0; sprintf(s,"tConvert = %05.03f usec's\r\n",tConvert); // s = "tConvert = 60.531 usec's" tScan = tStartup + (8.0 * tConvert); sprintf(s,"tScan 1 = %05.03f usec's\r\n",tScan); // s = "tScan 1 = 502.870 usec's" tScan = 8.0 * tConvert; sprintf(s,"tScan n = %05.03f usec's\r\n",tScan); // s = "tScan n = 484.245 usec's"