Transistor Logic inverting PIC UART input??
Posted: Tue Oct 31, 2006 1:07 pm
I have a 18F1320 where the UART works goes to TTL fiber optic transmitter (Optek OPF1412T) and Receiver (Optek OPF 2412). Using a 74LS00 Nand gate on the receiver with a 560 ohm pullup on the one NAND input and other tied to 5 volt, everything works fine at 9600 baud. Prefer using transistor inverter. First tried (NPN) 2N2222A with :5 volt > 1K ohm > collector, Emitter > ground, and signal (from OPF 2412) > 4.7k ohm > Base. With Pic online, no joy, but remove the PIC and jumper TX > RX, OK. As I understand the 1320 (with schmidt) low level needs to be 0.2 volt or less, and I was getting 0.3 volt. Then tried (PNP) 2N3906 with : 5 volt > Emitter, Ground > 1K ohm to collector, and signal > 4.7K > base. Now the low is getting to 0.00 volts. Tried a 0.01 mfd capacitor between 5 volt and ground. The Tx > Rx jumper thing still works, but the 1320 should receive one of several characters and respond with a string or a character, which isn't happening.
I also have a MAX232 on the circuit, the transmitter (from the 1320) always active, but a jumper to select either the RS-232 or fiber receiver so as not to drive the RX pin from 2 sources. The copper serial is OK.
The board is a PICPROTO18, the fiber optic goes to a 6' Tyco jumper cable (with loopback works fine) to a B&B FOSTC serial (either RS-232, Rs-485, but now RS-232) to fiber optic converter to a PC.
Assuming I have some sort of timing issue with rise fall times, but I don't have a O-scope to troubleshoot.
I also have a MAX232 on the circuit, the transmitter (from the 1320) always active, but a jumper to select either the RS-232 or fiber receiver so as not to drive the RX pin from 2 sources. The copper serial is OK.
The board is a PICPROTO18, the fiber optic goes to a 6' Tyco jumper cable (with loopback works fine) to a B&B FOSTC serial (either RS-232, Rs-485, but now RS-232) to fiber optic converter to a PC.
Assuming I have some sort of timing issue with rise fall times, but I don't have a O-scope to troubleshoot.