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 : Programming a Micromite with a Maximite?
Author | Message | ||||
DaveC Newbie Joined: 27/10/2014 Location: AustraliaPosts: 11 |
During the development of Peter Carnegie's program MMProg32RPC there are references in the thread to using a Maximite instead of a Micromite to program a second Micromite. I can't find any references on what the actual connections are (if this is possible) on the Maximite, so could someone tell me please? Dave |
||||
WhiteWizzard Guru Joined: 05/04/2013 Location: United KingdomPosts: 2794 |
Hi Dave, My understanding is that it was just 'theoretical talk' and I don't believe it was actually performed. I will stand corrected by all means - and would also love to see this achieved now that people involved are more 'educated' in the process involved & required. So is there anyone out there that has actually used a MaxiMite to program a MicroMite? - Please let someone prove me wrong - and more importantly, please give us the details! WW For everything Micromite visit micromite.org Direct Email: whitewizzard@micromite.o |
||||
G8JCF Guru Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Dave The very first MMProg32RPC program is written in pure MMBasic 4.5 and should/might run on a Maximite - that program is available from http://www.g8jcf.dyndns.org/mmbasic/index.html This program comprises 2 parts, a Client written in .Net running on a Windows PC, and a Server running on a uMite written in MMBasic, ie a simple RPC client/server arrangement. If you wanted to make an all Maximite PIC32 programmer, then you would replace the Windows PC program with a Maximite program, and eliminate the serial link RPC call mechanism between the two programs, ie merge my existing MMBasic code into your new Maximite program - this merge actually should be quite easy since the MMBasic part of the RPC client/server comprises only a few Functions/Subs, eg XferFastData
XferData32 XferData SendCommand XferInstruction Initialise SetMode ExitProgMode Clock Send8Bits PM me if you are really interested in going down this avenue Peter The only Konstant is Change |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2289 |
early on folks found it to be much easier to start out with existing solutions such as "pic32prog" running on a windows or linux platform. this provided a good framework of routines as a development guide, but that were beyond simple translation to MMbasic. peter, john, and I have all produced windows/linux solutions that only require very simplistic hardware to go between PC and target. john was able to achieve success with an FTDI FT232RL usb to serial bridge and just one resistor. peter has stuck to using a micromite mkII with a custom function, but i believe is also experimenting with an AVRISP adapter. i've been using a lightly modified version of pic32prog and a micromite (mkI) running just a couple dozen lines of MMbasic code, and am hoping to get around to transitioning the MMbasic part to an arduino pro mini some time soon. john has also achieved good results moving his complete solution onto the linux that runs on a raspberry pi. the RPi has the big advantage over a PC of having fairly direct control of some I/O pins exposed to user applications. at this stage, there seems little point moving from micromite to maximite, given how little the code running on the 'mite has to do. while moving all the code onto a maximite would be extremely hard and seems to have no target audience. one idea that is yet to be seriously explore, is to have a micromite MkII clone itself onto a blank MX170. geoff has made some comments recently that makes me think this might not be too difficult to achieve with just an MMbasic program. cheers, rob :-) |
||||
G8JCF Guru Joined: 15/05/2014 Location: United KingdomPosts: 676 |
The thing is, is that the uMite doesn't have backing storage, eg SD card. hence the need to have a PC supply the data to be programmed into the target. A Maximite does have backing storage, eg SD card filing system, so a Maximite based programmer would be completely self-contained, even if it was not as fast as other solutions. If someone is keen on trying to make a Maximite program a PIC32MX with a .hex file, then I am more than willing to help them, (I don't have a Maximite otherwise I would have done it myself !) @rr, I'd love to try out your PIC32 programmer if you could please supply the program (.exe ?) Peter The only Konstant is Change |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2289 |
here we are, the most up-to-date version including source and win32 console executable: 2014-11-30_061533_p32p.zip ("pic32prog r98 branch with bitbang interface enabled (nov 30, 2014).zip", the forum software objected to me using the full file name) the files in the archive needed to program a device are: --> pic32prog.exe win32 console executable of pic32prog using the above modified bitbang code. to load your firmware onto the MX150/MX170 target use the following command line: pic32prog -d COMn firmware.bin where n is the com port number where the programming head is attached --> MicroMite JTAG interface v7b.bas Mbasic code that needs to be first loaded onto the programming head. this implements both 4-wire JTAG interface as well as a subset of the 2-wire ICSP interface for JUST erasing a PIC32 that has had the JTAG enable bit cleared. to erase such a PIC32 enter the following at the command prompt: echo * > COMn where n is the com port number where the programming head is attached --> uMite JTAG programmer schematic v2.jpg schematic for programing hardware. note that hardware to control power supply to the target is not implemented as yet, with the target being always powered. this has not been a major issue so far i'd much appreciate feedback. so far, i'm not sure that anyone has tested out the code i've been posting. one reason my progress has been slow. cheers, rob :-) |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1133 |
Hi Peter, I'm very interested to do this conversion, but I'm busy till xmas. If no other users will do the job I will try it after xmas. Your help would be highly appreciated. Regards Michael |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3659 |
It's me who is doing (well, has done) the AVRISP programmer (as well as the FT232 & RPi, also Pinguino32). Just waiting for someone else to test it! My code for the Pinguino would work on a maximite but you'd have to overwrite the MM's existing firmware as it doesn't provide any way to run C as well as MMBasic yet. The RPI is very fast, the AVRISP next fastest (about a minute). John |
||||
G8JCF Guru Joined: 15/05/2014 Location: United KingdomPosts: 676 |
@rr, ah yes I remember, now, the 4 wire JTAG i/f. I had rather hoped you'd cracked 2 wire ICSP and could give us an idea of performance. Cheers Peter The only Konstant is Change |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2289 |
with pic32prog in its present state, moving to 2-wire ICSP would likely break support for some of the existing processors. serge would need to make a few tweaks further up in the code to allow one to avoid this happening, while already i've rewritten far more of the code in adapter-bitbang.c than i ever intended. the speed bottleneck is entirely in the MMbasic code, and replacing the micromite with an arduino pro mini should see at least a tenfold speedup. this would see a drop to less than 90 seconds to program a device, which seems to be more than acceptable. i shall wait for someone else to make an arduino pro mini drop-in replacement. the basis of the code is in the zip file. the only thing that the present version can not do is disable JTAG via the configuration words. at the moment this causes no issue, and will be ok as long as MMbasic does not depend upon the JTAG enable bit being cleared. i have discussed this with geoff. rob :-) |
||||
G8JCF Guru Joined: 15/05/2014 Location: United KingdomPosts: 676 |
@rr My MMProg32RPCII programs and verifies 4.6 B25 in 72 seconds, and I can get it to do the same in 46 seconds, but that requires me to use COM1 rather than the Console port for connection to the PC, and one can't download a MMBasic program via COM1 which rather impacts the user experience unfortunately :( Peter The only Konstant is Change |
||||
Print this page |