Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 10:51 29 Apr 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 : Open source MM programmer and USB/UART

     Page 1 of 2    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8583
Posted: 12:01am 08 Aug 2016
Copy link to clipboard 
Print this post

The PIC16F1455 provides one of the cheapest USB/UART connections for the Micromite and also, combined with PIC32prog, can be used to update the firmware in the Micromite. Previously MicroBlock has made available hex files to do this but has been unable to release the source as his code was built using the Microchip USB stack which is not open source.

The attached code is built on the m-stack USB stack which is open source so I am able to release the complete MPLabX project as well as the hex file to program the PIC16F1455. The hex should also work on the PIC16F1454, the PIC16LF1455 and the PIC16LF1454. It is intended that this code will also be uploaded to the PIC32prog github site.

2016-08-08_090654_usb-uart-prog.zip

The code as configured is completely compatible with BigMick's MuP ver. 3 and also my Ultimate Backpack available from CircuitGizmos. The hex file for the 16F1455 is in the usb-uart-prog directory and is named PIC16F1455V1.03.hex.

You don't need one of these boards though as the chip can easily be breadboarded. The attached circuit was prepared by Robert Rozee, the author of the ascii implementation of PIC32prog who has also provided much help during the development of the code.



Thanks are also due to BigMick and CircuitGizmos for helping to test the code.

You can program up the PIC16F1455 using a PicKit3. Alternatively ready programmed versions will be available from BigMick, CircuitGizmos and possibly others

The code automatically switches the PIC16F1455 to the speed set in the terminal emulator: valid speeds are:
300,600,1200,2400,4800,9600,19200,38400,57600,76800,115200,230400
230400 works extremely well for very fast downloads to the Micromite and very fast output.

To change speed on the Micromite use OPTION BAUDRATE xxx and then set the emulator to xxx and it will immediately work.

In addition you can also use break to reset the Micromite. On teraterm just go to the control menu and click "send break" and the Micromite will reset.

Windows 10 will automatically load the correct driver. For W7, XP, Mac, Linux refer to the documentation tab on this page

To program a PIC32 chip connect up the ICSP connections as in the diagram and briefly short pin 4 to ground (the switch in the circuit diagram). The LED will light showing the chip is now in programming mode. Make sure you have the latest version of the Pic32prog software from here.

Open a command window and use the command line:

pic32prog -d ascii:comxxx nnnn.hex

where comxxx is the com port that has appeared when the USB cable was connected and nnnn.hex is the firmware you wish to program into the PIC32.

The attached show a typical programming session:



Once the PIC32 is programmed the PIC16F1455 software will automatically revert to USB/UART mode and the LED will go out.

To reconnect just run a terminal emulator such as Teraterm or MMEdit and press return. The MM copyright banner will be displayed - no need to reset or reconnect anything.




 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9063
Posted: 02:25am 08 Aug 2016
Copy link to clipboard 
Print this post

Looking at your screenshot, that appears to be faster then the Arduino version too - is that my imagination?

Nice work, guys!

@ Rob - would you like a PCB rustled up for this one? At $1.43 for the SOIC version or $1.57 for the DIL version, an extremely affordable device!
Smoke makes things work. When the smoke gets out, it stops!
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 04:46am 08 Aug 2016
Copy link to clipboard 
Print this post

I have a PCB in development that I will be selling. That and programmed chips!

I need to finish my mini vacation first...Edited by CircuitGizmos 2016-08-09
Micromites and Maximites! - Beginning Maximite
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 05:26am 08 Aug 2016
Copy link to clipboard 
Print this post

I should say something but i won't. I will just refer to past posts.
I just refer to this.
and:

and this

and:




About open source...
well i do not fancy a lawsuit from Microchips so i just published the specific programmer part here. (note the date of the posts).
Edited by MicroBlocks 2016-08-09
Microblocks. Build with logic.
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1327
Posted: 01:13am 09 Aug 2016
Copy link to clipboard 
Print this post

Jean, what is the situation regarding availability of your boards? Where can we access ordering info and prices for them?

Greg
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 01:56am 09 Aug 2016
Copy link to clipboard 
Print this post

