To output a value to the output port you need 2 instructions. So each value is outputted with a clock of 9.6MHz / 2 = 4.8MHz. 4800000kHz / 38kHz = 126.315 Steps max. 256 is impossible with 9.6MHz.So you need 126.315 steps to make 38kHz but you can get 126 steps max. 38000Hz / 126.315 = 300.835. x 126 = 37.905kHz. How do you get 38kHz?