Would someone kindly advise me IN SIMPLE TERMS the difference between readadc and readadc10....I understand that it returns 8 or 10 bits but when / why would you use each ?
For an external light controller I am trying to read the light level using an LDR connected to pin 1 of a PICAXE 18X (I need extra in / out so the 18X is required) and 0 to 255 is not giving me enough range - the required levels are around 10 to 20.
Am I wrong in assuming that readadc10 would give me a greater range ?
I am using a PICAXE 18X
Thanks
main:
SYMBOL dark_level = 10
SYMBOL light_level = 20
check: readadc 2,b0 ' ADC input 2 - dark sensor,PIC pin 1, read into b0
if b0=<dark_level then dark ' condition if dark
if b0>=light_level then light ' condition if light
For an external light controller I am trying to read the light level using an LDR connected to pin 1 of a PICAXE 18X (I need extra in / out so the 18X is required) and 0 to 255 is not giving me enough range - the required levels are around 10 to 20.
Am I wrong in assuming that readadc10 would give me a greater range ?
I am using a PICAXE 18X
Thanks
main:
SYMBOL dark_level = 10
SYMBOL light_level = 20
check: readadc 2,b0 ' ADC input 2 - dark sensor,PIC pin 1, read into b0
if b0=<dark_level then dark ' condition if dark
if b0>=light_level then light ' condition if light
Attachments
-
29.7 KB Views: 131
Last edited: