Introduction

External Memory Programmer
Contents | Index
Next
Introduction

The External Memory Programmer is a multi-platform utility used to transfer HEX file information to a device. The device will load the transferred information into a memory device. While the memory device is usually an external memory device, like SPI NOR flash, it can be the internal memory of the device. The External Memory Programmer can use two communication mediums to transfer data, serial or USB.

The utility uses a binary communication protocol which allows the device to dictate the maximum payload size up to 65,000 bytes. This allows an independency between devices that have limited resources and the utility.

While this utility was designed for uploading HEX files from the Graphics Resource Converter utility, it will upload any HEX file in Intel 380 format.

Introduction
Microchip My Application xx.yy - [Jan 1, 2009]
Copyright © 2009 Microchip Technology, Inc. All rights reserved.


SW License Agreement

Contents | Index | Home
Previous | Next
SW License Agreement

MICROCHIP IS WILLING TO LICENSE THE ACCOMPANYING SOFTWARE AND DOCUMENTATION TO YOU ONLY ON THE CONDITION THAT YOU ACCEPT ALL OF THE FOLLOWING TERMS. TO ACCEPT THE TERMS OF THIS LICENSE, CLICK "I ACCEPT" AND PROCEED WITH THE DOWNLOAD OR INSTALL. IF YOU DO NOT ACCEPT THESE LICENSE TERMS, CLICK "I DO NOT ACCEPT," AND DO NOT DOWNLOAD OR INSTALL THIS SOFTWARE. BY DOWNLOADING AND INSTALLING THE SOFTWARE, LICENSEE AGREES TO BE BOUND BY THE TERMS OF THIS AGREEMENT.

NON-EXCLUSIVE SOFTWARE LICENSE AGREEMENT FOR ACCOMPANYING MICROCHIP SOFTWARE AND DOCUMENTATION

This Nonexclusive Software License Agreement ("Agreement") is a contract between you, your heirs, successors and assigns ("Licensee") and Microchip Technology Incorporated, a Delaware corporation, with a principal place of business at 2355 W. Chandler Blvd., Chandler, AZ 85224-6199, and its subsidiary, Microchip Technology (Barbados) II Incorporated (collectively, "Microchip") for the accompanying Microchip software including, but not limited to, Graphics Library Software, IrDA Stack Software, MCHPFSUSB Stack Software, Memory Disk Drive File System Software, mTouch(TM) Capacitive Library Software, Smart Card Library Software, TCP/IP Stack Software, MiWi(TM) DE Software, and/or any PC programs and any updates thereto (collectively, the "Software"), and accompanying documentation, including images and any other graphic resources provided by Microchip ("Documentation").

The Software and Documentation are licensed under this Agreement and not sold. U.S. copyright laws, international copyright treaties, and other intellectual property laws and treaties protect the Software and Documentation. Microchip reserves all rights not expressly granted to Licensee in this Agreement.

(1) Definitions. As used in this Agreement, the following capitalized terms will have the meanings defined below:

a. "Microchip Products" means Microchip microcontrollers and Microchip digital signal controllers.

b. "Licensee Products" means Licensee products that use or incorporate Microchip Products.

c. "Object Code" means the Software computer programming code that is in binary form (including related documentation, if any), and error corrections, improvements, modifications, and updates.

d. "Source Code" means the Software computer programming code that may be printed out or displayed in human readable form (including related programmer comments and documentation, if any), and error corrections, improvements, modifications, and updates.

e. "Third Party" means Licensee’s agents, representatives, consultants, clients, customers, or contract manufacturers.

f. "Third Party Products" means Third Party products that use or incorporate Microchip Products.

(2) Software License Grant. Microchip grants strictly to Licensee a non-exclusive, non-transferable, worldwide license to:

a. use the Software in connection with Licensee Products and/or Third Party Products;

b. if Source Code is provided, modify the Software, provided that no Open Source Components (defined in Section 5 below) are incorporated into such Software in such a way that would affect Microchip’s right to distribute the Software with the limitations set forth herein and provided that Licensee clearly notifies Third Parties regarding such modifications;