They have been send to the pcb manufacturer (slightly different as above picture as it has through hole caps and resistors and a TSSOP package for the chip that makes handsoldering easier. I expect them to arrive in about 10 days.
The price will be $3US for the bare pcb and $9.95US for a kit including all the parts (also preprogrammed chip).
They will probably also be for sale through Dontronics/Mick to have faster shipping.
From Thailand it is not more expensive (about $2US) but it takes anywhere between 10-28 days to arrive.

I also have another board that will arrive in the same time that is more like a programmer and an adapter board for 28 pin DIP.



They will be $5US for the bare PCB(both pcb parts)and $11.95US for a complete kit.

It is the same pinout as the 'Free' version by Matherp. If you already have a pickit 3 then you can use that version also. A kit is then 2US$ cheaper as you will then get an empty chip you need to program yourself.Edited by MicroBlocks 2016-08-10
Microblocks. Build with logic.
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 07:37am 10 Aug 2016
Copy link to clipboard 
Print this post

  matherp said   Alternatively ready programmed versions will be available from CircuitGizmos



Available now:

http://circuitgizmos.com/gizmo-store/#!/USB-to-serial-+Pic32prog-programmer-interface/p/69742387/category=14355150
Micromites and Maximites! - Beginning Maximite
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 08:00am 10 Aug 2016
Copy link to clipboard 
Print this post

You forgot to remove this text from your website:
[code]
The USB console is provided by MicroBlock's excellent PIC16F1455 software
and the wiring on the PCB support this programming
the Micromite+ firmware using PIC32PROG via the PIC16F1455
[/code]

Another reminder that i should not share code or ideas with anyone.
I am royally pissed off!
What kind of pleasure do you guys get from this?


Edited by MicroBlocks 2016-08-11
Microblocks. Build with logic.
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 09:22am 10 Aug 2016
Copy link to clipboard 
Print this post

  MicroBlocks said   I should say something but i won't.


Now your passive-aggressive comment makes some sense.


I reached out to you via email about using the hex file and was also hoping to get a copy of the source. I got nothing. I eventually got your hex file through matherp. Now I will be using his version of the hex file.


I provide some things for this Maxi/MicroMite community on my web site just like others do. For reasons very unclear to me, there appears to be some members of TBS that display considerable animosity toward these small efforts. I have fun with the 'mite projects and think that the efforts Geoff has made are fantastic. I hope to expose more people to the 'mites.


Micromites and Maximites! - Beginning Maximite
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 09:35am 10 Aug 2016
Copy link to clipboard 
Print this post

Ah yeah, the old i send you an e-mail and you did not responded excuse. That gets pretty old. Don't you have any other ones?

Why do people who ask me for the hex file in an e-mail always get it. I even give them support. Just so people have a nice experience and are happy with the product.

No, the reason was more like 'it is not open source so we had to', 'what if it is not available anymore, better make our own', or 'when it gets more expensive' etc. Even though i offered it for free and send the hex file AND source codes to Matherp.

No this is not how honest people act.

My passive-agressive comment was made as i should let this slide, but it bugs me to no end that this has been done.

I have said my thing. I will leave it at that!



Edited by MicroBlocks 2016-08-11
Microblocks. Build with logic.
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1421
Posted: 09:43am 10 Aug 2016
Copy link to clipboard 
Print this post

You are calling me dishonest. All of my dealings with people here have been on the up and up. You, however, have only made snide, unprofessional remarks. I'm glad I don't need to do business with you.

It is unfortunate that you have to react to all of this in the way that you have. You chose to air all of this publicly rather than PM. Clearly there are misunderstandings.
Micromites and Maximites! - Beginning Maximite
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2289
Posted: 05:12am 13 Aug 2016
Copy link to clipboard 
Print this post

below are pictures of a built-up unit using peter's .hex file. programming an MX170 under XP is marginally quicker than using the original arduino NANO design (1m 43s versus a tad over 2 minutes), and the serial interface side of things works fine. the 1455 was recognized without any intervention, as some time ago i had loaded up the microchip .inf file containing their vid/pid pairs. i believe that under windows 7 and later this is built in.

one major advantage offered over a regular usb-to-serial bridge is that under teraterm one can now press alt-B to reset the micromite, no need for a separate reset switch.

someone may wish to take the form-factor i have used and turn it into a PCB for folks to purchase (fabrication cost would be about USD 0.60). the board is sized to fit in place of the lid of a small jiffy box, 79mm x 50mm. if laid out more compactly a mini-USB socket could be placed on the board to the right of the micromite, this makes a nice fully self-contained experimenters setup.


cheers,
rob :-)







Edited by robert.rozee 2016-08-14
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 02:54pm 13 Aug 2016
Copy link to clipboard 
Print this post

Hi All,

Of course a board similar to Robert's vero one does already exist..

My MuP3 - Full details located here




It is smaller than the above Vero unit at 49.5mm x 43mm (1.95" x 1.69")

It supports either MicroBlock's U2SP-DIP chip or Peter and Robert's Free ware chip.. I can supply either if you can't burn your own.

Kind Regards,

