every ^&&% time I post a question, 5 minutes later I figure it out.
added ADCON1 = 7
confirm anyone? that this must be there for my 16 I/O ? working now.
every ^&&% time I post a question, 5 minutes later I figure it out.
added ADCON1 = 7
confirm anyone? that this must be there for my 16 I/O ? working now.
Hi,
ANSEL = 0 for sure.
CMCON = 7 why not, but it's the default POR value so really shouldn't be needed (as long as the datasheet isn't lying to us).
ADCON1 = 7 don't know how you came up with that value or how it would help (if it acually did). The four lower bits are unimplemented and does nothing so Writing 7 to that regiser does exactly that - nothing.
So, as far as I can see, clear ANSEL and clear TRIS bits for your outputs should do it.
/Henrik.
yeah, I think the adcon1 addition was my imagination. still acting up. what I'm trying to do is simple look at the data output from an infrared receiver on an input pin (with a pullup) and check for a low. works fine on a breadboard (just doing that with a few lines of code in a loop) but when I try to implement it in some code which has a lot going on, it's haphazard. I've tried using a for next loop so it stays on the input pin, checking a thousand times and even tried a goto where it loops for a few seconds using a counter. (a few seconds would be more than enough to "catch" the pin going low). tried a voltage divider on the pin trying to push it lower to ground, etc. not having much luck.
But I'll probably figure out after I post this--as always
Michael I only needed to use the 'F88 for 1 project. Here is my header. I never had any trouble with the inputs or outputs.
OSCCON = $60 'set int osc to 4mhz
ANSEL = 0 ANALOG INPUTS NONE
ADCON0 = 0 'AD MODULE OFF & CONSUMES NO CURRENT
CMCON = 7 'COMPARATORS OFF (DEFAULT ON POR)
If that doesn't work, post your entire code, including your CONFIGuration bits. Use [ CODE] and [/CODE] (without the spaces) to compartmentalize your code in the forum posting.
Bookmarks