How to program HCS devices in Standalone Mode
Currently the only method to create a valid SQTP file is through the use of MPLAB IDE v5.70 or MPLAB IDE v5.70.40. Both are posted on the MPLAB archive page
In order to create a non-encrypted SQTP file within MPLAB IDE, add the following line into the file named "mplab.ini" under the [programmers] heading.
(This file is typically located at C:\Program Files\mplab\):
Save this file and then start up MPLAB v5.70.40. Creation of SQTP File
In MPLAB 5.70 select Options->Programmer->Promate II
. Let MPLAB restart itself. Then choose Options_>Development mode
. and select the HCS device. Choose PROMATE->Enable Programmer
. Allow it to error out since no programmer is connected. Choose "Yes" to open the programmer dialog anyway. (It asks you this twice)
Enter settings, including baud rate, the decoder to use and the counter overflow. Now click on Promate->Generate SQTP File
Fill out all the fields for the application. The "Client ID Name," "Product ID name" and "Microchip Production code" where used for factory QTP programming in the past. The starting serial and ending serial number will determine how many unique numbers this SQTP file will contain.
Choose HEX file instead of Keeloq file for use with the MPLAB PM3.
For security, the final data encryption key is actually the result of the XOR of two Data Encryption Keys.
Once all the fields are complete, press the "Ok" button. A Num file will be created. Note the destination of this file. Creation of a HCS Environment
Start up Visual Procmd. Insert your SD Card in MPLAB PM3, connect it to the PC and turn it on. Got to Configure->Select device
select the HCS device. Select Programmer->MPLAB PM3
. Go to Settingsâ€¦->Communications
and select the serial communication port or USB. Select "Ok."
and allow visual procmd to start communications to the MPLAB PM3. Choose Programmer->Load SQTP File
. Select the SQTP file you created in the previous section. Choose Programmer->Environment->Save.
Type in a name for the environment and, optionally, a description. Select browse next to destination and select MPLAB PM3 Card. Select "Ok." Then press "Save." The file will be created on the SD Card. Using the HCS Environment
To use the newly created environment on the MPLAB PM3 in standalone, go to the top menu on the programmer by continuously pressing the ESC key. Select MPLAB PM3 Card and press the ENTER key. Select "Load an Environment," select the environment just created and press the ENTER key.
Each time Program->Verify Device
is selected, it loads the next SQTP entry and programs the part with that value. When all serial entries are completed, it does not allow further programming. Important Notes
- MPLAB PM3 does not support 16C5XX series devices as of yet.
- Since the encryption keys are XOR'd together in MPLAB 5.xx, the encryption key used in the Keeloq Evaluation Kit is not the same. Program the decoder using MPLAB v5.70.40 in order for the encoders to sync.
post edited by DevMod - 2008/05/08 19:02:39