Overview | Info/Download | Documentation | Sample Projects 
Making a GoGo board | Board Variations | Links | FAQ

GoGo Board Bootloader
(For GoGo Board 2.2 and higher)

The bootloader is a program that takes up a small portion of the PIC's 8k flash memory (the last 0.4k). The purpose of the bootloader is so that once the bootloader is burned to the PIC, you can use it to re-program the PIC as often as you want using only the serial port (and not the PIC burner).

You can see loaders in many consumer products (i.e. MP3 players, CD-burners, PDAs, etc). They are normally there to allow you to upgrade the firmware for bug fixes and performance updates. Although the GoGo bootloader is intended for the same idea, it can be used as a general PIC programming tool for developers as well.

Downloading a new firmware to the GoGo board

  1. Make sure you program the bootloader to the PIC before doing this. See here for more information about PIC burning.
  2. Connect the GoGo board to the PC's serial port.
  3. On the GoGo board, hold down the RUN button and power up the board. Both the RUN and USER LEDs should light up. The board should not beep. If this does not happen, your GoGo board may not have the Bootloader installed.


     
  4. On your PC, download and install the Firmware Downloader software (from the download box in this page). Then, run it.


     
  5. Open a firmware source file (HEX file) by pressing the "Browse" button. The latest GoGo board 2.x firmware can be found on the download page.
  6. Make sure the COM port number corresponds to the one connected to the GoGo board.
  7. Click the "Download Firmware" button. You should see the download progress and a confirmation message once the download is complete.

 

Information for Developers

This section contains some info for those who want to use the bootloader with other PIC projects. I've only tested it with the 16F877 chip. Minor modifications to the source should make it to work with other PICs as well.

Features:

  • Requires only a normal serial connection to the PIC (3 wires: Tx, Rx, Gnd).
  • Comes with a simple firmware downloader program. Source code is available.
  • The bootloader takes up only 0.4k of the PIC flash memory (addresses from 0x1E50-0x1FFF).
  • Written in C. Source code is available (requires CCS-C compiler).
  • Should work with any HEX file generated by various compilers (CCS, MPLAB, etc) as long as they don't overlap with the loader's memory space (0x1E50-0x1FFF).

Limitations:

  • No checksum. Assumes an error-free serial communication.
  • The PIC's configuration bits cannot be changed. This is a general limitation of any bootloader. To change the bits, you'll have to recompile the loader's source and re-program the PIC with a PIC programmer.

Hardware Requirements

You must use the hardware UART on the F877 (Pins C6, C7). You will also need a signal level converter, as the RS232 signal level is different from the PIC's TTL signal. This is typically accomplished with a MAX232 chip. But I normally cheat by using a much cheaper HEX Inverter chip. It doesn't meet the standards, but it works. Here's a diagram of a minimal circuit you'll need:


[Click to enlarge]

The serial Rx, Tx pins goes through the inverter and then to the serial port connector. The push button on pin B7 is used to activate the bootloader if pressed during power up. You can easily change the activation pin in the source code.

Software Requirements

The GoGo bootloader requires minimal changes to your PIC code.

  • You must not use the bootloaders memory. This is the address range from 0x1E50 to 0x1FFF, which is the last ~0.4k of the 877's 8K flash memory. In CCS C you can do this by adding this line to your code:

    #ORG 0x1E50, 0x1FFF {}
     

  • Since the configuration bits cannot be programmed, you're stuck with whatever configuration bits the bootloader uses. So, make sure this is okay. 

 

 

Download Firmware Downloader

PC Firmware downloader (Nov 27, 2003)
  This is the PC interface for downloading a firmware to the PIC that already contains the bootloader.

สัญลักษณ์แสดงหัวข้อย่อย Firmware Downloader v 0.92  (1.7M) New
สัญลักษณ์แสดงหัวข้อย่อย Firmware Downloader v 0.92 VB source New
สัญลักษณ์แสดงหัวข้อย่อย See Change Log
 

Download Bootloader Firmware

Bootloader PIC code (Nov 27, 2003)
  This is the bootloader code itself. 
 
สัญลักษณ์แสดงหัวข้อย่อย Bootloader v 1.0 HEX file
สัญลักษณ์แสดงหัวข้อย่อย Bootloader v 1.0 C Source (req CCS-C compiler)
สัญลักษณ์แสดงหัวข้อย่อย See Change Log
 
 

Quick FAQs

What does the GoGo Bootloader do?
   Once installed, you can change/update the board's firmware using the built-in serial port. Without the loader, this process would require removing the PIC micro-controller and using a special programming hardware.

If I already have a GoGo board, how can I test if it has the bootloader installed?
    You can try to activate the bootloader by holding the run button while powering up the board. If both the run and user LED light up without beeping then the board has the firmware.

If my GoGo board does not have the bootloader, can I install it?
    Yes, but you need a PIC burner to do so.

My board has the bootloader, how do I use it?
    First, you normally use it only when you have a new firmware for the GoGo board. To use the loader, connect the GoGo board to the PC serial port. Then, activate the bootloader by holding the RUN button down while powering up the GoGo board. Next, install the Firmware Loader on your PC and run it. Finally, open the firmware file (HEX file) and click "Download Firmware."

What's a firmware?
    The firmware is a program that operates the GoGo board. It is like the operating system of a PC. It sits in the micro-controller and drives all other hardware that are around it (i.e. serial, motor, and sensor ports).

What's the difference between a firmware and a cricket logo program?
    Cricket Logo only tells the firmware what to do. All the actual execution is done in the firmware. In other words, you need to have the firmware to run Cricket Logo.

Can I use the GoGo bootloader with my other PIC projects?
    Yes, the loader should work as long as your firmware does not occupy the memory addresses between 0x1E50-0x1FFF (the last 0.4k).

 

Related Links

Free PIC16F87x bootloader - This extremely small loader (~0.25k) works with the 16F87x chips.

WLoader - Another 16F877 loader. Has good explanation for developers.

CodeLoader - This loader is also written in CCS-C.

 
Contact: gogo@media.mit.edu.    

 Last updated: April 2, 2004