2
\$\begingroup\$

This question is derived from this Board review thread, I thought it would be preferable to make it a standalone question.

I want to be able to reset a PIC remotely using the only communication port of the board, the RS232. But I also want to be able to program it using a ICD3 (no bootloader), and this programmer apparently applies high voltage (0-13V?) to /MCLR which will certainly kill the MAX232 (MAX233 in fact).

Would a schottky between R2out of the MAX233 and 5V be the way to go? The datasheet says that the absolute maximum voltage on that pin is 5.3V, I find it a bit tight for a schottky. Any more robust suggestions? I don't want to use a jumper as this could be forgotten...

Schematic: enter image description here

Thanks

Edit:

Will this work?

schematic

simulate this circuit – Schematic created using CircuitLab

The Zener is a ON SEMI BZX84B5V1LT1G that has 5-5.2V tolerance at 5mA and I'm allowing 4.4mA max. The MAX233 will drive the /MCLR pin at 0.41V where up to 1V is a low level. The 20kOhm pull up comes from one of Olin's answers here.

\$\endgroup\$
  • \$\begingroup\$ Use a pluggable link to disconnect it when programming \$\endgroup\$ – Andy aka Apr 8 '15 at 10:32
  • \$\begingroup\$ I thought about it, I was just wondering if there wasn't an idiotproof way of making sure it doesn't blow up. I consider myself an idiot when I'm tired. \$\endgroup\$ – user42875 Apr 8 '15 at 10:34
1
\$\begingroup\$

If you put a 5.1V zener diode on pin 20 and ground (0V) of the MAX233A it would be protected but then there would be 70mA flowing thru R3 during programming and this may be too much so, increase R3 and R4 by 10x. The reset functionality should still be OK but now, when programming only 7mA flows into the zener diode.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ Very nice, I only need one more component. I've updated my post with the implementation, can you give it a look? \$\endgroup\$ – user42875 Apr 8 '15 at 11:21
  • \$\begingroup\$ It should work. It's just component value changes from my circuit. Easy to try out too. \$\endgroup\$ – Andy aka Apr 8 '15 at 11:33
2
\$\begingroup\$

You could interface the MAX233 to the MCU using an Open Drain or Open Collector arrangement.

The MAX233 activates a transistor (NPN BJT or N-channel MOSFET) which in turn pulls the MCLR pin low.

schematic

simulate this circuit – Schematic created using CircuitLab

This is also one of the recommended ways of activating a reset line from multiple sources - a wired or arrangement using open drain devices.

Note that the logic of the reset is then inverted from the perspective of the MAX223 - you need to set the output HIGH to pull the MCLR LOW.

\$\endgroup\$
  • \$\begingroup\$ Thanks, that's a good idea. I am going to go for Andy Aka's answer if there is anything wrong with it as it only adds one more component and I don't have to use a transistor (everytime I try to use a bipolar it doesn't work, never tried with FETs)... \$\endgroup\$ – user42875 Apr 8 '15 at 11:10
  • \$\begingroup\$ *nothing, not "anything". \$\endgroup\$ – user42875 Apr 8 '15 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.