Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC outputs toggle when _MCLR touched?

Status
Not open for further replies.

deweyusa

Member
Question:

I have a new design I'm trying to troubleshoot. It's based on a PIC18F controller. I attempted to use a reference design for it, but it's acting weird.

I noticed that Microchip opts in this particular reference design to put a 100 ohm resistor between the _MCLR/RST pin on the ICSP connector and the controller RESET input. On other Microchip designs, I've seen no resistor there at all, and I opted not to use one on my design.

Now, I have some LEDs used as outputs on random I/O pins. When I touch the _MCLR pin with a finger, these LEDs light up until the finger is removed. I also have relays attached to other outputs (driven by transistors) that switch when the finger is applied. I have the Microchip tool the design I'm referring to is based on, and when I touch _MCLR on it, nothing happens to any I/O pins.

I doubt that 100 ohm resistor Mchip is using would make the difference in their board not switching on its outputs vs. mine doing that. So...what gives? This instinctively seems like the controller is missing a ground or something similar. I should also mention that I do not have a thorough ground plane on the other side of the board, but I don't think that would do this either...or would it? I am using the Picdem.net 2 board for this design, and am uploading the exact same code to the Microchip board as I am to mine.

Any recommendations?

Thanks
-Dewey
 
Last edited:
Thanks for your reply Ian. I'm not sure this would matter, since the code I'm using is identical between the two boards, and the behavior on one is normal. Wouldn't the config options stay the same for both when programmed?

-Dewey
 
If you leave MCLR floating then it will reset randomly or, as you've found out, at 50/60Hz when supplied with an aerial (finger).

Mike.
 
The Microchip board more-than-likely does have a pull-up on MCLR.
 
Thanks, you were right. After further, closer inspection of the Microchip schematic, I found a separate page showing a pull up on MCLR that I hadn't seen before. :)

-Dewey
 
Status
Not open for further replies.

Latest threads

Back
Top