• AVR Freaks

AnsweredHot!PIC16LF15325, MCLR as general purpose pin

Author
kdmal
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2019/07/13 04:18:51
  • Location: 0
  • Status: offline
2019/07/18 03:36:01 (permalink)
0

PIC16LF15325, MCLR as general purpose pin

Hello, mcu configure with lvp disabled and mclr pin used as general purpose pin. This pin connected to push button. MCU control high-voltage power supply unit, and sometimes to this pin (wire from button to pcb board) high voltage arrives.
 
All other pins have esd protection, and there is no problem with the breakdown. But mclr pin reset mcu. To eliminate this problem im protect mclr pin with TVS-diode (PESD3V3S1UB, 3.3V working voltage, 5.6V breakdown voltage). MCU datashit says (http://ww1.microchip.com/downloads/en/DeviceDoc/40001865B.pdf page 481):
 
High Voltage Entry Programming Mode Specifications
1 VIHH Voltage on MCLR/VPP pin to enter programming mode min: 8, max: 9.
But in real life mcu entering in program mode (reset) only 5.2-5.3V. Of course i ordered new TVS diodes with lower breakdown voltage, but its error of datasheet or silicon bug of mcu?
 
(Sorry for my english)
 
 
#1
ric
Super Member
  • Total Posts : 24582
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: PIC16LF15325, MCLR as general purpose pin 2019/07/18 13:27:13 (permalink) ☄ Helpfulby kdmal 2019/07/19 22:04:39
+2 (2)
TVS diodes do not have a sharp enough "knee" to clamp the signal to VDD.
Much better to use a shottky diode to Vdd to stop the pin going more than 0.3V higher than Vdd.
 
For future designs, MCLR is the worst possible pin to use for an input that could spike high!

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#2
DeutcheN
Super Member
  • Total Posts : 121
  • Reward points : 0
  • Joined: 2010/09/01 12:35:40
  • Location: DM43BH
  • Status: offline
Re: PIC16LF15325, MCLR as general purpose pin 2019/07/19 14:20:20 (permalink) ☼ Best Answerby kdmal 2019/07/19 22:04:31
+1 (1)
 
 
Following Ric's recommendation, use a schotty diode to Vdd.  For these devices, do not let MCLR raise more than 2V above Vdd; at this level the micro will enter a reset mode.  Still, for proper programming of the device, a minimum of  8V is necessary.
 
 
#3
ric
Super Member
  • Total Posts : 24582
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: PIC16LF15325, MCLR as general purpose pin 2019/07/19 21:54:22 (permalink) ☄ Helpfulby kdmal 2019/07/19 22:04:21
+1 (1)
... and don't forget to remove the diode when you need to reprogram the PIC!

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#4
kdmal
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2019/07/13 04:18:51
  • Location: 0
  • Status: offline
Re: PIC16LF15325, MCLR as general purpose pin 2019/07/19 22:04:12 (permalink)
0
Thanks Ric and DeutcheN, its very useful information about reset level (Vdd+2V).
Initially, we used a diode, but when spikes arrived there was a lot of noise on the ADC. To solve this problem we clamp spikes to analog ground.
I forgot to write, MCU powered from LDO.
#5
NorthGuy
Super Member
  • Total Posts : 5805
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: offline
Re: PIC16LF15325, MCLR as general purpose pin 2019/07/20 09:13:31 (permalink)
0
Of all the PICs I've tested, only PIC16F648A (and family) requires substantial voltage (11V) to enter programming mode. All others need very little. It used to be important when the high voltage was really used to power flash programming, but now it's only a signal.
#6
PStechPaul
Super Member
  • Total Posts : 2439
  • Reward points : 0
  • Joined: 2006/06/27 16:11:32
  • Location: Cockeysville, MD, USA
  • Status: offline
Re: PIC16LF15325, MCLR as general purpose pin 2019/07/20 12:28:11 (permalink)
+1 (1)
To filter high frequency spikes, a capacitor from MCLR to Vss may be needed, perhaps with series resistor or small inductor (ferrite bead?) to other circuitry. Board layout, isolation, separation, and grounding are also important.

 
#7
Jump to:
© 2019 APG vNext Commercial Version 4.5