PDA

View Full Version : Pickit3 from Microcode Studio



Plcguy
- 3rd December 2010, 18:14
I currently use an EPIC, MCS, PBP and want to go to less wires / lose parallel and use ICP.

I see all kinds of posts about MCS operating a Pickit2, but when I look in the define new programmer choices, I don't see pickit3. I believe the only difference id LVP support in a 3. can you use a 3 and choose a 2 from the drop down?

I like the MCS interface for programming so I don't want to seperately fire MPLAB.

So, should I get a 2 or a 3?

mackrackit
- 3rd December 2010, 19:48
Might be best to stay with a 2. But I do not have a 3 so maybe it is OK. You never know.
http://www.picbasic.co.uk/forum/showthread.php?t=13594&highlight=pickit3

HenrikOlsson
- 3rd December 2010, 20:44
I've never had a PK2 so I can't really compare the two. I do have a PK3 and have it working from within MCS. I'm pretty sure I found the description on how to get it going here on the forum.

Anyway, the PK3Cmd.exe is the executable that you need to point MCS to and here are the parameters I use:
-P$target-device$ -F$hex-filename$ -E -M -B -L -V5
Apparenently the -V5 at the end specifies the voltage that the PK3 supplies to the target. Be careful with that if the target device is a 3.3V device. You have to use a fairly up to date MPLAB in order for it to work. Personally I'm on v8.50

/Henrik.

Plcguy
- 3rd December 2010, 20:48
I've never had a PK2 so I can't really compare the two. I do have a PK3 and have it working from within MCS. I'm pretty sure I found the description on how to get it going here on the forum.

Anyway, the PK3Cmd.exe is the executable that you need to point MCS to and here are the parameters I use:
-P$target-device$ -F$hex-filename$ -E -M -B -L -V5
Apparenently the -V5 at the end specifies the voltage that the PK3 supplies to the target. Be careful with that if the target device is a 3.3V device. You have to use a fairly up to date MPLAB in order for it to work. Personally I'm on v8.50

/Henrik.

I saw the posts about loading 8.5 and using PK3Cmd.exe. I don't see Pickit3 as a drop down option in MCS though.

HenrikOlsson
- 3rd December 2010, 21:04
Hi,
You have to add it manually. Click Add new programmer and select Create Custom Programmer Entry and follow the prompts.

Plcguy
- 3rd December 2010, 21:27
OK, I installed the PK3Cmd.exe and added
-P$target-device$ -F$hex-filename$ -E -M -B -L -V5

seem to take it. So this works as easily as my epic?
I can still choose an pickit2 if this has issues. are you happy with the way yours gets called and run?

HenrikOlsson
- 3rd December 2010, 21:40
I've had no problems with it. The only other programmer I have is a 15 years old PICStart+ so I can't say how the PK3 compares to anything really - but it works. When developing I tend to use a bootloader though so the PK3 doesn't get used that much.

One thing I've read about the PK2 is that Microchip won't add support for new chiås as they come out but recently I read somewhere that you could download new definitition files for it so.... Also there supposed to be some sort of basic logic/protocol analyzer application for use with the PK2 which I don't think is available for the PK3.

So again, the PK3 works fine for me, YMMV.

Plcguy
- 4th December 2010, 18:28
OK, borrowed a clone pickit3 from a guy at work.
set it up as we discussed - that went fine!

So, NOW I discover how thick I really am!
Since I'm not using epic, I need to define the pic and settings in the file. I get compile errors when I use
@ DEVICE PIC16F88 __config _CONFIG1, _INTRC_IO
I want to use the internal oscillator.

and error 207 "found label after column error and
err 122 "illegal opcode"

I've searched for quite a while AND tried a variety of syntax AND looked in the 16f88 inc file and know I'm missing something but....

So, syntax wise I need to tell MPASM
1. the processor
2. the fuse options

everyone else just posts
@ __config _CONFIG1, _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_OFF & _LVP_OFF & _CP_OFF

or some applicable derivative of this and it works, but makes me wonder how MPASM knows the processor.

So I add
INCLUDE "p16f88.inc"
and it says "unable to open include file"

What am I missing?

mackrackit
- 4th December 2010, 18:35
The processor is stated in the ASM code generated by PBP that is then turned to hex.
If you are using MCS or MPLAB the chip selected is the one used when the code is compiled.

Plcguy
- 4th December 2010, 18:49
I am using MCS and PBP
I see that, I forgot about that, I was thinking about the epic definitions.
So, one question down, I see the definition for the processor. So why does

@ DEVICE PIC16F88 __config _CONFIG1, _INTRC_IO
or
@ __config _CONFIG1, _INTRC_IO

give me error[118]?

ScaleRobotics
- 4th December 2010, 19:21
@ __config _CONFIG1, _INTRC_IO

give me error[118]?

If you are going to set configs in your code, you need to comment out the default configs in c:/pbp/picxxx.inc file like this (see bottom "do not forget" paragraph) http://www.picbasic.co.uk/forum/content.php?r=157-Presetting-Configuration-Fuses-%28PIC-Defines%29-into-your-Program

mackrackit
- 4th December 2010, 20:10
And I will add..
Do not use PM
@ DEVICE PIC16F88 __config _CONFIG1, _INTRC_IO

Move up to MPASM
@ __config _CONFIG1, _INTRC_IO

It will save you problems in the future.

Plcguy
- 5th December 2010, 15:37
Now that I see Melanie's write up I get it.
I'm surprised I didn't find this in a search? I looked in FAQ, but that is for the forum only.

Thank you for the pointing.

So, I'm assuming PM has "features" MPASM doesn't?

mackrackit
- 5th December 2010, 15:46
The write up from Mel is in the FAQ forum.
You have it backwards, MPASM has more than PM.

ScaleRobotics
- 5th December 2010, 17:25
The write up from Mel is in the FAQ forum.

Well, technically it is in the "How To" section. http://www.picbasic.co.uk/forum/content.php?r=57 Maybe I will try moving some things to the FAQ to try to make things a little easier to find.

mackrackit
- 5th December 2010, 17:44
http://www.picbasic.co.uk/forum/showthread.php?t=543
The origional

Ioannis
- 11th December 2010, 21:14
The instruction to add Pickit3 to MCS are very nice. The only minus I see is that this proceedure is much slower that using Pickit3 within MPLAB. I don't know why but took almost 3x times to program a F877 directly from MCS.

Ioannis

Plcguy
- 11th December 2010, 21:55
It seemed about the same for me