Missing pulses in fast speeds although using interrupts

The lcd function might not like the "volatile" variable.

The suggested solution would be to have the "volatile" variable which the interrupt scheme requires, and
to capture the value of that variable into another, non-volatile, variable just before calling the LCD function.