hello i have tested quadrature encoder using pic16f877a, i had to make my own ladder for testing i hope it is ok..,
https://www.youtube.com/watch?v=TkR9Nm2iiUA&feature=youtu.be
i think quad element works pretty great, but when reseting pic initial value is always 1, as shown in vídeo, i think it should be zero, about the other parameters (input A, B and Z, outputDir, cpunt per revol) need to read more, i´ll wait for ldmicro manual to be included.