The Gooligum site offers some free tutorials that cover it, in assembly and I believe in C also. https://github.com/gooligumelec/PIC-tutorials
What effect are you looking for from the LED?
Another source is Nigel Goodwins Tutoriols.
Thanks 4 the replies, so far i've looked @ googligum files, looks good, theres one on Comparators in the Midrage folder using the PIC12F629, I've us that.
Regards the effect on the LED i'm looking 4 Max, nothing specific, just wanted to practice on a project, when i turn a Pot, it turns a the Led on/off, to show me its working.
Ultimate goal is to update my garden like circuit using a pic / comparator...... currently I'm turning 6xled garden lights on via an LDR attached to an Op amp circuit, LM358, switching a relay.
I c the concept of turning stuff on&off has got a whole lot simpler by simply using a wifi power point adaptor, & using the timer feature, but i guess thats to easy.
So i'd like 2 use an LDR or Photo transistor using a comparator & pic12f629 on my garden lights, is the ultimage goal.