how the Photocell is connected? any pull-up/down?
1.CMCON=0? maybe CMCON=7.. but they're already off at POR so..
2.your ADCON0 setting use Channel 8 but adcin should override this for you
3.adcon1 should be set for right justified results
4. the maximum input impedance for analog source is 2.5K (section 12.1) so.. maybe you'll need something between the PhotoCell and the PIC a/d input. sometimes it works, sometimes not. look at your Photocell specs or measure it. What's the value when there's no light? maybe a little bit high
Last edited by mister_e; - 2nd December 2006 at 19:15.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks