I've been in your shoes before, trying to program my DIRECTV remote to my TV and getting confused with all the methods online. Honestly, the easiest way I found is to use the automatic code search method, it's pretty straightforward. Just go to the settings menu on your DIRECTV receiver, select the remote control option, and then choose the TV brand, the receiver will automatically try different codes until it finds the right one. Make sure your TV is turned on and the receiver is set to the correct input, and you should be good to go, it worked like a charm for me and my smart TV.