Hi, Paul
There's a very important button Missing ....
The " DONATE " button ...
Worth it ... I Think !
Alain
Hi, Paul
There's a very important button Missing ....
The " DONATE " button ...
Worth it ... I Think !
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 " !!!
*****************************************
Hi,
Jumping in in the middle here....
I definitely vote for #1. The other two consumes more codespace and takes longer to execute. The execution time may not matter much but saving codespace is good.
A benefit of #2 (and #3) though is that you could include comments on a bit to bit basis which makes it easier to see what each bit does.
/Henrik.
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
Hi Paul,
Just curious, are you using the *.device file for anything.
Dave
Always wear safety glasses while programming.
@Paul, I do find that very intresting. I am wondering, if you do this through google docs, the spreedsheet could be worked on by more people. I am guessing the information you need will be needed for each feature you want to add. Thats a huge volume of "homework". Or maybe share the format you need it in and we can work on other areas for you.
As a side note, you are gonna be Jedi master of "PIC" data when you are done reading all those datasheets, or just jelly brain.![]()
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Hi Bert,
Thanks for the suggestion, but in this case at least I'm going to continue to plod through on my own as it is an excellent tool for expanding my own understanding. Plus I'll be completing my collection of PBP-capable datasheets--I'm gonna have the whole set!
Interestingly, the spreadsheet becomes a potential configuration file that would obviate the need to parse the .INC files at all...! Not sure I want to go there or not.
As far as becoming a configuration Jedi, well I'd call that a benefit!
Best Regards,
Paul
Walter Told us about them here
http://www.picbasic.co.uk/forum/show...3897#post93897
Might be just as easy the way you are going though...
Dave
Always wear safety glasses while programming.
Bookmarks