I'd like to make a device similar to the "Digispark", but what really bugs me about those (and most, if not all, V-USB designs, at least all I could find online), is the "waste" of a GPIO pin which is just the negative of another pin for the differential pair. so I wondered if there's an easy (and cheap+small, so low chip count) way to do the differential pair to single ended full duplex conversion?

methods I know of:

  • using an opamp to convert differential pair to single ended
  • using a NOT gate to convert single ended to differential pair

the problem is I obviously couldn't just put those two in parallel, or I'd produce a feedback loop.

Is this even possible without having a dedicated IC that understands USB or another "wasted" pin to indicate the direction? the circuit would have to distinguish between a driven output and a high-impedance input pin in real time essentially, and I have no idea if or how that could be achieved.

  • 8
    \$\begingroup\$ USB is not true differential. There are states that require both D+ and D- to be low. \$\endgroup\$ Jul 30, 2018 at 21:00
  • \$\begingroup\$ What are you going to use the extra pin for? If it is a microcontroller with a built-in USB peripheral and a diff pair of signals, you won't be able to use it for anything else. \$\endgroup\$
    – Eugene Sh.
    Jul 30, 2018 at 21:00
  • 1
    \$\begingroup\$ @EugeneSh. V-USB is a "virtual USB" implementation - allows AVRs with no USB peripheral to emulate USB. \$\endgroup\$ Jul 30, 2018 at 21:02
  • \$\begingroup\$ @EugeneSh. as hinted by my mention of V-USB and "cheap", it's not a USB peripheral (because those usually cost more), but essentially low-speed USB1.1 bit banging. the Digisparks for example run on an ATtiny85 \$\endgroup\$
    – nonchip
    Jul 30, 2018 at 21:02
  • 1
    \$\begingroup\$ You could look at the ATtiny861 which has more pins and is still inexpensive. Unclear if it's an official V-USB target but there are indications people have gotten it to work. But realistically, consider something cheap with a true USB device engine. \$\endgroup\$ Jul 30, 2018 at 21:10

1 Answer 1


USB is not always differential. There are signalling states that require both D+ and D- to be low.

Additionally D+/D- are used for other purposes, such as performing reset and speed detection which require sense resistor configurations to be changed.

The pin isn't "wasted", it's "required". I suppose you should think of it less like a differential pair, and more like a clever two-wire communication protocol that is sometimes used differential to improve speed and immunity, and sometimes single ended to do control stuff.

  • 1
    \$\begingroup\$ i wasn't aware of that before (D+/- are usually just described as a differential pair, and the names also really hint towards that), but yeah ok, obviously i can't do it then (except by adding a dedicated "usb to 1 wire" ic or something like that, which... no. :P) \$\endgroup\$
    – nonchip
    Jul 30, 2018 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.