c. distribute the Software to Third Parties for use in Third Party Products, so long as such Third Party agrees to be bound by this Agreement (in writing or by "click to accept") and this Agreement accompanies such distribution;

d. sublicense to a Third Party to use the Software, so long as such Third Party agrees to be bound by this Agreement (in writing or by "click to accept");

e. with respect to the TCP/IP Stack Software, Licensee may port the ENC28J60.c, ENC28J60.h, ENCX24J600.c, and ENCX24J600.h driver source files to a non-Microchip Product used in conjunction with a Microchip ethernet controller;

f. with respect to the MiWi (TM) DE Software, Licensee may only exercise its rights when the Software is embedded on a Microchip Product and used with a Microchip radio frequency transceiver or UBEC UZ2400 radio frequency transceiver which are integrated into Licensee Products or Third Party Products.

For purposes of clarity, Licensee may NOT embed the Software on a non-Microchip Product, except as described in this Section.

(3) Documentation License Grant. Microchip grants strictly to Licensee a non-exclusive, non-transferable, worldwide license to use the Documentation in support of Licensee's authorized use of the Software

(4) Third Party Requirements. Licensee acknowledges that it is Licensee’s responsibility to comply with any third party license terms or requirements applicable to the use of such third party software, specifications, systems, or tools. Microchip is not responsible and will not be held responsible in any manner for Licensee’s failure to comply with such applicable terms or requirements.

(5) Open Source Components. Notwithstanding the license grant in Section 1 above, Licensee further acknowledges that certain components of the Software may be covered by so-called "open source" software licenses ("Open Source Components"). Open Source Components means any software licenses approved as open source licenses by the Open Source Initiative or any substantially similar licenses, including without limitation any license that, as a condition of distribution of the software licensed under such license, requires that the distributor make the software available in source code format. To the extent required by the licenses covering Open Source Components, the terms of such license will apply in lieu of the terms of this Agreement, and Microchip hereby represents and warrants that the licenses granted to such Open Source Components will be no less broad than the license granted in Section 1. To the extent the terms of the licenses applicable to Open Source Components prohibit any of the restrictions in this Agreement with respect to such Open Source Components, such restrictions will not apply to such Open Source Component.

(6) Licensee Obligations.

a. Licensee will ensure Third Party compliance with the terms of this Agreement, and will be liable for any breach of this Agreement committed by such Third Party.

b. Licensee will not: (i) engage in unauthorized use, modification, disclosure or distribution of Software or Documentation, or its derivatives; (ii) use all or any portion of the Software, Documentation, or its derivatives except in conjunction with Microchip Products or Third Party Products; or (iii) reverse engineer (by disassembly, decompilation or otherwise) Software or any portion thereof.

c. Licensee may not remove or alter any Microchip copyright or other proprietary rights notice posted in any portion of the Software or Documentation.

