A header wizard


Closed Thread
Results 1 to 40 of 230

Thread: A header wizard

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    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 " !!!
    *****************************************

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default

    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.

  3. #3
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    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

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Hi Paul,

    Just curious, are you using the *.device file for anything.
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    @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!

  6. #6
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cncmachineguy View Post
    @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.
    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

  7. #7
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Hi Paul,

    Just curious, are you using the *.device file for anything.
    Hello Dave,

    No, just the MPASM *.INC files What's a "*.device" file?

    Best Regards,
    Paul

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    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.

  9. #9
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    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...
    Wow, I should have looked at that closer before. I might take that route. Thanks for making me take a second look!

    Best Regards,
    Paul

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts