Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Electromagnetic interference on PIC16F877A?

Status
Not open for further replies.
mclr pic16f877a reset emi

I tried different power supplies and all of them were as old as my previous one, I still have this problem.It's difficult to believe as all power supplies are faulty.Yes, I have disabled LVP mode, but still the problem is there.I bought PIC16F876 to make the debugger from **broken link removed**.I downloaded the same code on this one with changing #include<16f876.h> and this one shows the problem too, when I send "ABCDEF..." on serial port, then I visited my friend's university for some work and there I met some guys, they were complaining about this interference problem too.They were doing serial communication and then they told me that they removed the MAX232 IC in the end and put the 10KOhms resistor for TX and RX pins and did the direct communciation, in this way they had done the serial communication, but I believe in this way his PIC controller is in more danger of getting damage easily, as though there are clamping diodes in I/O pins, but still, there are greater chances of PIC getting damage,my dad told me PIC is just like a toy, he further more added PIC doesn't have that much market coverage as the 8051 controllers have,he added that PIC applications can be seen in a toy or some small device.He told me that he had seen hundreds of controllers based on 8051 architecture working in industries at critical enviornment, in high temperature and noisy enviornment.He added that PIC controllers only suits to college/university students, where reliablity and durability doesn't matter.It's not a professional working controllers.He said he had work on 8051 for so many years.He had never seen such problem, although I agree on that as I had worked little bit on ATMEL89C51, but I have never noticed such things....I don't think my dad's opinion is correct about PIC.I think there must have been something, which is causing the problem and PIC controller isn't the problem itself.I have to find it out, sometimes I think may be the clock frequency is high 20Mhz, this might be creating some noise, because accroding to my information, I come to know that systems that operates on high frequency (for example 2 GHz) produces very high amount of noise, as compared to a system running on less clock speed like (4Mhz).
 

how to test if a pic16f877a is damaged

I don't want to get into "my uP can beat up your uP" (I actually saw a poster that said that! :D), but times have changed.

Right now the PICs are the most popular uC in the world. Since they pushed the 68HC11's out of the automobiles.

The reasons a lot of older guys (my peers) think that the 8051 is king was because for almost 5 years you couldn't buy the most popular 68HCxx stuff unless you were an automaker (not by exclusion, but production couldn't keep up with the automakers demands). Anyone outside the automakers learned other stuff, and in the case of the 20+ year old 8051 architecture, used what they had.

This current generation of (third major?) of automobile controllers (body, engine, etc) is all based on PICs. Especially with the new distributed and localized controllers on the CAN bus (with fiber communication the newest).

Even the AVRs and the current 8051 stuff had to switch to the Harvard Architecture to keep up. That's where the ATMEL89C51 comes from, speedin' up the old stuff. They still use the old 1st generation architecture, just faster.

If you look at the code to do something in Intel architecture and the PIC architecture, there is no comparison; the PIC takes a fraction of the code. (I have written asm code for both).

Virtually every new design I have been involved in in the last 5 years has used PICs; medical, instrumentation, appliances, power controllers, servers, etc. The dsPICs, because they act as controllers as well as DSP engines, have made a real dent in TI's DSP market as well (TI DSPs still cook, but make lousy controllers).

Added after 9 minutes:

Back to the topic.....

I really say; point to point ALL the connections on solderless breadboards. It sounds like you have a floating pin.

If you have to, measure with a #30 wire on your probe so there is no physical force on the pin you are measuring; even the lightest touch will make the connection only while you are contacting the pin. It then will open up as soon as you release pressure.

PICs have very good EMI characteristics, since everything is on chip and NOT going to those pesky lead wires.
 

ferrite beed

Hi!
I agree with JohnJ. I have been wroking with PIC's for the past three years and believe me i have never faced such a problem. Almost every second project that i made involved communication with the PC. I think that you have got a floating pin in your design.
Regards.
 

mcu decoupling pic mclr

Try change the xtal. Put a XT=14.7456Mhz and test it. Maybe the problem is the error in the baudrate due to crystal value. With a 20Mhz crytal and a baudrate=9600 bauds you have 1.73% of error. Please see the datasheet page 114.
 

serial comms how to get rid of interference

So should I connect every unused pin to either Vcc or Ground and do u guys also do that ?

Also tell me about the 1st pin MCLR(bar)/Vpp, I apply +5V on it, because I saw a schematic on the internet in which a guy had applied +5V on it, by a pull up resistor of 10Kohm, although while making the another debugger circuit.I come to know that +13V is used for programming the device in low voltage mode and we apply +13V on Vpp.So should I give Vpp +5V or +13V for proper operation(So that I don't face the EMI).What I currently had done is that I pull that pin up with 10Kohm resistor and I had applied +5V on it.
 

pic16f877a reset circuit

Hi!
It is not necessay to connect the free pins to Vdd or Vss. I have never done that. In fact in some designs the pins are deliberatley left open for future upgrades.
MCLR pin should be connected to +5V thorugh a 1K resistor but i think that even a 10K resistor is fine. +12V is applied only during high voltage programming.
I simulated your software and the values in reigsters seem to be Ok.
Moreover the baud rate error is 0.16% because BRGH = 1.
0.16% is a very acceptable error.
Regards.
 

decoupling schematic for pic16f877a

which software do u use to simulate the PIC codes?
 

microchip floating pins pic

umery2k75 said:
,my dad told me PIC is just like a toy, he further more added PIC doesn't have that much market coverage as the 8051 controllers have,he added that PIC applications can be seen in a toy or some small device.He told me that he had seen hundreds of controllers based on 8051 architecture working in industries at critical enviornment, in high temperature and noisy enviornment.He added that PIC controllers only suits to college/university students, where reliablity and durability doesn't matter.

if this has been true, probably Microchip Inc might have been wiped off from the face of earth years before.

regards

picstudent
 

pic16f877a how to set vpp to logic 1]

