• AVR Freaks

Helpful ReplyHot!MCLR circuit with in-circuit programmer --- beginner question

Author
PowerDuck
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2017/05/30 12:22:20
  • Location: 0
  • Status: offline
2017/06/15 08:01:26 (permalink)
0

MCLR circuit with in-circuit programmer --- beginner question

Hello all,
 
I am working on creating a SENT output device using the dsPIC33EV32GM002. I plan to program the device with the PICKit 3 In-Circuit Debugger. This is my first attempt at creating a microcontroller device, and I was hoping someone could please help me understand the function of each component.
 
Attached is a picture of my incomplete schematic. Power will be supplied to voltage plane VP, and all VDD pins are connected to VP and decoupled through VSS which is connected to ground plane GP. I am unsure if I have designed the MCLR circuit correctly. I will explain my understanding of the circuit. It'd be greatly appreciated if someone would verify that these facts are true and the circuit is correct.
 
  • The MCLR pin is directly connected to the ICSP so that the programmer can drive the MCLR pin high (13V) for programming.
  • Resistor R15 is a pull-up resistor for the power supply to MCLR.
  • Resistor R15 isolates the power plane and VDD from the ICSP high voltage.
  • Resistor R16 blocks current from entering MCLR pin from capacitor C30 in event of some ESD breakdown.
  • Capacitor C30 decouples power supply.
That is what I understand is going on this circuit. However I have some questions.
 
  • In the PICKit 3 manual, it states not to use capacitors on MCLR. In the dsPIC33EV family manual, it shows capacitor C30 connected to MCLR. I believe that this is OK because MCLR connects to the ICSP before that capacitor C30. Is this correct? (pictures of exact wording attached)
  • What drives MCLR low to reset the device during programming? Do I need to add a reset switch at the power input to MCLR?
Thanks for your help!!
 
LINK TO IMAGES
http://imgur.com/gallery/W8Nvx
 
#1
Weydert
Super Member
  • Total Posts : 483
  • Reward points : 0
  • Joined: 2008/07/02 04:22:40
  • Location: Aachen/Germany
  • Status: offline
Re: MCLR circuit with in-circuit programmer --- beginner question 2017/06/15 11:57:21 (permalink) ☄ Helpfulby PowerDuck 2017/06/15 12:35:28
4 (2)
hi,
- programming voltage for the dsPIC33EV devices is not "high voltage" (13V) . It is just 5V
- at all the dpPICs i have used I never added a capacitor at MCLR pin, only a pullup rseistor of 10k. No problems without C.
- a capacitor must be removed during programming. (as in Figure 2.2)  
- PICKIT 3 is driving the MCLR pin during programming. No Reset switch needed.
#2
NorthGuy
Super Member
  • Total Posts : 6350
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: offline
Re: MCLR circuit with in-circuit programmer --- beginner question 2017/06/15 12:10:45 (permalink) ☄ Helpfulby PowerDuck 2017/06/15 12:35:24
4 (2)
The circuit is fine. The goal of the C30 capacitor is to introduce a delay. This ensures the PIC doesn't run before the power is fully applied. I always use the capacitor, but I don't think it is necessary. I've never had to disconnect this circuit from the PIC when using PICkit3. However, I did have problems with the circuit interfering with ICD3.
#3
PowerDuck
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2017/05/30 12:22:20
  • Location: 0
  • Status: offline
Re: MCLR circuit with in-circuit programmer --- beginner question 2017/06/15 12:37:50 (permalink)
0
Thank you, NorthGuy and Weydert.
 
I will leave the space for capacitor C30 since it can be added/removed easily.
 
Does the PICKit3 drive MCLR low initially as part of its programming routine?
Also I am curious, what type of problems did you see using the ICD3 with the capacitor in the circuit?
#4
Mysil
Super Member
  • Total Posts : 3796
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: online
Re: MCLR circuit with in-circuit programmer --- beginner question 2017/06/15 14:07:46 (permalink) ☄ Helpfulby PowerDuck 2017/06/16 13:53:57
5 (1)
Hi,
Agree with NorthGuy, with resistor R16 between MCLR pin and capacitor C30, 470 Ohm is sufficient isolation for the Programmer to drive /MCLR signal when needed.
I have seen R16 with values between 470 Ohm and 1000 Ohm successfully used.
 
Reset switch indicated in diagram is in the wrong place.
Reset switch should be in parallel with capacitor C30, connecting to GP.
 
There have been mixed experiences reported with Tantalum capacitors for VCAP regulator stabilisation.
It seem some types of tantalum capacitors may have higher ESR than good aluminium electrolytics,
but I am not sure about frequency dependencies.
10 uF Ceramic capacitors seem to have much better ESR properties at high frequencies.
Ceramic capacitors loose capacitance when biased by DC voltage, thus ceramic capacitor rated for 16 V is preferred, even if VCAP voltage is only about 2 V.
 
   Mysil
#5
PowerDuck
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2017/05/30 12:22:20
  • Location: 0
  • Status: offline
Re: MCLR circuit with in-circuit programmer --- beginner question 2017/06/16 13:54:55 (permalink)
3 (1)
So is a reset switch necessary? Or will the PICKit handle resetting the device through the MCLR pin?
 
I do not have a need to reset the device besides during programming, so it is my understanding that a reset switch is not necessary.
post edited by PowerDuck - 2017/06/16 13:56:35
#6
qhb
Superb Member
  • Total Posts : 9999
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: MCLR circuit with in-circuit programmer --- beginner question 2017/06/16 15:09:29 (permalink)
3.5 (2)
Correct, a reset switch is only necessary if you have a need to reset the PIC when no programmer is connected, and without cycling the power.
#7
PStechPaul
Super Member
  • Total Posts : 2951
  • Reward points : 0
  • Joined: 2006/06/27 16:11:32
  • Location: Cockeysville, MD, USA
  • Status: offline
Re: MCLR circuit with in-circuit programmer --- beginner question 2017/06/17 16:40:10 (permalink)
0
Here is the circuit image for easier reference. I have no experience with dSPIC33 so nothing else to contribute.
 


 
#8
kellihayes
New Member
  • Total Posts : 1
  • Reward points : 0
  • Joined: 2019/12/24 05:25:50
  • Location: United States
  • Status: offline
Re: MCLR circuit with in-circuit programmer --- beginner question 2020/06/23 06:21:45 (permalink)
0
The oscillation start timer OST function or MCLR input is low level, the microcontroller will remain in the reset state, the microcontroller is in the following state at reset -
 
Oscillator start or work, including power-up start or sleep wake-up, start.
#9
Jump to:
© 2020 APG vNext Commercial Version 4.5