Mack,
Gotcha that would make sense. If you don't mind can we discuss the 8 bit vs. 10bit and let me rant a little about some observations. With regards to the ADC isn't just the obvious difference between reading 8 bit vs. 10 bit just precision? There is nothing else to consider is there? I can either get a return value from 0 -> 255 or 0 -> 1024. One thing I noticed given the 8 bit response it tends to not bounce around as much as the 10 bit. The 10 bit response raw data when I am at 0psi bounces all over the place from 92 to 100. I have to run that through Darryl's average routine to get that stablized. That helps but doesn't stop it completely which brings me to a question is there any way to get that to settle down? The other question is whats the proper term for a signle interval on the ADC read? Is it tick or interval, increment?
My other observation/question based on your statment about switching back and fourth between 10 bit and 8 bit. From my observations and looking at many examples of code there is always more then one way to accomplish something in the coding. I didn't miss anything here right I mean:
ADCON1 = %10000000
'ADCON1.7 = 1 'I DID THAT ABOVE RIGHT?
Setting ADCON1.7 = 1 is essentially the same thing as my example correct? You're just setting the individual bit right?
After this experience and reviewing what you taught me and looking at Bruce's example more closely that you could accomplish the 8 bit using the ADCIN by just setting ADC_BITS=8 in the beginning and the read on ADCIN basically puts both the ADRESH and ADRESL together for you in your variable. If you choose to use Bruce's method and wanted to do the 10 bit you've got to put those two result registers together right? Setting ADC_BITS is a one time thing at the beginning?
It's tough even with the datasheet until someone get's you pointed in the right direction. I think I am intellegent and I should be able to figure this stuff out but thats not always so. Now that you've given me direction it's much clearer I appreciate the help I get from this forum.
Good morning
David
Bookmarks