Electronic – Reading datasheets and applying Ohm’s Law

datasheetohms-law

I have a CPLD that wants +3.3v and has a maximum allowable current per pin of 8ma. I need to supply a clock signal. The oscillator I selected accepts 5v and outputs 5v-ish levels. I'm finding it challenging to internalize the datasheets of the CPLD and the oscillator.

Now, the oscillator's datasheet says for my clock speed (1MHz), it typically likes 10ma (Supply Current, typical). Which means that as long as 10ma are available at 5v (Supply Voltage, typical) we're gonna have a lot of wiggly fun.

This is where I get confused. Since the output of the oscillator is up to 4.5v (Output Voltage Levels) and this exceeds the 3.3v required by the CPLD, I need to add a resistor. But I don't know what the current should be.

I arbitrarily decided that I will allow 4ma to reach the CPLD. This will prevent the smoke from coming out of it. The oscillator will source 16ma (Output Current) so I believe this isn't a problem. Ohms:

(4.5v-3.3v) = .004R
1.2v = .004a * R
1.2v/.004a = R
300 ohms = R

So a 300 Ohm resistor between the output of the oscillator and the CPLD's clock pin will prevent damage to the CPLD by limiting the current and reduce the voltage to the limits required by the CPLD.

Q1: Does any of this make any sense?

Q2: I assume that when the datasheet says the output current for "1" is -16ma, this means it will source 16ma. Why does the oscillator's datasheet say the oscillator's "0" current is 16ma? I'd have expected 0.

EDIT –

Wow, thanks for the great feedback. I will look for a 3.3v-compatible clock. While in retrospect it's just a better idea, I am surprised that adding a resistor would be so problematic. They seem to be used frequently in digital circuits.

Reference circuit… here's the datasheet for the CPLD. I have not seen a reference circuit as such. However (boy am I dumb!) I do have a working dev board 3' from me that sports an oscillator having "8.000 G MEC AL8GS" stamped onto the tin. (It's my assumption that's the oscillator. Looks like one. The only other thing nearby is a tiny Atmel chip of some sort that I suspect is related to JTAG programming.)

Edit 2 – I'm not married to any particular brand or type of oscillator; for my purposes a low frequency clock is ok. I believe anything over 500KHz would be fine. Back to DigiKey and Mouser!

Best Answer

I highly recommend that you find the reference design for the CPLD and if possible, recreate it and even use the same components. The reason companies provide this is that they want you to get started using their device and unless you have some exotic requirements, it usually does the trick.

You didn't provide the datasheet for the CPLD or the name, but I can tell you that you should choose another oscillator that is 3.3V compatible. CPLDs don't typically operate at 5V and this will likely violate the specs in the datasheet. As I said above, selecting the same as in the reference design (or find any other board that uses the same chip online and see what they're using) will be the best. Trying to reduce the signal level of the oscillator is a very bad idea because you'll introduce all kind of issues such as capacitance, frequencies, noise, etc that are bad bad bad. Even just using resistors will introduce issues that can cause the CPLD to malfunction due to all the capacitance and perhaps loading.

You must make sure that the power supply you have can provide plenty of current for the worst case of the CPLDs. From my experience with FPGAs, the inrush currents are very very large and quick, and you should plan for this. Again, the recommendation is to use whatever a reference design uses and perhaps tweak as necessary.

Related Topic