Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 11:25 05 May 2024 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 : Colour Maximite programming problems...

     Page 1 of 4    
Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 11:16pm 26 Nov 2014
Copy link to clipboard 
Print this post

Hi folks.

Trying to program a UBW32 module with the CMM firmware.

IPE programs device fine, verify fine.

MMBASIC will not run.

Power LED does not light when you cycle power, so this means the firmware is NOT running.

Is there anything special I need to know about programming a CMM via the PICkit3 and not via USB, which is the way I have updated all my other CMM's?

MMBasic version 4.5 HEX file. Should I be using another HEX for the first firmware flash, then update to 4.5 via USB?

Stuck.

EDIT: I am DEFINITELY not doing something right with respect to programming the firmware. I have just triple-checked that all my connections were right to the LED, and the VGA socket, and same problem. Power LED does not light, no VGA output, and no response via TeraTerm on USB either. My prime suspect at the moment, is I programmed the wrong HEX file, but before I try anything else, I need to know for sure if I have to use a special one. I will have a look on Geoff's site now....

EDIT: Nope, according to what I can find on Geoff's site, I just program in the version 4.5 HEX, which is what I did.

The LED is connected to UBW32 E0 pin, as per the CMM circuit diagram. Anode to 3v3, cathode to E0 via 47R resistor - does not light. Blue SMD LED on UBW32 module lights up fine, and as I say - I can program the HEX file into it fine. Having done that, I would have expected it to "Just work". Edited by Grogster 2014-11-28
Smoke makes things work. When the smoke gets out, it stops!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 12:08am 27 Nov 2014
Copy link to clipboard 
Print this post

Hi Grogster,

In the download there is a 'Loading New Firmware.pdf'.
The last section of page one says to update via USB by pressing the boatload button.

I did the same as you the first time I upgraded a CMM. So reprogram the original firmware to get it back to where it was (i.e. put the boot loader back), and then program 4.5 via usb as per the instructions.

Good luck . . . .

(you could always design a PCB to make the process easier )

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 12:23am 27 Nov 2014
Copy link to clipboard 
Print this post

Oh, it IS on a PCB!!!





This is what dismays me as to why it won't work for me.

By original firmware, I assume you mean the constructor pack firmware - I will download that and see if I have any luck.
Smoke makes things work. When the smoke gets out, it stops!
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3663
Posted: 12:36am 27 Nov 2014
Copy link to clipboard 
Print this post

I suspect the CMM has both a bootloader + MMBasic firmware.

Using a PICkit you'd probably erase both but are adding only the latter.

So, there's nothing useful at the address where the CPU goes on reset etc.

You can either go back to original and upgrade as intended OR edit the bootloader part out of the original hex and combine with the new.

Yes, sounds scary but it isn't. The hex format is on the net and is funny-looking text. You can find the bootloader by looking for its address (you look for 1fc0 or 1FC0). And so on. A bit weird the first time but easy after.

You cut out the old MMBasic, add in the new hex, and use the PICkit.

John
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 12:45am 27 Nov 2014
Copy link to clipboard 
Print this post

@ John - you've lost me...

I have found a very useful PDF on Geoff's site here.

This explains that I need to use the version 4.4 + bootloader file - I will flash that in now, and see if I have any luck.

EDIT: OK, have programmed in version 4.4B with bootloader from the CMM construction pack, but it's still dead.Edited by Grogster 2014-11-28
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3165
Posted: 12:45am 27 Nov 2014
Copy link to clipboard 
Print this post

The upgrade versions do not have a bootloader and that might be the cause of the issue (I cannot test that at this time).

