Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:40 18 Sep 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 : simplest 32MX150 ICSP

     Page 14 of 28    
Author Message
memberx
Newbie

Joined: 20/04/2012
Location: Australia
Posts: 24
Posted: 07:12pm 09 Aug 2014
Copy link to clipboard 
Print this post

WTF are people wasting time???

PICKIT 3 = AU$22.49 !!!!!











 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2447
Posted: 09:19pm 09 Aug 2014
Copy link to clipboard 
Print this post

firstly, congratulations to JohnS for getting a micromite programmed. this represents a milestone for us all. now that a working method exists, 'the future is wide op' (as Tom Petty would say).

personally, i see the path forward being one that avoids any hardware that itself requires a separate programmer. i have always seen the goal of being able to turn a 32MX150 into a micromite with just a PC and a handful of simple components.

to this end, one approach would be for someone to work on a new PE that is specific to the 32MX series of PICs. this new PE would need to perform a very limited set of functions:

1. configure one of the onboard serial ports on the process to talk down pins 4 and 5 at a suitably high baud rate.
2. accept blocks of data from that serial port to be programmed into flash, with a format of something line <address><length><data><checksum>.
3. acknowledge each block of data with either a 'pass' or 'fail' response.

such a new PE would be useful to all the programmer efforts out there, even way beyond the MMbasic sphere.


cheers,
rob :-)



 
MOBI
Guru

Joined: 02/12/2012
Location: Australia
Posts: 819
Posted: 09:37pm 09 Aug 2014
Copy link to clipboard 
Print this post

  memberx said  WTF are people wasting time???

PICKIT 3 = AU$22.49 !!!!!


Have you never taken on a challenge for challenge sake or to simply learn something?? In any case, through "having a go" one never knows what benefit may come to light without first trying.

We all have our reasons and our barrows to push.

I'm not being sarcastic or denigrating, just matter of fact and when I get back from UK etc, I will continue my quest for programming a pic32 using a MMite platform. Why?, well, why not?
David M.
 
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 07:02am 10 Aug 2014
Copy link to clipboard 
Print this post

  MOBI said  
  memberx said  WTF are people wasting time???
PICKIT 3 = AU$22.49 !!!!!

I'm not being sarcastic or denigrating, just matter of fact and when I get back from UK etc, I will continue my quest for programming a pic32 using a MMite platform. Why?, well, why not?


I'd rather buy more MicroMite chips than a $20 piece of hardware that i'll use like ten times over it's entire useful life.

If i had a commercial product based on PIC32 chips, by all means, i'll have 2 PICKIT3's not one. But i am a hobbyist, and i don't need more than a couple of 'Mites. Being able to use one to bootstrap the other, increases my perceived value of a MicroMite.

I'd like to thank JohnS, MOBI and everyone else who tries to make this a reality.
 
JohnS
Guru

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

I'm for sure not doing it to save 20$ (and anyway I already have a PICkit3), it just seemed a challenge.

BTW, I put the full table of PIC32s and both variants of the PE in so it "should" program any PIC32 (incl. 170).

It would be very easy to add more PE kinds and by all means a few more pins such as for fast RS232 and thus speed it up a lot. I'm quite happy with the idea that anyone makes changes and time willing will try to help.

MOBI's version will run lots faster than mine now does.

It just seems like being "self supporting" is the way to go. As well as "fun" (by which I may mean "weird").

John
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4071
Posted: 05:26am 14 Aug 2014
Copy link to clipboard 
Print this post

Testers wanted please!

I'm expecting for Windows (I tried Win7) so here's a ZIP with an EXE and howto (but I can provide a Linux one if wanted).

It'd be wise to have a PICkit 2 or 3 in case this doesn't work but has erased your PIC32.

You need a suitable FTDI board. I've tested using one of these FT232RL

edit: Be sure to set it for 3V3 not 5V :)

So here's the file 2014-08-14_152431_ftdipic32.zip

JohnEdited by JohnS 2014-08-15
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2956
Posted: 01:09pm 14 Aug 2014
Copy link to clipboard 
Print this post

Hi Johns,

I was going to try to test it for you but my module doesn't have a DSR,

