How To: D-Bug12 Restoration

Color:

Main
Projects
How To Guides
Friend Websites
Other Websites

My Dugg Stories: Temporarily disabled.

You may download a compression of the files needed here. A copy of this guide is available in document format here. A full folder of files, including this guide in "doc" file,can be downloaded here. Compressed files are compressed with Winrar.

This guide is to show the various methods of restoring D-Bug12 onto the HC12 evaluation board.

NOTE: At the time of this document, I did not know of a way to use the USB BDM to flash the D-Bug12.  If you have figured out a way to do this, feel free to write down the process and see Dan about incorporating it into this document.

Requirements
A BDM (secondary microcontroller or standalone BDM)
A serial connection (on computer or via USB to Serial adapter)
An IDE for flashing the file to the microcontroller (such as AxIDE)
The D-Bug12 and bootloader s19 files
6-pin ribbon cable

Before you begin familiarize yourself with some key areas:
Voltage regulater, phone jack, and power connector:

Connectivity
BDMin and BDMout pins:
These are located between the phone jack and the power supply connector.  Pin 1 is on the left.  All red stripes on ribbons must be on the pin1 side.
BDM In/Out
EVB and POD mode jumpers/switch:
These are located right above the 7 segment LED.
(Old boards)
The EVB mode is the regular mode where you use D-Bug12.  POD mode is to use the HC12 as a BDM.  The top jumper shown in the picture below is used to select the mode.  Set the jumper accord to the mode you need.
Mode Jumpers
(New Boards)
Mode Switch

Setting Up a Target and POD HC12 Instructions

  • A target HC12 is the HC12 you wish to flash the D-Bug12 to.
  • To flash a HC12, you need a BDM or a secondary HC12 in POD mode to act as DBM.
  • If you have a regular DragonBDM simply connect the phone wire into the BDM and the ribbon cable from the BDM to the “BDMin” pins on the target HC12.
    • Make sure the red stripe on the ribbon cable is on the pin1 side.

BDM

  • If you don’t have a BDM then you will need a second HC12 that had the D-Bug12 on it.
    • Set the second HC12 to POD mode.
    • Connect ribbon cable to the BDMout of the POD HC12.
    • Connect the other end of the ribbon cable to the BDMin of the target HC12.
    • Plug the phone wire into the POD HC12.
    • Power the POD HC12 or both HC12s.

Set Up

    • You are now ready to move on to the next section.

Flashing Program Instructions

  • If you see an “R>” after powering the HC12, this means the target HC12 is in control.

Prompt Reset

    • Use “reset” command or reset the POD mode HC12 manually to proceed.
    • You should now see the “S>”
  • If you see “Can’t Communicate With Target CPU”:
  • Press Enter if target speed is already 16000 KHz.
  • Prompt Frequency
    • Otherwise select “1.) Set Target Speed (4800 KHz)”.

Prompt Frequency

      • Type 16000 and hit Enter.

Prompt Frequency

    • You should now see the “S>”

 

  • Once you see the “S>”,

Prompt F Commands

  • Use the “fbulk” command to erase the target flash memory.
    • Type “fbulk” and hit Enter.
  • Then use the “fload” command to load the bootloader file.
    • Type “fload” and hit Enter.

File Bootloader Load

    • Click on “Load” button on the IDE.
    • Click on “Browse” button and select the “MiniDRAGON_boot_16.s19” file.
    • Click “Open”
    • Click “Ok”
    • The bootloader will now flash into memory.
    • DO NOT type on your keyboard until the transfer window has disappeared.  It will count to around 70.

Count

  • After the transfer window disappears, reset the POD microcontroller manually.
  • At the “S>”, use “fload” command once again to load the D-Bug12 this time.
    • Type “fload” and hit Enter.

File Dbug12 Load

    • Click on “Load” button on the IDE.
    • Click on “Browse” button and select the “db12DP256-16_b29.S19” file.
    • Click “Open”
    • Click “Ok”
    • The D-Bug12 version 29 will now flash into memory.
    • DO NOT type on your keyboard until the transfer window has disappeared.  It will count to around 2000.
    • Wait for the transfer window to disappear.  (You may take a break now.  The process lasts almost 2 minute.)
    • After the transfer window disappears:
      • Disconnect all power.

WARNING:  If using 2 HC12s with only one power supply, the voltage regulator on the powered HC12 may become hot.

      • Disconnect ribbon cable.
      • Replace jumpers back to original position.
      • You are now finished!

This website was developed by Elmar Palma. Last updated: 08/28/07.