![]() |
Forum Index : Microcontroller and PC projects : Micromite V4.5D for the MX150 and MX170
Page 1 of 3 ![]() ![]() |
|||||
Author | Message | ||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
I have a new version of the Micromite firmware (V4.5D) which can be downloaded from: http://geoffg.net/Downloads/Micromite/Micromite%20V4.5D.zip This fixes some annoying bugs including the problems with the DS18B20() and PORT() functions. It does not fix the issues with the I2C protocol - that will take more time. The main feature of this version is that there is support for the PIC32MX170 series of chips (both 28 and 44 pin variants). Now you have 58K program memory and 52K free RAM at your beck and call. That is a lot for a small chip. Other than this there is no difference between the MX150 and 170 versions. I foolishly used my MX170 samples in another project so WhiteWizard kindly sent me one of his MX170 44-pin modules for testing. But I don't have a MX170 28-pin chip to test with so I need some help here. I am sure that the MX170 28-pin version is OK but if you have one of these chips would you please be so kind to load this firmware on it and report your experience in this thread. If you report that the MX170 28-pin version is OK I will post this new version on my website. But until then it is only available to Back Shed readers. Because of the limited free flash memory in the MX150 series of chips I plan to only make bug fixes to these versions (no new features) and the version number will stay at V4.5x. The MX170 series of chips have a lot more free flash so it will be possible to add new features over time (language improvements, support for new devices, etc). As a result MMBasic for the MX170 series will increment beyond V4.5 and diverge from the MX150 version. For this reason it I recommended that future chip purchases for the Micromite be from the MX170 family (these chips are only approx 40 cents more expensive than the MX150 series). Geoff Geoff Graham - http://geoffg.net |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9588 |
May I ask, with the Harmony thing being anything but for you, how you managed to make the 170's work for the extra memory, if Microchip did not supply the MLA for you to use? ...must have been difficult to code, if you had to write your own library to get around that issue... ![]() EDIT: How can you add new features to the 170 series without MLA? Are you really rewriting from the ground up for Harmony? What a name for a library - sounds like it is a contradiction in terms..... ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
I advise anyone with a PicKit3 and a MicroMite (whether it be a 28-pin and/or a 44-pin) to update their firmware to v4.5D. As Geoff says, it does fix a couple of bugs that people have identified and it also includes the new, and very useful, PULSEIN function. Anyone measuring negative temperatures with the DS18B20 function will also be able to do so now without any error . . . . Thanks Geoff for releasing a new firmware so soon after your return home ![]() WW |
||||
centrex![]() Guru ![]() Joined: 13/11/2011 Location: AustraliaPosts: 320 |
Hi to all Is there a tutorial on using the pickit3 to program the updated software into the micromite. Is it as straight forward as it appears to be in the manual. Not game to try it as I only have one chip. Regards Cliff Cliff |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4036 |
There are only 2 "failure modes" I can instantly think of: 1. you cause actual damage 2. it doesn't program but isn't damaged, so you can try again To avoid #1 do not press the Programmer To Go button (may be marked something else). In case you can connect your PICkit 180 degrees around (i.e. back to front), don't! I have found it best always to power a PIC32 separately rather than through the PICkit (so make sure its setting is off). I also found MPLAB much more painful than MPIPE (I think I have the right name). See what others say, too... John |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3282 |
The MLA library provides a convenient interface to the peripherals on the chip (serial, spi, I2C, etc) but it does not have anything to do with the amount of memory. When you compile a project that makes a call to a MLA function the compiler notes this and then loads the required code from the correct MLA library for the target chip. Microchip did not make the MLA library available for the 170 so the build failed at this point. Fortunately I was able to modify the compiler installation to trick it into using the 150 MLA library. Because the peripherals are identical between the two chips the 150 library code worked fine on the 170 chip. However this is not sustainable because the next compiler upgrade will wipe out my efforts - so I need to think of something more sophisticated in the future. The annoying thing is that Microchip could have supported the MLA library on the 170 with zero effort. I personally think that Microchip is committing suicide by fixating on Harmony. All I wanted to do was upgrade to an identical chip (with more memory) and Microchip expected me to spend hundreds of hours rewriting my code to do just that. If I was in a commercial operation I would tell the boss that, as a rewrite was required anyway, the best choice would be to ditch Microchip and go with another company that was easier to work with. Geoff Geoff Graham - http://geoffg.net |
||||
centrex![]() Guru ![]() Joined: 13/11/2011 Location: AustraliaPosts: 320 |
Thanks John Cant see anything in the IPE about power settings. Gave it a whirl anyway and the chip still works. I managed to keep the smoke in. Now to hold of one of the 170 chips. Regards Cliff Cliff |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
I fully agree with JohnS' comments (and I have programmed well over 100 MicroMites without any failures): You will need a programmer - most people use a PicKit3 due to it's low(ish) cost. You can use a PicKit2 but it is much more complex for a 'first-timer'. Also JohnS has an excellent solution but I will explain the current easiest method below. Requirements: PicKit3, Windows PC (or MAC), MPLabX-IPE, TeraTerm (or equivalent), USB-to-Serial device (if not using a fully featured 44-pin Module) Steps involved: 1> Download appropriate 4.5D hex file (four to choose from: 28-pin Or 44-pin; MX150 or MX170) 2> Power the MicroMite separately (i.e. not from the PicKit). I use a USB-to-Serial module for a steady 3v3 supply 2> Use MPLabX IPE (it is free to download if you don't already have it; and is easy to use). Select hex file, select exact PIC device, select programmer type - Programs the PIC in seconds) 3> Use TeraTerm (or preferred Terminal application) to check that the 'Welcome Message' shows upon reset (or type WatchDog 0 at the prompt). Remember to set Terminal program to 38,400 baud rate! If the above is unclear at any stage then do refer to Geoff's Manual (Pages 8 & 9 version 4.5D). @centrex - give it a go; it is really easy. Take your time, don't rush any part, and ensure there are no metallic objects around that may cause a short. ![]() Regards, WW |
||||
atmega8![]() Guru ![]() Joined: 19/11/2013 Location: GermanyPosts: 724 |
Geoff, cooool THX , great work!!! I have ordered some 170's and will test with the new FW as soon they will arrive!! |
||||
viscomjim Guru ![]() Joined: 08/01/2014 Location: United StatesPosts: 925 |
Don't forget in the IPE to activate the "advanced mode" with the password microchip |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
I've just programmed a 170F 28 pin and this is what it shows on boot. So it works and loads of memory. Micromite MMBasic Ver 4.5D
Copyright 2011-2014 Geoff Graham > Memory Flash: 0K ( 0% of 58K) Program (0 lines) 0b ( 0% of 1536b) 0 Saved Variables RAM: 0K ( 0%) 0 Variables 0K ( 0%) General 54K (100%) Free > ? mm.device$ Micromite > Geoff, have you increased the number of user defined functions/subs up from 32 ? Many thanks for 4.5D, really useful upgrade 73 Peter The only Konstant is Change |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
For those of us who only have a PicKit2 programmer, I have placed a copy of Pic32Prog at http://www.g8jcf.dyndns.org/mmbasic/ which enables a Pickit2 to be used to program '150/170 chips. (I did try and locate this version on Serge's site and although he refers to R97, I could only find the R94 .exe hence why I posted my compiled version) Pic32Prog.exe is a Console only application. So once you have extracted it to your disk, startup a command prompt, then CD to wherever you extracted Pic32Prog.exe, and then type Pic32Prog.exe --help
at the command prompt. you should be rewarded with Programmer for Microchip PIC32 microcontrollers, Version 1.96M
Copyright: (C) 2011-2014 Serge Vakulenko. PIC32prog comes with ABSOLUTELY NO WARRANTY; for details use `--warranty' option. This is Open Source software. You are welcome to redistribute it under certain conditions. Use the '--copying' option for details. Probe: pic32prog Write flash memory: pic32prog [-v] file.srec pic32prog [-v] file.hex Read memory: pic32prog -r file.bin address length Args: file.srec Code file in SREC format file.hex Code file in Intel HEX format file.bin Code file in binary format -v Verify only -r Read mode -p Leave board powered on -D Debug mode -h, --help Print this help message -V, --version Print version -C, --copying Print copying information -W, --warranty Print warranty information -S, --skip-verify Skip the write verification step Program whichever .hex file you need. If you've got a PicKit3 then use MPLAB/X, although Pic32Prog can use a PicKit3 as well as a host of other programmer h/w. Hope this helps PicKit2 owners. Peter The only Konstant is Change |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
@Peter A really useful post for PicKit2 owners. However, I do have just one question. Understandably Serge puts a 'cover my backside' warning in the form of: 'PIC32prog comes with ABSOLUTELY NO WARRANTY'. My question: is it known what could possibly go wrong? For example, is it that PIC32prog will either successfully program a PIC or otherwise not program it at all? Alternatively, if PIC32prog programs a PIC then is it guaranteed to be 100% OK, OR Is there a chance that the programming process 'may' miss something out meaning in this case that MMBasic could mis-perform? Appreciate any feedback. WW |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4036 |
Software often has bugs. Mchp's certainly has. The only likely way to kill or brick a PIC32 is power-related or whatever it is that the Programmer To Go bug does. Oh yes, that a Mchp bug. I don't see any reason to worry beyond those. You're connecting to ICSP basically so a state machine goes into action. Cleared on another power up etc so why worry? Look how I've abused ICSP. Nothing bad happens. Use verify if worried (as I do with my own software). John |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
@WW I would imagine that Pic32Prog either works or doesn't ! The only way to be sure is to examine the source code and verify that Serge is doing things absolutely the correct way. Serge is using the Microchip PE to do the real work, so that should mean that it's all being done by the book (Microchip's anyway). As Microchip themselves say, using a PicKit2 or 3 is NOT recommended for production quality - I don't know why they say that, maybe it's so that they can sell expensive professional programmers. Pic32Prog is very well known it seems on the Internet, and I've yet to come across any negative comments. If one only has a PicKit2 then there's very little alternative if one doesn't want to splash out. ![]() OK ? Peter The only Konstant is Change |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
My only concern was whether something got 'missed' during the PIC32prog programming cycle which would possibly then result in MMBasic not working correctly. I am personally using a PicKit3 with MPLabX so I am ok to program away as many PIC32s as I need to. However, it would be nice to have 100% confirmation that the method works without any impact on MMBasic and the way Geoff has written it to perform. With this confirmation, people with only a PicKit2 can be reassured that the method works 100% (rather than say 'MMBasic works but you can't use . . . . .). Please note; I am not negating this method at all, in fact I would fully support it' as I would JohnS' method. I just don't want to see people have less than 100% MMBasic functionality. Anyone trying this method - please share on this thread as to how you get on . . . . WW |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Phil I'm using 170F's programmed with Pic32prog and thus far have not found anything which doesn't work. More precisely all the various BCD libraries have been run on the 170F's, the I2CLCD and I2CKeypad libs. In fact I have been using 170F's exclusively for development for over 3 weeks now (until today running 4.5c) all programmed using Pic32prog. It would be real useful if other Pickit 2 owners could program a uMite or two and so confirm what I've found to be the case. 73 Peter The only Konstant is Change |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
Thanks Peter for that. Can you clarify 28-pin and/or 44-pin? ![]() |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Phil I've programmed 28 pin 170Fs, but Pic32Prog.exe should support the 44 pin 170Fs as well, but I don't have any of those 44 pin ones to hand for testing. 73 Peter The only Konstant is Change |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9588 |
Ahhhh - OK. I personally think that Microchip is committing suicide by fixating on Harmony. All I wanted to do was upgrade to an identical chip (with more memory) and Microchip expected me to spend hundreds of hours rewriting my code to do just that. If I was in a commercial operation I would tell the boss that, as a rewrite was required anyway, the best choice would be to ditch Microchip and go with another company that was easier to work with. Geoff Yeah, this does seem totally mad. Why upset the thousands of users of your chips, and expect them to do page-1 rewrites of all their code, just to use your latest chips? Especially if you really don't NEED to have to do that, it is more of a Microchip decision, so it would seem...... Quite odd. Based on what you posted in the other thread, it would seem that Harmony is anything but, and not beautiful and fabulous to use, as the name implies. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Page 1 of 3 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |