Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can program PIC24HJ32GP202 with PICkit2?

Status
Not open for further replies.

saeidjabbari

Member level 2
Joined
Jan 9, 2010
Messages
43
Helped
4
Reputation
8
Reaction score
3
Trophy points
1,288
Location
IRAN_Urmia
Activity points
1,565
Hi For All
My first question: which pins of PIC24HJ32GP202 are use for programing?
Second question: how can use 3.3volt circuit for this programmer for program PIC24?

Finally excuse me about my English
Thanks For Advice
 

Hi,

Nice work on the pcb...

To program the Pic24 series you need to run the pickit2 at 3.3v.
Simply disconnect the usb +5v where it enters the pcb and insert a 3.3v regulator and caps.

I have done this and programmed a Pic24FJ without any problems.

Make sure you have all the VDD and VSS lines connected

Regarding which PCLK and PDATA lines to use, you have 3 pairs to choose from, Microchip says this allows you to optimise your port layouts.
The pair you required are selected by the Config statement.

Here is the C config statement for a program I burnt ( I did not write the code )


Code:
_CONFIG1( ICS_PGx1 & JTAGEN_OFF & GCP_OFF & GWRP_OFF & COE_OFF & FWDTEN_OFF)
_CONFIG2(FNOSC_FRCPLL & OSCIOFNC_ON & POSCMOD_NONE & IOL1WAY_OFF)
 
Hi My Friend
Thanks a lot
I make 3.4v with LM317 and some resistors! and connecting programmer and micro pins together :

VPP---->MCLR
VDD(3.4v)----->VDDcore
VSS-----> VSS
PGD-----> PGED1/AN2/C2IN-/RP0(1)/CN4/RB0
PGC-----> PGEC1/AN3/C2IN+/RP1(1)/CN5/RB1

When open PICkit 2 v2.60 this error is show:



where is the problem?
 

Who told you to connect 3.4V to Vddcore? PIC24HJ is using a core voltage of 2.5V that's typically generated by the internal
voltage regulator. Vdd should be supplied with 3.0 - 3.6 V. Read the datasheet!
 

so why when i connect VDD to VDD pin PICkit2 software show this error:

No device detected
Ensure proper capacitance on VDDCORE/VCAP pin.

where is the problem?
dose my programmer need other Secondary circuit for program PIC24 series?

Thanks For Advice
 

Hi,

As FvM mentioned you need Vcap setting up.

This is the circuit I used for my Pic24FJ, think it should be the same for your Pic24H chip..

The Vcap should ideally be Tantalum but a standard Electrolytic should work.
 

PIC24 and PIC32 controllers have internal regulator, to enable this pin you should connect a capacitor.
You can follow this image for your PIC24 controller.


