Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:43 20 Nov 2025 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 : Question about Microbridge

Author Message
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 72
Posted: 10:22am 28 Feb 2022
Copy link to clipboard 
Print this post

I have a need to upload firmware into a PIC32MZ and thinking of taking the easy road given by the microbrodge. I only wonder if it will work the way I need it - UART-->PIC32, and USB to remain unused.
Is that possible?
Thanks
Edited 2022-02-28 20:23 by knivd
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 11:24am 28 Feb 2022
Copy link to clipboard 
Print this post

All I can offer is that I successfully loaded ByPic on to a MX170+Microbridge. Terminal is assigned to different pins on ByPic so all I could do was load the firmware.


Craig
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 72
Posted: 11:35am 28 Feb 2022
Copy link to clipboard 
Print this post

  Tinine said  All I can offer is that I successfully loaded ByPic on to a MX170+Microbridge. Terminal is assigned to different pins on ByPic so all I could do was load the firmware.


Craig


Did you upload it through the UART or via USB?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10620
Posted: 11:43am 28 Feb 2022
Copy link to clipboard 
Print this post

Not quite sure what you are asking. The microbridge loads to the pic on the pics pins that are defined for PGEC and PGED. It works on pics that don't even have USB. The microbridge itself connects to the computer using its USB port and can only connect like that.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2832
Posted: 12:03pm 28 Feb 2022
Copy link to clipboard 
Print this post

One of the easiest ways to load a .HEX file on to any PIC32 is with TassyJim's MMFlash program using a MM2, MM+, Arduino Nano or MicroBridge for the ICSP hardware.
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 72
Posted: 12:29pm 28 Feb 2022
Copy link to clipboard 
Print this post

  matherp said  Not quite sure what you are asking. The microbridge loads to the pic on the pics pins that are defined for PGEC and PGED. It works on pics that don't even have USB. The microbridge itself connects to the computer using its USB port and can only connect like that.


Simply put, I want to explore the possibility of using the microbridge as a hardware "bootloader". On one side is my PIC32 board, on the other side is something else connected via serial port (not USB). The "something else" part uploads a hex file into the PIC32 board via the microbridge
Edited 2022-02-28 22:30 by knivd
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 12:32pm 28 Feb 2022
Copy link to clipboard 
Print this post

  knivd said  
  Tinine said  All I can offer is that I successfully loaded ByPic on to a MX170+Microbridge. Terminal is assigned to different pins on ByPic so all I could do was load the firmware.


Craig


Did you upload it through the UART or via USB?


All I remember is that I grabbed a couple of micromite.org modules that consist of a SMD MX170 and a piggy-backed microbridge. I loaded the MMBasic firmware successfully via the micro-USB and just for giggles replaced it with ByPic_Firmware.
I believe that was the end of it and the module went back in its box. I have a Pickit-4 which is pretty much all I use.

If this module could be of any use to you, please PM me and I'll send it. I'm in the process of disposing of things that I have no real need for.


Craig
 
Tinine
Guru

Joined: 30/03/2016
Location: United Kingdom
Posts: 1646
Posted: 12:46pm 28 Feb 2022
Copy link to clipboard 
Print this post

@knivd

How is the "something else" coming along? I keep checking for updates on the "something else" forum  



Craig
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2466
Posted: 12:54pm 28 Feb 2022
Copy link to clipboard 
Print this post

  knivd said  I have a need to upload firmware into a PIC32MZ and thinking of taking the easy road given by the microbrodge. I only wonder if it will work the way I need it - UART-->PIC32, and USB to remain unused. Is that possible?


if you are wanting to program a PIC32 over a serial link, then the answer is YES, this is possible, but not using a "microbridge" which only talks down a USB link. you need to use an Arduino (ATmega328p) to do this - either a bare 328p chip with appropriate Arduino bootloader installed, or an Arduino Pro Mini. The Pro Mini talks serial directly (no USB to serial bridge), and is an easy option.

the pic32prog repository is located here:
https://github.com/sergev/pic32prog

pic32prog has embedded within it the necessary binary for a 5 volt 16MHz Arduino Nano. this should, in theory, also work on a 16MHz Pro Mini, but may not. when i wrote the code (nearly 7 years ago!), i only tested it on a Nano.

