I am 89v51rd2 microcontroller for my project but the problem with it is that the program loaded into it is not executed properly. It works
sometimes and sometimes it does not.Sometimes the instructions are executed partially ie. i get the output for some input conditions only. Why does the board work so unpredictably. There is no problem with the reset,oscillator. Then what could possibly be the problem? :roll:
Do you have any floating unused inputs?
Floating unused inputs can oscillate and cause the micro to latch up.
Any unused input line should be tied high or low or set up as outputs.
If all inputs are at a defined Low/High level other option could be ground shift, or switching noise on outputs getting back to the inputs. The best is to program a test loop with maximum activity on the output and measure the noise on ground and supply voltage. In case of industrial interfacing you might look at this application notes: iC-Haus Homepage - Welcome .
hi there,
I get weird problem with my AT89S52, I use PIR sensor, for first detection it is good enough, but after that it detect every three second (triggeer repeatedly) even ther is no movement in front of. is it kind of latch up??
thanks
Sounds like a floating input. Does the PIR sensor hat an open collector output? If so, the input needs to have a pull up resistor otherwize the iput is floating.
Actually I don't know how to identify it is open colector or not.. but I already use 10k pull up resistor for my sensor but it's still the same problem occurs.. is the floating only happen to input??
This is a very vague and open ended question. Many
ways to fail. You ask about latchup which is a specific
and usually destructive electrical / physical event. You
could more easily (because mfrs have been pretty good
about eliminating pin-induced electrical latchup for some
decades now) have a functional interrupt or dead end
in the code, some loop without an exit (esp when inputs
are in an unexpected state / value), etc.
True latchup would manifest a very elevated Idd.
You could look at the quality of decoupling, the behavior
of clocks and data when electromechanical or driver
events occur (possibly corrupting the clock / data)
and so on. Isolating high pulsed currents / edges from
the logic supply and logic ground is good hygeine.