![]() |
Forum Index : Microcontroller and PC projects : simplest 32MX150 ICSP
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4071 |
I think so, except I don't know what minimum time delay is needed before it's valid at the programmer's input (clearly cannot be zero). We do know the min time for the horizontal parts of PGC (40ns IIRC). My code waits about 40ns and seems to work OK. I suspect 20ns (maybe 10ns) would be OK but stuck a short delay in and never had trouble. I suppose the time will vary a bit with length of wires / capacitance / etc. I tend to have about 15cm leads for each of PGC & PGD on my lash-ups. Er, lost here. As we don't have them probably doesn't matter (to me LOL). John |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi John I was thinking of something like SN54/74LS259 with this kind of hardware, one would use PGEC to clock the state of PGD into the latch. Doesn't seem that MUCU's generally have edge-triggered/clocked latched inputs. 73 Peter The only Konstant is Change |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Please find attached the installation program for MMProg32RPC.EXE. 2014-09-11_232639_setupMMProg32RPC.zip MMProg32RPC.exe is a Windows program which uses a Micromite running MMBasic (4.5C or newer) to program a PIC32MX chip. Download, unzip and run the setup program which will install a new START menu entry G8JCF and under that MMProg32RPC and under that a shortcut to MMProg32RPC.exe. MMProg32RPC.exe is a .NET 3.5 application and has been tested under Windows XP (32 bit - Asus 901 Netbook) and Windows 7 (64 bit Dell i7). The target device must be wired to the uMite as follows PGD - uMite Pin 5 CLK - uMite Pin 6 MCLR - uMite Pin 7 For a PIC32MX170F256B, MCLR is Pin 1, PGD is Pin 4, PGC is Pin 5 I placed a 1K resistor between uMite Pin 5 and target PGD - I don't think it makes any difference either way. Your PC should be connected to the console connections of your uMite at 38,400 bps. When you have launched MMProg32RPC.EXE, you should select the COM port connecting your uMite to your PC (make sure no other program, eg terraterm/mmedit/putty, is using the COM port,) then click Verbose, and then click Connect. You should be rewarded with seeing the MMBasic Executive being downloaded to your uMite, followed by the MCHP PE, followed by the "Ready to Program" status message Click Program, load your .hex file and wait while the target chip is programmed. For MMBasic 4.5D it takes about 25 minutes to program a PIC32MX170F256B. Once programmed, click Exit Prog. Mode, and your freshly programmed PIC32 should start executing what you have just downloaded. This is an alpha release, so don't use this except to experiment with - I've had no accidents, but ..... I would be very grateful if people could install and test this stuff out and give me feedback please. 73 Peter The only Konstant is Change |
||||
boss![]() Senior Member ![]() Joined: 19/08/2011 Location: CanadaPosts: 268 |
Hi Peter, great job indeed. I'll try to flash 4.5D into MX150 tonight. I have two questions: 1)uMite console should be connected to the Rx,Tx pin at FT232 and speed set at 38400Bd, am I right? 2)What FT232 board signals are related to ISCP pins? I tried to find more info but I'm lost. Regards Bo |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Bo Haven't heard from you in a while, hope all is well. U connect your PC to your uMite using the standard serial connections as per page 8 of the Micromite User Manual at 38400 bps. The FT232 is NOT involved in ICSP in my implementation. U need another '150F/'170F chip as your target. This is the chip which will be programmed from the uMite. If you only have have a single '150F chip which currently contains MMBasic, then you can't use my software, you will need to use @JohnS's s/w which can program a PIC32 using only a USB<->Serial adapter. Given how cheap these chips are, I would buy a couple (at least) of 170F (28pin) before I over-wrote an existing uMite just in case !! OK ? Peter PS Have you taken a look recently at http://www.g8jcf.dyndns.org/mmbasic/index.html ? The only Konstant is Change |
||||
boss![]() Senior Member ![]() Joined: 19/08/2011 Location: CanadaPosts: 268 |
Hi Peter, I spent a couple of days in California and namely in San Diego with my family. We travelled almost 4000 miles on the wheels (from Vancouver BC to SAN and back) and it was a great family vacation. As I received AD9959 Chinese evaluation finally I started working on programmable generator 20Hz - 200MHz@2channels and 100kkHz - 200MHz@2channels. The AD9850 board serves there as master clock source. I checked your WEB pages and everything is clear now. I ordered couple of MX170 today so I'll try to build the uMite programmer then. I still waiting for Chinese PICKIT 3 and they always postpone the shipping date. uMite programmer could be a good solution for me. Regards |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Bo That was some journey !! about 6 times the entire length of the UK !! re the AD9959, that is some impressive chip !! Because we have significant import duties here in UK, I've stayed clear of ordering anything from China over US$23. OK, take care, and look forward to hearing from you. 73 Peter The only Konstant is Change |
||||
boss![]() Senior Member ![]() Joined: 19/08/2011 Location: CanadaPosts: 268 |
Hi Peter, we are lucky one as we can import anything (except alcohol and tobacco) up to $200 w/o duty. I started to play with Geoff (Microchip) single precision arithmetic and I'm writing a new DDS control program. Simulation says that Freq deviation is as better than 2.3Hz at 60MHz AD9851 board with 33.333MHz crystal and 6x multiplier. AD9850 (at 40MHz) has even lower error. The program looks be very simple less then 200 lines (including some comments) and recalculate LSB first for use with SPI for load the chips. For AD9959 is an error around 11-12 Hz at 200MHz but I think there is still chance to improve the algorithm. I plan to release the code for everyone here at Back Shed Regards Bo. |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Bo Looking forward to seeing the code Peter The only Konstant is Change |
||||
Keith W. Senior Member ![]() Joined: 09/10/2011 Location: AustraliaPosts: 118 |
Hi Peter, I get some way with your application. With it I can download the MMBasic program to the programming chip. Connect to the subject chip. Download the PE to the chip, I think correctly as your program prompts to program. But upon starting to program I receive an exception that indicates “Divide by Zero”. Refer attached screen grab. The application time indication continues to increment, regardless whether I accept the error to continue or not but what I presume is the % programmed number does not increment. Waited 30 minutes then tried the chip, but I think erased only. No other indication from your application. 2014-09-13_113051_Failure_of_Programming.pdf I am running a 2 year old Intel I5 2300 machine with Windows 7 Home Premium 32 Bit that is up to date by Windows Update including .Net I think but do know how to check this easily, but Update reports that I am up to date? Your application does seem to mainly run, up to this point. Could my problem be that my programming is using a PIC32MX150F128B chip running MMBasic V4.5, not the 4.5C that you have specified? Of course I was hoping to update this with your programmer and do not have a PicKit 3 at present to update. I wonder though about the MMBasic version causing a Windows Exception? My programmer chip communicates via a MAX232 chip on my test jig to PC serial port on the PC motherboard, not via a USB port. This works OK with MMEdit etc @ 38.4KB. Grateful for any suggestions Peter? I have been slow in trying your program, needing to shop to build a programming jig. But also have a WhiteWizzard 44 pin board that I would use as the programmer via USB from PC to WW’s board. Your pin numbers (5, 6 & 7) on programmer do not suit a 44 pin chip, perhaps you could change to pins that suit both 28 pin and 44 pin chips? Just noticed details given by exception, hope it helps. 2014-09-13_115827_Exception_Text.pdf Keith. |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Keith I will insert a 150F into the breadboard and give this a try. Sorry to hear that it didn't work. Hopefully I will be able to post a fix on Sunday. Apologies Peter The only Konstant is Change |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Keith This is the latest version (but without specifically looking at your problem). 2014-09-14_022344_MMProg32RPC.zip It may solve the problem, but I will look at the problem on Sunday. Peter The only Konstant is Change |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Keith I put a '150F into the programmer, and replicated your report - I fixed that - but now a different one has turned up, but hopefully I'll be able to get a fixed up release out in the next few hours. Apologies Peter The only Konstant is Change |
||||
Keith W. Senior Member ![]() Joined: 09/10/2011 Location: AustraliaPosts: 118 |
Hi Peter, No need to apologise. You asked for testers and that is an essential step in finding errors. I am very surprised that no one else has reported any experience at all. I am glad that you have found an error and not become completely absorbed with plugin. I feared that you would be keen to immediately add a plugin to this program and thereby require use of a 170. They may be now in short supply? Plugin can be in the next version which will make it faster, however I can wait 25 minutes for now. In your usual manner you will likely have it all sorted for me in the (Melbourne) morning. Regards, Keith. |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Keith New version with bugs fixed (hopefully) posted at http://www.g8jcf.dyndns.org/mmbasic/MMProg32RPC.html Thanks again for trying it out and finding the bugs. You will first need to uninstall the existing version before running setup for the new version. Thanks for the kind words. Yes, the Plugin stuff absorbed me yesterday, but my first responsibility is to users of my existing/published code, then comes the future. Anyway, I hope this does the trick for you. 73 Peter The only Konstant is Change |
||||
Keith W. Senior Member ![]() Joined: 09/10/2011 Location: AustraliaPosts: 118 |
Thank you Peter The programmer reported 21:55 to complete. After programming the application reported that PE had not downloaded properly but after clicking OK box twice then reported that “Checksum verified OK !”. I then used the first updated chip to program the chip that had programmed it. Again the PE error occurred though after accepting twice reported checksum OK again. Time taken was 21:57. Enclosed shot shows error report. 2014-09-15_001353_Almost_programmed_OK.pdf I did notice that although I had removed the original application, when the new one started, that the file previously selected for downloading was retained. Was an error also retained from previously, I do not think that you would have missed this error report? Keith. |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Keith Sorry ! So despite the error messages do U have chips programmed with 4.5D ? I'll take a close look and see if I can the cause of the error messages. Once again Many thanks for trying it out and reporting back. Peter The only Konstant is Change |
||||
Keith W. Senior Member ![]() Joined: 09/10/2011 Location: AustraliaPosts: 118 |
Yes Peter, I have 2 now programmed and working to 4.5D thank you. |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Keith Thanks for the report. Good news that you now have 4.5D up and running. MMProg32RPC stores its last used settings in the registry so that when it restarts it can resume as close as it can to where it left off. 21:57 is pretty good, that's quicker than I was getting ! I'll have to have a look at where those 2 errors are occurring, and they popped up just before the "Verified ..." status. Can I ask which OS you are running please because your screenshot looks a little bit different from mine, and reminds me of Windows 2000 - not that it should matter at all to MMProg32RPC. Take care Peter The only Konstant is Change |
||||
Keith W. Senior Member ![]() Joined: 09/10/2011 Location: AustraliaPosts: 118 |
Peter, I am running a 2 year old Intel I5 2300 CPU in a Gigabyte GA-H61M-USB3-B3 motherboard with Windows 7 Home Premium 32 Bit. It is configured to Windows Classic View as am too old to change. The screen shot is captured by “ FastStone Capture” as a rectangular portion of the screen, resolution is 1920 by 1080, then converted to lower resolution .PDF to post. The improved speed is interesting? Surprising, I would have believed now principally determined by the speed of MMBasic. I am using RS232 here, not USB as I think most people would use. Does USB come with an overhead for many small packets? I achieved a good speed improvement when I converted my Digital Oscilloscope project to USB from serial but had used FT2232 interface chip which had large fifo capacity with parallel interface requiring less but larger packets. I notice that you now use 38.4KBaud but are achieving times similar to when you used 230,400 BPS. I do not use the 1K resistor in PGD cable that you had suggested was likely not critical and have10 cm individual wires between chips. Best of luck. Keith. |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |