CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Programming with PICKIT2 off the IDE

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
miro



Joined: 15 Jan 2011
Posts: 62

View user's profile Send private message

Programming with PICKIT2 off the IDE
PostPosted: Thu Aug 31, 2023 11:15 am     Reply with quote

For those who want to directly flash off the compiler with the PicKit2 - here is the command you may enter into the Options-> IDE-> Tools-> Command, which works fine here:

Code:
"C:\Program Files (x86)\Microchip\PICkit 2 v2\pk2cmd.exe" "/P" "/M" "/W" "/R" "/F" "%H"


"/P" - autodetect the mcu
"/M" - perform a complete erase/flash/verify
"/W" - ext power for the mcu
"/R" - run after programming (/MCLR enabled, also see the help)
"/F" "%H"- .hex file name

The pk2cmd.exe have to be placed in your pickit2 directory..

After the compiling the cmd window pops up briefly and you will see something like

Code:
Auto-Detect: Found part DSPIC33FJ128GP802.

Using PE
PICkit 2 Program Report
31-Aug-2023, 18:52:23
Device Type: DSPIC33FJ128GP802

Program Succeeded.

Operation Succeeded


and the mcu starts to do its job after the flashing..

The prerequisite here is the mcu chip is powered during programming.
Without an external power the pickit2 programmer itself has to power the mcu chip and you have to remove related switch (/W) from the command.
Consult the pk2cmd help for the info related to your particular setup.

Warning: be careful with powering your entire design off the pickit2 programmer!

Disclaimer: use at your own risk Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group