first reading
http://www.picbasic.co.uk/forum/showthread.php?t=543

If you plan to blink on PORTA, read datasheet section 9 to know how to disable analog comparator.