Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:08 12 May 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : HELP needed: PIC32MX170 & MPLab IDE 8.90

     Page 2 of 2    
Author Message
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 09:18am 10 Aug 2014
Copy link to clipboard 
Print this post

Peter, is not there an extra 0 in the device ID? Just asking, as there the number is bigger than the others.
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 09:57am 10 Aug 2014
Copy link to clipboard 
Print this post

@VASI

afaik, the device ID is a 32 bit number, and that number is what PICPROG.EXE reported back to me for the "MX170F256B-501/SP". I used that number, and PIC32PROG.EXE works so I didn't argue or think about it any more, I was more interested in getting my MX170F256B-501/SP working ! I did try and find the Dev Id for a "MX170F256B-501/SP" but couldn't.

AS I said previously, that Device ID worked for me, so I didn't bother investing any further more time and effort , and I now have a working '170F.

If you (@Vasi) could find/know/research/investigate the Device ID's for '170 chips that would be most helpful to us all.

Perhaps someone who understands Microchip Device IDs can explain/verify what the Device ID is for the "MX170F256B-501/SP", and. hopefully more generally where/how Microchip Device IDs are managed/made visible to us punters.

73

Peter

Edited by G8JCF 2014-08-12
The only Konstant is Change
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2927
Posted: 09:32am 11 Aug 2014
Copy link to clipboard 
Print this post

@G8JCF, will be getting the 170's hopefully in the next 3-4 days so will have a play and be in touch when I get 'stuck'

WW
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3998
Posted: 10:18am 11 Aug 2014
Copy link to clipboard 
Print this post

The ID I have for the 170F256B is 0x06610053

Looks to be a stray 2 in the earlier post (which will be ignored as it's a 32-bit item).

I got the values from the Flash Programming Spec. It has a lot of PIC32MZ ones, too.

John
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 12:44pm 11 Aug 2014
Copy link to clipboard 
Print this post

@JohnS

Thanks for that info, I'll update target.c and try it out.

0x26610053 definitely works, but maybe PICProg masks out the top 4 bits because those are the silicon revision bits (I think).

BTW, I've managed to find 61145L.PDF from Microchip which includes MZ series as well as MX, but not unfortunately MX170's. So there must be a newer 61145X.PDF out there somewhere ?

Thanks, once again

Peter
The only Konstant is Change
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 01:08pm 11 Aug 2014
Copy link to clipboard 
Print this post

Hi JohnS

Very many thanks for your info, it gave me the spur/clue to go digging around on Microchip's site and find the requisite document !

So here is PIC32PROG.EXE for PICKit2 with


{0x6610053, "MX170F256B", 256, &family_mx1},
{0x661A053, "MX170F256D", 256, &family_mx1},


added into target.c

When I run the new compiled PIC32PROG.EXE against my '170F, PIC32Prog reports


>pic32prog.exe
Programmer for Microchip PIC32 microcontrollers, Version 1.96M
Copyright: (C) 2011-2014 Serge Vakulenko
Adapter: PICkit2 Version 2.32.0
Processor: MX170F256B (id 26610053)
Flash memory: 256 kbytes
Boot memory: 3 kbytes
Configuration:
DEVCFG0 = 7ffffffb
3 Debugger disabled
0 JTAG disabled
18 Use PGC1/PGD1
DEVCFG1 = fc67cf59
1 Fast RC oscillator with divide-by-N and PLL
3 Primary oscillator: disabled
4 CLKO output disabled
0 Peripheral bus clock: SYSCLK / 1
8 Fail-safe clock monitor enabled
4 Clock switching enabled
DEVCFG2 = fff9ffd9
1 PLL divider: 1/2
5 PLL multiplier: 20x
7 USB PLL divider: 1/12
8 Disable USB PLL
1 PLL postscaler: 1/2
DEVCFG3 = cfffffff
USBID pin: controlled by port
USBID pin: controlled by port
4 USBID pin: controlled by USB
8 VBuson pin: controlled by USB

>


I've attached the new PIC32Prog.exe in case it's useful to someone.

Once again, very many thanks to @JohnS

73

Peter
2014-08-11_230509_pic32prog.zip
The only Konstant is Change
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3998
Posted: 10:52pm 11 Aug 2014
Copy link to clipboard 
Print this post

I'm not sure if you found it but the most recent doc looks to be:
here

If that C code uses a 32-bit value (maybe a type called u32) then using the old constant with that stray 2 ought to generate a compiler warning (at least) if you turn enough warning on. gcc is quite good (sometimes painfully so) at warning about apparent loss of bits.

JohnEdited by JohnS 2014-08-13
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2927
Posted: 12:15am 12 Aug 2014
Copy link to clipboard 
Print this post

@G8JCF. I am having no luck running either of your posted pic32prog attached files.

I am unzipping on a windows 7 (64-bit) laptop and when I run the file I get a quick dos window flash up and then disappear.
If I run as administrator it just sits on an hourglass (I then have to quit via Task Manager).

Please, what am I doing wrong??

Thanks for including the file as a downloadable with both 170's and 150's - and thanks too to for JohnS help
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 01:58am 12 Aug 2014
Copy link to clipboard 
Print this post

@WW

You have to open up CMD.exe, then from the command line type PIC32PROG.exe. PIC32Prog.exe is a command line only utility.

OK ?

Peter
The only Konstant is Change
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 02:02am 12 Aug 2014
Copy link to clipboard 
Print this post

PIC32PROG.EXE - Update

I got an email from Serge (pic32prog's author) this morning who said

  Quote  
I've added the needed ids for mx170/270 in revision r97 - it was easy fix.
Usually the build for Windows is the most complicated part.
I've found that Linux mingw32 cross-compiler is the most straightforward way to build Windows binaries.


Peter


The only Konstant is Change
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 02:03am 12 Aug 2014
Copy link to clipboard 
Print this post

WW, probably libusb for windows has to be installed. Pickit2 has to be connected on USB and at your board. Pic32prog is a console application. For you to be able to read the application;s messages, you need to open a permanent console, inside where you navigate to the folder you have the hex file. Pic32prog has to be in a folder included in the PATH system variable.

Again, TotalCommander file manager can be very useful (you can launch cmd.exe from his command line in any folder you want). As an old programmer, you should be proficient with this stuff...
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2927
Posted: 02:12am 12 Aug 2014
Copy link to clipboard 
Print this post

  vasi said   WW, As an old programmer, you should be proficient with this stuff...


Appreciate your help vasi (but I'm not that old!!)
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 11:52pm 12 Aug 2014
Copy link to clipboard 
Print this post

@WW

If you have installed a PICKit2 then PIC32Prog should work without further ado. All the driver(s) required should have been installed as part of installing the PICKit2.

73

Peter
The only Konstant is Change
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025