Pic16f628a Programmer Circuit
If you try to pull more current from the ICSP than it's rated to supply, you could damage the ICSP, or trip the breaker in the USB hub (if you have a decent hub with proper breakers). It's reasonable to assume that an NPN transistor will not turn on spontaneously. It can turn on from the I/O pin.
If you wish to be extra safe, you can add a fuse to the +5V line in the ICSP cable. Few more comments on your schematic. • Did you deliberately not add a 47kΩ pull-up between MCLR# and +5V? • Schottky would be a better diode for back EMF protection of the relay. The +5v pin on the ICSP pin can be used to power an associated MCU, but it is not necessary. If it is not being used to power the device, the programmer uses this lead to sense when the programming cable is connected to the MCU.
Jump to USB PIC Programmer PICKit2 Modified Circuit Diagram - The built-in-clock generator of pic uses external crystal oscillator X1, C2 and C3. The programmer is powered from the Serial port itself, so there's no need to any external power supply. But be careful this circuit will not work with the Laptop Serial port due to the weak voltages it has.
So it still needs to be connected to +5. To avoid the pin being used for power, you can insert a diode with the anode connected to +5 and the cathode (+ or the end with the bar) connected to the +5v of the ICSP header. Contoh proposal disertasi pdf compressor.
In this case, you will need to connect the +5v rail to an external supply. $ begingroup $ Ok, now I can program the micro successfully. I made I simple test code in which I simply set the RA0 pin to 1 (and it stays at login high 1). However, the relay starts to oscillate rapidly instead of being steadily up. I'm using a 5V power supply rated at 1A. The relay pulls a maximum of 150mA so I should be ok. I can't understand why it oscillates.
I suspect the micro keeps resetting itself for some reason. How to hack vhlcentral free download programs. GIE is disabled so no interrupt are triggered.
$ endgroup $ – Jun 7 '15 at 12:50 •.