If you are using an UNO (the newer version R2) to control a character LCD then AVOID using pins 4 and 7 in your definition.
What happens is when at first powered up if there is even a small 5volt signal (a weak pullup) present on those pins the UNO will hang.
So far from my testing it is just pins 4 and 7 that are affected.
On my LCD panels it seems that all the data pins ,and control pins show a weak pullup.
The reset button will work allowing it to reset.
If you need to use pins 4 and 7 then see the following thread for an all around fix to the problem :http://arduino.cc/forum/index.php/topic,64256.0.html
Here is another thread dealing with the issuehttp://arduino.cc/forum/index.php/topic,68477.0.html