General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
-
hxhl95
Post
by hxhl95 » Fri Aug 10, 2012 8:09 am
Hi all,
I have an ATmega328p which has its PD2 as D+ and PD3 as D-, as per the V-USB default setup. However instead of diode clamps to enable my 5V ATmega to talk to the 3.3v USB bus lines, I have used a different level converter. A schematic of the level converter:

Question: I'm not quite sure what to do with the 1.5K pull-up resistor that is supposed to be on D-. Assuming SH in the above circuit goes to PD3 (D- pin on the ATmega), should I replace R1 with a 1.5K resistor? Should the 68 ohm series resistors go on the SH or the SL side, if they are critically necessary at all?
Due to a certain unfortunate series of events I can no longer change the hardware for the level conversion very much, so I would appreciate some input on how to get V-USB to enumerate properly using this level converter.
Thanks

-
ulao
- Rank 4

- Posts: 481
- Joined: Mon Aug 25, 2008 8:45 pm
Post
by ulao » Sat Aug 11, 2012 6:14 pm
I can't tell exactly what your setup is without seeing the entire schematic but:
" I'm not quite sure what to do with the 1.5K pull-up" -- Yes you need it, yes it goes on the d-. Releasing this drops the USB.
" Should the 68 ohm series resistors go on the SH or the SL side, if they are critically necessary at all?"-- Just make sure the are on the side that is closes to the chip.
Personally I dont think the USB will work without the diodes. If it gives you troubles run your device in to a hub first. Seems that in my experience they are not needed on some hubs ( i.e belkin ).