News:

Let's find out together what makes a PIC Tick!

Main Menu

Upgrade from proton pic basic

Started by Peter Truman, May 07, 2023, 01:21 AM

Previous topic - Next topic

Peter Truman

Hi all

I'm not exactly new since I've been using the Proton compiler with the standard IDE for near on 20 years. Mostly small projects. I do have the dongle (actually 2 since I wanted to keep a spare just in case)

I've recently retired so I have a bit more time to play so I decided to download the trial version of Positron and John B's Proton Studio IDE

My problem is that now, when I try to use the original IDE (with an old piece of code using a PIC18F25k22) I get a message saying 'a registration is required to use device PIVC18F25K22 - please contact storypainer@hotmail.com'

Now it is very likely I will pay for and register the new compiler anyway - but it's unfortunate that downloading the trial has locked me out of my existing tool chain! Particularly since I cant seem to find another location where the original compiler lived (seems to be in the same place? C:\Program Files (x86)\ProtonIDE\PDS)

My plan is to slowly introduce myself to a new toolchain but I need to have access to my original setup at the same time (I.e the proton compiler and original IDE as well as the new setup)

Can anyone help me with this?

I have joined the new forum (and recognise several names from years ago on the old forum)

Thanks in advance - I'm really glad this compiler is still being developed after the crownhill breakdown.

Peter Truman

Ok panic over!

I just reinstalled ver 3.6.0.2 and both the original IDE and Proton Studio seem to use that happily without any issues.

Should I infer that upgrading to Ver 3.7.3.6 requires the registration (and fee)? (Which I'm happy to pay)

I'm keen to get cracking with the new 'procedures' structure and thought it was time to refresh the way I do things.

While I'm about it - I have a MPLAB ICD4 sitting on the bench unused - does anyone have any experience with using this? - particularly keen on finding better debugging tools rather than just monitoring the serial output of my projects. I'd like an easy way to step through and watch variables etc - I believe this might help me?


Thanks again
Peter 

Peter Truman

Ok - slightly weird

I just reinstalled ver 3.7.3.6 from my previous download- all seems to work fine. Not asking me to register.

Not clear what happened there?

RGV250

#3
Hi Peter,
Welcome back, I may be wrong but the new "Positron" (which has a lot more to offer than just the procedures) started at 4.0.0.0.
I recall that there were 2 upgrade options at the time where you could keep the dongle and it was slightly cheaper but to be honest even if that option is still available it is way better to get the full version as that no longer requires the dongle and you can use it on all your machines, it is a personalised version to you.

There is nothing really to learn from the change as the new version looks and feels the same, it is not like Microsoft who make changes just to see how well they can mess you up, they must have a prize for that. You can either use the original IDE or Positron Studio or Fineline. As far as I am aware they all live hapily side by side so you can try each as you so desire and drop back as and when.

Bob

Peter Truman

Hi Bob - thanks for the response. I must admit I was a bit puzzled when I (thought) I had downloaded Positron because it looks so similar to proton!

It seems I may have just started Positron Studio and actually run Proton from there. However, it was puzzling to find a message saying I should send the email to register.

I am an amateur so navigating through this stuff can be a bit daunting. I did have the two dongles, one for the PC and the other for the laptop, so it would be good to be able to put them in a draw.

I will try again and see what happens - not at all worried about the cost, which I consider to be far too cheap for a program of this quality anyway. Lots of people I spoke with over the years said I should change to using a C compiler - while there may be some advantages in terms of debugging etc I've never found the need.  Everytime I try, I get tired of the gibberish and just throw in the towel and do what I want to to with Proton instead!

Thanks again

 

Stephen Moss

Hi Peter,
I may be miss remembering as things were a little confusing at the time of the Proton/Positon change over, but as I recall you had the option of purchasing a dongless verion of Proton (4.0.0.0?) which would not longer then came Positron (4.0.0.1?) which would be supported going forward.
The Positron updates will not work with Proton, so if you were thinking you could just install the latest version of Positron to upgrade from Proton 3.7.3.6 to the current version as you used to in the past then it will not work, I presume that is the primary reason for appearance of the registration message.

You might want to search the forum for confirmation as I am sure there are posts mentioning it, but as I recall you can have can have the both Proton and Positron installed at the same time if you wanted to dabble in Positron using the available trial device while still being able to edit and compile your old files using Proton. However, if you do that, you have to be careful to install them into different directories otherwise one will overwrite the other due to Positron retaining the original Proton directory names.
As I recall Positron Studio will work with both Proton and Positron, which it initially uses will depend on which is installed in the compilers default directories, although if you want to swap between them you can changes the directory Positron Studio refernces in Options (under the Tool menu)

You will find there have been quite a few changes since your last version, this is not an extensive list but I think you will find some commands that are new to you, Parameter passing subroutines have been downgraded to legacy status in favour of Procedures, All_Digital is now obslete (compiler does it automatically) & you can now use Sub & EndSub to define the start and end of subroutines as an alternative to the orignal method. 


AlbertoFS

Hi Bob,
The Procedures started with the version V3.7.5.5, last version with the dongle before Positron. But In this versión the procedures are not fully develloped.
I am using it actually to write code.
Alberto
73's de EA3AGV

Peter Truman

Hi Stephan

Indeed - I was a bit confused. Its wasn't my intention to try and upgrade from Proton to Positron for free, I understood that I would need to buy a new copy (for trivial amount for such a quality product IMHO). I was trying to install the Trial version of Positron so I could run both compilers (and the different IDE's) side by side until I 'got used to it'

