In this example the junction of R3/R4 is connected to GP0 - it doesn't have to be - it can be any PIC pin with ADC or Comparator analog input.

VSS and VDD are shown not connected - it is assumed you will know what to do with them. VSS would be connected to the Neutral (0v) line - that's the SUPPLY Neutral and NOT the LOAD Netural. VDD is connected to your +5v Supply which if derived from a transformerless source is ideal (see elsewhere on this forum for examples of that).