PDA

View Full Version : Configurator



Ioannis
- 6th February 2014, 14:20
I wish for a PIC configurator like this:

http://www.protonbasic.co.uk/content.php/2607-PIC-FuseConfigurator-Mk2

If this is already working for the PDS compiler in a MCS environment, how difficult is to make it compatible with PBP?

Ioannis

Demon
- 6th February 2014, 20:59
Too bad the attachment on that article isn't working.


This has come up so often ever now and again. I remember Mr E being real tempted to do something a while back.

Now that you mention it, I wonder how complicated it would be to do in VB? I'm dabbling a bit in VB code for my Access database, I know VB should be able to do all this. It's just a matter of knowing how to get at all the right information from the right files (in my feeble mind).

The hard part would be to make it so it can work for any PIC. Personally I'd target PIC 10, 12, 16 and 18 (know little of 10 and 12 series - haven't researched PIC 24 and 33 yet).

Robert

Ioannis
- 7th February 2014, 08:19
Robert, at the bottom of the page the link refers too, there is a Note and after this note you can download the Fuse Configurator ( PICŪ Fuse Configurator Mk2 (Ver3.2.0.2) (http://www.click-server.com/forumfiles/misc/FuseConfiguratorVerP24Install.zip)). But it is for the PDS compiler in a Microcode environment.

So, my question is, since this is done for the other compiler, and covers almost all PICŪ controllers, how difficult is to modify it and use it in PBP?

Ioannis

Demon
- 7th February 2014, 16:30
The author is unlikely to share source code if he has a vested interest in the other compiler (and rightfully so).

You can ask but I wouldn't hold it against him if he said no.

Robert

Ioannis
- 7th February 2014, 17:52
My phrasing implied "free", but it was not my intention. Maybe in the Plus edition of the MCS?

But there is no option yet.

Ioannis

Demon
- 7th February 2014, 19:28
Tell you what, accumulate everything I would need to know to make this tool; what files, what lines to look for, etc.

I'll keep an eye open while I'm making this application and see if I can come up with at least a basic system. Nothing is stopping us from coming up with a barebone version 1 with open source, and let the ball roll from there. Maybe someone with more advanced skills than me might then be willing to spruce things up at that point.

I can't guarantee anything except giving my best effort with the VB knowledge I have. I know this can be done, someone has proved that already.

Robert


EDIT: I had done this for PIC 18s:
http://www.picbasic.co.uk/forum/content.php?r=467-PICs-CONFIGS-and-Oscillator-Settings-for-Beginners

But I'd also need the same for 10, 12 and 16s. I don't know anything about the 24 and 33s, do they support PBP?

pedja089
- 7th February 2014, 19:49
MPLAB X have fuse configurator buil in.
MPLAB X>Window>PIC Memory Views>Configuration Bits:
http://www.picbasic.co.uk/forum/attachment.php?attachmentid=7219&d=1391798898

Demon
- 7th February 2014, 20:17
Wow!

I had tried MPLAB a long time ago but had been turned off by the interface. It just didn't seem as easy to get going (for a beginner) as MicroCode Studio Plus.

It looks like I'm going to have to give it another try after all. And it's free too. I went through the user guide and didn't see any reference if there is a retriction to what compiler it supports.

Dumb question #34: Does PBP v2.60c work on MPLAB X?

Robert

Ioannis
- 7th February 2014, 20:24
I don't know anything about the 24 and 33s, do they support PBP?

They do support PBP. But PBP is not supporting them. Yet...

Well, I cannot helpon this project Robert, as my skills on VB are at ground level. But can beta test if it is needed.

Ioannis

Ioannis
- 7th February 2014, 21:07
For the 1.95 installation, maybe you want to see this thread also:

http://www.picbasic.co.uk/forum/showthread.php?t=18520

by our friend pedja089

Ioannis

Demon
- 8th February 2014, 03:53
I don't see any mention so far that MPLAB X is for PBP 3.0 only, or am I missing something? I thought I had seen that restriction last year but now I can't see it (probably right in my face too).

If MPLAB X supports v2.60c, I'm not interested in reinventing the wheel. Somehow I have a feeling it doesn't, just because of the new way CONFIGs are handled.

Robert

mackrackit
- 8th February 2014, 04:18
I use MPLABX with PBP2.6

pedja089
- 8th February 2014, 09:26
Demon, you can comment out default configs in .inc files, and put it in your code in asm(ASM/ENDASM).
That will work only with MPASM.

Demon
- 8th February 2014, 15:00
i use mplabx with pbp2.6

tytytytytyty! :)

Charlie
- 8th February 2014, 15:24
Don't erase the older versions too quickly - do a fresh install in a completely different directory. You may be back - I was.
But in fairness, I tried it when it was first released. I'm sure there have been bug fixes since then.

Darrel Taylor
- 9th February 2014, 02:33
I wish for a PIC configurator like this: ...
how difficult is to make it compatible with PBP?


I can tell you from experience that it's VERY HARD to write a configuration utility!!!

But rather than trying to convert one from a different compiler.
Try this one, which is written for PicBasic Pro ... http://support.melabs.com/content/563-meCONFIG

Many months have gone into this FREE program, and many more are sure to come.
Please test and then comment at ... http://support.melabs.com/forums/22-meCONFIG

Demon
- 9th February 2014, 05:42
That's excellent Darrel. That has pretty much everything I need to config a PIC.

I liked Old-Long setting, feels comfy and can just copy/paste into my program. I don't like editting the INC except to comment out default settings. Not all my programs for a given PIC use the same CONFIGs; best place for me is in the program.

Looks can be deceiving. I bet there's a lot of code under that puppy.

Now I just need a newer programmer for easy debugging.

Robert
:)

