A header wizard
+ Reply to Thread
Page 1 of 6 12345 ... LastLast
Results 1 to 40 of 230

Thread: A header wizard

  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
    2,872

    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

    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,926

    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

    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,926

    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
    Aug 2010
    Location
    Maryland, USA
    Posts
    869

    Default

    Community supported database, that's the words I was looking for in my first post.

    I posted this here in the "wish list" section, assuming the GUI part could be done by the pbp developers, so it would be an integrated part of mcs. Then "we" the community would build the database based on our needs.

    I suppose an alternate solution would be, either a: if mcs supports plugins, we could develop it. Or b: just a stand alone app. I don't like that approace as much, cuz it won't feel intgreted.
    -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!

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

    Default

    The forum is a canned system from V Bullitin so we can not do anything tied directly to it.

    But Lester has made free websites available to forum users so maybe we could play with something there.

    I will do some poking around. Could be fun.
    Dave
    Always wear safety glasses while programming.

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

    Default

    well Dave,

    as it appears I have you at least intrested, do you have any ideas on how to use the wizard? I mean as a plugin, stand alone ....
    -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!

  10. #10
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,926

    Default

    I was thinking something along the lines of SQL with a web interface (python of course).

    To add data a form page would be used, so we will need to figure out what all this thing should do so a standard form can be used. Might have to have a couple standard forms, 16Fs and 18Fs.

    Then a form for to set the parameters for the header.

    Just a bit of planning to do.

    Anyone else with ideas?
    Dave
    Always wear safety glasses while programming.

  11. #11
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,926

    Default

    Maybe fuse configuration would be a good place to start?
    Dave
    Always wear safety glasses while programming.

  12. #12
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    2,872

    Default

    And after we set up all the necessary little things on the form, Microchip(c) wll make this tiny change and screws everything

    OK, I am joking, but the Form/SQL may have to be prepared for such a case.

    Fuse settings is a good starting point as there is a lot of confussion on this. Every time I change a chip I have to scan the fuse settings which arfe not very obvious sometimes.

    Ioannis

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

    Default

    Quote Originally Posted by Ioannis View Post
    And after we set up all the necessary little things on the form, Microchip(c) wll make this tiny change and screws everything

    OK, I am joking, but the Form/SQL may have to be prepared for such a case.
    Go from depreciated to inflated...
    We may have to make a script for that.
    Fuse settings is a good starting point as there is a lot of confussion on this. Every time I change a chip I have to scan the fuse settings which arfe not very obvious sometimes.
    You too? My last big problem was a fuse mistake.
    Give me a day or two and I will try to get something started.
    Dave
    Always wear safety glasses while programming.

  14. #14
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    2,872

    Default

    What a coincidence Dave, yeah me too. Embarrased to confess it...

    Ioannis

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

    Default

    If by fuse bits, you guys mean the config bit, I'm not too embarrassed to confess. I have spent hours trying to debug code that doesnt work anymore. Just to realize I didn't set the clk in the settings part of mplab.

    So That is a big part of what I hope this will resolve.

    I think a database approach is great! To be clear, I won't be any help in its development besides being a tester. I have plenty of experience with lotus notes, but thats about it. I will learn if anyone wants to point me in the direction of the starting point for python. But my startup time may well exceed the time it takes for you pro's to be done.

    So I will take a stab at how I see the "work flow" of writing a new PBP program:

    click the wizard icon to start the wizard
    upon it opening, choose an existing device,create new device, or check for updated db
    existing device:
    page 1 has config stuff like clk, wdt, etc
    next page could be hardware stuff like mccp,a/d,esuart,etc
    next page port assignment and I/O choices. also IOC and WPU on this page
    next pages, everything else I can't think of right now.
    finally after a zillion clicks, hit "print" or "Done" button and a text file is created to load into mcs

    check for updates:
    not much to say here, wizard will check for updated database

    create new device:
    form will follow the same format as using an existing device, except all options will be available. (does this make sense?)
    when done, option to upload to the master database


    A note about new device addition to the database. I feel like a new device should have some sort of flag with it indicating it is new and possibly not complete. This flag should ride with it until such time as it is blessed by some (ideas here?) verification method. This is just to try and prevent any badly built entries from corrupting the database.
    The method could be 5 unique users "appove" it. This would get reported back to the master copy of the database.

    My vote is to be able to have a local copy of the database so we are not dependant on web access to use the wizard.
    -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!

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

    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: 641
Size:  17.8 KB

    CCS just shows you the configs, like this:
    Name:  valid_fuses.gif
Views: 551
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

  17. #17
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    2,872

    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

  18. #18
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,539

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

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

    Default

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

    Name:  MPLAB.PNG
