I'm just getting started with PIC processors, driven mainly by a shortage of the simpler PICAXE from my local retailer. My question is, how do I read the length of a PWM pulse on a certain input pin (analogous to the PULSIN command on PICAXEs). I'm using the MPLab IDE, and the specific PIC in question is the 12F683. Secondly, (sorry to combine two questions into one), are there libraries out there that contain 'common' functions (PWM output, i2c support and the like)? Google's turning up dry-ish, but it seems to me that such libraries have to be out there, somewhere.... Thanks for any help!
EDIT: the language is C, and the PWM signal is the output from a RC reciever intended for a servo, so, it is a 1-2 ms high pulse every 20 ms (if I understand that correctly)