Quote Originally Posted by owali View Post
I wanted to try a very simple LED program for my PIC16F84A. I wired it in the following manner:

5V to 4.7k Ohm resistor to MCLR pin
5V to VDD
VDD to ground via .1uF cap
20 MHz ceramic resonator across OSC1 pin and OSC2 pin
Ground to Vss
Pin RB1 to 470 Ohm resistor to LED to Ground

The strangest thing happens though... The LED only goes on when I move my hand close to the circuit. I don't even have to touch the circuit, and the LED remains on(does not blink) until I move my hand away.

I have no idea what I am doing wrong. Can someone PLEASE help me figure this out?? Thanks
You don't mention anything about the timing capacitors. You need a 22pf - 33pf capacitor from OSC1 to GND and another between OSC2 and GND, with the resonator / Crystal between OSC1 and OSC2.

However if your resonator has three pins then the centre pin needs to be grounded. This is because three pin resonators have the capacitors built in.