Hello,
Alas, it will use #1 and #3... Users will have the choice. Checking the "Use ADC Aliases" box gets the nice and wordy #3. Leaving it unchecked gives the more terse #1.
#3 Does use a little more code space but should be more helpful in laying everything out clearly for the less experienced. The aliases also match the the names given for the bits in the datasheet, which could be helpful maybe.
#1 will be there for the more hardcore or those who need to conserve every byte.
Anyway, it became clear to me that there is no way around doing my homework. I'm going through every PIC that PBP supports, getting the datasheet, and logging the ADC configuration bits and registers into a spreadsheet. I started with the 10F202 and am working my way down the list, and I'm roughly a quarter of the way through. Here's some interesting numbers:
-The header wizard identifies 394 PIC microcontrollers supported by PBP. I've gotten my data for 101 of them so far.
-Of those 101, 53 have built-in ADCs.
-Of those 53, there are 15 different combinations of ADC setups. Two of those combinations will set up the ADCs on 24 different PICs while five are unique to a single PIC.
-There really appears to be only 2 or 3 general ways of setting up the ADC (with a couple of unique outliers), primary differences being the number of channels.
-So far, there are 35 different ADC register bits. (I.e., ANS0, PCFG0, CHS0, etc.)
Ok, so maybe they're not really all that interesting...8^) But I'm seeing some distinct patterns showing up that will make implementing the Header Wizard's code a little easier.
My guess is that it will take me another 3 or 4 days to finish gathering the data then another couple of days to implement it in code. So my target is to have a new version posted for next weekend, that will contain all of the bug fixes from the last one and add the ADC configuration.
Best Regards,
Paul
Bookmarks