Connecting programmer to MicroCode Studio
New to this forum, and new to PIC programming as well.
I have just started to learn about PIC programming. I started by downloading MPLAB and doing some of the tutorials. Then I purchased this programmer http://www.futurlec.com/PIC_Programmer.shtml , built a development board to blink LED’s and started having some success.
But developing in ASM is not my cup of tea, so I have downloaded the demo version of PICBasic Pro and I am trying to use it.
The problem is I cant’t seem to figure out how to connect the programmer to MicroCode Studio. I know I can just use the files generated by PBP to use in MPLAB to program the PIC, but I want to program directly from MCS.
The programmer says it is Pickit2 compatible if that helps.
Any help would be appreciated, but it needs to be tailored to a complete novice.
Where did I put that file?
Quote:
Originally Posted by
KrashKaloop
OK, I thought I had it, but I don’t. Although my programmer is working, the files created in MCS are not being loaded into the PICkit 2 program.
When "compile and program" is selected in MCS, the file is compiled with no errors and the PICkit 2 programmer window opens. Then my programmer lights up and the PICkit 2 programmer shows a successful program loaded into the PIC. Unfortunately, all that is loaded is blanks (all “3FFF”).
Somehow the HEX file is not being loaded into the PICkit 2 software.
I don’t know if I am explaining this well, but can anyone help? Could this be that I left the last step out during the programmer setup? It was a blank box that had somthing to do with linking the HEX code. I didn't know what to enter there.
Hi KrashKaloop,
Welcome to the forum.
Just went through the same problem. The PICkit2 is new to me too.
I found that the top box, of the three boxes, in the lower right-hand corner, of the single screen, PICkit2 programming window, labeled [“Auto Input Hex + Write Device”] worked.
But, you have to know (remember) where MCS put the hex file and what it is called. :)
You know you have the hex file loaded (ready to progam) when it shows up in the PICkit2 [Source:] window.
-Adam-
Auto program for PICkit2 ?
I just installed a new PICkit2 and would like to know if the auto start and program will work.
When I select compile and program in the IDE, the programmer app starts but I have to manually grab the hex file and do the load from the PICkit2 application (2 steps).
Some other programmers will accept a script file in the IDE that will allow them to compile and program your PIC with one click...
Does anybody know the correct script to make the PICkit2 program the PIC when started by the IDE?
Thanks,
....Microcode studio plus 3.0.0.5
....18F252
1 Attachment(s)
Installing the PICkit2 Command Line Interface
Download the latest PICkit2 GUI, and the "PICKit2 Command Line Interface" from Microchip.
http://www.microchip.com/stellent/id...cName=en023805
Extract all files from PK2CMD to your "C:\Program Files\Microchip\PICkit 2 v2" folder.
It's the same folder as the PICkit2 programmer software.
In Microcode Studio View | Compile and Program Options... | programmer tab,
click Add New Programmer, select "Create a custom programmer entry" then click "Next".
Enter any name you wish to call it and click "Next".
Enter pk2cmd.exe as the "Programmer Filename" and click "Next".
Click the "Find Manually" button and point it to C:\Program Files\Microchip\PICkit 2 v2 and click "Next".
Enter this parameter line
-pPIC$target-device$ -f$hex-filename$ -M -R -T -h2
Then click Finished.
Pressing Compile and Program or F10 in MicroCode Studio will now do it all.
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=3146" /><!-- Attachment 3146 -->
Descriptions of those, and additional command-line parameters can be found in the "Readme For PK2CMD.txt" file from the .zip above.
<br>
programmer launch from Microcodestudio
Hi to you all !
I do have to launch the MPLAB in order to programm the PIC directly from the MCS. At the moment I use the MCS and MPASM and then i call the MPLAB to program the chip. I will like to do it in a single action.
Thanks for any suggestion .
Regards,
Ambrogio
IW2FVO
North Italy
Re: Connecting programmer to MicroCode Studio
I have a PICkit2 clone and DT explanation works if followed to the letter, the only thing I changed was the cmd line to one suggested in another post: -PPIC$target-device$ -F$hex-filename$ -E -M -Y -Y -h9, then the dos cmd box will open with erasing device followed by three msg's and waiting 9 sec before closing allowing user time to view error's if any.
Note:if dos cmd box closes quickly then you have made a mistake during installation or the choosen device in Microcode Studio
selection box is incorrect(example 16F877A when should be 16F877)