Try loading the "ColourMM_plus_bootloader_V4.4B.hex" from the Colour MM Construction pack( http://geoffg.net/Downloads/Maximite/Colour%20Maximite%20Con struction%20Pack.zip). Then upgrade via the USB bootloader to the version that you want.
Geoff Graham - http://geoffg.net
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 12:50am 27 Nov 2014
Copy link to clipboard 
Print this post

Hi Geoff - see above......

EDIT: PDF for the UBW32 says on page 6 that sometimes the UBW can be difficult. I will have a look at changing those options mentioned, and see if we can make it behave.

EDIT: Can't find any of those settings mentioned in the PDF anywhere in IPE. Could Geoff or anyone else tell me where I find those settings to change them?
Edited by Grogster 2014-11-28
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5913
Posted: 12:19pm 27 Nov 2014
Copy link to clipboard 
Print this post

I am sure I used V4.0 of the firmware for my UBW32's
I have put it here:
http://www.users.on.net/~tassyjim/stuff/colourmm_firmware.zi p

Jim
VK7JH
MMedit   MMBasic Help
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 12:58pm 27 Nov 2014
Copy link to clipboard 
Print this post

Thanks Jim. Programmed that in without issues, but no LED, no VGA.

Programming is never an issue, which is nice, but the UBW32 is never booting following the programming.

I would like to know how to change those settings that Geoff mentions on page 6 of the PDF I linked to from his site a few posts above.....

In the PDF, the circuit diagram makes specific mention of the fact that pin C13 must be grounded. It is not on my PCB by default, although I have tried programming with that pin grounded and not grounded, and powering up with C13 grounded and not grounded, and it makes no difference.
Smoke makes things work. When the smoke gets out, it stops!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 01:38pm 27 Nov 2014
Copy link to clipboard 
Print this post

  Grogster said  I would like to know how to change those settings that Geoff mentions on page 6 of the PDF I linked to from his site a few posts above......


If you use MPLabv 8.90: select 'Configure' tab, then 'Configuration Bits . . .'. You will then come to a screen where there is a tick box for: 'Configuration Bits set in code'. If it is ticked, then unstick it and change the options there. It will become clear if you try it. See screenshot below - this shows you my screen with Page 6 in the background so you can see what needs changing.

Hope this helps you . . . .

WW
ok - small screenshot but hope this guides you enough . . . .


Edited by WhiteWizzard 2014-11-28
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 01:45pm 27 Nov 2014
Copy link to clipboard 
Print this post

Screenshot here for better view: 2014-11-27_234434_GrogsConfigBits_copy.zip

WW

For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5913
Posted: 01:47pm 27 Nov 2014
Copy link to clipboard 
Print this post

C13 is connected to ground if you are using the original UBW32 bootloader. In that case pin 1 is also unavailable.

Once you have reprogrammed it with the MMBasic bootloader, Pin 1 is available as normal and C13 is grounded whenever you want to put it into bootloader mode.

I didn't need to change any settings.
I did have problems recently but it turned out to be my USB cable.


I think you need the IDE, not the IPE if you want to change any settings.

Jim



VK7JH
MMedit   MMBasic Help
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 02:05pm 27 Nov 2014
Copy link to clipboard 
Print this post

@ WW - Thanks for your post and picture - I have downloaded the nice big clear image in the zip - thanks. I have MPLAB X. I had a look in there, but could not find anything useful to change. Now I have a version and program type to look for, I will see if I can find and download MPlabv 8.9. Can anyone use this software, or is that one of the ones you have to pay a license for?

@ Jim - Thanks. Yeah, my problem is that I can't get the CMM firmware to even boot in the first instance, to be able to use the USB to update it. If I can't get a HEX into it such that the UBW32 will boot into MMBASIC, I cannot use the USB to update it either.

Don't you just LOVE technology sometimes?! (rhetorical!)
Smoke makes things work. When the smoke gets out, it stops!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 02:18pm 27 Nov 2014
Copy link to clipboard 
Print this post

Pop over to this page for 8.9x - Totally FREE

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 02:24pm 27 Nov 2014
Copy link to clipboard 
Print this post

Thanks. I am sucking 8.92 from the net now.

I have a job I have to go to now, so I will have to install the IDE and try this out later today. Stay tuned!

EDIT: Installing the software before I go, and keep getting errors with this now - MPSwitcher.exe has stopped working. I am ignoring those messages(three of them), and allowing the install to complete. We'll see if it will run despite those complaints.Edited by Grogster 2014-11-29
Smoke makes things work. When the smoke gets out, it stops!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 02:28pm 27 Nov 2014
Copy link to clipboard 
Print this post

@Grogs: Its half past midnight here in UK so I'm off to get some sleep; will catch up in about 8 hours or so . . . . .

good luck - hope you get it back up and running!

WWEdited by WhiteWizzard 2014-11-29
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 02:43pm 27 Nov 2014
Copy link to clipboard 
Print this post

OK, software installed, and loaded. Selected PIC32 device, connected to PICkit 3.

Changed config bits in the menu as shown by WW, and then closed that window. MPIDE 8.92 still running though.

How do you commit those changes to the PICkit3, or does MPIDE do that as soon as you change them?

I have re-ticked "Configuration bits set in code" - had to untick to make changes.

HAVE to get to my job now, anticlimactically, but to be continued...


Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 06:22pm 27 Nov 2014
Copy link to clipboard 
Print this post

OK, back home now, and so what I tried next was:

- Open IDE and select correct device.
- Untick set configuration in code checkbox
- Make changes as listed in PDF
- Recheck box
- Close window
- Close IDE
- Open IPE
- Load and program HEX

Still nothing.

What am I doing wrong?
The fact that the PIC32 programs fine every time, SHOULD mean that everything will work as soon as you cycle power. Helpfully, the extra SMD LED's on the UBW32 are useful for debugging purposes, and no matter what I do, or what HEX I program, the only LED that stays on is the blue PWR one. The yellow and red ones don't ever light up. I am watching for the yellow one, as that should indicate that MMBASIC is running, according to the PDF.

EDIT: Does it matter that several external circuits are connected by default during programming? I would not have thought so, but I am clutching at straws now. Perhaps I should remove the UBW32 from the mainboard, and just hook up the programmer and power, and nothing else, then see if I can get it going?

EDIT: No, no joy. I removed the UBW32 module from the mainboard, sat it to one side on the bench, and hooked up just the power and the programmer. Programmed the HEX into it, still dead as a dodo. ...other then that blue LED, that is. Therefore, it is not any of my mainboard circuitry somehow upsetting the programming procedure, so at least we know that.

EDIT: Just reloaded the IDE, and all the config bits are back to the defaults, which is NOT what the PDF lists.

QUESTION: Once you have set the configuration bits in the IDE, how do you ensure that this is applied to the chip when you program in the HEX file with IPE?Edited by Grogster 2014-11-29
Smoke makes things work. When the smoke gets out, it stops!
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 09:42pm 27 Nov 2014
Copy link to clipboard 
Print this post

Morning Grogs - I'm up!

Don't re-tick the box otherwise the code overrides your changes.
As Geoff says in the .pdf this is something to try if the UBW32 'locks' up.

Let us know if this helps.

Check: you are using a hex file with a boot loader?? You need the boot loader to be included. . . .
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 09:44pm 27 Nov 2014
Copy link to clipboard 
Print this post

Why are you not loading the file from the IDE? Otherwise the settings will/could be different when you switch to the IPE
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
     Page 1 of 4    
Print this page
© JAQ Software 2024