labs.beatcraft.com
BC-USB-Kit

BC-USB-Kit get started

This article provides the step-by-step explanations for how to build a firmware form its source code, then how to write the firmware into PIC of BC-USB-Kit.
When you write your firmware into your BC-USB-Kit, please apply this method.

Requirements

To complete the build and writing processes, the hardware and applications are required.

Build the Firmware

  1. Expand the downloaded source code of the firmware, “USB Device - CDC - Sensor.zip.” 003_firmware.png

  2. Start up X IDE.
    004_X_IDE_launch.png 005_X_IDE.png

  3. From the menu of MPLAB X IDE, select File →Open Project...
    006_X_IDE_open.png

    Open Up “USB Device - CDC – Sensor.X,” which is located at the directory of “USB Device -CDC- Sensor\src\aps\usb\device\cdc_i2c\firmware\.”
    007_X_IDE_open.png 008_X_IDE_open.png 009_X_IDE_open.png

  4. Once open up the project you will use, close Start Page of MPLAB X IDE.
    010_X_IDE.png 011_X_IDE.png

    From the menu of MPLAB X IDE, choose Run →Set Project Configuration → Customize.
    012_X_IDE_conf.png

    As the Project Properties Window opens, configure Hardware Tool and Compiler Toolchain for the project. In this project, PICkit 3 is selected for Hardware Tool, and XC16 (v.1.24) is chosen for Compiler Toolchain.
    013_X_IDE_pp.png 014_X_IDE_pp.png

  5. Once these configurations of Hardware Tool and Compiler Toolchain are completed, select the configuration of Power for PICkit 3. Then, check the box of “Power target circuit form PICkit 3.” This is the end of preparations for building the firmware.
    015_X_IDE.png 016_X_IDE.png 017_X_IDE.png

  6. Once the preparations are completed, to click the icon of Build Project (look at the red circle in the picture) on the window menu of MPLAB X IDE, execute the build process.
    018_X_IDE_build.png

    As the execution log shows up in the tab of USB Device - CDC - Sensor on Output pane, the build process of the firmware is completed.
    019_X_IDE_build.png

    The name of the built firmware is “USB_Device_-_CDC_-_Sensor.X.production.hex, which is located at the directory of “USB Device - CDC - Sensor\src\apps\usb\device\cdc_i2c\firmware\USB Device - CDC – Sensor.X\dist\bc_usbkit_pic24f\production.”

Writing the firmware onto PIC

  1. The build process of the firmware is completed, click the icon of Run project (See the red circle in the picture) on the window menu of MPLAB X IDE.
    020_X_IDE_rp.png

    The firmware is written into BC-USB-Kit by PICkit 3.
    While PICkit 3 writes the firmware into PIC, the color of its status LED changes from green to red. As the writing process is completed without any issues, the color of status LED goes back from red to green.
    The status of the writing process is appeared in the PICkit tab on Output pane of the MPLAB X IDE main window.
    021_X_IDE_rp.png

    Programming...
    Programming/Verify complete
    When the status shown above appears in the tab, the writing process is successfully finished.

    If you click the icon of Make and Program Device (See the red circle in the picture) on the window menu of MPLAB X IDE, both the build process and the writing process can be completed at once.
    022_X_IDE_mp.png

Conforming operation of the firmware

  1. As BC-USB-Kit, which is the firmware is already written, is connected to a USB port of a PC, driver is installed into the PC, and BC-USB-Kit is recognized as a USB serial port (COM *).
    023_driver.png 024_driver.png

  2. To open up the recognized COM port by TeraTerm at Baud rate of 9600, the output numbers are displayed.
    025_teraterm.png 026_teraterm.png

    The contents of outputs are the read values of the humidity and temperature sensor. These are repeated results of “Temperature x 10: Humidity x 10.”

Revision History


Front page   New List of pages Search Recent changes   RSS of recent changes