Good news -- there is no program to write. You ge three choices, connect TD to GND, leave it floating, or tie it to VCC. What could be simpler. Where did you get the quaint notion that you needed to write a program?
One other feature that you will need to consider is the TOL pin. This pin controls the tolerance of the device to the voltage drop on its Vcc pin. If you tie the TOL pin to ground the threshold is 4.75V and if you tie the pin to Vcc the threshold is 4.5V. You should not leave this pin open.
Selection of watchdog timeout interval depends on what you are doing. This watchdog device depends on what you are connecting to the input. If you use the ALE signal then you might as well pick the shortest timeout since if the ALE signal goes away you want to know as soon as possible. On the other hand if you use a port pin and you have a great deal of processing to do you might want to select the longer interval.
You need to remember that a Watchdog should never be kicked in an interrupt routine. It should be kicked at least once every time the program's main loop executes a certain mumber of tasks.