# CPLD interfacing

Discussion in 'General Electronics Chat' started by matty204359, Oct 21, 2012.

1. ### matty204359 Thread Starter Member

Apr 6, 2011
105
3
I have this MAX II CPLD dev board the teacher insists we use a 5volt TTL as an input to the CPLD. The data sheet clearly states a 4 volt maximum input on IO pins. Granted i have put 5 volts to it with no magic smoke being released. after reading a PDF about the situation. i am convinced it is a bad idea to keep running 5 volt inputs. The PDF recommends using a resistor on the input pin. They give a formula and example.

MY question however is couldn't I just use 2 signal DIODES to drop the voltage for the input pins? .7 volts each diode would give me 3.6 volts which is a logic high for the CPLD and it doesn't require any math? is there some thing I'm missing here? what advantage does the resistor method have?

Last edited: Oct 21, 2012
2. ### Sensacell Moderator

Jun 19, 2012
2,344
752
The diodes will drop the voltage and assert a valid HIGH state, the problem is when it goes low, the input will float.

You need at least:

1) A diode and a pull-down resistor.
2) 2 resistors in divider configuration.

matty204359 likes this.
3. ### takao21203 AAC Fanatic!

Apr 28, 2012
3,682
491
The CPLD may survive 5 volts.
It may suddenly stop working (+ take permanent damage).

Don't apply more than the given absolute maximum rated voltage.
If it says 4.5 volts, only apply 4.5 volts.
If it says 4.0 volts, only apply 4.0 volts.

CPLD is NOT TTL, it has nothing to do with it.

For sure a chip won't explode immediately from + 500mV.
But somewhere a border line exists.

matty204359 likes this.
4. ### matty204359 Thread Starter Member

Apr 6, 2011
105
3
okay! I get it it will look like a high impedance or non connect because the diode will stop it from grounding it.

the only problem I have with the voltage divider is i don't know how much current the cpld draws. in an ideal case i'd just use a 10k and 20k resistor and call it at day (2/3 * 5 volts ~= 3.3).

Its a 3.3 volt chip with a 4 volt max. I know its not TTL he wants us to interface it with TTL. I just am trying to find a way to do so safely, so when everybody else in my class has smoked their CPLD mine is still working.

Last edited: Oct 22, 2012
5. ### t06afre AAC Fanatic!

May 11, 2009
5,936
1,228
What chip are you using, can you find the the exact type. I know that MAX II CPLDS series have some 5 volt versions. If the chip is supplied with 5 volt. And it is a 5 volt type chip. You should be OK. It could also be that your board include the resistor needed in order to use them on 5 volt. Why not ask your teacher about this. Use the arguments you have come up with here.

6. ### matty204359 Thread Starter Member

Apr 6, 2011
105
3
EPM2210F324 is the exact CPLD

dev board datasheet does not explicitly indicate any sort of protection or interfacing circuitry.

The data sheet for the EPM2210F324 datasheet explicitly indicates an absolute maximum of 4.0 volts.

funny thing is most the ic's we have are CMOS (74HCxx) they wont have a problem driving the CPLD but the CPLD with 3.3 as high will put it in the indeterminate range of most CMOS logic chips.

MY mistake the datasheet indicates An absolute maximum rating of 4.6V and a recommended rating of 4.0V. so I guess 5.0v is only 400mV above the absolute maximum rating. I still dont feel safe about it.

Last edited: Oct 22, 2012
7. ### t06afre AAC Fanatic!

May 11, 2009
5,936
1,228
As far as I can see. You are correct. And you should never exceed the "absolute maximum" ratings. It could be that your teacher confuses the Altera 3000S series with the chip on your board. The 3000S series can handle up to 5 volt on the digital IO even if it running on lower voltage. The chip on your demoboard is not of this type.

matty204359 likes this.
8. ### matty204359 Thread Starter Member

Apr 6, 2011
105
3
Its nice to have some one agree with me, I'm gonna work on an interface circuit for the chip. thinking of a voltage divider or the diode with a pull down resistor. only thing is if i need it to be bidirectional I might need to use a series resistor instead.

9. ### takao21203 AAC Fanatic!

Apr 28, 2012
3,682
491
74HC can work from less than 5V.

matty204359 likes this.
10. ### matty204359 Thread Starter Member

Apr 6, 2011
105
3
good suggestion unfortunately we are required to use a "trainer" board that runs off a 5 volt supply.

11. ### t06afre AAC Fanatic!

May 11, 2009
5,936
1,228
But with a series resistor it should be OK, I think.