Oricom Technologies
www.oricomtech.com

Return to:
previous page.
Running the Bootloader on the BOT40 Boards
Index
|> Using the Bootloader
|> Bootloader Modifications

The following is a summary of the information contained on the Dontronics PIC-Loader page. It discusses how to use the Bootloader with the Windows Hyperterminal program, but other terminal emulators will work in a similar fashion.

Note that we have modified the original PICLoader slightly, as shown in the last section below.

How to Use the Bootloader

1. Connect the BOT40 to a PC RS-232 port using a straight-through (not a "null-modem") serial cable.

2. Start HyperTerminal.

3. To Run the Bootloader

Note - in the Rick Farmer PICLoader, if a user program has been previously loaded, then it will automatically start executing when the chip is powered-up. In order to break-out to the PICLoader, 2 steps are required:

See modifications section below regards slight differences in accessing original and modified Bootloaders.

4. PIC-LOADER Commands

Note that the data eeprom referenced in commands 'W' and 'R' is not the same as the code eeprom space.

5. The following sequence pertains to Uploading a Program to the '877 eeprom, using the U command.

6. To simply Erase the program stored in the '877 eeprom without writing a new program, press the "Return" key alone after the U-command "Ready" prompt appears.

7. Use the D-command to Dump the current program image to the terminal in INHX8M format. Storing a downloaded image is essentially the reverse of uploading an image. This allows you to verify a code upload and retrieve data stored in user program space. Data EEPROM memory is also included in the dumped image.


The following ZIP file can be downloaded, and contains source and .HEX files for the Rick Farmer PICLoader ver 1.5. The .HEX files can be programmed into an erased PIC 16F876 or 16F877, 20-Mhz chip.

Note - when programming, do not use code protection. These files do not work with 16F876A or 16F877A version "A" chips.

  • download: PICLDR15.ZIP (20 Kbytes, 01.2005).

    <| Bootloader Modifications

    We have made several minor modifications to the original Rick Farmer PICLoader, in order to make it easier to use with the BOT40 boards.

    • the default mode is now for operation with a 20 Mhz crystal, and 9600 baud serial port.
    • the watchdog timer has been disabled.
    • cpu pin RB6 no longer has to be held low in order to access the bootloader.
    • as before, once a user program has been loaded, access to the bootloader is done by sending capital 'Z' over the RS-232 port. In the modified software, this must be done within 3 sec of power-up.
    • the splash screen wording is slightly different.
    • the modified bootloader is labelled as OTFLoader v 2.x to distinquish it from the original.

    Uploading Program Code. As described above, program files of .HEX format are generated using the Microchip assembler, and uploaded to the bootloader internal code eeprom using ASCII file transfer mode on a terminal emulator program. First, the bootloader "U" command is used to erase the code space, and the file then transferred at 9600 bps using 8N1 protocol. Remember that line pacing/delay must be set to 100-msec or greater in the temrinal software to give the bootloader time to write each line to the eeprom. To erase a stored program, use the bootloader "U" command without a file transfer.

    The following shows a sample
    bootloader session:
    8K OTFLoader v2.0
    user code version = none
    ? - Help
    Q - Quit to user code
    U - Upload user code
    D - Download user code + data eeprom to PC
    W - Write data eeprom, "W DD @ AA"
    R - Read data eeprom, "R AA"
    V - user code version
    PIC>u
    Are you sure? [y/N]>y
    Erasing........................
    Ready.
    [... file xfer initiated here via the terminal emulator ...]
    Upload ok
    Enter user code version>myprog01
    user code version = myprog01
    PIC>v
    user code version = myprog01
    PIC>q
    Jumping to user code

    <| TOP


    © Oricom Technologies, updated Jan 2005