Jump to content
  • 0

Using ARTY A7 with PMOD RS232


Lyao

Question

Hello,

I already have a working ARTY firmware design of UART communication from the ARTY to the computer via the micro USB cable. My new design need to use the DB9 connector as the interface so I'm looking for a convienent way to do the porting. I found that the digilent official has the PMOD RS232 module which seems to be very helpful for me. 

After reading the manual I still have some questions, can I simply plug the PMOD RS232 to one of the 4 PMOD interfaces on the ARTY and change my firmware pin assignment of the UART_TXD and UART_RXD to the corresponding TXD and RXD pins on the PMOD? How should I deal with the CTS and RTS pins? If I do not want the handshaking feature can I bypass them by unload JP1 and short JP2? The manual said when the JP2 is shorted the JP1 should be left open to avoid potential device damage, but from the product photos it seems the default setting is to short both JP1 and JP2 when delivered, which looks a little confusing to me.

It will be very appreciated if someone can help me to clear these questions, thanks in advance!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

2 hours ago, Lyao said:

My new design need to use the DB9 connector as the interface so I'm looking for a convienent way to do the porting.

Well, using the term 'porting' is possibly a bit optimistic.

First of all understand that you will be using RS-232 so the first step is to do research on RS-232. The older charge-pump RS-232 level converter devices are unlikely to work at the same higher baud rates as a USB serial port, especially those using the higher RS-232 signalling levels. You will also have to understand DCE and DTE perspectives; this has always been confusing on a working level and adds the added twist that the media  (cabling) now has something to say about signal directionality. There are gender changing adaptors to deal with this. Personally, I'm happy not to have to waste time looking for the combination of adaptors that work with my RS-232 setup.

At 115200 and below CTS and RTS hardware hand-shaking shouldn't be an issue. I've highlighted shouldn't because it's been a while since PC motherboards have had a serial COM port connector. So if your target is a really old PC or an SBC or some other micro-controller board than you might want to support hardware handshaking.

As to the direction for the UART signals defer to the PMOD-RS232 user manual. When connecting anything to your FPGA board for the first time it's really really important that you understand how the hardware works, at least as far as logic level compatibility, pin names, and who's driving what signal.

When in doubt asking questions is a good thing to do; but even after you get answers you need to make sure that what you are doing makes sense and that you understand enough of what's going on so as to avoid damaging your hardware.

Make sure that your constraints file reflects the correct pin assignment for the UART signals connected to whichever PMOD connector you want to use.

One nice aspect of using a true RS-232 interface is that you can use a very long cable between the ends.

 

Link to comment
Share on other sites

Thank you so much for your advice, yes you are right I'm not very familar with the details of the DB9 RS232 and just want to reduce some work here.  The other side is a HUB with multiple DB9 connectors and one USB port to the computer. Probably I need to do some test directly and debug based on the results. If it doesnt work I guess I can pick some other spartan6 FPGA kit with real DB9 and adapter chip to implement the firmware again. 

Link to comment
Share on other sites

If I was assigned your task I'd start off with the requirements ( it's never a bad idea to nail down requirements before starting on a project... ).

  • what are the baud rates that need to be supported?
  • what are the applications that need to be supported?
  • what are the cable lengths for connected devices?

That is a lst to start with. It might be that the task is easy. It might be that the task is difficult. It depends on what the end result has to do. Never accept a task with open-ended or undefined specifications or movable goalposts in a set time frame if you can get answers to basic specification questions. If you work for someone who likes 'mushroom farming' think about changing workplace addresses sooner rather than later.

Note: Be aware that RS-232 levels were a changing specification. You should read a few datasheets for RS-232 level converters to see what I mean. In the heyday of PC serial ports a lot of these level converters used levels closer to 3-5V. I suspect that your HUB supports a wide variety of actual levels but I'd never make assumptions... Assumptions are engineering killers.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...