News:

;) This forum is the property of Proton software developers

Main Menu

Microstick 2 programming

Started by RGV250, Jun 10, 2023, 06:30 PM

Previous topic - Next topic

RGV250

Hi,
I normally take the device out and use a breakout board (ICSP) to program it but that is tedious. I have just read that the Microstick has a built in programmer so I wondered if it is possibly to couple that with Positron to save program from the IDE which will save a lot of grief.

Bob

jaka

The Microstick II most probably has PKOB (Pickit on board, basically a stripped down PICkit3). At least on some website was listed that Microstick II has USB PID 0x8107, which is same as in Curiosity PIC32MX470 development board. And that Curiosity board has PKOB.

You can probably use MPLAB IPECMD for programming. I have heard that the programmer support is very broken in the latest MPLAB-X 6.10, so you might want to try something older.

I have implemented PKOB support for PICkitminus. It works, at least on the above mentioned Curiosity MX470 board. But is not much tested and thus not released.

DaveS

Hi Bob

Using the info from jaka, I found this.

There is info here to set up PICKIT4 using the MPLAB IPECMD.exe
Prob just need to change -TPPK4 to what ever the Microstick II uses
https://www.sfcompiler.co.uk/wiki/pmwiki.php?n=SwordfishUser.IDEProgrammingTool

Dave

RGV250

Hi,
Thanks for your replies, it looks interesting and I will have to do a bit of reading when I get the time.

Bob

RGV250

Hi,
It seems Microchip have done their level best to mess good ideas up. The Microstick is a good idea but you cannot use ICSP, I tried MPLAB X as that seemd to have pointers to command line but it failed to even find the programmer. I uninstalled it and installed MPLAB 8.76 and that finds the programmer and I can import the hex file and program it but cannot find any information on if it is possible to use command line as it uses "Starter kit on board". All the information I found needed MPLAB X and ipecmd.exe which does not appear to be part of the older MPLAB.
At least it works and is not much more effort. I do wonder if it was not for Les and Positron if I would have given up with Microchip as they clearly need some better programmers / designers.

Bob

jaka

Hi Bob, all,

Sorry to bring up old post.

Earlier this year I released a version of PICKitminus which supports PKOB (PICKit-on-Board). I have tested it only with two boards:
- Curiosity PIC32MX470 (DM320103)
- PIC24F CURIOSITY DEVELOPMENT BOARD (DM240004)

If you still have the Microstik II, you could see if it works with PICkitminus. You need to use the GUI software first which will update the PKOB firmware. After that, you can also use the command line version. You can get it here: http://kair.us/projects/pickitminus/

top204

#6
Many thaks Jaka.

QuoteIt seems Microchip have done their level best to mess good ideas up.

I noticed this a long time ago Bob.

When I first developed the Amicus18 board, back in around 2011, a developer from microchip came to see us, and he was banging on about MplabX he was working on with others, and showed me it in its early stages. I could not believe how bad it was and that it was just a banged up version of the Netbeans IDE, written in dreadful 'Java' of all languages! With its slow speed, bloat and clumsiness! And now has sections written in Python!!!! A roll back to the 1980s with commercial programs written in interpreted BASIC. :-)

I don't think he liked my responses to it. LOL Then they nicked the idea of the Amicus18 board and made their own, as they have done with a few other developers I have known, and their projects they have created and shown microchip.

Microchip are a, "buy it, or nick it, give it to third parties to screw it around, and re-sell it" company, and they actually develop very little of their own. So quality does not seem to come into play anymore with microchip, and it is "name only", as has happened in the past, and happens now with all the most popular companies. Unlike when it first took over GE and it was a first class development company, with very good datasheets and info and some good apps, but never mplab. It was always a dreadful IDE. :-)


charliecoutas

I've been following the Post Office enquiry into the Horizon scandal. I'll bet Microchip have programmers who think that the idea is to show off how clever you are. Here is some code from the Horizon system. It reverses the sign of a value. You and I would probably write D=-D, but the clever programmer from Fujitsu did this:

Public Function ReverseSign(d)
If d< 0 Then
    d=Abs(d)
  Else
    d=d-(d*2)
  Endif
ReverseSign= d
End Function

Charlie

RGV250

Hi Jaka,
I still have it but on holiday so will not be able to try for a while.
Only one question, if I am changing the firmware and it doesn't work, is it possible to reload the old firmware?

Bob

jaka

Hi Bob,

I can't promise it for sure but you shouldn't be able to brick it. These are the two most probable scenario that can happen:

1) Microstik II is PKOB compatible. PICkitminus will detect that it is in MPLAB mode and asks to update the firmware. After you have tested it, you can go back to old firmware by choosing 'Revert to MPLAB mode', as you would need to do with a standard PICkit3

2) Microstik II is not PKOB compatible. PICkitminus won't detect it at all, and thus wont change the firmware at all

sdallo

Quote from: jaka on Jul 08, 2024, 04:22 PMHi Bob,

I can't promise it for sure but you shouldn't be able to brick it. These are the two most probable scenario that can happen:

