Spartan 3 Starter Kit I/O ports

Hello,

I am relatively new to VHDL design, and I bought this board as a first time learning kit.

I was mainly interested in the I/O expansion connector for this board. It appears that the connector has both 3.3V and 5V outputs. If I had wanted to interface the board with a PS/2 port for example (which uses

5V logic levels), how can I force the Spartan board to output 5V logic levels and not 3.3V output?

I'm not too sure if this is even possible since the FPGA's voltage requirements is only 3.3v.

Thanks for your help.

Reply to
vu_5421
Loading thread data ...

I believe the S3 starter kit already has a PS/2 port, but I suppose if you want both a mouse and a keyboard, you would need to add another.

As for the voltages, 5V devices can see a 3.3V driver just fine. 3.3V is well above the 2.5V threshold for TTL logic. The trouble is that a

3.3V device can't interface directly with a 5V driver as it is beyond the voltage tolerance of most parts. You can simply use a shottky barrier diode to clamp the voltage at 3.3V, though. A lot of development boards already include some I/O with clamping diodes, but I'm not sure about the S3 starter kit board.
Reply to
radarman

Radarman,

Thanks for the reply. Just wanted to clarify your response:

So you are saying even though I can send signals to the computer PS/2 port using 3.3V levels just fine, the signals I receive back will be too high for the Spartan board's components?

radarman wrote:

Reply to
vu_5421

For 5V to 3.3V interfacing:

Just use a ~100 ohm series resistor.

The S3 has clamp diodes to Vcco and ground, so you are not violating any specifications using the series resistor.

formatting link

applies to Spartan 3, 3E as well.

Many 5V TTL drivers do not really drive all the way to 5V, check to see if they are true CMOS output structures (then they do drive to 5V). If they are npn bipolar, or all nmos outputs, then they pull weakly to something less than 5V, and usually can not source more than a few milliamperes into the clamp diodes (and no resistor is needed, at all).

Austin

Reply to
Austin Lesea

Austin,

Thanks for the comments.

I did a search on Xilinx answers database and found this article:

formatting link

Answer Record: 19146

It pretty much reinforces what you had mentioned. Although I am still unsure on the result of the series resistor if the I/O pin was a bidirectional pin. I assume it would work fine for a 5V input signal (from PC PS/2 to Spartan3), but what about outputting the same signal to the PC?

The article above quotes: "Spartan-3/-3E I/O can be made 5V-tolerant by using an external series current limiting resistor to limit the current into the upper clamp diode to 10 mA. This makes the input 5V-tolerant, but an I/O configured as an output still cannot drive 5 Volts and the resulting VOH does not meet the input specifications of the 5V device."

Btw, it appears they would reccommend a 300ohm series resistor instead of a 100ohm.

Thanks all for the help.

Aust> For 5V to 3.3V interfacing:

Reply to
vu_5421

vu_

I prefer the ~100 ohms.*

As for the other direction, previous post already answered that: a

3.3V cmos driver is more than sufficient, as the TTL hi level is 2.4 volts.

Austin

*The issue is how much current should you inject into the pmos body diode. The answer is that for the entire device, it shall be less than the JEDEC latchup specification of 200 mA, or else you risk activating the parasitic npnp structure, and causing destructive latchup. So, if a bus has 10 pins, that would be 10 X 20 mA (max) for each pin.

3.3v + 0.5v (diode) = 3.8v

5-3.8=1.2v

1.2v/10 mA = 120 ohms (for twenty IOs, all overdriven).

If you have more than 20 IOs, then you should have more than 120 ohms.

300 ohms would allow for ~50 IO's, all driven at the same time high, strongly to 5.0 volts...if my math is right. 300 ohms/50=6 ohms. 1.2v/6ohms=200mA. Yes, I think that is exactly right.
Reply to
Austin Lesea

The VOH might not meet the VIH spec for some 5v logic family, but in the real world it is almost certain to work if the distance isn't too great and the speed not blindingly fast (you resistor is after all mostly working against input capacitance). For a hobby project or experiment, that's likely enough. Otherwise, look at the specs of the actual receiver.

Another thing to build confidence - try substituting a vastly larger series resistor. Keep increasing it until you get errors. Compare that value to the 100 or 300 ohms being considered, and you have some rough but practical idea of your margin (ie, if it works with a series resistor of a few K, 300 ohms isn't much to worry about)

Reply to
cs_posting

Reply to
Peter Alfke

The way we do it in our development board products is to use a bus switch to protect the Spartan-3 with pullups to 5V on the keyboard side to ensure we make 5V CMOS levels. Using the bus switch, or a series resistor, is probably better than an active device as some lines are bi-directional using open drain style driving. Controlling an active driver can have a few issues if you are not very careful on these lines. Have a look at our schematics as to what we do. Follow link to our PS2 module on our module page

formatting link
to access them.

Most keyboards etc with PS2 will be happy with TTL level capable of being driven by the Spartan-3 but occasionally we have seen some that need the higher CMOS levels.

John Adair Enterpo> Hello,

Reply to
John Adair

I will start implementation later in the week, I'll post my results.

Thanks for every> The way we do it in our development board products is to use a bus

Reply to
vu_5421

Just please read the section on the PS2 port in the Spartan3E users guide before adding any resistors. They're already there.

Reply to
John_H

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.