ADC conversion time, 40X2

binary1248

Senior Member
Reading the description in the tec manuals it seems to indicate the conversion is done by slope (256 bit times to convert) but I am not sure if it could be successive approximation method (8 bit times to convert).
At any rate I cannot find any definitive answer on conversion time for the 8 ADC conversion.
Anybody care to enlighten me ?

I have searched but nothing to my specific question.
Paul
 

AllyCat

Senior Member
Hi Paul,

The base data sheet should give most of the answers:

Section 17. describes the (10-bit) successive approximation method and setup. Section 27-22 specifies that conversion takes 12 cycles of the ADC clock, wth the period set between 1 us (min) and 25 us (max, at up to 85 deg C).

So it looks like a minimum of perhaps 15 us ADC conversion time, plus the PICaxe interpreter time (several times that, even at 64 MHz).

Cheers, Alan.
 

binary1248

Senior Member
Thanks all, exactly what I needed. I am in the process of setting up my breadboard to measure the conversion/instruction timing. You answered my question precisely but since I already started the setup I will continue and publish my results later in this thread.
 

binary1248

Senior Member
Update on my measurements of 'readadc' command.
My test loop was setup with 40X2 freq set to 16 mhz (setfreq m16) and a conversion loop of 500 then set a pin to pulse for the scope (Rigol DS1052E). By measuring with the A/D command, then removing the A/D command, the difference in overall execution speed of the loop should give a fairly good idea of the A/D convert command speed.
My test showed conversion speed command of 308 us @16mhz. This is comparable to Goeytex's measured conversion speed of 71.4 us at 64 mhz or 71.4 X 4 = 285.6 us.
 
Last edited:

westaust55

Moderator
Further, if you look at the work I did some time ago: http://www.picaxeforum.co.uk/showthread.php?17782-PICAXE-program-Size-Optimisations-and-Speed
The attachment at post 9 and page 12 showns data for an X2 part (I used a 28X2) and manual timed as opposed to oscilloscope, you have data for 4 MHz and 8 MHz.

ReadADC an READADC10 both very similar and around 1050 - 1070 usec at 4 MHz then 520 to 530 usec at 8MHz. That equates to about 260 to 265 usec at 16 MHz. so in summary within the accuracy and depending upon where the command is within a program we are all talking about roughly the same timing durations.
 

binary1248

Senior Member
Thanks westaust55, you just gave me a lot of interresting reading.
As a further comment on my test, the readadc and readadc10 take the same time, so I assume that readadc is still an 10 bit conversion but the results are shift adjusted for a 8 bit byte output.
Paul
 
Top