© 2014 Optical Society of America. A polarimeter architecture is presented based on a birefringent grating displayed onto a parallel-aligned liquid crystal (LC) on silicon display (PAL-LCoS). The system is compact and flexible, since the size of the image can be adjusted by means of the period of the grating. The LCoS grating permits simultaneously measuring two orthogonal states of polarization (SOPs). By adding a wave plate, different couples of orthogonal SOPs can be detected. First, a basic proof of concept is presented using one quarter-wave and one half-wave plate with fixed retardances, which permit measuring the six SOPs classically used in polarimetry (linear states at 0°, 45°, 90°, and 135°, and R and L circular states). Next, the system is made fully programmable by incorporating a variable LC retarder (LCR). The LCR orientation and retardance values are optimized by means of the condition number indicator, in order to provide equivalent optimal accuracy. Experimental results of calibration images and test images are presented, showing the potentials of this architecture.