Home

Electronic Projects
  • Micromite Microcontroller
  • Micromite Plus
  • The Microbridge
  • DDS Signal Generator
  • Super Clock
  • Boat Computer MkII
  • Parking Assistant
  • Micromite LCD Backpack
  • ASCII Video Terminal
  • GPS Controlled Clock
  • GPS Tracker
  • Colour Maximite Computer
  • The Original Maximite
  • The mini Maximite
  • Intelligent Fan Controller
  • GPS Synchronised Clock
  • GPS Boat Computer
  • GPS Car Computer
  • Making the GPS Computer
  • Energy Meter Firmware
  • ISM Band Scanner
  • Utility Power Supply
  • Precise Voltage Reference
  • Game of Pong
  • Water Level Meter


  • General Articles
  • Problems in Open Source
  • The Maximite Story
  • Programming PIC Micros
  • MMBasic on the UBW32
  • The TFT Maximite
  • Surface Mount is Easy
  • Measuring Capacitor ESR
  • EM-408 GPS Module
  • SG12232A LCD Driver
  • Custom PC Boards
  • The Gerber Format


  • Reviews
  • Hantek DSO-2250 Scope
  • Rigol DS1000 Scope
  • PIC C Compilers
  • Brickbats


  • PC Software
  • Weather Station
  • Mazing


  • About

     

     

     

    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Australia (CC BY-NC-SA 3.0)

    The Microbridge

     

    The Microbridge is a low cost device that plugs into a USB port on your desktop or laptop computer and provides three services:

    It is mostly intended for use with the Micromite described elsewhere on this website and is cheap enough to be included as a permanent feature in any Micromite project.

    Using this gadget you can program the Micromite firmware into a PIC32 chip, enter and edit your BASIC programs using the serial interface and power the Micromite via the 3.3V power supply. 




    The Microbridge featured in the May 2017 issue of Silicon Chip magazine.   This web page provides a shorter description so, if you would like the full story, you are encouraged to read the magazine article.  Back issues of the magazine can be purchased from Silicon Chip or electronic access can be purchased for about the cost of the printed issue.


    The Microbridge has two operating modes;

    The Mode switch is used to change modes and the LED is used to indicate the current operating mode and serial transmit/receive activity.

    USB to Serial Converter Mode

    On power up the Microbridge will default to running as a USB to Serial converter.  In this mode it appears as a serial over USB port on your desktop or laptop computer and transfers the data as a TTL serial stream to the Micromite.  When you run a terminal emulator on your PC you can then access the Micromite's console via USB and the Microbridge.

    The following diagrams illustrates how the Microbridge could be connected to a 28-pin Micromite with the Microbridge also supplying the 3.3V power for the Micromite.

    Windows 10 includes the required device driver for the Microbridge but for other operating systems you can download the driver from the download section at the bottom of this page.  The Microbridge emulates the Microchip MCP2200 so you can also download drivers from that website.

    With the correct device driver installed the Microbridge will appear as a serial port to your computer. For example, in Windows it is represented by a COM port number which you can find by checking Device Manager -> Ports (COM & LPT) as shown on the right.  Using a terminal emulator such as Tera Term you can connect to this virtual serial port and anything typed on your computer's keyboard will be sent via the serial interface of the Microbridge and anything received on this interface will be sent to your terminal emulator's screen.  To aid in fault finding the LED on the Microbridge will flash for every character sent or received.

    Within your terminal emulator's setup you can set the baud rate for the serial interface and the Microbridge will automatically adopt this speed on its serial interface (the Micromite defaults to 38400 baud so this would normally be selected).

    If you connect pin 1 of the programming connector on the Microbridge to the MCLR (the reset) pin of the Micromite you can also use the Microbridge to remotely reset the Micromite. This is done by sending a serial break signal to the Microbridge. In Tera Term this is done by pressing the ALT-B keys. Another method of generating a reset is to press and hold the MODE switch on the Microbridge for two or more seconds, its LED will flash and the MCLR line will be pulsed low to reset the Micromite.

    PIC32 Programmer Mode

    As a PIC32 programmer the Microbridge uses the same pinouts as the Microchip PICkit 3 programmer and can be plugged into the same six pin programming socket.  The photo to the right shows the Microbridge plugged into the programming socked on a 44-pin Micromite PCB which was originally designed for the PICkit 3..

    If your project does not have a programming socket you can connect the Microbridge directly to the PIC32's programming pins (MCLR, PGD and PGC).  The diagram below illustrates the connections for programming the PIC32 chip used for the 28-pin Micromite.

    In this example the PIC32's 3.3V power supply is supplied separately but this power can also be provided by the Microbridge.

    To use the Microbridge as a programmer you should momentarily press the MODE switch on the Microbridge - the Microbridge will immediately switch to its PIC32 programming mode and the on-board LED will illuminate to confirm this.  If you did not intend to enter programming mode you can revert to the USB/Serial mode by pressing and holding the mode switch for two seconds or more.

    To program a chip you use the Windows program pic32prog.exe (available at the bottom of this page).  There are versions for macOS and Linux also available on the Internet.  The Windows version does not need installation so you can just copy the executable to a convenient location and start a DOS box in that folder. The command line used to program a PIC32 chip is as follows:

    pic32prog -d ascii:comxx yyyy.hex

    where xx is the COM port number and yyyy is the name of the firmware file. 

    The COM port number is the same as that allocated by Windows when the Microbridge was in its USB to Serial converter mode. 

    For example, if your Microbridge was allocated the virtual serial port of COM6 and the file that you wanted to program was "m.hex", the command line that you should use is:

    pic32prog -d ascii:com6 m.hex

    When you press enter at the end of this command line pic32prog will upload the hex file to the Microbridge, program it into the PIC32 then read back the programmed data to verify that the programming operation was executed correctly. The screenshot on the right shows the complete operation.

    At the completion of the programming operation the LED will turn off and the Microbridge will revert to operating as a USB to Serial converter.

    Power Supply

    The Microbridge has its own 3.3V regulator and this voltage is made available on the serial interface connector.  It can supply up to 150mA and can be used to power the connected Micromite.  The USB 5V supply is also made available on this connector - its current rating is determined by your computer's capability.

    The image on the right shows the Microbridge with a PIC32 development board.  The Microbridge is plugged into the board's programming connector and flying leads are used to connect to the serial interface and provide 3.3V power to the board.

    Using this setup various versions of the PIC32's firmware can be loaded and the serial console accessed via the USB/Serial converter without having to rearrange the hardware and connections.

    Circuit

    The Microbridge is quite simple and uses just a PIC16F1455 microcontroller, a 3.3V regulator and a few passive components.

    The PIC16F1455 microcontroller can run directly off the USB 5V power but in the Microbridge it is powered by 3.3V regulator so that its outputs are driven at 3.3V to suit the PIC32 chip.

    For CON2 (the serial I/O and power) connector I used a five pin header with the pins pointing downward so that it could easily plug into a solderless breadboard but you could use a different arrangement, for example flying leads.

    The right angle six pin socket used for the ICSP programmer output (CON3) can be difficult to find however you can purchase a six pin socket intended for Arduino boards and bend the pins to 90 degrees so that the socket can mount flush to the PCB. Both Altronics (cat P5380) and Jaycar (cat HM3208) stock suitable connectors.

    The construction pack (available at the bottom of this web page) contains the Microbridge firmware, the PCB files, parts list and other data that you will need to build the Microbridge yourself.

    Sourcing The Parts

    A full kit of parts will be available from Silicon Chip magazine. Buying this kit and a copy of the magazine article is the easiest way to build the Microbridge.   If you want to source your own parts you should refer to the parts list included in the construction pack (which can be downloaded from the bottom of this page).

    The PIC16F1455 microcontroller can be found in many places. The Silicon Chip online store offers the chip pre-programmed with the Microbridge firmware and Microchip Direct sell the blank microcontroller for US$1.57 (for a single chip + freight). Other suppliers such as Element 14, RS Components, etc also sell the blank chips at a slightly higher cost. If you already have a Micromite you can use that to load the Microbridge firmware into a blank PIC16F1455 (see below for the instructions) otherwise you will need a PIC programmer such as the PICkit 3 to load the firmware.

    The Microchip MCP1700-3302E/TO voltage regulator can be found at Element14, Microchip Direct and others. There are also many other voltage regulators that can be used - the critical parameters are a 3.3V output, low dropout and a current rating of at least 200mA.

    The printed circuit board design is included in the construction pack and it can be made by many companies (usually based in China). I used ITead Studio Prototyping Service and they made ten boards for US$10 + freight.  You might not need ten but even if you used just one board it is still quite cheap.  Seeed is another supplier that I have used and I am also happy to recommend them.

    Programming the PIC16F1455

    If you already have a Micromite you do not need a PIC programmer to get the Microbridge firmware into the PIC16F1455.  Instead you can program the PIC16F1455 using just the Micromite and a 9V battery. To do this you should wire up the PIC16F1455, the Micromite and the 9V battery as shown below.

    This circuit can be built on a solderless breadboard or a strip of perforated prototyping board.

    The battery is a standard PP3 9V battery and the switch used to connect it to the PIC16F1455 can be a lead with an alligator clip which you clip onto the batteries' positive terminal when prompted.

    You can use any version of the Micromite family so long as it is running version 5.0 or later of MMBasic. Pins 4 and 5 are used on the Micromite however you can edit the BASIC program to change this (they are defined at the start of the program).

    With everything connected you should load the BASIC program MicrobridgeProg.bas into the Micromite (available in the download area at the bottom of this web page). Make sure that the 9V battery is disconnected, run the BASIC program on the Micromite and then connect and disconnect the battery when prompted.

    The programming time is under 30 seconds and the software will report its progress as it goes. The screen shot on the right shows a typical programming session.

    Credits

    The Microbridge is the creation of a number of brilliant people working together:

    Downloads

    Windows Driver DOWNLOAD
    MAC OS X Instructions DOWNLOAD
    Linux Instructions DOWNLOAD
    pic32prog.exe (Windows only) DOWNLOAD
    Microbridge Construction Pack
    Contains the firmware, circuit, parts list, PCB design files and other build information.
    DOWNLOAD
    MicrobridgeProg.bas
    MMBasic program to load the Microbridge firmware into a PIC16F1455
    DOWNLOAD