PDA

View Full Version : Fast / low resolution A/D conversion



AndrewC
- 6th April 2009, 22:46
I'm considering an application which requires a 12F683 to perform a very fast A/D conversion - I don't need the full 10 bits the ADC normally supplies, probably just 4 bits of resolution is adequate. Reading the data sheet it says that if you terminate the conversion early (after say 5 TAD periods) nothing is stored. Is there a trick to get around this ?

Andrew

mister_e
- 6th April 2009, 23:16
How fast is enough? Do you detect some specific range/values, or just a threshold/single value?

Acetronics2
- 7th April 2009, 08:37
Hi, Andrew

Such use of ADCs are explained in the PIC Datasheets relevant chapters and Midrange Manual.

Good explanation also from the great " Bigonoff " ( a good asm teacher from Belgium ) - in French !

see Part 2 $19.6 ...

Alain

AndrewC
- 7th April 2009, 09:56
How fast is enough? Do you detect some specific range/values, or just a threshold/single value?

Application is to detect a change in light intensity caused by an object passing in front of a confocally illuminated machine vision lens. It is battery powered so I want a low duty cycle illumination but fast enough to detect moving subjects.

What i'm thinking is a cycle that runs:

1) Light on
2) Pause enough for sampling cap to charge
3) Start AD conversion
4) Light off
5) Interrupt on conversion complete and compare new intensity to old - GOTO event handler if significant change
6) Pause and loop

What I want is a total loop time of <1msec or less. I can run a TAD of 2usec so it would only be 22usec for the conversion which to be honest is probably way fast enough. It just seems wasteful to do a 10bit conversion when I only want 4 bits of data !

Andrew

AndrewC
- 7th April 2009, 09:57
Hi, Andrew

Such use of ADCs are explained in the PIC Datasheets relevant chapters and Midrange Manual.

Alain

I couldn't find where to reduce the ADC resolution - can you be more explicit ?

Andrew

Acetronics2
- 7th April 2009, 10:04
You didn't search too much ...

23.7.1 Faster Conversion - Lower Resolution Trade-off

Alain

AndrewC
- 7th April 2009, 11:03
Or perhaps not looking in the right place. It doesn't refer to it in the device datasheet but does in the midrange manual.

It's a pity you can't just stop the conversion after a certain number of bits.

Anyway, thanks for pointing me in the right direction.

Andrew

Acetronics2
- 7th April 2009, 12:18
It doesn't refer to it in the device datasheet

aha ???



To calculate the minimum acquisition time, TACQ, see
the PICmicroŽ Mid-Range MCU Family Reference
Manual (DS33023).


from the 16F87xa Datasheet ...

LOL ... Everything always in the Holy Datasheet plus PbP Manual ...

Ok, lots of reading ... but always useful !!!

Alain