Question: I connected my PC to my 40" LG TV and the starting screen came up but when it gets to the screen with the icons on the side it goes black and says invalid format.

Answer: 
I found the issue! I deleted the drivers for the mouse and keyboard, then restarted the machine. It no longer locks up. Previously, i had only checked for updates, and made sure they didn't have the yellow warning symbol, I did not think to remove them entirely until today.
I would suspect an issue with the USB ports. The first think I would try is to connect another USB device to another port and see if that stops working also.
The kbd has its own power so if there r any LEDs on it they may not go out, but if u see an LED on the mouse when it is working, does it go out when it stops. That would indicate a power problem with the ports. U could also try a wired kbd to see if the LEDs go out when it stops.