Heckler
- 9th February 2014, 16:08
Like MANNA from Heavin
Ask and Ye shall recieve

That's awesome Darrel!

I see it was posted to MeLabs website on Feb 8th, that's quite a coincidence compared to the original post by Ioannis.

Ioannis
- 9th February 2014, 23:15
Thanks Darrel. I felt it that you were up to something!

Gone for testing now!

Ioannis

muddy0409
- 23rd October 2014, 02:13
I have a reasonably easy answer to the configuration method:
Since all of my code is for inhouse use, ie for things I build for my own, or close contacts, I feel I don't really need to go through the CONFIG method in my code.
My solution is that I use the MELABS USB programmer, and once I do the COMPILE & PROGRAM step in MCS, then the programmer fires up and I can set the configuration in a dropdown tab. Each CONFIG bit, all of which are named, can be set or cleared as required and the chip programmed. So far, it appears that all the config bits that pertain to the chip you are using are available in the dropdown, so you know each bit is relative to the chip that you are about to program.
There will probably be some purists out there that will insist that CONFIG should be part of my code, but, hey, it works for me doing it the cheating way, so why not?
I do believe the PICKIT has similar function, but the CONFIG bits are not named, they ere simply shown as the bit number, so you still have to work out what the bits are. Too damn hard for an old bloke, so the PICKITs have been put out to pasture in favour of the MELABS unit...So much easier.

Charlie
- 23rd October 2014, 16:13
I did that for a while, but if you are tweaking and experimenting, it gets old pretty fast. Far better to have it in the code and do it ONCE rather than every program attempt.

muddy0409
- 24th October 2014, 01:03
Umm, no, you only have to alter the dropdown contents if you need to change anything.
Before the programming starts, the existing config is read and doesn't change unless you tell it to. So makes it easy, in my view anyway.

richard
- 24th October 2014, 01:58
http://support.melabs.com/DT/meCONFIG/meCONFIG_setup.exe


have you seen this ?

Charlie
- 24th October 2014, 16:11
@ Peter - you didn't say which programmer you are using, but mine resets the bits to a default and needs to be changed every time. I guess they can behave differently. (Granted mine is a clone).

mark_s
- 24th October 2014, 16:59
Charlie,

The Melabs usb programmer program has a pull down menu for options.

Un-check the "Update configuration from file". Now it will keep the configurations
you selected and not reset these each time you flash the pic.

I agree with Peter the Melabs USB programmer is the way to go. Many questions on this forum
are on configurations problems. Melabs USB program has a pull down configuration check list for each
pic supported. The negative is the price, I think it is about $80usd.

rsocor01
- 24th October 2014, 19:04
Charlie,

The Melabs usb programmer program has a pull down menu for options.

Un-check the "Update configuration from file". Now it will keep the configurations
you selected and not reset these each time you flash the pic.

I agree with Peter the Melabs USB programmer is the way to go. Many questions on this forum
are on configurations problems. Melabs USB program has a pull down configuration check list for each
pic supported. The negative is the price, I think it is about $80usd.

I agree 100%. The U2 USB Programmer makes your life a lot easier. I have been using it for years without any issues.

muddy0409
- 25th October 2014, 01:38
Admittedly the price may be a worry, but as far as I am concerned, $80 for the programmer is much better than $hundreds of pulling your hair out.
All mine went years ago, so I figure I am in front.

Charlie
- 25th October 2014, 17:03
You can spend the money, or you can add a couple lines of code to your program. To each his own.

The issue with using the programmer (assuming you have one that doesn't forget the settings after each use) Is that 6 months or a year from now, when you want to program another device with the same code, you have to dig through your notes to decide what to program the fuses to. If it's already in the file, you simply program.

Honestly, I find the option names pretty intuitive, and spend less than 2 minutes at the start of a project deciding which options I want and adding them to the file. In fact, for the two devices I use most often, I have a generic file that sets fuses, turns off rarely used functions, sets up important registers and so on. The files are well commented in case I need to make changes, but are almost always more than 90% correct, and I can start coding right away.

I did try out Darrel's program, and it was very good, but I found doing it myself to be not all that painful after the first few devices I played with.