Generating bit stream in hardware. Glitches with Arduino
An interrupt is probably occurring in the middle of your sequence. If you really want to precisely control the timing of your pulses you should disable interrupts before starting the first pulse and enable the interrupts after the last pulse.