pickit2 clone question

t06afre

Joined May 11, 2009
5,934
I have a homemade clone of pickit2 with schematic
View attachment 52065
Can this clone program 3V3 pics (eg. dspic33fj64gp804)?
If you look at the datasheet you will see that the PGEC2 and PGED2 are 5 volt tolerant pins. And hence can be connected to the junebug device that is a 5 volt device. The "dspic33f family reference manual" state that
Any of the following three pairs of programming clock/data pins can be used:
• PGEC1/PGED1
• PGEC2/PGED2
• PGEC3/PGED3
During programming, each pin pair is recognized as a valid programming connection. Therefore,no special selection is to be performed by the user to specify which pin pair will be used forprogramming.​
And hence for debugging​

The debugging functionality is controlled through the PGECx (emulation/debug clock) and PGEDx (emulation/debug data) pin functions. Any of the following three pairs of debugging clock/data pins can be used:


• PGEC1/PGED1
• PGEC2/PGED2
• PGEC3/PGED3
The debugging clock and data pins must be selected by programming the ICD Communication Channel Select Enable bits (ICS<1:0>) in the In-Circuit Debugger Configuration register (FICD<1:0>). To use the in-circuit debugger function of the device, the design must implement ICSP connections to MCLR, VDD, VSS, and the PGECx/PGEDx pin pair. In addition, when the feature is enabled, some of the resources are not available for general use. These resources include the first 80 bytes of data RAM and two I/O pins​
.​
 
Last edited:

Markd77

Joined Sep 7, 2009
2,806
I haven't looked at the datasheet or programming specification, so I don't know if everything else is right, but make sure that you provide 3.3V power to the PIC and find the option in your programming software for external power (not powered by PICKIT 2).
 

t06afre

Joined May 11, 2009
5,934
Come to think about it. Your PIC use low voltage programming. But still the MCLR pin on the PIC is important during the programming cycle. I am not sure if the junebug only support high voltage programming. This is normally taken care by the software in the background and by setting the proper configuration bit. So I have not given it much thinking. Any idea around this Mark? By the way. The MCLR pin is also 5 volt tolerant on the PIC the OP use
 

ErnieM

Joined Apr 24, 2011
8,377
One quick way to check this is to use MPLAB: hit up the menu for Configure | Select Device... and enter the PIC you are considering using. You get instant indication of what programmers and debuggers work with that part.

Otherwise, this programmer will NOT work without modification. It only provides 5V for Vdd (U5V), and you need to drop this down for that part.

Did you build this yourself? Does it work? What programmer did you use to program the PIC18F2550 inside this programmer?
 

Markd77

Joined Sep 7, 2009
2,806
I just lost my longer reply, but basically I checked the schematics and the Junebug can control VPP and VDD the same as the PICKIT 2.
Clock and Dat pins are level shifted on the PICKIT 2 but not the Junebug.
Maybe a pair of 3.3V zeners would be a good safety precaution.
AUX pin is missing on the Junebug but not required for this PIC.
PICKIT2 schematic is at bottom of this datasheet:
<ed> Link didn't work. Look for PICKIT2 Microcontroller programmer users guide link near the bottom of this page:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023805
</ed>
http://www.microchip.com/Microchip....ce=SS_GET_PAGE&nodeId=1406&dDocName=en023805#
 
Last edited:

Thread Starter

blind2_man

Joined May 12, 2008
33
If I insert a 3v3 LDO in debuger to run all stuff on 3v3, is it posible this?

I use PGED2/PGEC2 to connect the debuger.

I have builded myself used to program/debug 16f876A/16f84A/18f4550 and dspic30f2020.

If I measure on VDD out of debuger I never seen other then 5V or 0V on VDD.
 

Markd77

Joined Sep 7, 2009
2,806
Maybe just give it a try with no PIC attached with settings for the 33F PIC and measure VDD and VPP.
It might detect there is no PIC connected too quickly to get a measurement, but worth a try.
 

t06afre

Joined May 11, 2009
5,934
As long as the MCLR, and PGED2/PGEC2 pins are 5 volt tolerant pins. I would not mess with inserting a 3.3 volt LDO to power the MCU used in the junebug. That will for sure create other problems. What you instead could do is to use a 3.3 volt LDO on the USB 5 volt rail. And use this to power the PIC during programming experimenting. But if you already have 3.3 volt source on your board. You can use this. You do not have to connect the junebug VDD if you already have a suited power source. As long as the junebug/development board has a common GND during programming and debugging
 

Thread Starter

blind2_man

Joined May 12, 2008
33
Maybe just give it a try with no PIC attached with settings for the 33F PIC and measure VDD and VPP.
It might detect there is no PIC connected too quickly to get a measurement, but worth a try.
I have done this andI have following error:
Initializing PICkit 2 version 0.0.3.63
Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 3.25V)
PK2Error0024: PICkit 2 was unable to establish a valid Vdd on the target (Attempted 3.25V - Read 4.99V)
PICkit 2 Ready


The question still remains my clone has a problem or the schematic is not made to power 3V3 pics.
 

t06afre

Joined May 11, 2009
5,934
I have done this andI have following error:
Initializing PICkit 2 version 0.0.3.63
Found PICkit 2 - Operating System Version 2.32.0
Target power not detected - Powering from PICkit 2 ( 3.25V)
PK2Error0024: PICkit 2 was unable to establish a valid Vdd on the target (Attempted 3.25V - Read 4.99V)
PICkit 2 Ready

The question still remains my clone has a problem or the schematic is not made to power 3V3 pics.
Yes that is correct. In your schematic the power to the ICSP port. Comes dirrectly from the USB 5 volt power rail. And hence it can not power any 3.3 volr device without inserting a LDO. But doing so. You should be able to power at least your dspic33fj64gp804 as it has some 5 volt tolerant pins
 

Markd77

Joined Sep 7, 2009
2,806
I just noticed that the part of the circuit for adjusting VDD is only connected to the ICD connector, the pins are in a different order to the ICSP connector, but otherwise should function the same.
 

Thread Starter

blind2_man

Joined May 12, 2008
33
Could be a solution not to connect VDD at all and use only development board power supply the dspic, I will try.
One more question, is it possible by mounting one of transistors BS250 /2n7000 wrong can have this behavior: 0/5V on VDD output?
 

t06afre

Joined May 11, 2009
5,934
Could be a solution not to connect VDD at all and use only development board power supply the dspic, I will try.
One more question, is it possible by mounting one of transistors BS250 /2n7000 wrong can have this behavior: 0/5V on VDD output?
Did you mean VPP and not VDD:)
 

Thread Starter

blind2_man

Joined May 12, 2008
33
I mean VDD pin 3,4. If I understand correctly the transistors Q2 = BS250 and 2N7000 controls the pin3 in connector VDD target via diode 1n5817 that it is a sckoty diode opening on 0.2V. Am I understanding in the wrong way? What 3v3 programing means? Supplying 3v3 on the 3 pin and apply some programing voltage on VPP and sending data via PGM/PGD.
 

Markd77

Joined Sep 7, 2009
2,806
After another look the junebug is actually missing some of the parts for controlling the voltage of VDD, so you get only 5V on the ICSP connector and about 4.8V on the ICD connector which can be switched on or off using Q2 and Q5.
 

t06afre

Joined May 11, 2009
5,934
The junebug uses the PICKIT 2 firmware. According to the PICKIT 2 supported devices. No debug header will be needed. So you should be able to both program and debug your DSPIC chip. But it may be you have to upgrade the firmware
 
Top