The Cicuit Description:

RS232 outputs is current limited and it protects the PIC if it is bad inserted.

The input voltage on clock is limited by D3 and D4. No current limiting resistors is needed.

The build in clamp-diodes protects the inputs too, and D3 + D4 is not needed. But 24CXX has no clamp diode to Vdd, and then D4 is absolutely needed.

Q2 amplifies the output voltage to RS232 levels. Then it works as common base. R2 is the pull-up but it is not needed due to the limited current of the RS232 port. (See extra lowcost programmer).

Q2 also limits the input voltage to the PIC when DTR is high. Then it works as an emitter folower and input voltage is reduced to Vdd-0.7V.

Turning DTR low, will make Q2 to work inverted and the amplification is only about 5. The equivalent resistance is about 10K/5 = 2K. This reduces the input current on data to the PIC together with the resistor R2.

When DTR is turned from low to high, will Q2 switch from inverted, saturated mode to active emitter folower. This cause a spike on data, but the spike is dead when the clock changes. It makes sure that eeprom's is not turned into test mode.

Q1 works in a way as emitter folower too, but it is saturated when it is active. The voltage across it is very low. The transistor turns on or off the voltage at MCLR.

TxD powers C2 to be 13V trough the base collector diode of Q1. The voltage across C2 is limited by the zener D6 to be about 5.1V+8.2V = 13.3V.

When TxD is high will the voltage on MCLR not exceed this voltage. Base is pulled higher, but Q1 is saturated and the output will not exceed the voltage on collector.

C2 decoubles Vpp and Vdd trough the zener diode D6. But Vdd is decoubled only if the voltage on C2 is about 13V. If it is 8V, then it will be possible to control the power by turning RTS and DTR. The power on C2 is reduced to about 8V by helding TxD, DTR and RTS high for about 0.5s.

The extra diode, D5, limits the voltage on TxD. It is primary used, to power the eeprom when both DTR and RTS is high. It also guarentee that MCLR is higher than -0.2V when TxD low. The diode D7 pull's MCLR low when TxD is low.

The PIC is powered by RTS from D3 too. The input current on data also power the PIC to Vss. Both signals need to be negative to power the chip at highest possible current. C2 powers the PIC if the signals are positive. RTS and DTR is not critical when programming 24CXX, because the diode D5 pulls Vss down.

At programming PIC's will only D3 be used. RTS and DTR need to be low to power it, and they must not be high for long time. The current is extra high when reading a zero from the PIC, and the active reading time with DTR high must be short. To compensate the power used, will extra time at RTS low need to be inserted.

If replacing D5 and D7 with a BC557B, will it be importent to know that base-emitter is a zener diode. Only D7 may be a zener, and MCLR need be connected to this emitter, while collector of BC557B is connected to Vss. The transitor works in a way as emitter folower, and it pulls down MCLR at extra high current.

The high current is not needed, and may even dammage the BC557B if the programmer is connected to external power. Connecting the programmer to external power supply may always cause a risc, and it is not permitted for normal use.

Danger if connecting to external power supply: The internal zener diode reduces the voltage to 5.1V. It may be dammaged if too high voltage is applied. External connections may cause problems due to the negative voltage too. (Vdd is connected to computer ground and may short-circuit programmers if an external circuit is grounded to computer, e.g. by grounding the main). Applying external power also cause problems with the safety if turning around PIC's or other components.


E-Mail address: