I would love to see the whole code with ADCIN. Sometime if you play with some ADC registers, and you place them Before or After the DEFINEs, it may end-up with unexpected results.
I would love to see the whole code with ADCIN. Sometime if you play with some ADC registers, and you place them Before or After the DEFINEs, it may end-up with unexpected results.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi,
Found in the Datasheet ...
a beginning of an explanation ???Note:The GO/DONE bit should not be set in the
same instruction that turns on the ADC.
Refer to Section 8.2.5 “A/D Conversion
Procedure”.
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
ADCIN doesn't work with port pin aliases. Use ADCIN 2,W0, or define PinProbe as a constant. PinProbe CON 2 would work.
Also ADCIN doesn't setup TRIS, ANSEL or ADCON1. So you end up with Fosc/2 for your A/D clock because ADCON1 defaults to all 0's. So you're way out of spec for a 4MHz osc. Fosc/8 would be a good one to use with 4MHz (see datasheet).
Bruce ... 1K points ...
as always !!!...
Shame on me.
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Blonde moment here too
Disclaimer: "Blonde moment" is a deliberate sentence that belongs to Mister_e user and plah plah plah, shall not be considered as offensive plah plah plah. Complaints about that shall not be send to Admin, Mods, user but only to Mister_e user plah plah plah....![]()
Last edited by mister_e; - 23rd January 2011 at 20:37. Reason: Disclaimer
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi, Steve
I Think the "Blonde" term use rights already belong to KarenHornby ...
so, you'll have to buy a licence ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
busted.....
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks