3.3v <> 5v interfacing @ 15Mhz

Nov 25, 2006 81 Replies

dsPIC I/O port VinH requirement is 0.8*Vcc. At 5V it gives us VinH >= 4.0V. It's a little high for 3.3V circuit, isn't it?

WBR, Yuriy. "Resistance is futile"

Hi Alison,

While the transistors may have an ft of 100Mhz their switching response can be quite poor. You could try one in common base mode. Emitter to DO of the 3v3, 2k2 from base to 3v3 and the collector to DI of the PIC with a 1K0 pullup to +5V.

While VIH is specced at 0.8 * Vsupply the parts with CMOS inputs will generally switch at about 2.5 volts. The 0.2*VDD for VIL and 0.8*VDD for VIH are the guaranteed levels.

Regarding your driving the 3v3 inputs from the PIC. The input capacitance your SPI device could be 'thumb-sucked' at about 20pF. Your

1K8 and 3K3 gives a node impedance of about 1k1 which when combined with the 20pF gives a delay of about 20nsec. The gap between clock edges at 15Mhz is only 33nsec. Combined with logic propagation delays this could easily cause data corruption.

A way to get around this would be to fit a cap of about 33pF across the

1K8 resistor - the idea is the same as used on the 10megohm scope probe inputs. The cap may have to be bigger or smaller depending on the actual input capacitance of the device, but I would guess that the 33pF would probably fix it.

Regards Rocky

Haven't you been reading the thread? We discussed that and Alison added transistor buffers that should have fixed the problem and instead made it worse. That says to me that although driving from 3.3 may not be meeting the spec, it is working in her case and she has another issue.

Hi Rickman,

It's working :-) I made up a small board of solid copper, and am using a fixed 2k/1k divider to give 3.33v.

Have a look at this picture to save 1000 words;

formatting link

Not something I'd want to leave on my car seat at an airport!! Most of the wires are now redundant. The little upright board has a MAX232 on it. Your transistor circuit is over there on the lower right. The upper right are those awful dividers from before.

Even the two most troublesome cards I have are working (they're about

3-years old).

What does that tell us in the end? That breadboards are seriously problematic.

Our DATA OUT signal from the SD card is now directly connected to the SPI-IN port on the pick.

Alison

Hey Yuiry!! :-)

I'm going to order a few of those ICs you suggested, as to be honest I like the right way of doing things. And resistor dividers don't seem to be the

100% reliable tool for the job.

If there's an IC specifically for 3.3v/5v bidirectional comms, then I think it's good practice to use it.

That dsPIC is now recognising 3.3v as positive '1' at 15Mhz. It had been spoken of that PICs would work with SD cards directly, yet the datasheets suggest otherwise. So it's sensible to stay within spec.

This will be a data storage device afterall, so nothing can be left to chance.

Thanks again :-)

Alison

[snip]

For 3.3V to 5V Logic...

formatting link

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Yes, it does look a little rough. I don't think many people still use those push boards just because they can create problem with the speeds of today's circuits. The stuff we do goes directly to PCB. In fact the last board I designed had *no* artwork revisions and the first rev is being shipped to the customer now.

Like you say in your other post, this is clearly not meeting the spec and so you should consider changing it. However, as others have pointed out, circuit delays can add up and be a problem at 15 MHz, especially since the SPI bus is only using half a clock for setup (33 ns). So when you pick a buffer, make sure it is not one of the really slow HC or HCT buffers. Try to pick one with < 5 ns delay which should not be a problem at 5 volts. At 3 volts you may see a bit longer delay, but you should be able to keep it below 10 ns. This should all be spec'd in the data sheet.

Incredible. Designing complicated circuit instead of simply using

74HCT14 / 74HCT04 / zillion other HCT74xx and AHCTxx ICs.
WBR, Yuriy. "Resistance is futile"

This is exactly what expected from *transistor* buffers at this speed. Duh.

WBR, Yuriy. "Resistance is futile"

Alison,

I hate to tell you this, but that solderless breadboard is about the worst thing you could be using. With edge rates of 10ns and periods of 33 ns, you are talking serious ringing and ground bounce. This kills data integrity regardless of how good the paper schematic looks. The breadboard will also develop intermittent connections after a while, so you end up spending all your time chasing random problems.

