A header wizard - Page 3


Closed Thread
Page 3 of 6 FirstFirst 123456 LastLast
Results 81 to 120 of 230

Thread: A header wizard

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


    Did you find this post helpful? Yes | No

    Default

    It is so much fun to see such intrest in this. And to think, I started it. Its about time I had a useful idea - lol.

    I am working on working on learning python so I can help somehow. Don't know if I will be up to speed in time for first rev's, but at least I may be able to help maintain it.

    As for the 18xxJxx problem, my first question is how would we go about programing it without the wizard? When we know the answer to that, the wizard will just do the writing for us. I do like the idea of having the wizard "fix" the .inc file for us. That really seems like the most seemless solution. But that may be another chunk of code.

    @Dave and Paul, are your programs looking at the dir to find all the available *.inc files? So updates will just automaticlly be added?

    @Dave, If I am reading your code right, did you have to hard code all the cases for the config options?
    -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. #82
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    @Dave and Paul, are your programs looking at the dir to find all the available *.inc files? So updates will just automaticlly be added?
    Mine is. The dir is copied to the server.
    @Dave, If I am reading your code right, did you have to hard code all the cases for the config options?
    Nope.
    Code:
    file = open("%s" % subject,"r")
    text = file.readlines()
    file.close()
    
    for line in text:
        m = re.match(r"_", line)   # Looks for everything starting with "_"
        if m: print line, "<br>"
    So because of the "J" chips a second pass will be needed.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    So because of the "J" chips a second pass will be needed.
    Maybe better to trigger off the "J" and have seperate routines? Or is the differance not that clear in the parts?
    -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. #84
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Separate routines might be best.
    Split it up between
    16F
    18F
    18F__J

    Unless I am forgetting something that should be the three basic configs.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    Sorry Paul, if there is one I don't know about it.
    Downloaded and installed the latest MPASM stuff I could find--it's v5.31. Anyway, that took care of that issue!

    Thanks for the terrific advice! Now back to coding...(after replying to some more posts...)

    Best Regards,
    Paul

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics View Post
    Honestly ...
    The MPASM section itself is 62 Mo on the HDD ...

    AND No separate Download from µChip site ...

    Time for your PC to grow a bit, don't you think ???

    Alain

    Thank You, Alain.

    I have bitten the bullet and downloaded. Once I started installing I was able to direct it to *not* install anything but MPASM for the 8-bit microcontrollers.

    And, since this is the first time I think we've ever communicated directly, I think your avatar is one of the most amusing that I've ever seen.

    Best Regards,
    Paul

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    A very small start.
    http://wiz.mackrackit.cambs.net/
    I will post a project log and any code used at the above address if anyone want to work on it.
    If you have suggestion or code lets play. I will work on it as time permits.
    more from the novice:
    Followed the link, played with the button. Not sure how to access the .py scripts. If I right click and choose view source, all I see is the html source for the page. What am I missing?
    -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. #88
    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
    Not sure how the big open projects work...
    I guess to do it right a license needs to be decided on, GNU?
    Other than that jut make the code available someplace for folks to play with. If someone adds a function/fix then they let you know. You then work their code into a version if possible then release the updated version.
    If you do not want to incorporate code from others just make yours available someplace.

    If we can find others using Delphi or Python that want to help with this we could give out parts that need worked on. The "J" chip problem comes to mind.
    Very good, Dave.

    As soon as I have the code actually doing something beyond parsing the files (shouldn't be more than a few days) I'll set up two files on a server, one of just the executable and the another including all the source. I'll administer the overall "broad release" version and incorporate any improvements/fixes created by others.

    Best Regards,
    Paul

  9. #89
    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
    It is so much fun to see such intrest in this. And to think, I started it. Its about time I had a useful idea - lol.
    With great power comes great responsibility! Hope you hang in long enough to put it through thorough testing...

    As for the 18xxJxx problem, my first question is how would we go about programing it without the wizard? When we know the answer to that, the wizard will just do the writing for us. I do like the idea of having the wizard "fix" the .inc file for us. That really seems like the most seemless solution. But that may be another chunk of code.
    I think that has now been resolved. Thanks, scalerobotics!

    @Dave and Paul, are your programs looking at the dir to find all the available *.inc files? So updates will just automaticlly be added?
    Yes, that it exactly.

    For fun I've attached a screenshot of the application's current status...

    Best Regards,
    Paul
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by prstein View Post
    With great power comes great responsibility! Hope you hang in long enough to put it through thorough testing...
    I'm here for a good while. I've been coding with just assy for about 10 years as a hobby, nothing big. Finally took the plunge to do things a bit easier and buy PBP. Enrolled in a python class starts on 9/15. Decided not to go the self taught route on this one. Too many times I start to learn a new language and quit cuz something doesn't make sense to me.

    As for the "thorough" testing, I will put it through all I can.

    Thanks for jumping on board. Looks like a nice start you have!
    -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!

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by cncmachineguy View Post
    more from the novice:
    Followed the link, played with the button. Not sure how to access the .py scripts. If I right click and choose view source, all I see is the html source for the page. What am I missing?
    Well... That is all there is at the moment

    The .py that the HTML button page triggers is in red on the first page. The HTML with the button sends info to the .py then the .py produces a web page with the results.

    The HTML part that gets it going
    form action="/cgi-bin/ChipDrop.py" method="post" target="_blank">
    select name="ChipSel">
    --SNIP--

    Then the Python code picks it up here
    # Get data from fields
    if form.getvalue('ChipSel'):
    subject = form.getvalue('ChipSel')
    else:
    subject = "Not entered"


    So all I have is the HTML and one py script to display the config options.
    BTW.
    I used this to help generate the HTML. No way I typed all of that..
    Code:
    #!/usr/bin/python
    import os
    import re
    import string
    path="fileS"  # insert the path to the directory of interest
    dirList=os.listdir(path)
    for fname in dirList:
        str = fname
        tx = str.strip('.INC');
        sep = ''
        list = ['<option value="fileS/',str,'">',tx,'</option>']
        print sep.join(list)
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Enrolled in a python class starts on 9/15.
    COOL!!!!
    Now when I get stuck I know who to ask

    Never took a class myself And it probably shows...
    Dave
    Always wear safety glasses while programming.

  13. #93
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi guys,

    I like the enthusiasm, and it’s a great idea … but …
    You may not want to spend too much time on this project.

    I can’t say from whom or where right now, but there is already a functioning Configurator that will be available fairly soon.
    It covers all the chips, and all the configs, with drop-down boxes and descriptions for each option.

    It creates a file that can be INCLUDEd in the code, and each project can have its own config file, instead of the normal default configs in the .inc files.
    Or like all INCLUDEs, it can be pasted into the main code itself.
    The defaults still have to be commented out, but that may be fixed soon too … maybe.

    Sorry for the late notification, but I've been moving out of state and haven't been on-line for a few weeks.

    Cheers.
    DT

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    I like the enthusiasm, and it’s a great idea … but …
    You may not want to spend too much time on this project.
    There you go, bursting our bubble, spoiling our fun. (And I use "our" very loosely)

    I was looking forward to the open source aspect. Just to have the possibility of adding some bells and whistles would be great. There is a lot that this application could do. Some "PicMultiCalc like" functions could be added ... all digital includes, all sorts of possibilities.
    http://www.scalerobotics.com

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


    Did you find this post helpful? Yes | No

    Default

    Leave it to Darrel to be a couple steps ahead of us.
    Time wise I probably would not get much done before Darrel's (??) program comes out. So I will wait some.
    Who know, maybe it will be open for tweaks. Or not have everything we have talked about. If not then.... We fill the gaps.

    What else could we do like this? I like the idea of an open community project.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrel!?!?!? -lol really that is good news. I don't know if I understand from the breif description if it does all we want, missing seems to be initial I/O pin setup. But alas, we will have to wait and see.

    As for the community project, that was my 1 big idea. But I am open to any others. another big question for me will be to pay or not to pay, that is the question. Darrel clearly provides us with GREAT code to use as we see fit. So if he IS going to be the author, I would feel compelled to pay some amt for it. Now if he just has a heads up on an update from the PBP folks, well I just bought mine, I would hate to have to give it up for an update this soon.

    Guess we wait. In the meantime, I still get to learn python, and that by itself is awesome for me. I may still persue daves efforts as a realtime puzzle to practice with.
    -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!

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


    Did you find this post helpful? Yes | No

    Default

    Here is another one to practice with
    http://www.picbasic.co.uk/forum/showthread.php?t=10381
    It has some problems the way it is written. Pointed out in the thread. I just never got around to fixing it.

    It would be a good stand alone program, command line or GUI, to practice with.
    Dave
    Always wear safety glasses while programming.

  18. #98
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    Here is another one to practice with
    http://www.picbasic.co.uk/forum/showthread.php?t=10381
    It has some problems the way it is written. Pointed out in the thread. I just never got around to fixing it.

    It would be a good stand alone program, command line or GUI, to practice with.

    Nice - just tested it with the latest version of my thermostat project -



    Very useful app - thanks Dave
    Attached Images Attached Images  

  19. #99
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    I can’t say from whom or where right now, but there is already a functioning Configurator that will be available fairly soon.
    The usual suspect is the "who" I suppose.

    Well, when he is involved, job gets done!

    Anxious....

    Ioannis

  20. #100
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Maybe i should have said not to spend time on the CONFIG part, which is what it does, and what I saw you working on so far.

    I don't want to stop all the other stuff you could be working on, because that will be very valuable too.

    I did ask permission before revealing the configurator (because it's not from me), I just hated to see the time being spent here. But if that time were redirected towards setting up all those crazy internal registers, I'm sure it would be extremely usefull and appreciated by everyone.
    DT

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


    Did you find this post helpful? Yes | No

    Default

    Well it looks like we are back to work..

    Everything but the configs....

    Thanks for the heads up Darrel.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Talking

    I'm not sure we want to exclude the configs, may still be a good starting point. Plus the more intergrated the better. But hey, I'm on board with however we proced. I'm glad we are turned back on.
    -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. #103
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default

    Does anyone know, does MicroCode Studio support third party apps?
    -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!

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


    Did you find this post helpful? Yes | No

    Default

    MicroCode Studio
    Why??
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    MicroCode Studio
    Why??
    Because most people like it a whole lot more than a text editor.
    http://www.scalerobotics.com

  26. #106
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    No, MicroCode Studio does NOT have Plug-in's.

    It was converted into the Proton IDE and Plug-in's were added there, but they were never added to MCS.
    DT

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mackrackit View Post
    MicroCode Studio
    Why??
    I thought that was the "standard" for writing PBP code in. Besides a text editor, how else?
    -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!

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


    Did you find this post helpful? Yes | No

    Default

    MPLAB
    Emacs
    gEdit
    Norm's Fine Line IDE
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Red face i am so behind

    Ok, so I get it now. You guys already told me in my other thread to use mplab since I am used to it already. But I forgot. To be clear in my head, I just write the PBP code in mplab, and since I ran the install mplab plugin, mplab will know how to compile it. Do I have it correct now?

    Assuming I am correct, since I install the mplab plugin, mplab allows plugins. I hope I am correct here, cuz to me that would mean we really want to evolve the wizard into a plugin for mplab.

    Thoughts?
    -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!

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


    Did you find this post helpful? Yes | No

    Default bad mplab

    well it appears microchip does not want to make the plugin development by non commercial folks too easy. from a quick search, I gather there is some NDA to sign. this makes an open source project pretty un-doable.
    -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!

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


    Did you find this post helpful? Yes | No

    Default

    The thing about plugins is every time the thing it is plugged into gets an update the plugin most often needs and update too.

    That does not sound like fun too me.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    You are right Dave, the plugin becomes unplugged! So we are full circle back to the good stuff now, the business of header wizard.

    Thanks for clearing up my confusion about the code you have done so far. I won't bite off the html stuff for now, so thats on you guys. but I am very excited to get started on the python. Last time I had a formal programming class was college. lets say 20 years ago.

    And yes, I hope to be able to ANSWER some questions soon, instead of always being the asker.
    -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!

  33. #113
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default About MPLAB

    About MPLAB 'd like to post my experience regarding the use of ICD3.

    If you are using the above as a programmer then the best MPLAB version so far is the 8.15a and you can download it from Melabs site.

    Newer version have serious timout problems and lose connection with the ICD3 producing the ICD3Err0033 error. I was almost ready to return it form repair until I download the old version and have no problem at all. And the assembler is very-very fast also!

    Too pity that many people have the same problem (according to Microchips forums) but the company does not seem to do anything about it.

    Ioannis

    P.S. When installing a newer version you have manually to remove the older one. Look at Add/Remove programs fro XP or Program and Features for Vista.
    Last edited by Ioannis; - 11th September 2010 at 19:08.

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


    Did you find this post helpful? Yes | No

    Default

    That's so sad for me (mplab version). I had to upgrade to icd3 because my icd2 was an older one with no support for win7. Had to upgrade mplab to 8.53 to get support for my device (16F1947). So it sounds like the best option may be 8.53 with icd2 on an xp machine.
    -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!

  35. #115
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    16F1946 is supported by 8.15a but not the 16F1947...

    Do you have any problems with the ICD3/MPLAB 8.5x/Win 7 ?

    Ioannis

  36. #116
    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

    Do you have any problems with the ICD3/MPLAB 8.5x/Win 7 ?

    Ioannis
    To be honest, I haven't tried that combo yet. ICD3 is at work, where I only have XP. I will bring it home tomorrow and try it on my laptop with win7. I don't have a current built project to test it with, but I can use the test module that came with it,
    -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!

  37. #117
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default

    OK. Looking forward...

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default

    Hello All,

    I was hoping to have an demo exe ready to post today, but the development had to take a major turn this past Friday...

    I removed all the fuse configuration parsing and settings. For want of a better first task I tried adding the setup of the pin input/output states and levels. The relevant MAPSM .inc file is parsed to determine what ports exist and which individual bits are available for those ports (and of course GPIO for the little chips). Each port gets it's own tab. Bits that don't exist for a given port are not shown on the individual tab. (Did that make *any* sense?). The configuration files can be saved and re-loaded.

    However, when taking the last look before posting I noticed two bugs that I won't have a chance to fix until tonight or tomorrow. One is that the text doesn't update properly when using certain chips until you actually click on a tab. The other is that when the text is generated in the form "TRISA = %10101010" I have inadvertently reversed the order of the bits. (When all bits in a port are not used it instead puts in an individual line for each bit, e.g. "TRISA.1 = %0".) I'm sure additional bugs will appear...

    Anyway I just wanted to put out that I was still trying to (finally!) maybe do something useful for this community. Suggestions for additional features to add would be most welcome. A screenshot is attached.

    Best Regards,
    Paul
    Attached Images Attached Images  

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


    Did you find this post helpful? Yes | No

    Default

    That looks nice!!!
    Next ADC?
    I was planning to start there but my weekend did not go as planned so I have nothing to show.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Paul, its great! I assume if ADC or any other special function options are chosen, the corasponding pin will not be available for I/O configuration?

    Dave, no worries. I might start pushing on you anyway when I start to learn something.

    Question for the masses, Do you think we should still include the config bits? I feel like it would still be good to have, plus its all wrapped up in 1 spot. And sometime down the road, we may want it to make some simple error checking like : configed for 4mHz internal osc, but wanting to rum 115KB serial, or something like that.
    -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!

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