A header wizard


Closed Thread
Results 1 to 40 of 230

Thread: A header wizard

Hybrid View

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

    Default A header wizard

    At the risk of being accused of not wanting to "write" my code, I would love a header wizard. To me this would be a fill in the blank radio type GUI. Have it so :

    1. User selects uP
    2. select initial pin status
    3. osc select

    When finish is pressed, a "template" would be generated to write the code in.
    If this were community enhanced, maybe the PBP users would build the .dat file for any device they are coding for if its not already available as a download.

    The dat file of course would have all the options for that individul device. This way no 1 person has to bang out dat files for devices no one wants to use.

    To me this would be helpful due to all the optional ways any 1 part can be setup.

    Thoughts??

    ##################################
    This project has taken off with Paul working on a stand alone app. The latest beta can be found here.
    Thanks Paul.
    Last edited by mackrackit; - 20th September 2010 at 21:49. Reason: Up dated code
    -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!

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default

    4. ADC setup
    5. Comparator setup
    6. UASRT setup
    7. I2C setup
    8. SPI setup

    But then think howmany flavors of controllers exist and how many combinations can be setup...

    We need a wizard (of programming) to make the Header Wizard!

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    4. ADC setup
    5. Comparator setup
    6. UASRT setup
    7. I2C setup
    8. SPI setup
    EXACTLY!!!

    But then think howmany flavors of controllers exist and how many combinations can be setup...
    Thats what I am thinking about


    We need a wizard (of programming) to make the Header Wizard!

    Ioannis
    Seems to be a plenty of them around here

    I think the power will be in the dat file. The "wizard" will load the dat for the selected device, and from there will know what options are available. In that way the wiz can determine what to display. Maybe a different page for each option.

    maybe in rev 2 it can do some simple conflict checking to determine if trying to double assign functions.

    I am not too familiar with the include files provided with mplab, but maybe these will work for the dat files?
    -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!

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


    Did you find this post helpful? Yes | No

    Default

    I have 17 different flavors of PICs in inventory, several share the same data sheet and I only use maybe six of the flavors regularly.

    For me a project like this would not be worth the time. If I were using a different chip every day then maybe it would be.

    How many different chips do you plan on using?
    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

    well I really only have 4 different chips. The benefit for me is that I don't have to pour over the data sheet to find all the different setup options and make sure they are turned on or off. And I really don't do stuff with them often enough to retain a good working knowledge of them.

    I guess it would be more useful for the programmer who doesn't work with it all the time.

    Thank you for the input.
    -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
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Well that is why forums like this are handy. There is almost always someone with an answer.

    A very usefull tool that answers some of the questions is mister e PicMultiCalc.
    It has a baud rate calculator, time calculator and some other stuff.

    Then the config options can be found for each chip in the Pxxx.inc file in the MPASM directory.

    But again. It is easier for us to answer questions than it is to make a large data base.

    Hmmm. Might be good extra credit for a student...
    Or a community supported data base.
    Darn it. Now you got me thinking about how something like this could be put together.
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default Config Tool

    It would be nice if this config fuse tool could parse the xxx.inc file, and post these options for you. That way, as new chips are given, the new .inc file inputs the data, without manual input. It is all here.

    Code:
    ;       Configuration Bits
    ;
    ;   NAME            Address
    ;   CONFIG1H        300001h
    ;   CONFIG2L        300002h
    ;   CONFIG2H        300003h
    ;   CONFIG3L        300004h
    ;   CONFIG3H        300005h
    ;   CONFIG4L        300006h
    ;   CONFIG5L        300008h
    ;   CONFIG5H        300009h
    ;   CONFIG6L        30000Ah
    ;   CONFIG6H        30000Bh
    ;   CONFIG7L        30000Ch
    ;   CONFIG7H        30000Dh
    ;
    ;==========================================================================
    
    ; The following is an assignment of address values for all of the
    ; configuration registers for the purpose of table reads
    _CONFIG1H        EQU  H'300001'
    _CONFIG2L        EQU  H'300002'
    _CONFIG2H        EQU  H'300003'
    _CONFIG3L        EQU  H'300004'
    _CONFIG3H        EQU  H'300005'
    _CONFIG4L        EQU  H'300006'
    _CONFIG5L        EQU  H'300008'
    _CONFIG5H        EQU  H'300009'
    _CONFIG6L        EQU  H'30000A'
    _CONFIG6H        EQU  H'30000B'
    _CONFIG7L        EQU  H'30000C'
    _CONFIG7H        EQU  H'30000D'
    
    ;----- CONFIG1H Options --------------------------------------------------
    _OSC_LP_1H           EQU  H'F0'    ; LP
    _OSC_XT_1H           EQU  H'F1'    ; XT
    _OSC_HS_1H           EQU  H'F2'    ; HS
    _OSC_RC2_1H          EQU  H'F3'    ; External RC, RA6 is CLKOUT
    _OSC_EC_1H           EQU  H'F4'    ; EC, RA6 is CLKOUT
    _OSC_ECIO_1H         EQU  H'F5'    ; EC, RA6 is I/O
    _OSC_HSPLL_1H        EQU  H'F6'    ; HS-PLL Enabled
    _OSC_RCIO_1H         EQU  H'F7'    ; External RC, RA6 is I/O
    _OSC_IRCIO_1H        EQU  H'F8'    ; Internal RC, RA6 & RA7 are I/O
    _OSC_IRC_1H          EQU  H'F9'    ; Internal RC, RA6 is CLKOUT, RA7 is I/O
    _OSC_RC1_1H          EQU  H'FB'    ; External RC, RA6 is CLKOUT
    _OSC_RC_1H           EQU  H'FF'    ; External RC, RA6 is CLKOUT
    
    _FCMEN_OFF_1H        EQU  H'BF'    ; Disabled
    _FCMEN_ON_1H         EQU  H'FF'    ; Enabled
    
    _IESO_OFF_1H         EQU  H'7F'    ; Disabled
    _IESO_ON_1H          EQU  H'FF'    ; Enabled
    
    ;----- CONFIG2L Options --------------------------------------------------
    _PWRTEN_ON_2L        EQU  H'FE'    ; Enabled
    _PWRTEN_OFF_2L       EQU  H'FF'    ; Disabled
    
    _BOREN_OFF_2L        EQU  H'FD'    ; Disabled
    _BOREN_ON_2L         EQU  H'FF'    ; Enabled
    
    _BORV_45_2L          EQU  H'F3'    ; 4.5V
    _BORV_42_2L          EQU  H'F7'    ; 4.2V
    _BORV_27_2L          EQU  H'FB'    ; 2.7V
    _BORV_20_2L          EQU  H'FF'    ; 2.0V
    
    ;----- CONFIG2H Options --------------------------------------------------
    _WDTEN_OFF_2H        EQU  H'FE'    ; Disabled
    _WDTEN_ON_2H         EQU  H'FF'    ; Enabled
    
    _WINEN_ON_2H         EQU  H'DF'    ; Enabled
    _WINEN_OFF_2H        EQU  H'FF'    ; Disabled
    
    _WDPS_1_2H           EQU  H'E1'    ; 1:1
    _WDPS_2_2H           EQU  H'E3'    ; 1:2
    _WDPS_4_2H           EQU  H'E5'    ; 1:4
    _WDPS_8_2H           EQU  H'E7'    ; 1:8
    _WDPS_16_2H          EQU  H'E9'    ; 1:16
    _WDPS_32_2H          EQU  H'EB'    ; 1:32
    _WDPS_64_2H          EQU  H'ED'    ; 1:64
    _WDPS_128_2H         EQU  H'EF'    ; 1:128
    _WDPS_256_2H         EQU  H'F1'    ; 1:256
    _WDPS_512_2H         EQU  H'F3'    ; 1:512
    _WDPS_1024_2H        EQU  H'F5'    ; 1:1024
    _WDPS_2048_2H        EQU  H'F7'    ; 1:2048
    _WDPS_4096_2H        EQU  H'F9'    ; 1:4096
    _WDPS_8192_2H        EQU  H'FB'    ; 1:8192
    _WDPS_16384_2H       EQU  H'FD'    ; 1:16384
    _WDPS_32768_2H       EQU  H'FF'    ; 1:32768
    
    ;----- CONFIG3L Options --------------------------------------------------
    _T1OSCMX_OFF_3L      EQU  H'DF'    ; Active
    _T1OSCMX_ON_3L       EQU  H'FF'    ; Inactive
    
    _HPOL_LOW_3L         EQU  H'EF'    ; Active low
    _HPOL_HIGH_3L        EQU  H'FF'    ; Active high
    
    _LPOL_LOW_3L         EQU  H'F7'    ; Active low
    _LPOL_HIGH_3L        EQU  H'FF'    ; Active high
    
    _PWMPIN_ON_3L        EQU  H'FB'    ; Enabled
    _PWMPIN_OFF_3L       EQU  H'FF'    ; Disabled
    
    ;----- CONFIG3H Options --------------------------------------------------
    _MCLRE_OFF_3H        EQU  H'7F'    ; Disabled
    _MCLRE_ON_3H         EQU  H'FF'    ; Enabled
    
    ;----- CONFIG4L Options --------------------------------------------------
    _STVREN_OFF_4L       EQU  H'FE'    ; Disabled
    _STVREN_ON_4L        EQU  H'FF'    ; Enabled
    
    _LVP_OFF_4L          EQU  H'FB'    ; Disabled
    _LVP_ON_4L           EQU  H'FF'    ; Enabled
    
    _DEBUG_ON_4L         EQU  H'7F'    ; Enabled
    _DEBUG_OFF_4L        EQU  H'FF'    ; Disabled
    
    ;----- CONFIG5L Options --------------------------------------------------
    _CP0_ON_5L           EQU  H'FE'    ; Enabled
    _CP0_OFF_5L          EQU  H'FF'    ; Disabled
    
    _CP1_ON_5L           EQU  H'FD'    ; Enabled
    _CP1_OFF_5L          EQU  H'FF'    ; Disabled
    
    _CP2_ON_5L           EQU  H'FB'    ; Enabled
    _CP2_OFF_5L          EQU  H'FF'    ; Disabled
    
    _CP3_ON_5L           EQU  H'F7'    ; Enabled
    _CP3_OFF_5L          EQU  H'FF'    ; Disabled
    
    ;----- CONFIG5H Options --------------------------------------------------
    _CPB_ON_5H           EQU  H'BF'    ; Enabled
    _CPB_OFF_5H          EQU  H'FF'    ; Disabled
    
    _CPD_ON_5H           EQU  H'7F'    ; Enabled
    _CPD_OFF_5H          EQU  H'FF'    ; Disabled
    
    ;----- CONFIG6L Options --------------------------------------------------
    _WRT0_ON_6L          EQU  H'FE'    ; Enabled
    _WRT0_OFF_6L         EQU  H'FF'    ; Disabled
    
    _WRT1_ON_6L          EQU  H'FD'    ; Enabled
    _WRT1_OFF_6L         EQU  H'FF'    ; Disabled
    
    ;----- CONFIG6H Options --------------------------------------------------
    _WRTB_ON_6H          EQU  H'BF'    ; Enabled
    _WRTB_OFF_6H         EQU  H'FF'    ; Disabled
    
    _WRTC_ON_6H          EQU  H'DF'    ; Enabled
    _WRTC_OFF_6H         EQU  H'FF'    ; Disabled
    
    _WRTD_ON_6H          EQU  H'7F'    ; Enabled
    _WRTD_OFF_6H         EQU  H'FF'    ; Disabled
    
    ;----- CONFIG7L Options --------------------------------------------------
    _EBTR0_ON_7L         EQU  H'FE'    ; Enabled
    _EBTR0_OFF_7L        EQU  H'FF'    ; Disabled
    
    _EBTR1_ON_7L         EQU  H'FD'    ; Enabled
    _EBTR1_OFF_7L        EQU  H'FF'    ; Disabled
    
    ;----- CONFIG7H Options --------------------------------------------------
    _EBTRB_ON_7H         EQU  H'BF'    ; Enabled
    _EBTRB_OFF_7H        EQU  H'FF'    ; Disabled
    
    
    _DEVID1          EQU  H'3FFFFE'
    _DEVID2          EQU  H'3FFFFF'
    
    _IDLOC0          EQU  H'200000'
    _IDLOC1          EQU  H'200001'
    _IDLOC2          EQU  H'200002'
    _IDLOC3          EQU  H'200003'
    _IDLOC4          EQU  H'200004'
    _IDLOC5          EQU  H'200005'
    _IDLOC6          EQU  H'200006'
    _IDLOC7          EQU  H'200007'
    It would even be a start to be able to click on your selections, and have it bring up relevant code for both including in your code, or for adding to your PBP inc file.

    like:
    Code:
    asm
        __CONFIG    _CONFIG1H, _OSC_HSPLL_1H
        __CONFIG    _CONFIG2H, _WDTEN_OFF_2H & _WDPS_512_2H
        __CONFIG    _CONFIG4L, _LVP_OFF_4L
    endasm
    It looks like Proton has a simple config "tool" here:
    http://wiki.picbasic.org/index.php?n...seConfigurator
    Name:  FuseConfigPic.png
