it depends on the remote you have. try code 250 or go to this webpage and click on 3 digit code (in step 2) and put in your information https://www.mydish.com/support/program-to-tv-code-non-basic
Probably power supply out on the main board. If you haven't before, buy a New TV and a UPS (battery backed up power strip) to protect your TV from power hits and Brown outs.