It worked well on the simulation ,, But I have a problem with the circuit ..
The required output from the microcontroller is maintaned for a bunch of time (sometimes 4 seconds .. sometimes 10 seconds .. ) after the circuit stsrt up ..
That happens although the output is required to remain the same until power is off .. & that what happens on the simulation ..
Considering you have posted no schematics or given any information on how the circuit is connected and to what it's connected to no one can help you. You need to post a schematic.