Views: 1833
Size:  17.8 KB

    CCS just shows you the configs, like this:
    Name:  valid_fuses.gif
Views: 1701
Size:  9.9 KB

    It would be nice to expand on it, and make it easier. I think everyone has gotten stuck with configs. I know I sure have.

    With a quick look around the net, I can't find any manufacturer or software maker that has made this very easy for any chip. You would think Microchip would be interested in this, as it would really give them an edge. Perhaps you can sell it to them when you are done!
    Last edited by ScaleRobotics; - 2nd September 2010 at 16:19.
    http://www.scalerobotics.com

  8. #8
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,802


    Did you find this post helpful? Yes | No

    Default

    CCS seems more human friendly with the plain english explanation. What the heck is that FCMEM_ON anyway?

    You see what I mean?

    If Dave manage to complete this maybe Melabs or Mecanique would be interested too. It would be a great tool for amateurs or pros.

    Ioannis

  9. #9
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,613


    Did you find this post helpful? Yes | No

    Default

    HI, Walter

    And what about the MPLAB config screen, once " config bits set in code " being unchecked ???

    noooooo .... not on the head !!!

    Ok, the VDI doesn't exist any more ...

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

  10. #10
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Ok Alain, I think I am up to speed. Here is the MPLAB window with nifty drop down boxes:

    Name:  MPLAB.PNG
