In current circuit the ATmege-328p is interfaced with the MOSFET H-Bridge (schematic below). The code just runs a simple routine to test the bridge, that is, turns on or off both sides.
Since the first test, it did not function, sometimes it would behave erratic way, when I put my finger close to (M5, or M6) MOSFET it would then start to function, when I take away my finger, couple of seconds later it would stop again.
If I remove the control wires which are used to energize the H-Bridge and hold it with bare hands, the circuit will start function, as soon as I connect them back to AVR everything stops.
Has anyone come across this kind of issue, if so an advise on resolving this floating behavior would be very appreciated.