Pic16f628a Programmer Circuit
The MPLAB® PICkit™ 4 In-Circuit Debugger/Programmer allows fast and easy debugging and programming of PIC®, dsPIC®, AVR, SAM and CEC flash. Simple 3 Resistor PIC Programmer: Micro-controllers play a very important role. To the schematic, these resistors are connected to the following pins of the PIC:.
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. 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. 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. Serato scratch live skins.
I suspect the micro keeps resetting itself for some reason. GIE is disabled so no interrupt are triggered. $ endgroup $ – Jun 7 '15 at 12:50 •.