SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Stevetronics
#110147
Hey all,
I'm working on a V-USB project, and have been looking at the issues with level shift in the usb lines. My ATmega32 HAS to run at 5v for this project, as there are other (much, much older) ics in the circuit that will _not_ run at 3.3v, despite my attempts. (I'm talking to you, Intel 8021). I need a way to bidirectionally level shift the D+ and D- lines of the USB interface from 3.3v (computer) ------ 5v (Project). I've read elsewhere on the forum about level shifting with mosfets, but I couldn't tell how it could work bidirectionally.
Thanks in advance for anybody's help.
Steve
By xyf
#110148
From the V-USB page:
If you need to run the AVR at 5 V, add 3.6 V zener diodes at D+ and D- to limit the voltage.
By tecoist
#110150
The mosfet trick works for I2C because that bus uses passive pullups to Vcc. As you suspected, it does not work for USB.

The V-USB folks have some suggestions: V-USB Wiki: Hardware. If you are cheap (and there's nothing wrong with cheap) and are comfortable with their assertion that you can get it to work "close enough to make it work reliably" without actually meeting the USB electrical specifications, there you go. The zener diodes that xyf mentions are V-USB's plan B (plan A is to run the Atmel part at 3.3V).
By Stevetronics
#110188
Thanks guys! Zeners it is.