See why it helps to draw schematics. Can't see how you could heat up a 16F877 with a 10K on VDD though. Do you have decoupling caps? Both VDD & VSS connected? Stable regulated 5V?
You did not answer my previous question about the 10k resistor. You do not need decouple caps on your ground pins, You only need decouple caps on your power pins ie. +5v
I think Blu meant caps connected from power to ground.
You need decoupling caps with any digital logic IC. 0.1uF is common. We can't help you until you provide a complete schematic of your design. Photos may help.
i try it whole day,i figure out somethings.That is,my MCU circuit and relay all no probelm,works well.Even i use relay to turn on 240V without load(mean valve),its still work.But if i connrct the 240 to my valve,problems happen.MCU hot and MCU stop function.i am using 220v ac 50hz solenoid valve.is than my valve problems???
Better learn babboy =) Text description are almost completely useless for anything more than a couple of connections. Try just jotting down all the electrical connections as you have them hooked up using standard symbols. Do it on paper and scan or photograph the paper if you can't do it on a computer.