Isolated RS232C for PIC16F84
Connect serial transmit bit of the transformerless supply PIC16F84 circuit with COM1 through the use of isolation device. Protect your notebook from direct connected to power line.
Another method that helps program development besides a dot LED as the output device is a serial bit. With a serial transmission to a terminal emulator program, developer may then test program running easier than a dot LED. One of my circuit uses PIC16F84 having one bit for sending ascii character with “printf” function. The PIC16F84 provides a very convenient way of connecting serial data to terminal. We may use a 1K resistor connects RB1, say to RxD pin of COM1 directly. As shown above diagram, my PIC circuit uses a transformerless DC supply. Direct connection is then not recommended for safety. The ground voltage difference between two circuits may destroy the RS232 converter chips. We thus need an isolation device to separate AC line and notebook circuit.
The example circuit for PIC16F84 shown below, uses RB1 as a TxD pin. Digital baseband is NRZ, i.e., data bit 1 is logic high and data bit 0 is logic low. The heart of the circuit is a 4N26, an opto-isolator with NPN output transistor. Since the output port of the 16F84 can drive LED directly, say with sink current. We need only a 180 Ohms current limiting resistor connected to RB1. The output signal of the opto-isolator connects an RS232 level converter, DS275. You may use MAX232 or someone may use -10V from TxD pin with PNP transistor to switch -10V to RxD. Without the use of RS232’s line supply, we need additional +5V, as shown with a 78L05. The supply for DCin must be separated from notebook’s supply. I suggest to use the AC adapter that uses transformer. Do not use a light weight switching adapter.
For more detail: Isolated RS232C for PIC16F84
EasyEDA: Ideas for Circuit Design, Innovation for Electronics Access
Free Circuit Design: Schematic – Simulation – PCB Layout – Gerber Viewer
Cheapest PCB Prototype: Only $2 for 10pcs 10×10cm PCBs, 24 hours Quick Turn, DHL Delivery in 3 Days