OK. Looking forward...
Ioannis
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
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.
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!
Not sure how that will specifically be worked out. The app should make it so that the header will work that way. I think (but need to check) that if you set a particular TRIS direction it will be superseded by a subsequent ADC setup. But I could have this completely wrong...
I've removed the fuse bits parsing but I haven't thrown it away. I currently plan to see what the new mystery application will do, first. It could just 100% outclass anything I can do.
I do think it will be possible to do some sort of "reality check" on the selected configuration to catch circumstances such as that you mention. I would probably put a remmed warning or suggestion into the header text.
Thanks for the comments!
Best Regards,
Paul
************************************************** ***********************
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 " !!!
*****************************************
Attached is the first Alpha version of my attempt at a PBP Header wizard. Please try it out if you are interested and/or have been following this thread. However, expect bugs.
I'm happy to provide the source code (in Delphi, version 4) on request but unless you really want to dig in I suggest waiting until it is a little more stable and structured.
Any comments, suggestion, requests, and bug reports are welcome.
Best Regards,
Paul
1st praise - excellent so far
2nd requests
- instead of just giving me an error when mpasm cant be found, can it bring up a file dialog to find it?
- can we have a browse button to get the path to mpasm?
- after setting the path, reload to populate. (now it requires exit and restart)
- request or bug, depends on you. can't type a part number in direct. error right away. (file not found)
3rd bugs
- so far all I see is tris sets the port, and initial state sets tris. port g on 16f1947 tris and portl are correct. only 5 pins for G, maybe thats it?
- tried it with a 16f676, device has 12 I/O a0..5 and c0..5 wizard configures for 8 and 8. gets the names correct.
- initially on startup, "select device" text is not there. if I max the window, its there.
Overall awesome! Looking forward to more!
Last edited by cncmachineguy; - 14th September 2010 at 06:02.
-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!
PROBLEM...
I thought the MPASM *.inc file had all of the info we needed for this but now it looks like I am wrong.
I can not find where the ports are defined.
Where does it tell that the 16F676 only has six pins on a port?
Evidently the data sheet is the only place to find the info.
HIGH PORTC.7
compiles just fine for a 16F676.
Dave
Always wear safety glasses while programming.
Hello Ioannis,
Thank you very much! It is written in Delphi, an IDE for Visual Pascal. I'm using version 4, which is kind of old, but the IDE loads so much more quickly than the later releases. I know about a half dozen or so (programming) languages, several of those are different flavors of C/C++. I can stumble through a couple of others (C# and Java). I tell customers that I'll write in any language they pay me to. If it isn't specified and it's for Windows, I generally choose Delphi.
I better get off my soapbox before I blather on any further...8-)
Best Regards,
Paul
Thanks for the great info and the links! I think I'd prefer to keep the idea of using those files as plan B, as it takes away the simplicity by requiring files to be present that are not required by PBP.
An alternate Plan B would be to develop my/our own set of files with just the data the application needed. A lot of work on the front side but there could be benefits as well.
Best Regards,
Paul
But if they are freely available, they could be distrubted with the program. Are the installed with mplab? if so it seems no different then requiring MPASM
This goes back to the original database idea of Dave. Use a form to input information for each device as needed. If the db is community supported, it will be far easier to build the records.An alternate Plan B would be to develop my/our own set of files with just the data the application needed. A lot of work on the front side but there could be benefits as well.
-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!
Hmm, until Mama Microchip thinks there are rights on this and prohibits the free use of the files...
OK, may be I am pessimistic about it but if it involves community use of their original files, i'd be carefull...
Now it came to me, what is Lester doing on the matter of domain name?
Ioannis
Just to follow up on this, I finally did remember to bring my ICD3 home from work. Today I have it plugged in. I also have the test interface module pluged into it. From time to time through out the day, I jump to mplab and test the connection. So far so good. I don't really know if this will test the issue or not, but at least is a start.
-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!
With the test interface works OK. It just ensures that electrically the ICD3 is working.
But if you load a hex file, compile a project or try to program a chip then after a while it looses connection and returns an error message. The only cure is to disconnect the USB cable and reconnect in a few seconds.
Any version after 8.15a does this. In my Vista, XP and in a friends systems to (his ICD3). On the Microchips forum there are reports from others too...
Ioannis
Hello All,
Don't want you to think I've been slacking off too badly...
Attached is the most recent version of the header wizard. It's come a long way but there is still far to go...
Changes and additions to Build 3:
- -Now requires accurate location of PBP folder. This is used when populating the "Select PIC" combo box. The include file must exist in both the MPASM and PBP folders to be added. This prevents the application from attempting to parse files for microcontrollers that are not supported by PBP.
- When selecting PIC, tabs are updated to show or hide PORT, ADC, Comparator, and USART tabs depending on whether or not they exist for that device.
- In General tab, added DEFINE for oscillator speed.
- In General tab, added DEFINE for using bootloader.
- In General tab, added DEFINE for enabling PORTB pullups.
- In Port tab, straightened out reversing of TRIS and PORT bits.
- In Port tab, added handling so that PORT and TRIS will be output in a single line each if possible. Unused (i.e. non-existant) bits are set as zero.
- In ADC tab, added checkbox to set all potential ADC ports to digital.
- In ADC tab, added checkbox to configure internal ADC. At this point ONLY the standard PBP DEFINES are included.
- In Comparator tab, added checkbox to set all potential comparator ports to digital.
Comments, bug reports, suggestions always appreciated...
Best Regards,
Paul
Great idea, but now I'm broke from testing at work again.Changes and additions to Build 3:
- -Now requires accurate location of PBP folder. This is used when populating the "Select PIC" combo box. The include file must exist in both the MPASM and PBP folders to be added. This prevents the application from attempting to parse files for microcontrollers that are not supported by PBP.
All sounds really good, just have to wait till I get home to play.
- When selecting PIC, tabs are updated to show or hide PORT, ADC, Comparator, and USART tabs depending on whether or not they exist for that device.
- In General tab, added DEFINE for oscillator speed.
- In General tab, added DEFINE for using bootloader.
- In General tab, added DEFINE for enabling PORTB pullups.
- In Port tab, straightened out reversing of TRIS and PORT bits.
- In Port tab, added handling so that PORT and TRIS will be output in a single line each if possible. Unused (i.e. non-existant) bits are set as zero.
- In ADC tab, added checkbox to set all potential ADC ports to digital.
- In ADC tab, added checkbox to configure internal ADC. At this point ONLY the standard PBP DEFINES are included.
- In Comparator tab, added checkbox to set all potential comparator ports to digital.
Comments, bug reports, suggestions always appreciated...
Best Regards,
PaulAnd I have work I must do before going home.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Hi Paul. Thanks for the new version.
Please have a look at the attached picture. It has some garbage under File Utility menus.
Also when starting the application it askes fo the Microchip directory.
a) since it is by default installed in a known place, can this be autmated?
b) the window that request to manually find the directory is at the back ground and not visible.
And it then assumes that my PBP is at c:\pbp
If I have my PBP in a different place, say c:\pbp243 it gives an error message for MPASM not found!
After the error messages if I set the paths in Utility/Settings menu, all are OK after.
In ADC tab, if All Analog Ports to Digital is checked, then there is no point in Configure Built in ADC. An being in the ADC, it does not set the ADCON0/ADCON1 registers. (I tested the 16F887)
Can you add also a PWM tab?
Now this is a reminder if possible to add in a later version: Timers, Comparators, Interrupts.
The last note is about the aesthetic ofte windows. Can this be OS based to look more slick and related to the current OS system?
Ioannis
Last edited by Ioannis; - 20th September 2010 at 20:03. Reason: Forgot many ...
Hello Ioannis,
You must be using Large Fonts. I'll add some handling to account for that,
Are you aware of a registry key for this? I could check that and use that as the default (if the key exists). Failing that can you make any recommendations for what the default should be or how it should be determined?Also when starting the application it askes fo the Microchip directory.
a) since it is by default installed in a known place, can this be autmated?
Good point. I can fix that.b) the window that request to manually find the directory is at the back ground and not visible.
Whoops...that will teach me to re-use code! I will fix that as well.And it then assumes that my PBP is at c:\pbp
If I have my PBP in a different place, say c:\pbp243 it gives an error message for MPASM not found!
After the error messages if I set the paths in Utility/Settings menu, all are OK after.
Hmm. I'll have to figure out what I did to break that--thanks for finding the problem!In ADC tab, if All Analog Ports to Digital is checked, then there is no point in Configure Built in ADC. An being in the ADC, it does not set the ADCON0/ADCON1 registers. (I tested the 16F887)
I did figure that someone might wish to configure all ports as digital and then change just one of them (or something) to analog. I probably didn't think that through far enough and will re-visit the question.
Comparators is on the short list. PWM can be done reasonably easily (I think). Timers and interrupts somewhat harder. On any/all of these, what do you want to set? (What decisions would the user make and what would the output look like). I've set all of these at one time or another for my own projects but the challenge is how to generalize the rule.Can you add also a PWM tab?
Now this is a reminder if possible to add in a later version: Timers, Comparators, Interrupts.
I'm using an old version of Delphi (v4 from 1998!). At some point I'll try recompiling under a newer version, which should update the look.The last note is about the aesthetic ofte windows. Can this be OS based to look more slick and related to the current OS system?
Thanks for all your comments!
Best Regards,
Paul
Paul, maybe we can get a definative list for all the special functions - everyone chime in here - and get a version just showing all tabs as if every function may be used on a "test" device? Even better, anyone want to put together a "test" .inc to try out the app? The test device would be a phantom chip that has every function available in every chip for its class. So maybe 3 files 16F,18F, and 18FJ.
I think this would go far towards the planing side of things.
As for the looks, I really like the new icon.
Which OS to look like? XP,Vista, WIn7, or none of the above. Personally I like the looks of Fedora Core but thats a whole different issue.
-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!
Bookmarks