You have a Pmod and you’re not afraid to use it. But where to begin? Naturally, you’re going to want to plug it in and start seeing some sign of life. But in order to do this one of the first questions you will likely need to answer is where exactly to do just that- plug it in. And although Pmod boards have generally been designed to plug directly into most Digilent host boards, there are some differences between host ports that need to be considered. In this post we will focus on FPGA’s. Later posts will discuss where to plug your Pmod in if you are using a Digilent microcontroller or Zynq board.
First, a couple of definitions. The male connectors on Pmod boards themselves are referred to as “Pmod connectors,” while the female connectors on host boards are referred to as “Pmod host ports.” The diagram below explains the distinction.
In general, there are three main ways to connect a Pmod to a host board in general. The first method is to plug the Pmod directly into a Pmod host port. The second is to use Pmod cables, which come in several varieties including 6-pin, 12-pin and 12-pin to dual 6-pin splitter cables. Lastly, Pmods can be wired up using MTE cables or individual jumper wires, which is necessary if the host board does not have enough Pmod ports built in. This last method is arguably the messiest but is still quite effective and a perfectly viable way to use your Pmod. In fact we do it all the time!
In terms of signals, the majority of Pmods use one of four different serial protocols: SPI, I2C, UART or GPIO. When using FPGA boards, the communication protocol is less of a concern when deciding which host port or which pins to plug into as each pin on the FPGA can be assigned to be whatever you need it to be. When working with microcontrollers it’s a different story, but that will be handled in another post. With these general considerations in mind, let’s start diving into the details.
I have a 6, 12 or 8-pin Pmod and want to use it with my Digilent FPGA board.
There are two main categories to consider when plugging in your Pmod, electrical connection and mechanical connection. We will break the two down:
When considering the electrical connection, the first thing you’ll need to know is whether your Pmod uses digital or analog signals (99% of Digilent Pmods are digital). If you’re using a digital Pmod (which you most likely are) you can plug it into any Pmod host port on a Digilent FPGA board and it will work. This is regardless of communication protocol used by the Pmod (e.g. SPI, I2C, etc.). What’s more, if you have a 6-pin Pmod, you can plug it into the top row or bottom row of the 12-pin host port. If your design permits, you can even plug two 6-pin Pmods into the same 12-pin host port, one on the top and one on the bottom. This is exemplified on the right hand side of Fig. 2.
If your Pmod uses analog signals, you’ll need to look for analog capable host ports. You can easily identify this port by checking the silkscreen of your FPGA board. You should see a Pmod host port labeled “JXADC.” See the image to the right for an example.
The JXADC port is wired to the auxiliary analog input pins of the FPGA. Depending on the configuration, this port can be used to input differential analog signals to the analog-to-digital converter inside the on-board FPGA (XADC). Be sure to also check your board’s reference manual to make sure you’ve correctly identified this port.
In terms of mechanical connection, as mentioned previously, you can plug directly into any host port, or cable connections can be used. We have 6-pin, 12-pin and 12-pin to dual six-pin cables specifically for this purpose. If plugging two 6-pin Pmods into a single host port, you’ll want to use the 12-pin to dual 6-pin splitter cable pictured in Fig. 2. Lastly, if you are trying to connect to a board without connecting directly to Pmod host ports (examples include using the shield headers on the Arty board, connecting 8-pin I2C Pmods, or connecting through a circuit on a breadboard), you can use MTE cables or jumper wires, also shown in Fig. 2. MTE cables can be purchased in packs of singles, or 6-pin, 4-pin, 2-pin, or other styles.
Although your digital Pmod will technically work with any host port on a Digilent FPGA board, there are considerations to make regarding high-speed ports that could improve performance. The high-speed Pmods use the standard Pmod connector, but have their data signals routed as impedance matched differential pairs for maximum switching speeds. They have 0-Ohm shunts in place of series resistors and therefore allow for much faster switching speeds, but offer no protection against short circuits. For this reason, we recommend these high-speed ports only be used if your Pmod requires data signals faster than 10 MHz, or if the standard ports have been used and additional ports are needed. In either case, caution must be taken not to use voltages higher than 3.3 V, or short FPGA-driven pins.
To identify these ports, check the FPGA board’s reference manual. The high-speed ports will either be labeled as such directly, or will be identified as having 0 Ohm series protection. Series protection is very important, to so make sure to note which Pmod ports have it and which don’t. See the images below for examples.
So to sum up, if you’re using a Digilent FPGA board it’s really quite straightforward to decide where to plug in your Pmod. First, ask yourself if it is digital or analog. If it is analog, you need a JXADC port. If it is digital, ask whether or not it operates faster than 10 MHz. If it does, then you should use a high speed port, but if it does not then use any standard port. Easy as that!
For any questions or comments, please use the comment section below or visit the add-on boards section of the Digilent Forum!