![]() |
Forum Index : Microcontroller and PC projects : simplest 32MX150 ICSP
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
memberx Newbie ![]() Joined: 20/04/2012 Location: AustraliaPosts: 24 |
WTF are people wasting time??? PICKIT 3 = AU$22.49 !!!!! |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2447 |
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: AustraliaPosts: 819 |
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 StatesPosts: 83 |
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 KingdomPosts: 4071 |
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 KingdomPosts: 4071 |
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 John |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2956 |
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 Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2956 |
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: AustraliaPosts: 2956 |
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. mik Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Alan68 Newbie ![]() Joined: 28/01/2013 Location: AustraliaPosts: 17 |
Hi Mick, try connecting PGD to RSD I'm also using windows 8.1 I got the same error, it now works ![]() |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2956 |
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: AustraliaPosts: 17 |
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. ![]() |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2956 |
Hi Alan, John, Doh! ![]() 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 KingdomPosts: 4071 |
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. John |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2956 |
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 KingdomPosts: 4071 |
(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. John |
||||
bigmik![]() Guru ![]() Joined: 20/06/2011 Location: AustraliaPosts: 2956 |
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: AustraliaPosts: 17 |
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: AustraliaPosts: 2956 |
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 KingdomPosts: 4071 |
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. John |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |