Hello, and welcome to the forum.
The TMOD and TCH1 registers are both 16-bits. However, I notice that you are not setting the high byte value in either case. For the modulo register, the high byte will have value 0xFF, and for TCH1 the high byte has indeterminate value after a reset. Additionally, a value of 128 for TCH1 does not represent 50 percent duty - rather a duty of 128/160, or 80 percent.
Since there is a coherency mechanism for both registers, the high byte value requires to be written first, followed by the low byte. Alternatively, if using the CW compiler, the following should also work correctly:
TMOD = 159;
TCH1 = 80; // 50% duty
Note that, unless you trim the internal oscillator frequency, the tolerance for the PWM frequency may be up to +/-25 percent. The internal oscillator frequency needs to be calibrated as part of the programming procedure, with the trim value normally programmed to flash address 0xFFC0. Your code will then need to transfer this value to the trim register.
For the initialisation of TSC and TSC0 registers, it is much more efficient to simultaneously write all bits, rather than sequentially writing individual bits.
TSC = 0x32; // Stop and clear timer, prescale 4
TSC0 = 0x1A; // Unbuffered PWM mode
Regards,
Mac