I completely forgot to say that I already have two 25pF capacitors correctly attached to the circuit, otherwise I think it would not even work with the PIC628 right?
--Edit: Just noticed, sometimes I plug it to power and it runs for like 3~4 seconds, then stops.
MCLR requires a high state to work and low state for reset the micro... with no pull-up (10kohm to VDD) it's in no definite state so with your finger it goes to high or not... mostly static and so....
---------- Post added at 17:11 ---------- Previous post was at 17:06 ----------
never forget to set a pull-up to MCLR, VDD to 5V GND to 0V the crystal
and also a common led works with 2.4V 5mA (not exact data but it works) so if you give it 5V it's certainly it will be burned or at least will heat... with a 200ohm resistor you limit the current to almost 13mA (5-2.4 = 2.6/200ohm == 13mA just a little high) but also it depends on your Led, i would set a 330ohm or higher (up to 1K) resistor for any led in my circuits...
---------- Post added at 17:12 ---------- Previous post was at 17:11 ----------
aaaannnnd also Don't forget that a common IO pin in a PIC at most can draw or source 20mA of current... so don't push it too far....
Thank you all, very useful, replaced my 200ohm led resitor with a 1k one, also MCLR doesn't seem to do anything different whenever I use the 10k resistor, a 400ohm resistor or directly connected.. Then what do you mean with the high/low state?
MCLR/VPP = MCLR and VPP are two functions on the same pin;
MCLR means Master Clear, and functions as the Reset pin on the PIC micro, causing the PIC to be held in a reset state as long as MCLR is at 0 volts. When MCLR is connect to VDD instead, then the PIC begins running by executing the first instruction in program memory.
VPP means Voltage for Programming. When there are 9-12V ( need to see the specific datasheet) on this pin, the PIC goes into a special reset state where it's not running, but it can be programmed.
MCLR/VPP = MCLR and VPP are two functions on the same pin;
MCLR means Master Clear, and functions as the Reset pin on the PIC micro, causing the PIC to be held in a reset state as long as MCLR is at 0 volts. When MCLR is connect to VDD instead, then the PIC begins running by executing the first instruction in program memory.
VPP means Voltage for Programming. When there are 9-12V ( need to see the specific datasheet) on this pin, the PIC goes into a special reset state where it's not running, but it can be programmed.
it's always recommended to put a pull-up resistor at MCLR, you can use a higher res up to 47kohm or lower even directly to VDD
but
if you plan to put a RESET push button, you can´t put MCLR directly to VDD, so it should have a pull-up ressistor... this resistor shouldn't be too low so the current while pressing the button shouldn't be too much...
also leaving it with no pull-up could make it very vulnerable to static and noise...