the source code for this binary is contained in the bitbang folder here:
https://github.com/sergev/pic32prog/blob/master/bitbang/ICSP_v1E.ino (browse)
https://github.com/sergev/pic32prog/raw/master/bitbang/ICSP_v1E.ino (download)

read the comments in the source code carefully. you need to MODIFY the Arduino IDE's serial library to expand the serial Rx buffer size to 1024 bytes, the comments explain this.

a schematic showing how to wire things up is here:
https://github.com/sergev/pic32prog/raw/master/bitbang/ascii%20ICSP%20using%20arduino%20nano%20v1_1.pdf


cheers,
rob   :-)
Edited 2022-02-28 23:05 by robert.rozee
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 72
Posted: 09:04am 01 Mar 2022
Copy link to clipboard 
Print this post

  robert.rozee said  
cheers,
rob   :-)


Thank you! I found a pdf with your original work, dated 4/4/16. Does the method described there apply to the PIC32MZ as well? The microbridge page only mentions PIC32MX, and the PIC32MZ family chips have a different size flash page
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2466
Posted: 09:36am 01 Mar 2022
Copy link to clipboard 
Print this post

as i recall it does work with the MZ devices, insofar as Peter produced a port of MMbasic that ran on one of the MZ processor (i don't remember which one) and verified that pic32prog could upload the firmware to it.


cheers,
rob   :-)
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 72
Posted: 09:44am 01 Mar 2022
Copy link to clipboard 
Print this post

  robert.rozee said  as i recall it does work with the MZ devices, insofar as Peter produced a port of MMbasic that ran on one of the MZ processor (i don't remember which one) and verified that pic32prog could upload the firmware to it.


cheers,
rob   :-)



Great. And what is the input, a hex file?
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4147
Posted: 11:24am 01 Mar 2022
Copy link to clipboard 
Print this post

Are you sure you want to use PIC32MZ? Almost no-one does & the software and other support is very poor.

BTW, Maybe pic32prog documentation tells you what input file it accepts...

John
Edited 2022-03-01 21:25 by JohnS
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2832
Posted: 11:39am 01 Mar 2022
Copy link to clipboard 
Print this post

The file has to be .HEX as that goes over ASCII serial easiest.
Pic32prog.exe is intended for an Arduino Nano but TassyJim's Windows front end for it (MMFlash) can also use a MM2 or MM+ by switching it to a different mode . Pic32prog.BAS gets loaded on to the MM (with Peter's Pic32prog CSub).
Very easy to use.

Click the link at the end of any of Jim's posts and scroll down.
Edited 2022-03-01 21:44 by phil99
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 72
Posted: 12:31pm 01 Mar 2022
Copy link to clipboard 
Print this post

  JohnS said  Are you sure you want to use PIC32MZ? Almost no-one does & the software and other support is very poor.


Where did that come from?
Yes, I am sure. This is a non-MM related project, and I only need the programming interface to save me from writing a bootloader. The chip itself is excellent, and I use a MZ port of the Plib, which saves me from the unpleasantness of using the Microchip's Harmony, so I have no issues whatsoever with "poor support"
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4147
Posted: 12:48pm 01 Mar 2022
Copy link to clipboard 
Print this post

With so few users, I'd worry as to when it will be discontinued.

John
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 72
Posted: 01:35pm 01 Mar 2022
Copy link to clipboard 
Print this post

  JohnS said  With so few users, I'd worry as to when it will be discontinued.

John


Ah, that... Microchip are not known to easily discontinue products. They still offer some PICs from the mid 1990s, so I am not worrying about that at all

.
Edited 2022-03-01 23:35 by knivd
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4147
Posted: 02:22pm 01 Mar 2022
Copy link to clipboard 
Print this post

Yeah - they actually sold well, though!

John
 
knivd

Regular Member

Joined: 07/09/2014
Location: United Kingdom
Posts: 72
Posted: 03:06pm 01 Mar 2022
Copy link to clipboard 
Print this post

Btw, in case someone needs a Plib port for the MZ, drop me a message
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 622
Posted: 01:51am 21 Apr 2022
Copy link to clipboard 
Print this post

A MZ2048 is used as a controller in the recent Silicon Chip dual power supply - might be a base for other stuff. I don't know if the software was created using Harmony or not.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025