Views: 761
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

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

    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!

  21. #21
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,926

    Default

    I am not familiar with lotus notes. SQL or SQLite are just data base engines.
    But after reading the comments I am not sure if that is the best way. Like Walter said, it is in the *.inc.

    Might just parse the inc. Would have to have a couple or three pre-set parameters because not all incs are equal...

    I decided some time back to only use Python for PC stuff, cross platform and free Command line, GUI, CGI..

    Goto python.org and look at the cgi module. I think a web interface for this is what we want, but still open to suggestions.

    Marketing sounds nice but a community project would be fun. Besides that I may not have the time to do it all myself, nor may I have all of the skills needed. I certainly do not know everything about every chip... So help will be needed.
    Dave
    Always wear safety glasses while programming.

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

    Default

    I'm not sure how the parsing of the files will work, but it would for sure eliminate the need for the database. then we would have a stand alone app using the *.inc provided by microchip.

    Do the inc files have all the data to do as I have "wished" for? I assume they do, but just don't know.

    I will have a go at python. I would love to learn a language to write stuff for windows. I have been using ruby (very little) to write a plugin for sketchup. but at this point, i am not set on anything.

    python 2.7?

    Have any thoughts on work flow as I posted?
    Last edited by cncmachineguy; - 3rd September 2010 at 00:15.
    -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!

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

    Default

    I am not so sure about a stand alone app. If it were web based then updates would be easier.

    Pretty much everything about the chip is in the inc.

    Python 2.6 or 2.7. Not 3.xx Many web servers have not went with 3 yet and there are just enough changes that I am aware of to cause problems. There are some app to convert 2.xx to 3.xx but I have not used them.

    Work flow...
    I am still thinking how to go about it.
    Something like...
    A script to parse the inc to place the data we want in a "standard" format for each series. Figure the configs would be a good starting/testing app at first. Take a look at the differences in the configs between a random 16F and 18F.

    A new file would be created for each chip? Or a data base entry made? Or just work this into the main app directly from the inc, but that might slow things down some.

    Then when a chip is selected the file is read to see if MCLR has an option (example) or internal OSC. The config select part of the app would then be populated with radio buttons to turn MCLR ON/OFF, another option for the OSC speed and type...

    The app would then run through the file, with a little logic, for things like PLL USB DIV.

    The completed configs would then be printed ready to copy paste.

    Something like that...
    Dave
    Always wear safety glasses while programming.

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

    Default

    Thanks for the python info, i will download and install tonight. I was running out of new things to learn, down to only 4 or 5.

    I agree with the updating and the web access.

    I also agree starting with the configs will be a great start and instantly useful.(always a good thing)

    new file vs database vs direct read on the fly. hmm, I am not sure about the extra time for the direct read. do you think we are talking seconds, minutes? big pro to me for the direct read would be the .inc files are maintained by microchip, so in theory they will always be up to date.

    sounds to me like the operation and use is the same as I was thinking, so I second that.

    instead of copy and paste, I was thinking the file itself would just be opened and start coding from there.
    -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!

  25. #25
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    2,872

    Default

    Sorry if this is a stupid question,but how a web based app will find those *.inc files?

    Aren't they stored locally in he MPLAB folder?

    Ioannis

  26. #26
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,926

    Default

    Quote Originally Posted by Ioannis View Post
    Sorry if this is a stupid question,but how a web based app will find those *.inc files?

    Aren't they stored locally in he MPLAB folder?

    Ioannis
    They would have to be uploaded.
    Dave
    Always wear safety glasses while programming.

  27. #27
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    2,872

    Default

    OK. I feel very stupid... Thank you!

    Ioannis

  28. #28
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,926

    Default

    Quote Originally Posted by Ioannis View Post
    OK. I feel very stupid... Thank you!

    Ioannis
    No reason to feel that way.
    I tried finding them on MicrChip's website with the idea of scraping from there. Looks like the only place to find them is on our hard drives.

    I wonder how often they are updated?
    Dave
    Always wear safety glasses while programming.

  29. #29
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    2,872

    Default

    Hmm, Every time a new MPLAB appears? I can do that.

    Ioannis

  30. #30
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,926

    Default

    I have never paid any attention, even "old" chips have their *.inc changed/updated?
    That would make this project only usable to those with a certain version of MPLAB.

    I have not updated for awhile, still have MPLAB 8.0 .
    If your are using a newer version does yours match this?
    Attached Files Attached Files
    Dave
    Always wear safety glasses while programming.

  31. #31
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    2,872

    Default

    Dave the file is absolutely the same, Rev. 1.

    Hope they do not mess with the format of the files.

    If this is the case things are a little easier.

    My current MPLAB is 8.50.

    Ioannis

  32. #32
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,539

    Default

    Hi,

    May I tell you you could have an eye on the MikroE Edit Project Window ...

    on the left side ... the config options
    in the window ... the HEX config values for the different config xx registers ...

    the .cfg file do not show " Config xx " so, it's a bit trickier ...

    BTW ... it's DELPHI written ...

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

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

    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: 663
Size:  56.1 KB
    http://www.scalerobotics.com

  34. #34
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,926

    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.

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

    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

  36. #36
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,539

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

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

    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.

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

    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!

  39. #39
    Join Date
    May 2007
    Posts
    604

    Default

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

  40. #40
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    620

    Default

    Hi guys,

    Let me get my inexperienced nose into this conversation . But, unless I'm missing something here, there is already a software out there that helps you to set the configuration fuses in your PIC. It is easy to use and you don't need to worry about the INC files or anything like that. This software comes with the U2 Melabs programmers.

    http://store.melabs.com/prod/u2/U2.html

    Robert
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

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