Hahahaha
:lol: very true.....
I think the same as you do.
 

pic16f877a ground pins

Hi!
I use MPLAB to simulate all my softwares. In order to simulate a complete design i use Proteus.
Regards.
 

pic16f88 20mhz cristal circuit what pf to use

It's a good design practice to avoid floating pins, but the PICs are nice:

The I/O pins power up as inputs (hi-z) so a resistor can ensure the power-up state of each pin. Just program all the unused pins as outputs in either state to reduce power consumption (floating inputs tend to use a bit more power).

Oh yeah.....JohnJ is now JDJ. I don't have my old e-mail and lost my password :cry:
 

89c51 wires interference

Hi, this is Sasha,

Mu suggestion is that put 100ohm resistor in series with MCLR# pin. Since due to spikes on MCLR pin, if the spikes above 9V for very short duration, it enters into programming mode and possibly reset the system or may be corrupt the code. Try putting series resistor

Added after 2 minutes:

My suggestion

Added after 1 minutes:

https://obrazki.elektroda.pl/79_1201582963.jpg
 

unstable output from pic16f877a

Try use max6817 maxim product
 

pic18f corrupt mclr

Possible problem with the clock.

Floating clock can do a ton of stuff like erase PICs by clocking in blank data, etc etc.

On your top picture I only see the little cap at the power pins, where are the caps for the crystal? On the bottom picture, it looks like you may have added them later though.


Your dad either only worked on someone else's already designed and debugged 8051 circuits, or he was kidding. 8051 stuff is 1/10th as tolerant of real problems as a PIC..



First, DUMP what you are doing out of the PIC. Put in the simplest blink an LED or two program, and get that running rock stable on this board, then worry about other stuff.


A PIC can always be bad, but this really sounds like clock, reset, or power problems. IOW it doesn't sound like it's running in a stable manner in the first place.

Use 1K on the MCLR, it's supposed to be around 1-10 K, and if you're having problems stronger will lessen it's chances. Don't forget crystals are relatively fragile, a drop can make one work sometimes and not others. But more likely would be a bad or mis- connection, or a wrong mode for the crystal you're running.

Power doesn't like running through long thin wires for good operation. Not usually a problem, but when you're having problems you need to check everything. Fat supply cap could be nearer the PIC. Check your smaller caps. Numbers for a pf and an nf cap are very similar, and you definitely need the .1 nf or more for decoupling. I tend to use .1 uf ceramics..

There aren't many circuits just to make a PIC run. Forget your software and do a LED blink, and then make each of the circuits solid and get it running. Then worry about adding other things back in. If you take the software out and then it runs rock solid already, then you have a pretty good idea it isn't the PIC..
 

pic16f877 decoupling capacitor

Is the problem with PIC in your kit solved? I deeply think Its not the EMF playing havok. I am getting some recall from one of my old project with PIC16F877. Let me know if the problem still persists
 

Some thing problem remains there and sometimes it disappears. I haven't hunt down the problem.
 

I'll just tell u what i had experienced. You may try this with your project. Most probably its not Electromagnetic interference. When the 16F877 is programmed with a small code, the rest of its memory is blank and this makes the PIC prone to ESD or electro static discharges from out body or in the atmosphere. In our project we had problems of resetting the circuit and erratic operartions often. Then we noticed it happened even when we touch the middle part on the surface of PIC where beneath the chip lies. The remedy we tried is write a long code or strech the existing code, or put some other codes in ":" so as to deactivate this extra code. The main intention is to fill the extra space in the pic. This worked well for us. You just give it a try. Good luck.
 

Link gone ,not seen

A electrical "leak" somewhere could do that.
To check : put a meter , set on 220 V ac, connect one lead to a GOOD earth and the other lead to your zero Volts.
There should a reading of next to ZERO.
If not there is a leak or something there.....
For safety (to your system) :Connect a lamp 220 ,any wattage , to the good earth and the zero of your supply
If it is a bad leak the lamp could even light up.
No garantie , but it could be the problem.....

It is always a good practice to connect to earth ,safety wise..
 

This thing has again started haunting me and this time it's even worse.
On a new Circuit Design
On a brand New PIC16F877A
On brand new ICs, Resistor,Crystal,LED.
On my brand new Computer(Intel Core2 Quad)
My PC doesn't have a Serial port and neither the Parallel port, I'm using converter USB 2 RS232.

Everything has been changed, but symptoms still exist. I guess I have to change few other things too,I have change almost every equipment.I had shifted my stuff to another room.What is left is to change my home, if still that doesn't work I'll move to another city,if problem still presist, then I'll contact VISA officer for moving on to another country, will anybody at EDAboard, help me find another home in his/her country.Before getting another home at your place, I would like to test this circuit at your home.If still this circuit performs in this way.I'll then try to change something bigger....Hmm....
maybe like a continent or something :D or if still I don't get success I'll give this circuit to NASA to take it to the Moon or to Mars because maybe Earth's magnetic field might be causing this problem, then this circuit has got to work over there.If that circuit works over there, then I'll be very happy to come to know the reason that was bothering me.





 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top