PDA

View Full Version : ADC -how it works?, pic -



matias
- 13th March 2007, 18:35
Hi mi name is Matias and this is my first post in a forum, a friend told me that they were very usefull and I had realise that they certainly are. I need to learn how to use the adc of the pic, I read the manual and I am ready to start tests, but first I need to define what pic to use, any sugestments.
If posible any ruting..

malc-c
- 13th March 2007, 21:54
We can't tell you what pic to use as it will vary depending on your requirements, 8pin, 14, 20 etc. Have a look at the Microchip Website, it is possible to select various features such as A to D, etc.

A to D works by taking a voltage range and converting this into a digital number. Depending on the resolution (8 bit, 10 bit etc) this number range can be three digits to four digits (decimal), for example 8 bit gives 0 to 254 for a zero and maximum reading. Souinds complicated, let's say you had a 10K potentiometer (variable resistor) between 0v and +5v, with the wiper connected to the PIC. Turning the shaft will give between 0 and +5v, and if we was careful enough in the middle it would read +2.5v, and as the 8 bit range is 0 for no volts and 255 for +5, the value at 2.5v would be .... 128, thus each 0.02v (approx) increments the convertion by 1.

You can set the voltage range and use internal or external voltage references to in case you only wanted to convert different voltages that are not to the extreams of the supply.

Hope that helps