It has an RSD if that is a Chinese mis-spell

It has heaps of external connection pins including

DCD, RSD, RI, RXD, RTS, DTR, TXD, CTS, TXL, RXL, CTS and the word PWRENTEN that overlaps two pins.

Can you tell me off hand which pin on the FT chip that DSR (I assume it means `data set ready') connects to.

Mick

PS. Is the Zdiag.exe necessary or is it just a diag tool as I know my modules work on my win 8.1 box but I don't really want to upset the delicate balance of the drivers.

Mick

EDIT ***

I just buzzed it out RSD is actually DSR

Mik

Edited by bigmik 2014-08-15
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2956
Posted: 01:51pm 14 Aug 2014
Copy link to clipboard 
Print this post

John,

OK I keep getting

FTDI_USB_OPEN Failed - disconnected errors.

I suspect it is something to do with Zdiag.. I am not sure what I am supposed to put in the box.. it doesnt have anything detected in the pull down selection when zdiag runs..

I tried creating my own device and added the PID VID in the USB ID box but Zdiag fails when I click install.

Mick


Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2956
Posted: 02:10pm 14 Aug 2014
Copy link to clipboard 
Print this post

John,

I played around a bit more and `installed' a winUSB driver. now the FT chip appears as a FT232R USB UART (no port No as before)... Ok I try to do a program and this is the error I now get.





Regards

Mick

PS I will pack it up for now I am obviously too dumb to do this.

mikEdited by bigmik 2014-08-16
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Alan68
Newbie

Joined: 28/01/2013
Location: Australia
Posts: 17
Posted: 02:31pm 14 Aug 2014
Copy link to clipboard 
Print this post

Hi Mick,

try connecting PGD to RSD

I'm also using windows 8.1

I got the same error, it now works


Edited by Alan68 2014-08-16
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2956
Posted: 02:49pm 14 Aug 2014
Copy link to clipboard 
Print this post

Hi Alan,

Yes that is what I have it connected to.. I suspect that my problem is either my CPU speed is too fast (i7 4770) or it is my FT232RL module. I might give it a go on my laptop, although that is an i7 as well.

As per an earlier discussion on TBS I suspect (read that as 99% certain) that my Chinese module uses a fake FTDI chip so that could also be the problem.. the only guaranteed FTDi module I have is the one I got from WhiteWizard but it doesnt have the required pins going out, not that that would stop me but it isnt my preferred option.

Did you have to set the device type first? If so what is the string it expects for device type?

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Alan68
Newbie

Joined: 28/01/2013
Location: Australia
Posts: 17
Posted: 03:29pm 14 Aug 2014
Copy link to clipboard 
Print this post



Hi Mick,

I'm using a cheap red module from China.

I was using my fast AMD Win 8.1 laptop, but I need it for work.

I now have it working on my old laptop a Centrino Win7.

It programs at the same speed, very slow.

I set the device up as JohnS explained.



Edited by Alan68 2014-08-16
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2956
Posted: 06:34pm 14 Aug 2014
Copy link to clipboard 
Print this post

Hi Alan, John,

Doh! (I wish there was a Homer Simpson Emoticon)

I cleaned the spider webs out of my old AMD box and it did the same so I went over the cables and yes I had DCD and DSR switched..

It is now going through its cycle on the AMD loading PE etc (now past the 10% stage)

I have to leave for work soon so it would give it about 55min before the deadline... if it doesnt finish I will shut it down, erase and try it again when I get home about midnight...

Looks like it is working well

Great stuff John, a few hook up wires and a cheap module..

I assume the driver has to be put back to use the FT module as a comm port?


Regards,

Mick

Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4071
Posted: 08:45pm 14 Aug 2014
Copy link to clipboard 
Print this post

Thanks, guys!

Oh, the joys of being in such a different timezone.

Good to see it works (despite "RSD"!!). Looks like no PICkit2/3 is needed :)

That's the first PIC32MX150F128B that's been used (I tried an 220F032D and a 150F128D).

It should cope with anything (famous last words) except a PIC32MZ (kinda hard to test without one plus I didn't find a PE for MZ yet).

As to whether WinUSB needs removing/tweaking to use the device as a serial port - er, I don't know. (I didn't think to try it.)