Views: 1793
Size:  60.3 KB


    I had to look up what VDI was. But I like it! Looks like even Microsoft could not keep up with their own chips. When did this VDI get exxed?

    Yes Ioannis, I hear you as well. Like Dave says, a database could be made with all the descriptions. Hopefully a new chips .inc file could be parsed, and the corresponding English text description would be pulled. It would be neat to try initially with two or three families of chips, to see what it takes.
    Attached Images Attached Images
    Last edited by ScaleRobotics; - 2nd September 2010 at 20:33.
    http://www.scalerobotics.com

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


    Did you find this post helpful? Yes | No

    Default

    I've been trying to remember the VDI for a while now. I played with it once about 6 years ago, but it didn't support the chip I was using at the time.

    It is basically what I was thinking about, but doesn't need to be graphical.

    Being able to use the .inc files to populate the form is a great idea, but it may add loads of complexity to the application. I really don't think entering the data the first time will be an issue. After all, without the wizard, you would have to type it all in a program and hope you didn't miss anything.

    As for selling it to someone or some company, of course I have no control over that. But I really did see this as GNU. Now if it comes down to 1 person doing all the work, and its not a community project, well that person should have the say about its eventual distrubtion.

    I have been talking to people here at work, and I am told SQL is a kin to lotus notes. If thats the case, maybe I can be useful in this design effort.

    @dave, please point me to exactly the software you are looking at for this.
    -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!

  12. #12
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Yes, I guess I had that under my nose, but failed to notice it. That is about the best I have seen.

    Name:  mikroe.PNG
