We report the use of a pulse-width modulation drive technique for high-resolution liquid-crystal gratings and show how the grating diffraction efficiency depends on the duty cycle of the drive signal. We identify a regime in which the diffraction efficiency is linearly proportional to the duty cycle, thereby providing a linear drive characteristic.