Walt Kester, Analog Devices states:

"Matrix board, Vectorboard, wire-wrap, and plug-in breadboard systems are, without exception, unsuitable for high-performance or high-frequency analog prototyping. The resistance, inductance, and capacitance of these breadboards are too high."

He shows some examples of high-frequency prototyping here, but the photos are too small:

formatting link
(198KB)

Here are some examples of "deadbug" and "solder-mount" prototype circuits:

formatting link
(598KB)

Also look for "Manhattan" (and the incorrectly spelled version, "Manhatten") breadboards.

Terry Ritter has an excellent example at

formatting link

I hope this helps. If you need any more information, please ask.

Regards,

Mike Monett

Antiviral, Antibacterial Silver Solution:

formatting link
SPICE Analysis of Crystal Oscillators:
formatting link
Noise-Rejecting Wideband Sampler:
formatting link

Wow! This is the case when the extra knowledge only harms. Why didn't you use a simple gate of a standard LS or HCT series?

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Hi Mike,

Thanks for the info. Reading through now.

I'm going to try and get the circuit onto PCB in the next week or so. The final design will also switchover to TQFP devices. At the moment it just about serves the purpose of providing a base from which I can develop the firmware for the chip.

To be honest, I hate breadboard!! But am not in a position to create PCBs. The closest I can do is 0.1" pitch, printing out the circuit, drilling the holes through, dalo-ing out the bits I want to keep, and then ferric-ing off the rest. That's just toooooo messy.

Prototype PCBs here in the UK are still astromonically expensive compared to the US.

Thanks again,

Alison

74LS: VoutH >= 2.4V It is actually worse, than 3.3V CMOS.
WBR, Yuriy. "Resistance is futile"

You've just proved yourself an incredible dumb-s*it ;-)

You have NO clue what "HCT" actually means. It DOES NOT MEAN that a

+3.3V CMOS input is satisfactory.

There ARE, however, specialty chips made for 3.3V 5V logic translators.

Sheeesh! Another employment candidate for Fry's ;-)

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

You're exhibiting the same ignorance of how IC's work as Yuriy K.

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Hi Jim,

Nothing wrong with what you've said. It's all stuff I'm reading through so none of it is wasted :-)

thanks,

Alison

Thanks!

These _little_boys_ just get on my nerves chastising me and saying that HCT would work properly in your application.

...Jim Thompson

| James E.Thompson, P.E. | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC\'s and Discrete Systems | manus | | Phoenix, Arizona Voice:(480)460-2350 | | | E-mail Address at Website Fax:(480)460-2142 | Brass Rat | | http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Now, now :-)

Everything everyone has said is valued. It's enabling me to build up a wider picture of what can be done and what the options are. What I do and don't do I won't announce though. :-) I'll go with what is reliable with my own eyes.

The trouble with the net is that since it's so *company* driven, there is only their view since it's so difficult now to Google search for the old fashioned diy and educational stuff. If only we could go back 10-years to when companies laughed at the Internet. Searching was a hell of alot easier before they came along. Usenet has calmed down alot too, we'd be threatening to murder each other with a pickaxe by now. (those were the days).

:-)

Alison

This is exactly correct.

Extra knowledge only hurts to the fools.

RTFM, dude.

It does mean that > 2.0V is guaranteed 1 and < 0.8V is guaranteed 0. The threshold is normally at 1.4V which is exactly what is required for

3.3V CMOS interfacing.

Oh, you don't say.

Have the courage to admit the mistake, dear.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

formatting link

Your ignorance is very loud and of highest quality, I must admit. Not everybody can achieve that level. Have you ever read datasheet, or any textbook for the EE? "The Art of Electronics" would be a good start.

SN74HCT14

formatting link

VT+ max 2.1V VT- min 0.5V

SN74HCT04

formatting link

VT+ max 2.1V VT- min 0.5V

Other manufacturers have similar characteristics.

Typical 3.3V logic:

SN74HC04

VoutH min 3.2V @ 20uA VoutL max 0.1V @ 20uA

After all these years of design it is finally time to learn the basics. :)

WBR, Yuriy. "Resistance is futile"

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required