Since then I have purchased the latest Positron, it seems very familiar so I've not worried about hanging on to Proton (I can always reinstall it if I run into trouble). I've spent the afternoon playing with the Proton Studio with the new compiler just to get used to the changes.

So I'm a long way down the path of 'updating' my tool chain - I would like to know how I could better debug my code though. Right now I have a MAX232 chip on pretty much every board I make (cheap) so it's reasonable to just squirt out various notes and values as I develop the code - but that's not very efficient, it means I have to carefully track down issues, then write a line of code to squirt out variables, artificially slow down program loops etc so I can see what is going on. It's also just not the right way to do things.

I did inherit a MPLAB ICD4 from another project and I wondered if I might be able to make use of that - but sadly, don't know how at this point.

So, if anyone knows how I could add that sort of debugging capacity to my new tool chain, I'd love to hear about it.

I must say - it is nice to have the forum to hand, I hadn't realised how much I had missed that. (not really found the full wiki stuff yet, I learned heaps out of that in the early days).

Thanks again


Stephen Moss

Quote from: Peter Truman on May 10, 2023, 05:48 AMI did inherit a MPLAB ICD4 from another project and I wondered if I might be able to make use of that - but sadly, don't know how at this point.
I cannot help you there, I am sure an internet search will provide a link to instructions.
I have one of the older biscuit tins as I call them (IDC3?) but don't really use it. All I can recall is that I had to hack up a modem cable and wire one end into a 6 way socket to connect via my ICSP connector (I put on one every board) and if memory serves set the DEBUG config bit in the MPLAB ide which results in some debugging code being added to the loaded hex file before programming, which may be an issue on devices with small or little free memory as there may not be space for it.

Off the top of my head, if you want to use the MAX232's you should be able to add some kind of serial terminal program to the IDE as a tool to make it easy to access, but on newer PC's you may need to use an RS23 to USB adaptor. Then in your code use a timer interrupt to trigger regular dumps of whatever variable and register data you deem relevant. Whatever debugging method you use will result in extra code and execution time.

tumbleweed

#9
If you create a .cof file ("Declare Create_Coff = On") then it's possible to do source level symbolic debugging using MPLAB or MPLABX, but it's not necessarily a straight forward process.

If you use an older device and programmer (PK2, PK3, or ICD3) then you can use the old MPLAB 8.92, which is much easier. For newer devices you're forced into using a PK4 or ICD4 and MPLABX, and getting that up and running isn't for the faint of heart. You have to compile outside the IDE and then import the cof file as a prebuilt project.

One nice thing is using either IDE you can use the simulator to check out basic code, although using it for hardware simulation usually leaves much to be desired. Both IDE's support using a virtual UART so you can send messages to a window using HRSout without needing any real hardware.

If you use the serial debugging route I'd suggest dropping the MAX232 and get a USB-TTL UART cable. That way you can use the serial w/out any additional hardware (unless you want a serial port on your target anyway).

John Lawton

Quote from: tumbleweed on May 10, 2023, 11:18 AMIf you use the serial debugging route I'd suggest dropping the MAX232 and get a USB-TTL UART cable.
Using a virtual serial port adaptor makes possible very high serial speeds which can reduce the delay impact on your code of the debugging activity. For instance the FTDI TTL-232R-5V-WE claim up to 3 MBaud at TTL levels.