I suspect it'll work without needing to do anything, but the snag I usually find with Windows is that not quite enough info is available and that applies both to MS stuff and other things.

What I think it does it install a software switch so either the existing (USB-related) driver(s) can be used or the new one(s) can be, but never both at the same time.

I'm busy net searching for more info and will post more when/if I find it.

BTW, it runs a bit faster without -v (verify) but mine failed to flash without logging an error a couple of times (no idea why, unless it's the wiggly wires I'm using). I resorted to -v and then -R (resume) and all was well.

I'll clean up the code and see about posting it. I ended up building the Windows EXE using MinGW (32-bit) cross-compiling on (i.e. hosted on) Linux. Didn't need to change any code at all, it just compiled, linked to an EXE and that EXE runs fine.

JohnEdited by JohnS 2014-08-16
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2956
Posted: 09:16pm 14 Aug 2014
Copy link to clipboard 
Print this post

Hi John,

It only completed about 30% when I shut it down (after about 35min) so I have brought it all into work tonight to give it a try.

I will let you know..

Bottom line is a cheap USB-ttl adapter (which is needed to talk to the uMite anyway) plus 5 wires and an hour or so and its done.

Mick


Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4071
Posted: 09:19pm 14 Aug 2014
Copy link to clipboard 
Print this post

(When I say it's SLOW... I mean S-L-O-W.)

It's fine to kill it any time and restart, though another erase might be a good idea.

Looks like worst case to undo the driver tweak you can follow this

Which basically removes what was added so Windows can go back where it was.

I'm wondering about putting my code into a umite i.e. making a HEX file that can be flashed into a umite (slowly, if it's done this way) and then the umite can be used as the programmer from then on. I'd rather MOBI's code be used, though, as that way MMBasic can be used to flash PIC32s, even if the very first board a new user creates uses my slow stuff.

JohnEdited by JohnS 2014-08-16
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2956
Posted: 10:24pm 14 Aug 2014
Copy link to clipboard 
Print this post

OK,

I have started a burn at Work tonight, (started 6:16pm) I will keep you updated on how it goes,

I did not do an erase (from the half burn previously) and I opted for no verify.


Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
Alan68
Newbie

Joined: 28/01/2013
Location: Australia
Posts: 17
Posted: 12:40am 15 Aug 2014
Copy link to clipboard 
Print this post

Hi JohnS,

After 10 hours I have a programmed Micromite, I started the programming with a windows 8.1 laptop, as it was going so slow and I need my laptop for work, I changed to using my old windows 7 laptop.

 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2956
Posted: 01:27am 15 Aug 2014
Copy link to clipboard 
Print this post

Lads,

I havent quite got there yet,

It seems to fail around 40-60% mark

I have tried the -R option to no avail,

But still you are very close John...

Maybe a pullup on each line needed? I could try 4k7 to 10k.

Running out of time now.. I am at 20-30% of my 3rd attempt at work

If that one fails I will have to quit for the night.

What is the slowness? Is it the hardware? Or is it the programme?

Mick
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4071
Posted: 01:27am 15 Aug 2014
Copy link to clipboard 
Print this post

10 hrs - aargh :(

It was a lot less for me on Linux. More like 3 hrs.

Anyone else with a time please?

(I suppose even 10 hrs is bearable if you've no PICkit2/3 but it's dire.)

The slowness is a combination of:
1. using USB packets, 1 packet per tiny transition on PGD / PGC etc
2. needing to turn PGD around (from In to Out and back) all the time
3. the OS slowness - Windows seems to be about a third of the speed of Linux

This makes me want to program the bare minimum (a 1K bootloader or whatever) then with more connections blast the rest down.

Currently there's a tiny PE loader then the bigger PE. Both of those need a staggering number of ICSP transactions, with endless USB packets.

I'm not sure what Mchp say about pullups except I think they say not to. Something like 4K probably won't hurt any silicon and can't possibly do anything worse than stop the app from working - which is no big deal at all.

I did have to set my FT232 board for 3V3, of course. Never tried (fried?) it at 5V.

JohnEdited by JohnS 2014-08-16
 
     Page 14 of 28    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025