Interfacing the ADC0831
Archiver
Posts: 46,084
Hi,
I'm trying to use the ADC0831 in conjunction with a light sensor
(basically an LDR) which runs on 12V with my stamp. I was just
wondering if I've got these connections right?
CS, CLK, DO. They are all connected to pins of the stamp
V+ is connected to 12V+
V- is connected to ground for 12V
Gnd is connected to ground for 5V
Vcc is connected to 5V+
Vref is connected to the output lead of the light sensor (it has
three lease: 12v+, gnd and output).
It seems to be working kinda. I don't lthink there's a problem with
the code I'm running. It dbeugs the variable and I keep getting
values of about 234 and it only changes by 1 when I shine a light on
the sensor. It seems to be kinda workign because when I disconnect
the output lead teh value goes all teh way up to 255. But the
problem is I can never get the value to go under 234. Does anyone
know where I Can find a tutorial for the ADC0831 or have any example
code?
Thanks
James
I'm trying to use the ADC0831 in conjunction with a light sensor
(basically an LDR) which runs on 12V with my stamp. I was just
wondering if I've got these connections right?
CS, CLK, DO. They are all connected to pins of the stamp
V+ is connected to 12V+
V- is connected to ground for 12V
Gnd is connected to ground for 5V
Vcc is connected to 5V+
Vref is connected to the output lead of the light sensor (it has
three lease: 12v+, gnd and output).
It seems to be working kinda. I don't lthink there's a problem with
the code I'm running. It dbeugs the variable and I keep getting
values of about 234 and it only changes by 1 when I shine a light on
the sensor. It seems to be kinda workign because when I disconnect
the output lead teh value goes all teh way up to 255. But the
problem is I can never get the value to go under 234. Does anyone
know where I Can find a tutorial for the ADC0831 or have any example
code?
Thanks
James