CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

18F4550 USB RE3 sensitive
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jaka



Joined: 04 May 2014
Posts: 36
Location: Finland

View user's profile Send private message

PostPosted: Sat Nov 28, 2020 7:04 am     Reply with quote

This is clever solution to the problem.

The root cause of problem is that the RE3 pin doesn't have the internal ESD protection diode clamp to VDD, like all other pins have. This is because the RE3 pin must be able to swing to Vpp to enter programming mode.

If you have a positive voltage transient on RE3 pin, the pin voltage will rise to Vpp, which causes the PIC to reset. The diode you added prevents the positive transients propagating to pin.

However, if you have high voltage transients like ESD, they can 'shoot through' the 1N4148. This could be avoided by adding external clamp diode from RE3 to VDD (anode to RE3, cathode to VDD). BUT adding this clamp diode prevents you from programming the PIC in high voltage programming mode!

I have found that the best solution is to avoid using the /MCLR pin for other purposes than reset or programming. Especially when it is routed far away from the PIC or when it is possible to touch it. It also helps to put 10 nF cap on the MCLR pin, which prevents PIC from reseting if you touch the programming connector. Even though Microchip suggests to not place any caps on the line.
vtrx



Joined: 11 Oct 2017
Posts: 142

View user's profile Send private message

PostPosted: Sat Nov 28, 2020 9:30 am     Reply with quote

Anyway, i discovered this 'too late', as i already have 20 pcb ready without components.
I will have to order again with the modification or risk leaving it as is.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Nov 28, 2020 11:09 am     Reply with quote

jaka wrote:

It also helps to put 10 nF cap on the MCLR pin, which prevents PIC from reseting if you touch the programming connector. Even though Microchip suggests to not place any caps on the line.

I don't do that, because as you say, Microchip recommends against it.
Look on the right side of the Pickit 3 poster. It shows no cap on MCLR:
http://ww1.microchip.com/downloads/en/devicedoc/50002010b.pdf

Same thing in the Pickit 4 user's guide on page 21:
http://ww1.microchip.com/downloads/en/DeviceDoc/PICkit4%20In-Circuit%20DebuggerUG-DS50002751B.pdf
Quote:
2.3.5 Circuits That Will Prevent the Debugger From Functioning
Ttelmah



Joined: 11 Mar 2010
Posts: 19538

View user's profile Send private message

PostPosted: Sat Nov 28, 2020 11:41 am     Reply with quote

This is why if you use the pin for something like this it is worth having
jumper enabled protection.
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Nov 28, 2020 11:46 am     Reply with quote

I decided a few years ago to have the ICSP pins DEDICATED to ICSP having been stumped for days wondering 'it should work' only to discover the 'unique' trouble I was having...grrr...
if I need extra pins, a simple 'expander' is cheap and easy to add on...
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group