1) Microstik II is PKOB compatible. PICkitminus will detect that it is in MPLAB mode and asks to update the firmware. After you have tested it, you can go back to old firmware by choosing 'Revert to MPLAB mode', as you would need to do with a standard PICkit3

2) Microstik II is not PKOB compatible. PICkitminus won't detect it at all, and thus wont change the firmware at all

Hi Jaka,

I have the MicroStick II, tested with your last version of software, recognized as PKOB in MPLAB mode.

Firmware update show three PicKit3 versions, I'm not sure if these are compatible and keep me to prpceed.

Thanks, Stefano

jaka

Hi Stefano,

Thank you for helping to test PKOB functionality.

You should use PK3OSV022000.hex which is supplied with the latest PICkitminus GUI software.

You said it offers three PICkit3 versions, do all these files begin with 'PK3OSV'?

Best Regards,
Jaakko

sdallo

#12
Quote from: jaka on Jul 10, 2024, 09:59 AMHi Stefano,

Thank you for helping to test PKOB functionality.

You should use PK3OSV022000.hex which is supplied with the latest PICkitminus GUI software.

You said it offers three PICkit3 versions, do all these files begin with 'PK3OSV'?

Best Regards,
Jaakko

Hi Jaakko,

thank you for the fast reply, now after firmware change recognize the PIC, inserted in socket, see the screenshot. Good!

Yes, these files are all OS:
PK3OSV020005.hex
PK3OSV020101.hex
PK3OSV022000.hex

Best, Stefano


jaka

Hi Stefano,

Thank you for nice results. Did you try to read or write the PIC24FJ64GB002?

Jaakko

sdallo

Quote from: jaka on Jul 10, 2024, 12:00 PMHi Stefano,

Thank you for nice results. Did you try to read or write the PIC24FJ64GB002?

Jaakko

Yes, reading result 'Done' without errors, also the Erase and Write are apparently OK. I'll load a simple blinker code when have some time.

Best, Stefamo

sdallo

Quote from: sdallo on Jul 10, 2024, 01:54 PMI'll load a simple blinker code when have some time.

Done, after some finding for oscillator configuration of this PIC the loaded code execute smootly on MicroStick II dev board. Thanks Jaakko.

Stefano

jaka

Thank you Stefano!

Starts to go offtopic. If anyone has some other old Microchip devboard with PKOB and willing to test, please post results. Note that all new devboards have PKOB4 or some other solution, those are not supported. Also many older boards have been updated to new revision. For example Curiosity HPC board originally had PKOB (based on PICkit3), but revision 2 has PKOB4 (based on PICkit4).

Probably the easiest way is to look at the microcontroller type on the devboard. If it is PIC24FJ256GB106, it is very likely PKOB, and probably will work. You could also just try if PICkitminus recognizes the board. The recognition is based on USB VID=0x04d8 and PID=0x8107.

If your devboard has PKOB, but the VID/PID are different, please post about that. I think some third-party devboards can have PKOB with different PID, as I have seen ChipKit Pro MX7 board (TDGL010) listed with PID=0x8108.

sdallo

Quote from: jaka on Jul 17, 2024, 10:01 AMStarts to go offtopic. If anyone has some other old Microchip devboard with PKOB and willing to test, please post results.

Hi Jaakko

I've another devboard: Explorer 16/32 with PKOB3, Tested and recognized as PKOB in MPLAB mode, loaded the correct OS start with correct devboard but the original processor module (PIM-PIC24FJ1024GB610) is not detected by file PK2DeviceFile.dat (maybe added with editor?), nor supported by Positron Compiler...

Replaced PIM module with dsPIC33FJ256MC710A, now recognized and supported. See screenshot below.

Best, Stefano

RGV250

Hi,
Just to let you know it went seamless to update the firmware on both the Microstick 2 boards. I have downloaded a program to both which went with no issues but have not got the test board handy to make sure they work. When I unpack my stuff I will run the programs I did for the Microstick plus boards but I am sure they will work so thanks for your work on this. What Microchip should have done if they bother to listen to customers.
Devices were 24HJ128GP502.

Bob

jaka

Quote from: sdallo on Jul 18, 2024, 08:27 AMI've another devboard: Explorer 16/32 with PKOB3, Tested and recognized as PKOB in MPLAB mode, loaded the correct OS start with correct devboard but the original processor module (PIM-PIC24FJ1024GB610) is not detected by file PK2DeviceFile.dat (maybe added with editor?)
Thank you again, nice to see it is working with Explorer 16/32 board too. I haven't yet looked in detail, but I think it is possible to add support for PIC24FJ1024GB610 in single partition mode with device editor. For dual partition mode, software changes are needed too. I haven't ever used a PIC with dual partition flash, so I don't know how common it is to program both partitions at production. If you want to try programming this chip, you can contact me with PM.

QuoteReplaced PIM module with dsPIC33FJ256MC710A, now recognized and supported. See screenshot below.
I noticed from your screenshots that some texts on the GUI software are not shown with your dark color theme. I tried to replicate this problem. The default win10 dark theme nor high contrast dark themes don't show this issue.