PIC16F628A Programming Low-voltage programming requires dedicating RB4 to PGM function. This is controlled by the LVP bit in a config register; when LVP=1 then RB4 is unavailable, the pin becomes the PGM pin. It is shipped this way from the factory. Therefore, to use RB4 as a programmable I/O pin -- clearly desirable -- high-voltage programming must be used, which overrides this, and when programming the device the LVP bit must be written to 0. Once this is done low-voltage programming is disabled and RB4 is a normal I/O pin. Programming mode is selected by raising /MCLR to high-voltage; see the programming docs. Programming pin assignments, in program mode only: PGM RB4 CLOCK RB6 DATA RB7 Vpp /MCLR LVP internal config bit