Views: 1707
Size:  56.1 KB
    http://www.scalerobotics.com

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


    Did you find this post helpful? Yes | No

    Default

    Looks like I need to try that.
    Does it produce stuff that can be used in PBP code?
    Dave
    Always wear safety glasses while programming.

  14. #14
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    No, it is the programmer interface, and edits the config bits after compiling your hex file, just prior to programming.
    http://www.scalerobotics.com

  15. #15
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,613


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    No, it is the programmer interface, and edits the config bits after compiling your hex file, just prior to programming.
    not the programmer interface, Walter ...

    MikroE Edit Project Window
    Attached Images Attached Images
    ************************************************** ***********************
    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 " !!!
    *****************************************

  16. #16
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    %
    Hello cncmachineguy,
    Here are a couple of ideas I have given thought to:
    1. Make "Include" files for the chips you use regularly.
    2. make start up files for each chip and name them accordingly, use lots of comments on the register settings so you do not have to bury yourself in them each time. Then after opening them, save them as your new project name, something like Blinky16F690.bas. Lots of us make new File directories for each project, so this naming convention works if you recompile for a different chip, say Blinky16F648A.bas, then all your hex files will be named that way too.
    BTW
    I program and run a Fadal TRM when I work, great to see another cnc guy here.
    %
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

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


    Did you find this post helpful? Yes | No

    Default

    Wow! lots of intrest. I would like to point out while all the solutions presented seem to be great ideas for tending to the config bits, the goal is a total configuration tool. The config bits are just a starting point. Don't get me wrong, I do appreciate the tips.

    @Joe, that is a great idea, and may very well be the better option, but this IS the "wish list" section.

    I have 3 bridgeport VMC's all running DX2 controls, and a FEMCO lathe with a fanuc control. I agree it is nice to find others with like jobs.
    -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!

  18. #18
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    What type of tool changer do your Bridgeport VMC's have? Side-mount or carousel style?

  19. #19
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cncmachineguy View Post

    1. User selects uP
    2. select initial pin status
    3. osc select
    The Proton guys had developed something that did all the above and more. Unfortunately, I cant seem to find the installable anymore on the net.

    And it could do only 16Fxxx.

    The developed header was of course for the Proton, but could easily be adapted for PBP.


    Name:  Protonheadermaker.jpg
Views: 2115
Size:  90.4 KBRegards,

    Anand.

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


    Did you find this post helpful? Yes | No

    Default

    Seems that program has disappeared. I only found one thread mentioning it on the Proton forum. Looked like it was from the writer but the link was broken.
    Dave
    Always wear safety glasses while programming.

  21. #21
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Yes, I noticed that.

    I have it installed on my system, but dont seem to have the original installable. However, it does seem to be a portable app, as it works on any PC I copy that folder to.

    It was a free utility, so I can mail it to anyone who is interested; its about 3 MB in size.

    Regards,

    Anand

  22. #22
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,613


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ardhuru View Post
    Yes, I noticed that.

    I have it installed on my system, but dont seem to have the original installable.
    Anand
    Hi, Anand

    may be one can find it here :

    http://depositfiles.com/files/urjh2so1w

    ...

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

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


    Did you find this post helpful? Yes | No

    Default

    Not so nice.
    Looks like a pay thingy just to download.
    Dave
    Always wear safety glasses while programming.

  24. #24
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    may be one can find it here :

    http://depositfiles.com/files/urjh2so1w
    Thanks for fishing that out, Alain.

    Now to wait till one of the geniuses here create a PBP version...

    Regards,

    Anand

Members who have read this thread : 2

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