(from PIC32 datasheet, Don't worry PIC32 and PIC24 are pin to pin comaptible)
**broken link removed**


Don't forget to connect PGC and PGD.

Good luck...
 
Hi saeidjabbari

Sent you a PM message earlier - you do not seem to have seen it ..?
 
Thanks For All
programmer is work very well but when i use MPLAB for program PIC24HJ32GP202 i see this error:



Thanks For Advice
 
Hi,

When you use the pk2 V2.61 program to burn the Pic24 you will see that its "VDD Target" is set at 5v even though the whole circuit is actually running at 3v3.

This is a limitation of the Pk2 Lite, as it has no circuitry to adjust VDD.

In Mplab when you try to program the Pic24 with the Pk2 Lite running on 3v3 it will still report back to MPlab that VDD is at 5v, so Mplab reports that as an error.

The way to program it more automatically is to intially start off your first programming with PK2V2.61 manually, but if you then want to program another build into the pic24 you just press the Red buttom on the Pk2Lite, this will automatically pick up the latest version of your build and progam it in to the chip.

Check the v2.61 parameters that the 'programmer' ' write on pk2 button' box is checked on.
 
wp100 said:
This is a limitation of the Pk2 Lite, as it has no circuitry to adjust VDD.

How to fix this?
Can circuit designed to solve this problem?
 

saeidjabbari said:
wp100 said:
This is a limitation of the Pk2 Lite, as it has no circuitry to adjust VDD.

How to fix this?
Can circuit designed to solve this problem?

Use external power source...
 

Hi,

anandpv2009 said:
saeidjabbari said:
wp100 said:
This is a limitation of the Pk2 Lite, as it has no circuitry to adjust VDD.

How to fix this?
Can circuit designed to solve this problem?

Use external power source...


anandpv2009

Well have just tried the pic24 with its own power source and without any power and MPlab still senses the Pickit2 Lite as at 5v.

If there is a way to fooling Mplab into sensing it as 3v3, please help.


saeidjabbari

The two main difference between the proper PK2 and the Lite is the absense of the eeprom chips which are only really needed for the programmer to go option, and the ability to auto sense and vary the VDD.
See the full circuit diagram at the end of the Pk2 User Guide

I believe others in this forum have found the equivalent parts to make up the Vdd circuitry. You could try that route but if you can put up with just using the V2.61 application that might be the simpler way.

I find using the v2.61 and pressing the red button better than having mplab program it every time you do a build, or keep turning the programmer on and off in Mplab

If you do want to source and add the extra parts, then I would be tempted to say consider buying a ready made genuine Microchip Pickit2 or 3.
The Pk2 is still be best value programmer around - have one myself as well as the PK2 Lite as backup.
 
wp100 said:
Hi,

anandpv2009 said:
saeidjabbari said:
wp100 said:
This is a limitation of the Pk2 Lite, as it has no circuitry to adjust VDD.

How to fix this?
Can circuit designed to solve this problem?

Use external power source...


anandpv2009

Well have just tried the pic24 with its own power source and without any power and MPlab still senses the Pickit2 Lite as at 5v.

If there is a way to fooling Mplab into sensing it as 3v3, please help.

.


Not fooling man...You can enable or disable VDD (of pkit2), there is a option is available in the programmer menu of Mplab.


See this result...(Programmer : PicKit2, Power Source: External)

**broken link removed**
 
Hi anandpv2009

Are we talking about the same programmer ?

I know saeidjabbari has used Pickit2 in the title, but he is actually talking about the DIY Pickit2 Lite as featured in this forum, which normally runs at a fixed 5v.

To allow him to program the 3v3 Pic24 you can add a 3v3 regulator to the USB +5v line so the whole 2550 circuit runs at 3v3 so making it ok to program the pic24.

No matter how I power the pic24 or how I change the Mplab PK2 Programmer settings it still sees the diy Pk2 Lite as 5v - unless you know of something else ?

[/img]
 

wp100 said:
Hi anandpv2009

Are we talking about the same programmer ?

I know saeidjabbari has used Pickit2 in the title, but he is actually talking about the DIY Pickit2 Lite as featured in this forum, which normally runs at a fixed 5v.

To allow him to program the 3v3 Pic24 you can add a 3v3 regulator to the USB +5v line so the whole 2550 circuit runs at 3v3 so making it ok to program the pic24.

No matter how I power the pic24 or how I change the Mplab PK2 Programmer settings it still sees the diy Pk2 Lite as 5v - unless you know of something else ?

[/img]

I have both DIY PicKit2 lite and original pickit2 & 3

and am also talking about DIY version of pickit2 (Lite Fixed 5V)...
Disable or off VDD from pickit2, then try...

**broken link removed**
 

Hi anandpv2009,

Thanks for your patience, as you correctly said it does work ok - had got myself stuck in a loop. :oops: :oops:

Instead of powering the Pk2 Lite by 3v3, just keep it at 5v but ensure the Pic24 is first powered by the 3v3 regulator, then it works fine in MPlab.
( had forgotten that the pgc and pgd pins are 5v tolerant )

Thanks again.



Hi saeidjabbari

Sorry if I have taken you the long way round things, but sure you can quicky modify the power connections to make it work ok in Mplab.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top