I am playing with a Xilinx Spartan-3A development (XC3S50A-TQ144C) and then I tried to implement RS-232 serial port by following the guide here: http://www.fpga4fun.com/SerialInterface.html

I bought a DB-9 port and connect RxD,TxD,GND of DB-9 port to three pin of my development board. (Of coz GND is connect to the GND of my board)

I tried to send a signal of one character every second from the pin to TxD. I checked the signal with a scope. The signal should be correct.

But I cannot see any character shown on my terminal by reading from /dev/ttyS0 (Serial port on Linux).

The scope show that the signal is sent using +2.5V and -2.5V respectively. I think the problem is that serial port should be sent with at least +5V / -5V. How can I modify the board (or construct an amplifier circuit) to send signal in higher voltage?

I have a photo capture of my scope here:

enter image description here

  • \$\begingroup\$ Did you verify if the serial port on your PC works? \$\endgroup\$ – jippie Mar 30 '13 at 12:59
  • \$\begingroup\$ I cannot fully confirm as I do not have any serial port hardware now. But I connected RxD to one of my LED in the configuration. When I open /dev/ttyS0, I can see the signal of RxD change. I also tried with another USB to Serial port connector too. \$\endgroup\$ – wonghang Mar 30 '13 at 13:02
  • \$\begingroup\$ Have you got Tx (on your dev board) connected to Rx (on your pc)? \$\endgroup\$ – Andy aka Mar 30 '13 at 13:05
  • \$\begingroup\$ There is no TxD (or serial port) on my development board. They are just custom pin for me to program. I am building a serial port from scratch. \$\endgroup\$ – wonghang Mar 30 '13 at 13:07
  • \$\begingroup\$ What RS-232 interface are you using? Have you checked that is working properly? \$\endgroup\$ – Leon Heller Mar 30 '13 at 13:20
  • Look up the voltages for RS-232, your 2.5v logic is nowhere close. 5v and sometimes 3.3v logic may work to a degree, but is out of spec.

  • RS232 serial is inverted (traditionally in the level translator chip) from the sense of logic level serial.

  • if you connected an RS 232 output to your fpga without a level translator you have likely damaged it.

  • it is unlikely that you are getting -2.5v out of your fpga, rather this sounds like a measurement or description error.

In summary you need a level translator.


Chris is right, if you want to connect your FPGA to a serial port of any kind, you need to have a proper RS232 driver like the MAX3232 or similar. Just like this from Pantech Solutions:

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.