QuickStart Rev. A - serial comm.
makarcz
Posts: 14
in Propeller 1
In my character terminal project, I use QuickStart + Human Interface boards.
I use FullDuplexSerial object to provide serial communication port for my home brew computer, which currently has RS-232 based I/O.
I use different set of pins instead of P30/31 as I want to keep my serial port interface separate from Propeller programming interface:
I didn't have any MAX 232 or 233, so I looked on the internet for possible solutions.
I first tested this circuit, which I found in several places as recommended interface from Propeller to external serial port:
I connected Tx/Rx pins to P5 and P7 on Propeller and I left the /RES unconnected as I am not using this interface for programming the chip.
However I could not make this interface work and I don't know why. I tried connecting to a serial port of a PC and to my home brew computer.
I tried lower transmission speeds, replacing the parts (suspecting that transistors or resistors were at fault), tried disconnecting the Rx to DTR circuit completely, but all to no avail.
Sometimes when I set the Baud rate to a different (wrong) value, I would get garbage from the interface. I added debug code and it seems that all that I was getting from serial port was $FF.
I finally had a success with resistors only circuit:
I use FullDuplexSerial object to provide serial communication port for my home brew computer, which currently has RS-232 based I/O.
I use different set of pins instead of P30/31 as I want to keep my serial port interface separate from Propeller programming interface:
SerialTx_pin = 5 SerialRx_pin = 7Since my home brew computer which I will connect this character terminal to has a RS-232 interface, I had to build an interface on Propeller side.
I didn't have any MAX 232 or 233, so I looked on the internet for possible solutions.
I first tested this circuit, which I found in several places as recommended interface from Propeller to external serial port:
I connected Tx/Rx pins to P5 and P7 on Propeller and I left the /RES unconnected as I am not using this interface for programming the chip.
However I could not make this interface work and I don't know why. I tried connecting to a serial port of a PC and to my home brew computer.
I tried lower transmission speeds, replacing the parts (suspecting that transistors or resistors were at fault), tried disconnecting the Rx to DTR circuit completely, but all to no avail.
Sometimes when I set the Baud rate to a different (wrong) value, I would get garbage from the interface. I added debug code and it seems that all that I was getting from serial port was $FF.
I finally had a success with resistors only circuit:
RS-232 RXD <--------------220R-----------< PROP TXD RS-232 TXD >------|--------100K----------> PROP RXD 10K | GNDWith the circuit above I noticed immediate improvement, although I have to use low transmission speed of 2,400 baud only since the received from serial port characters skip with higher speeds. This I think is the problem with programming on Propeller side, so I don't blame it on hardware, but I wonder why the transistors based circuit didn't work at all?
Comments
I can't remember the details, what puzzled me most was that 4.7k resistor between Rx and DTR, so I changed that part.
I'm using it to program the propeller every day without problems, I even designed a PCB for it if you want.
Hope it helps.
I see no improvement with the Transistors, they really only work as inverters wih 3.3V level, and that can be done by inverting the signals in FullDuplexSerial driver.
The original Transistor circuit did some level conversion to +3.3 / -5..12V if you can set DTR to a negative voltage (needs a special driver on PC). But most PCs don't need negative voltages to detect a Low (Threshold is mostly at ~1.4V).
Andy
You should be able to test each way separately.
The RS232_TX to P1_RX is the simplest, so try that first, eg toggle a LED when an expected char is seen.
Next, use a terminal to manually change DTR or RTS, and you can use a diode to both DTR and RTS, and check P1_TX to RS232_RX.
I actually did and it worked.