tumbleweed

Good point John, although I've found getting it to work much past 460K can be tricky sometimes.

I should have mentioned - if you use one of the hardware debuggers via the ICSP connection then it has almost no impact on your code, timing or size-wise. Most modern devices don't require any target resources except for the MCLR, ICSPDAT, and ICSPCLK lines (usually RB6 and RB7). You do lose use of those two IO lines since they have to be dedicated to the debugger.

As usual with Microchip, on the smaller pin count chips this can be a challenge, especially since they can be shared with some of the analog pin functions like opamps, dacs, etc, so you lose those peripherals. On some of the devices with USB the programming signals are even shared with USB D+/D- which is a real nightmare (18FxxK50). Smart move, huh?


John Drew

Hello Peter,
If you go down the USB/TTL cable route don't be tempted by the cheap Chinese copies. They often fail to work. It's better to spend a bit more to ensure you have a genuine FTDI chip.
John

PS you won't regret the upgrade to Positron for the extras, but also to support the developer.

AE7HD

I bought Proton with the dongle many years ago for a commission that the customer abandoned. I subsequently lost the dongle, and just today went looking for what was going on with Proton Basic.

I think 99% of my questions have been answered by this thread.

trastikata

Quote from: tumbleweed on May 10, 2023, 12:34 PMOn some of the devices with USB the programming signals are even shared with USB D+/D- which is a real nightmare (18FxxK50). Smart move, huh?

tumbleweed, I think 18FxxK50 are sharing the differential pins with the Interrupt On Change, not programming pins. Maybe you meant other USB capable PICs?

Peter Truman

Quote from: tumbleweed on May 10, 2023, 11:18 AMOne nice thing is using either IDE you can use the simulator to check out basic code, although using it for hardware simulation usually leaves much to be desired. Both IDE's support using a virtual UART so you can send messages to a window using HRSout without needing any real hardware.

Hmm. lost me there I'm afraid. What simulator and how do I setup a virtual uart? (I'm using Positron Studio)

I generally need a serial output on my projects anyway (mostly agricultural) so no probs there.

Peter Truman

Quote from: tumbleweed on May 10, 2023, 12:34 PMGood point John, although I've found getting it to work much past 460K can be tricky sometimes.

I should have mentioned - if you use one of the hardware debuggers via the ICSP connection then it has almost no impact on your code, timing or size-wise. Most modern devices don't require any target resources except for the MCLR, ICSPDAT, and ICSPCLK lines (usually RB6 and RB7). You do lose use of those two IO lines since they have to be dedicated to the debugger.

As usual with Microchip, on the smaller pin count chips this can be a challenge, especially since they can be shared with some of the analog pin functions like opamps, dacs, etc, so you lose those peripherals. On some of the devices with USB the programming signals are even shared with USB D+/D- which is a real nightmare (18FxxK50). Smart move, huh?



Ok - this is interesting. I generally don't use the ICSP pins for other things unless I'm stuck so the idea of keeping these free for debugging is just what I'm looking for.

So, in order to do this I need a hardware debugger? I use the MELabs usb programmer - which I presume doesn't have this capacity? Can you outline the steps necessary for this. (I just searched for this and found https://melabs.com/resources/debugmon.htm) so I have some reading to do already.


Peter Truman

Quote from: AE7HD on May 10, 2023, 07:00 PMI bought Proton with the dongle many years ago for a commission that the customer abandoned. I subsequently lost the dongle, and just today went looking for what was going on with Proton Basic.

I think 99% of my questions have been answered by this thread.

There are so many helpful people on the forum. So much to learn!

Peter Truman

So, during the course of the day I've found that the Pic Basic Pro compiler has a debug monitor that might form the basis of something useful.

It talks about having 'hooks' that sit in the code calling a debugger monitor at each step of the code - the debug monitor can dump values out to the serial port and can be made to wait for an input in return. Alternatively the monitor can just return to next line of code and carry on with the program.

Can anyone advise if this is possible with proton? Seems like this would be very useful and really, just what I'm after.







RGV250

Hi,
There used to be P-ICD which was brilliant, I have heard JohnB and Possibly Normnet might be looking at adding this to their IDE's. I do hope that is possible as it was the best thing I have used for debugging.

Bob