Mick


Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2289
Posted: 04:18pm 13 Aug 2016
Copy link to clipboard 
Print this post

good point, i forgot the MuP3. although, having a ZIF socket and a jiffy box protecting the back of the board can be useful.

incidentally, i've found that the cheap ZIF sockets found on ebay (from china) can be very hard to get to solder nicely. extra flux and a hot iron were required in the end.


cheers,
rob :-)
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2870
Posted: 05:49pm 13 Aug 2016
Copy link to clipboard 
Print this post

Rob, All,

As the pins of the ZIF sockets are too wide to plug into a normal socket, I have extended mine, using double ended round pins, like this.





Here is a shot of it plugged into a MuP3 ready to go.





As to protecting the bottom of the board, all you need there are rubber bumpers/feet added to the underside of MuP3.

Kind Regards,

MickEdited by bigmik 2016-08-15
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8583
Posted: 04:51am 22 Aug 2016
Copy link to clipboard 
Print this post

Please find attached an updated version (V1.08) of the code and hex file.

Changes are:

Bug Fixes:
Fixed cause of occasional Microsoft warning "Device can run faster if connected to a hi speed USB"
Fixed bug that caused the LED to sometimes light when changing baudrates

Enhancements:
When in USB/UART mode:
Pressing the program select switch for greater than 2 seconds will reset the Micromite but not enter programmer mode. The LED will flash briefly after 2 seconds to indicate success

When in programmer mode:
Pressing the program select switch for greater than 2 seconds will exit programmer mode. The LED will go out after 2 seonds to indicate success and when the switch is released the Micromite will be reset and the PIC16F1455 will switch back to USB/UART mode

HEX

2016-08-22_145021_PIC16F1455V1.08.zip

MPLabX Project directory and source

2016-08-22_145055_usb-uart-progV1.08.zip




 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2794
Posted: 09:31am 22 Aug 2016
Copy link to clipboard 
Print this post

Thanks for this Peter - will test over the next few days and get back with any issues

WW
For everything Micromite visit micromite.org

Direct Email: whitewizzard@micromite.o
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2289
Posted: 11:39am 22 Aug 2016
Copy link to clipboard 
Print this post

a factory reset of the micromite can now be performed as follows:

1. set teraterm to 38400 baud,
2. press and hold the 'select' button,
3. after the LED flashes press and hold '!' on the keyboard,
4. release the 'select' button,
5. when the "MMBasic reset completed" message appears release '!'.

cheers,
rob :-)
 
kermess
Regular Member

Joined: 04/04/2013
Location: Spain
Posts: 45
Posted: 07:14am 28 Sep 2016
Copy link to clipboard 
Print this post

Hello people.
I'm trying to use the "PIC16F1455-I/P" with this software and I encounter different problems.
My main idea is to use this chip for USB communications with the PIC32MX.
To program I use Win7 PICKIT3 programmer and usually have no trouble in PIC32MX170 schedule.
I mounted on a breadboard circuit diagram at the top of this article and simply
the PICKIT3 not recognize the PIC16F1455, it is as if the chip is not connected.
Reviewing different schemes on the net I can see that the lines of PICKIT3 are connected in this way and
I make this connection assembly

PICKIT3 .............PIC16F1455
Pin_1 ---- MCLR --- Pin_4
Pin_2 ---- VDD ---- Pin_1
Pin_3 ---- VSS ---- Pin_14
Pin_4 ---- PGD ---- Pin_10
Pin_5 ---- PGC ---- Pin_9
Pin_6 - nc

Power suply 3v3.
I realize this assembly and then IPE Microchip PIC16F1455 can recognize without problems.
Then charge the HEX file and produces no error.
I want to believe that it has been properly programmed.
File used "PIC16F1455V1.08.hex".
I usually use a circuit with a FDTI to connect the PIC32MX170 and I have no problems.
In the PC it detects me FT232R USB UART is a Teraterm and working properly.
Now I connect the PIC16F1455 on my breadboard with this chip and I can not communicate with Teraterm.
The PC detects a "USB Composite Device" and leaves an alarm with a triangle and an interrogation.
Note: If the microswitch pulse 2 seconds LED blinking occurs,
in this way I think PIC16 programming can be well done.
Question:
  "What could be happening to me..... ???"
  "You may need new drivers for Win7 USB ..... ???"
  "That drivers."
Thank you very much.
a greeting
!!! Sorry for my English !!!
David.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8583
Posted: 08:09am 28 Sep 2016
Copy link to clipboard 
Print this post

See this thread for how to program
a PIC16F1455 with a MicromiteEdited by matherp 2016-09-29
 
     Page 1 of 2    
Print this page
© JAQ Software 2024