d. Licensee will defend, indemnify and hold Microchip and its subsidiaries harmless from and against any and all claims, costs, damages, expenses (including reasonable attorney's fees), liabilities, and losses, including without limitation product liability claims, directly or indirectly arising from or related to: (i) the use, modification, disclosure or distribution of the Software, Documentation, or any intellectual property rights related thereto; (ii) the use, sale and distribution of Licensee Products or Third Party Products; and (iii) breach of this Agreement. THIS SECTION 3(d) STATES THE SOLE AND EXCLUSIVE LIABILITY OF THE PARTIES FOR INTELLECTUAL PROPERTY INFRINGEMENT.

(7) Confidentiality. Licensee agrees that the Software (including but not limited to the Source Code, Object Code and library files) and its derivatives, Documentation and underlying inventions, algorithms, know-how and ideas relating to the Software and the Documentation are proprietary information belonging to Microchip and its licensors ("Proprietary Information"). Except as expressly and unambiguously allowed herein, Licensee will hold in confidence and not use or disclose any Proprietary Information and will similarly bind its employees and Third Party(ies) in writing. Proprietary Information will not include information that: (i) is in or enters the public domain without breach of this Agreement and through no fault of the receiving party; (ii) the receiving party was legally in possession of prior to receiving it; (iii) the receiving party can demonstrate was developed by the receiving party independently and without use of or reference to the disclosing party's Proprietary Information; or (iv) the receiving party receives from a third party without restriction on disclosure. If Licensee is required to disclose Proprietary Information by law, court order, or government agency, License will give Microchip prompt notice of such requirement in order to allow Microchip to object or limit such disclosure. Licensee agrees that the provisions of this Agreement regarding unauthorized use and nondisclosure of the Software, Documentation and related Proprietary Rights are necessary to protect the legitimate business interests of Microchip and its licensors and that monetary damage alone cannot adequately compensate Microchip or its licensors if such provisions are violated. Licensee, therefore, agrees that if Microchip alleges that Licensee or Third Party has breached or violated such provision then Microchip will have the right to petition for injunctive relief, without the requirement for the posting of a bond, in addition to all other remedies at law or in equity.

(8) Ownership of Proprietary Rights. Microchip and its licensors retain all right, title and interest in and to the Software and Documentation ("Proprietary Rights") including, but not limited to all patent, copyright, trade secret and other intellectual property rights in the Software, Documentation, and underlying technology and all copies and derivative works thereof (by whomever produced). Further, copies and derivative works will be considered works made for hire with ownership vesting in Microchip on creation. To the extent such modifications and derivatives do not qualify as a "work for hire," Licensee hereby irrevocably transfers, assigns and conveys the exclusive copyright thereof to Microchip, free and clear of any and all liens, claims or other encumbrances, to the fullest extent permitted by law. Licensee and Third Party use of such modifications and derivatives is limited to the license rights described in Sections this Agreement.

(9) Termination of Agreement. Without prejudice to any other rights, this Agreement terminates immediately, without notice by Microchip, upon a failure by Licensee or Third Party to comply with any provision of this Agreement. Upon termination, Licensee and Third Party will immediately stop using the Software, Documentation, and derivatives thereof, and immediately destroy all such copies.

(10) Warranty Disclaimers. THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. MICROCHIP AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR THE ACCURACY, RELIABILITY OR APPLICATION OF THE SOFTWARE OR DOCUMENTATION. MICROCHIP AND ITS LICENSORS DO NOT WARRANT THAT THE SOFTWARE WILL MEET REQUIREMENTS OF LICENSEE OR THIRD PARTY, BE UNINTERRUPTED OR ERROR-FREE. MICROCHIP AND ITS LICENSORS HAVE NO OBLIGATION TO CORRECT ANY DEFECTS IN THE SOFTWARE. LICENSEE AND THIRD PARTY ASSUME THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE AND DOCUMENTATION PROVIDED UNDER THIS AGREEMENT.

(11) Limited Liability. IN NO EVENT WILL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL OR EQUITABLE THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS. The aggregate and cumulative liability of Microchip and its licensors for damages hereunder will in no event exceed $1000 or the amount Licensee paid Microchip for the Software and Documentation, whichever is greater. Licensee acknowledges that the foregoing limitations are reasonable and an essential part of this Agreement.

LICENSEE ACKNOWLEDGES AND AGREES THAT IT IS SOLELY RESPONSIBLE FOR THE LICENSEE PRODUCTS AND THIRD PARTY PRODUCTS, INCLUDING DETERMINING WHETHER SUCH PRODUCTS INFRINGE A PATENT, COPYRIGHT OR OTHER PROPRIETARY RIGHT OF ANY THIRD PARTY. LICENSEE AGREES THAT MICROCHIP HAS NO OBLIGATION TO INDEMNIFY OR DEFEND LICENSEE IN THE EVENT THAT A THIRD PARTY MAKES A CLAIM REGARDING LICENSEE PRODUCTS OR THIRD PARTY PRODUCTS.

(12) General. THIS AGREEMENT WILL BE GOVERNED BY AND CONSTRUED UNDER THE LAWS OF THE STATE OF ARIZONA AND THE UNITED STATES WITHOUT REGARD TO CONFLICTS OF LAWS PROVISIONS. Licensee agrees that any disputes arising out of or related to this Agreement, Software or Documentation will be brought in the courts of the State of Arizona. The parties agree to waive their rights to a jury trial in actions relating to this Agreement. If either the Microchip or Licensee employs attorneys to enforce any rights arising out of or relating to this Agreement, the prevailing party will be entitled to recover its reasonable attorneys' fees, costs and other expenses. This Agreement will constitute the entire agreement between the parties with respect to the subject matter hereof. It will not be modified except by a written agreement signed by an authorized representative of the Microchip. Microchip’s authorized representatives will have the right to reasonably inspect Licensee's premises and to audit Licensee's records and inventory of Licensee Products in order to ensure Licensee's adherence to the terms of this Agreement. If any provision of this Agreement will be held by a court of competent jurisdiction to be illegal, invalid or unenforceable, that provision will be limited or eliminated to the minimum extent necessary so that this Agreement will otherwise remain in full force and effect and enforceable. No waiver of any breach of any provision of this Agreement will constitute a waiver of any prior, concurrent or subsequent breach of the same or any other provisions hereof, and no waiver will be effective unless made in writing and signed by an authorized representative of the waiving party. Licensee agrees to comply with all export laws and restrictions and regulations of the Department of Commerce or other United States or foreign agency or authority. The indemnities, obligations of confidentiality, and limitations on liability described herein, and any right of action for breach of this Agreement prior to termination, will survive any termination of this Agreement. Neither this Agreement nor any rights, licenses or obligations hereunder, may be assigned by Licensee without the prior written approval of Microchip except pursuant to a merger, sale of all assets of Licensee or other corporate reorganization, provided that assignee agrees in writing to be bound by the Agreement. Any prohibited assignment will be null and void. Use, duplication or disclosure by the United States Government is subject to restrictions set forth in subparagraphs (a) through (d) of the Commercial Computer-Restricted Rights clause of FAR 52.227-19 when applicable, or in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013, and in similar clauses in the NASA FAR Supplement. Contractor/manufacturer is Microchip Technology Inc., 2355 W. Chandler Blvd., Chandler, AZ 85224-6199.

If Licensee has any questions about this Agreement, please write to Microchip Technology Inc., 2355 W. Chandler Blvd., Chandler, AZ 85224-6199 USA. ATTN: Marketing.

Copyright (c) 2011 Microchip Technology Inc. All rights reserved.

License Rev. No. 03-060111

SW License Agreement


Release Notes

Contents | Index | Home
Previous | Next
Release Notes
Microchip External Memory Programmer

This application is based on the JAVA programming language. To effectively run this program, the computer must have JRE6 installed.

Version 1.00.01

Bug Fixes

  1. USB Drivers
    1. Placed the USB drivers needed for the application under the <install directory>/Microchip/Utilities/USB Drivers/MPLABComm
    2. Using version 2 of the WindowUSB drivers.
  2. USB INF file
    1. Placed the USB drivers needed for the application under the <install directory>/Microchip/Utilities/USB Drivers/MPLABComm/Windows
    2. The INF file name has been changed to MPLABCommWinUSB.inf
  3. Serial Libraries
    1. The serial libraries have been placed in their own directory <install directory>/microchip/graphics/bin/memory_programmer/Serial Drivers
    2. The correct serial driver will be copied into the same directory as the memory_programmer JAR file
      1. It is important that the serial driver directory be in the same directory as the memory_programmer JAR file.
    3. Support for 64-bit Windows 7

Version 1.00

Initial JAVA version

Features

  1. Multi-communication support
    1. USB - uses the same drivers as MPLAB X
    2. Serial - uses the rxtx JAVA serial libraries (rxtx.org)
  2. Binary file transfer - The HEX file is converted into binary packets
  3. Communication protocol - header with checksum and ACK/NACK response
  4. File upload verification
  5. Drag and drop of the HEX file
  6. Progress bar with status

Limitations

  1. Using serial communication on the Mac OS X may be slower than running on a Windows machine. It is recommended that USB communication medium be used.
Release Notes


User Interface

Contents | Index | Home
Previous | Next
User Interface

Topics
Name | Description
Menu Bar | The menu bar can be used to load HEX files, exit the programmer, or launch the about window.
Tool Bar | The tool bar button are used to load a Hex file, configure the communication medium and upload the HEX file.
HEX File | The uploading HEX file edit box indicates the name of the HEX file to upload. Hovering over the file edit box will display the absolute path of the HEX file, provided one is loaded.
Upload Status and Progress | When uploading a HEX file, the current status will be display along with a progress bar. This can be used to indicate the amount of data that has been transferred.
Communication Medium Information | The communication medium information displays the type of medium used, serial or USB and other details that relate to the medium being used. For serial communication, the communication port (COMM) will be displayed and the baud rate, data bits, parity and stop bits. For USB communication, the devices manufacturer and product strings are displayed.
User Interface


Menu Bar

Contents | Index | Home
Previous | Up | Next
Menu Bar

The menu bar can be used to load HEX files, exit the programmer, or launch the about window.

File

Browse - Loads a HEX file to be uploaded to a device.

Exit - Quits the application.

Help

About... - Opens the About window.

User Interface > Menu Bar


Tool Bar

Contents | Index | Home
Previous | Up | Next
Tool Bar

The tool bar button are used to load a Hex file, configure the communication medium and upload the HEX file.

Browse

Opens a file dialog box, which allows the user to choose a HEX file to be uploaded.

Communication Settings

Opens a dialog box, which allows the user to select the type of communication, serial or USB, and specific communication settings.

Serial Communication - Uses RS-232 communication.

Serial Port - The serial port number (COM<x>) that will be used to communicate to the device.

Baud Rate - The baud rate used to communication to the device.

Parity - The parity used.

Stop Bits - The length of the stop bits used.

NOTE: The serial settings must be the same settings as the device.

USB

List Box - If there are any USB devices which match the product and vender ID associated with the External Memory Programmer, a list of the serial numbers will be present. The user must select the serial number of the device to communicate to.

NOTE: The device should have a serial number and the correct product and vendor ID. Please refer to the External Memory demo in the MAL for the correct information.

Upload

Uploads the HEX file to the device. The button is only enabled after a HEX file and communication settings have been configured.

User Interface > Tool Bar


HEX File

Contents | Index | Home
Previous | Up | Next
HEX File

The uploading HEX file edit box indicates the name of the HEX file to upload. Hovering over the file edit box will display the absolute path of the HEX file, provided one is loaded.

HEX File Box

This displays the current HEX file name. By hovering over the file name, the absolute file path will be displayed. The file box also serves as a drag and drop location for HEX files.

User Interface > HEX File


Upload Status and Progress

Contents | Index | Home
Previous | Up | Next
Upload Status and Progress

When uploading a HEX file, the current status will be display along with a progress bar. This can be used to indicate the amount of data that has been transferred.

Upload Status

The upload status displays the current status of the communication to the device. Some of the messages that are displayed are:

  • Binary Upload: Sending ECHO
  • Binary Upload: Getting Max packet Size
  • Binary Upload: Erasing Memory
  • Binary Upload: Programming.....<x> of <y>
  • Binary Upload: Verifying...<x> of <y>

Where <x> is the current packet and <y> is the total number of packets to be sent

Upload Progress

The upload progress is a graphical status of the communication when programming or verifying the device.

User Interface > Upload Status and Progress


Communication Medium Information

Contents | Index | Home
Previous | Up | Next
Communication Medium Information

The communication medium information displays the type of medium used, serial or USB and other details that relate to the medium being used. For serial communication, the communication port (COMM) will be displayed and the baud rate, data bits, parity and stop bits. For USB communication, the devices manufacturer and product strings are displayed.

Communication Medium

The type of medium used for communication, either serial or USB.

Communication Interface

For serial communication, the serial port (COMM<x>) will be displayed.

For USB communication "Device" will be displayed.

Communication Settings/Information

For serial communication, the baud rate, data bits, parity and the stop bits will be displayed.

For USB communication, the product string will be displayed.

User Interface > Communication Medium Information


Using the Utility

Contents | Index | Home
Previous | Next
Using the Utility
Topics
Name | Description
Loading a HEX file | Loading a HEX file to upload to a device can be done two ways, through a file dialog box or dragging and dropping it.
Setting the Communication Parameters | Setting the communication medium and parameters can be done with the Options dialog box. The dialog handles setting the serial and USB communication parameters.
Uploading a HEX file | After selecting the HEX file to upload and configuring the communication method, the programmer will enable uploading to a device.
Using the Utility


Loading a HEX file

Contents | Index | Home
Previous | Up | Next
Loading a HEX file

Loading a HEX file to upload to a device can be done two ways, through a file dialog box or dragging and dropping it.

Loading a HEX file from a File Dialog Box

Follow these steps to load a HEX file from a file dialog box

  1. Launch a file dialog by either choosing the Browse menu option or tool bar button.

  2. Use the file dialog box to navigate to the HEX file directory

  3. Select the HEX file to load

  4. The HEX file name will appear in the HEX File to Upload box, hovering over the box will show the absolute path.

Loading a HEX File by drag and drop

Follow these steps to load a HEX file by drag and drop

  1. Navigate to the directory or location of the HEX file.

  2. Drag the file, by using the drag feature, to the HEX File to Upload box and drop it.

  3. The HEX file name will appear in the HEX File to Upload box, hovering over the box will show the absolute path.

Using the Utility > Loading a HEX file


Setting the Communication Parameters

Contents | Index | Home
Previous | Up | Next
Setting the Communication Parameters

Setting the communication medium and parameters can be done with the Options dialog box. The dialog handles setting the serial and USB communication parameters.

Serial Communication Settings

Follow these steps to configure the serial communication parameters

  1. Select the serial port. The drop down combo box will be populated with all of the serial ports that are available.
  2. Select the baud rate.*
  3. Select the parity.*
  4. Select the stop bits.
  5. Check the "Use Serial Communications"

* It is important that the device has the same settings for proper communication.

USB Communication Settings

Follow these steps to configure the UAB communication parameters

  1. Plug in the USB device into the host PC running the External Memory Programmer.
    1. The host PC may require a driver and *.inf file to be associated with the USB device. Please refer the the USB driver section for more information.
  2. Under the USB tab on the Options dialog, there will be a list box that is populated with the USB serial numbers of all valid USB devices.
  3. Select the serial number corresponding to the USB device to upload.

After the communication method has been configured, the information will be displayed on the main panel.

Using the Utility > Setting the Communication Parameters


Uploading a HEX file

Contents | Index | Home
Previous | Up | Next
Uploading a HEX file

After selecting the HEX file to upload and configuring the communication method, the programmer will enable uploading to a device.

Uploading a HEX file to a device

Follow these steps to upload a HEX file to a device

  1. Make sure that the device is properly connected to the host.
  2. Select a HEX file and configure the communication method
  3. The upload button will be enabled.
  4. Press the upload button

  5. The upload status and progress bar will display the current progress of the upload

  6. A message box will appear at the end of a successful upload indicating the time to upload.
Using the Utility > Uploading a HEX file


Binary Communication Protocol

Contents | Index | Home
Previous | Next
Binary Communication Protocol

The External Memory Programmer uses an ACK/NACK communication method to transfer the data contained in the HEX file to the device. All packets from the host to device must be ACK/NACKed, but do not require a payload.

The following is a description of the communication method with uploading a HEX file.

  1. An echo packet is sent. This packet has no payload and is used to establish communication between the host and device.
  2. A packet requesting the maximum packet size is sent. This is used by the host to ensure that the packet length is never larger than the device's resources. Devices are able to dictate the resource requirements for the packet.
  3. A packet requesting that the memory be erased. The device will need to make sure that the memory is in the proper state to write data.
  4. The memory write packets are sent. The amount of packets required depend on the HEX file and the maximum packet size.
  5. The verify memory packets are sent. The device will perform a checksum over a memory region.
  6. The done packet will be sent. The device is notified that all memory uploading and verifying are complete.
Topics
Name
Description
Binary Packet
The binary packets used in the External Memory consist of a header followed by a payload. The payload size can range from 0 to 65,000 bytes. The payload size is determined by the device.

Binary Commands
The binary packets use commands to instruct the device what actions are required.

The following commands are supported by the External Memory Programmer

  • ECHO - A zero payload command. Used to establish communication with a device.
  • MEMORY ERASE - requesting that the memory be prepared to be written to.
  • MEMORY WRITE - write the data in the payload to a memory section
  • MAX PAYLOAD SIZE - requesting the maximum payload size accepted by the device
  • MEMORY VERIFY - requesting a checksum over a memory range
  • DONE - all memory programming and verifying are done

Binary Communication Protocol


Binary Packet

Contents | Index | Home
Previous | Up | Next
Binary Packet

The binary packets used in the External Memory consist of a header followed by a payload. The payload size can range from 0 to 65,000 bytes. The payload size is determined by the device.

Packet Header

The packet header is four bytes in length.

ACK/NACK - This bit is a response to a command and the reply bit must be set.

Reply - This bit is set when a response to a command is processed. Every command packet must have a reply

Command - The command of the packet. All reply packets will reply with the same command.

Checksum - The checksum of the entire packet. If the calculated checksum does not match the header's checksum, the packet must be NACKed.

Length - The length of the payload, ranging from 0 - 65,000.

Packet Payload

The packet payload is variable length. The length member of the header will indicate the size of the payload in bytes.

Binary Communication Protocol > Binary Packet


Binary Commands

Contents | Index | Home
Previous | Up | Next
Binary Commands

The binary packets use commands to instruct the device what actions are required.

The following commands are supported by the External Memory Programmer

  • ECHO - A zero payload command. Used to establish communication with a device.
  • MEMORY ERASE - requesting that the memory be prepared to be written to.
  • MEMORY WRITE - write the data in the payload to a memory section
  • MAX PAYLOAD SIZE - requesting the maximum payload size accepted by the device
  • MEMORY VERIFY - requesting a checksum over a memory range
  • DONE - all memory programming and verifying are done
Binary Communication Protocol > Binary Commands


USB Drivers

Contents | Index | Home
Previous | Next
USB Drivers

The External Memory Programmer provides two communication mediums to upload HEX files, serial and USB. The MAL provides the serial communication drivers needed for Windows and MAC operating systems.

The following drivers and files are needed to run use the USB medium.

  • The inf file, MPLABCommWinUSB.inf, is provided by the <install directory>/Microchip/Utilities/USB Drivers/MPLABComm/Windows directory.
  • The USB drivers are located in the <install directory>/Microchip/Utilities/USB Drivers/MPLABComm/ directory.
USB Drivers


Trouble Shooting

Contents | Index | Home
Previous | Next
Trouble Shooting

The following topics may be helpful when debugging the External Memory Programmer.

Why doesn't the External Memory Programmer run when a double click on the memory_programmer.jar?
  1. Make sure that you have JRE 6 or higher installed on the host machine.
  2. Make sure that the JRE is associated with the jar extension.

Why can't I find the available serial port I need?

Make sure that you have the serial port available before selecting the communication settings. For example, if using a USB to serial connector, make sure it is plugged in and enumerated by the host before selecting the communication settings.

Why doesn't the HEX file load with a select upload with serial communication?
  1. Make sure that the settings of the External Memory Programmer match the settings of the device.
  2. Make sure that the serial cable is correctly connected.

When running on a MAC, why do I see a "Port in Use Error" error?

When running the application on a MAC, the serial libraries need to have permission to lock the serial port. Without this permission, the library assumes that the serial port is in use by another application. If you are not certain that the serial library has lock permission, see the MAC: Lock File Permission section for details on how to accomplish this.

Why can't I choose a serial port?

If the application's serial port selection window is disabled, the serial libraries where unable to be loaded.

  • Make sure that the memory_programmer.jar is located at the same directory level as the Serial Drivers directory.
  • Linux operating systems are not supported at this time.

Why can't the USB device be selected?
  1. Make sure that the device is enumerated. See USB Drivers for more information.
  2. Make sure that the device has the proper USB product and vender ID. See the USB descriptor of a MAL graphics demo External Memory for an example of the proper product and vender ID.
  3. Make sure that you have USB serial number. If using multiple devices, use a unique USB serial number for each device.

What if I lose communication with my target device?

If communication is lost, there is a timeout of 1.5 seconds along with a retry counter of 3. The communication status will show the retry count.

Trouble Shooting


MAC: Lock File Permission

Contents | Index | Home
Previous
MAC: Lock File Permission

When using serial port communication on a MAC OS, the serial library used by the memory_programmer needs to be able to lock the serial port. By locking the serial port, no other application will be able to access the serial port while the memory_programmer is using it. For the reason, the memory_programmer must has permission by the MAC operating system to be able to lock files.

Here are the following steps that can be preformed in the command line interface to grant lock permission to memory programmer.

  1. Make /var/spool/uucp and /var/lock directories if they do not exist.
Copy Code
    sudo mkdir /var/spool/uucp
    sudo mckdir /var/lock

  2. Change the permission and group of the made directories
Copy Code
    sudo chmod 775 /var/spool/uucp
    sudo chmod 775 /var/lock
    sudo chgrp uucp /var/spool/uucp
    sudo chgrp uucp /var/lock

  3. Confirm the permission and group of the made directories. The output is shown if operation is correct.
Copy Code
    ls -l /var/spool/ | grep uucp
    >drwxrwxr-x 2_uucp_uucp 68 5 19 03:15 uucp

    ls - /var/ | grep lock
    >drwxrwxr-x 20 root_uucp 680 10 7 14:26 lock

  4. Confirm the USER ID. You USER ID is shown as taro.
Copy Code
    who -H am i
    >USER_LINE    WHEN
    >taro    ttys000 Oct 7 15:28

  5. Append your account to the membership of the UUCP group. Please user your own USER ID for taro.
    1. For MAC OS 10.4
Copy Code
        sudo niutil -appendprop / /groups/uucp users taro
  2. For MAC OS 10.5 or 10.6
Copy Code
        sudo dscl . -append /Groups/uucp GroupMembership taro

  6. Confirm the setting of the UUCP group, where taro is the USER ID.
Copy Code
    dscl . -read /Groups/uucp | grep GroupMembership
    > GroupMembership: taro
MAC: Lock File Permission


Contents

Contents | Index | Home
Contents
Introduction
SW License Agreement
Release Notes
User Interface
Menu Bar
Tool Bar
HEX File
Upload Status and Progress
Communication Medium Information
Using the Utility
Loading a HEX file
Setting the Communication Parameters
Uploading a HEX file
Binary Communication Protocol
Binary Packet
Binary Commands
USB Drivers
Trouble Shooting
MAC: Lock File Permission


Index

Contents | Index | Home
Index
B | C | H | I | L | M | R | S | T | U
B
Binary Commands
Binary Communication Protocol
Binary Packet
C
Communication Medium Information
H
HEX File
I
Introduction
L
Loading a HEX file
M
MAC: Lock File Permission
Menu Bar
R
Release Notes
S
Setting the Communication Parameters
SW License Agreement
T
Tool Bar
Trouble Shooting
U
Upload Status and Progress
Uploading a HEX file
USB Drivers
User Interface
Using the Utility


Introduction

Contents | Index
Next
Introduction

The External Memory Programmer is a multi-platform utility used to transfer HEX file information to a device. The device will load the transferred information into a memory device. While the memory device is usually an external memory device, like SPI NOR flash, it can be the internal memory of the device. The External Memory Programmer can use two communication mediums to transfer data, serial or USB.

The utility uses a binary communication protocol which allows the device to dictate the maximum payload size up to 65,000 bytes. This allows an independency between devices that have limited resources and the utility.

While this utility was designed for uploading HEX files from the Graphics Resource Converter utility, it will upload any HEX file in Intel 380 format.

Introduction