IR range problem after coding burst/gap rate and ratio for TSOP1236
You are initializing the timer to generate 36 kHz carrier. Then in the for loop you are turning the timer 10 times on and off to the compare output pin at 28us period - or 36kHz. This obviously does not work, modulating it twice. Just connect it, let it be on for 10+ cycles like 500 us and disconnect it for say 1000 us.