(newbe here)
Should that be High PORTB.4 and LOW PORTB.4?
I also don't see an ADCON1 being setup
Code:if x > %10000000 then PORTB.4 = 1 endif if x < %00000111 then PORTB.4 = 0 endif
(newbe here)
Should that be High PORTB.4 and LOW PORTB.4?
I also don't see an ADCON1 being setup
Code:if x > %10000000 then PORTB.4 = 1 endif if x < %00000111 then PORTB.4 = 0 endif
Last edited by norohs; - 2nd November 2012 at 03:26.
There are two versions of the QRE1113 - one digital, one analog . Are you sure you have the analog version?
You're correct, for my purposes, the high / low settings should be reversed. I'm trying to read up more on how the ADConverter works, to get this circuit working. There are lots of examples of using it with a LCD on RA4, but I can't find anything more.. general.
And yes - I'm sure I have the Analog version. Also, looks like you can't edit old posts, I meant to set my thresholds at 128 on both sides, but forgot to edit it before copying in. The low threshold should be set at 128, not 7.
Bookmarks