Electronics > Microcontrollers

Touchy MCLR reset as Input pin

(1/3) > >>

CorbPeters:
Hello,
As the title suggests I am having problems with my MCLR pin on a PIC18f4620. I have the MCLR configured as an input pin and have a 10k resistor through a diode to tie it to 5VDC, the diode for ICSP. The problem arrises when the MCLR pin is touched by metal or me the PIC resets even though MCLR is set to input pin. Brown out reset is disabled and virtually all of the other resets are disabled. When I connect the ground lead of the oscilloscope to the ground of the circuit board the problem goes away and I can touch the MCLR pin without a reset. Same idea happens with my ADC pins. The ADC is jumpy without the o-scope ground attached and fine with it. When I power the board from my usb port, no problems, when powered from other 5VDC sources with a 2 wire mains (live and neutral no ground) the problem occurs. My idea is that the ground needs to be tied to earth ground and it will work. The question is should I swap the mains connector with a three pin socket and run the mains ground to the DC ground? When the oscilloscope is attached that is essentially what is happening and making it work. The other question is why would this make it work? It is obvious there is a ground issue with my source but why would connecting the DC ground to mains earth ground change it?
thanks,

amyk:
You and large metal bodies will act as an antenna and pick up any EM from the environment. Static electricity also factors into this too.

Why would you want to touch the pin anyway? It's ESD-sensitive. You'll probably damage it if you keep on doing that.

The short answer: don't touch it.

Jon Chandler:
Do you have 0.1 uF bypass caps on the power pins at the PIC?  Strange things like this can occur without them.

CorbPeters:
Well I can avoid touching it, that isn't a big problem but the big problem is the ADC is also super jumpy and the problem goes away when the MCLR problem goes away. The project is a hexapod robot that I have built from the ground up and whenever the circuit is earth grounded it works fine but when it isn't earth grounded the ADC in the controller gets unstable so the robot will start twitching.

The circuit does have the filter capacitor right next to the chip VSS VDD. I have tried small values and very large values to see if that would help but it hasn't.

I attached the ground DC to the earth ground pin in the power supply and the problem went away. I understand that there can be some possible problems with this but it seems to be working well. I just wish I knew what the actual cause of the problem was.

PA0PBZ:
When you say that the ADC is 'jumpy', what are you feeding it with?
Some external source that has a ground reference or does it also happen when you use a simple pot on VSS/VDD?

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod