ENC28J60 @ 3V to 18Fxxxx @ 5V how do you do the level translation?

Status
Not open for further replies.

blueroomelectronics

Well-Known Member
Looking for a simple solution for the SPI bus between ENC28J60 and a 5V PIC. Since the ENC28J60 is 5V input tolerent that's easy 100 ohm resistor, but can I hook the SPI directly to the PICs SPI DI port? Can I do it with a couple of transistors?
 
How about this as a quick and dirty solution.

**broken link removed**

When 3V is transmitting, diodes conduct so,
0 -> 1.4
3 -> 4.4
When 5V transmitting,
5 -> tolerant anyway.
0 -> 0

Mike.
 
Last edited:
Try here:

https://www.sparkfun.com

Theres a schem and tutorial on the news on the main page.

Worked for me, but impractical for more than a few lines. If the lines are unidirectional I believe some 74 series (LVHC?) buffers can run down to 3v, but the inputs have up to 7v input protection, making them ideal for 5v -> 3.3v conversion.

Blueteeth
 
Great solutions all around, much thanks.

The PIC is running at 5V for two reasons, speed and compatibility with my 5V ICD.

Hmm looking through and a reply from the Microchip forums seems the logic high for a 5V PIC is 2.0v and the logic high output from the ENC28J60 is 2.6V (3.3V-0.7) so it should work directly, if so then why do most schematics include some sort of level conversion?

It's going to a 18F2620 (64K Flash bytes) and I may avoid using an external EEPROM in the design since the 18F has those great table instructions.
 
Last edited:
blueroomelectronics said:
Looking for a simple solution for the SPI bus between ENC28J60 and a 5V PIC. Since the ENC28J60 is 5V input tolerent that's easy 100 ohm resistor, but can I hook the SPI directly to the PICs SPI DI port? Can I do it with a couple of transistors?

It will not work directly, because on PIC high level starts from 0.7 Vdd and up.

On one project I hooked MMC flash card to 5V PIC via 5V tolerant 3.3V powered 74 series AND gates. Worked as a charm.

Don't mind the attached picture.
 

Attachments

  • pic-input-voltage.jpg
    131.1 KB · Views: 596
Last edited:
dipmicro said:
It will not work directly, because on PIC high level starts from 0.7 Vdd and up.

On one project I hooked MMC flash card to 5V PIC via 5V tolerant 3.3V powered 74 series AND gates. Worked as a charm.

Don't mind the attached picture.
Pictures are great, I love em. I read that picture differently, the 0.8 VDD +.25 is for less than 4.5V the 5V spec says 2.0 volts min. Maybe I'm reading it wrong...

MMC cards are not 5V tolerent... the ENC28J60 is.
 
Last edited:
I'm guessing that level transition was (and still is) needed for 16 series as these operate on 0.7Vdd (3.5V). The 18 series appear to have been designed to work with 3V logic.

Mike.
 
you'd think Microchip would have an app note detailing an easy way to connect one of their 3.3v products to one of their 5v products?

Papabravo hit the nail on the head according to Microchip;


alternately, how about using one of the sexy new 18F's with the ethernet mac and phy built in!? The PIC18F67J60 has 128KB of flash on board!
 
The 18F67J60 is 3.3V and the TQFP package is really tricky to hand solder, really nice part though.

Looks like I'll use the 74HCT solution. I do think the diode version is pretty cool.
 
blueroomelectronics said:
I read that picture differently, the 0.8 VDD +.25 is for less than 4.5V the 5V spec says 2.0 volts min.

Actually, the parameter D040 is with TTL buffer. The SDI pin does not have a TTL buffer, so that parameter is irrelevant for your application and parameter D041 (RC3 and RC4) applies.

blueroomelectronics said:
MMC cards are not 5V tolerent... the ENC28J60 is.

Correct. One can connect directly to ENC but has to clamp the voltage to flash card:

**broken link removed**

But that was not your question. I understood you were asking about path from ENC to PIC.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…