Okay, finally got it working. Used the Melabs example at http://melabs.com/samples/LABX2-16F877A/ccpx2.htm and things are working precisely as expected.

Thanks, guys!