USB v/s Serial

I know of the V-USB library which allows directly USB connectivity to any AVR microcontroller without an FTDI chip. But my doubt is USB has two lines transmit and receive. Serial pins on the AVR has two pins TX&RX. Why can't I connect them directly instead of using an FTDI chip. Why is an FTDI chip needed? Can't I get the data from the USB into the serial register of the AVR and then decode in software?

USB has +/- data lines for signal integrity. PC transmits using both, then the slave device responds using both.
Like very high speed half-duplex RS485. Very high speed.

Okay...so I want only one way communication i.e PC to micro. So it can simply use the + line right?

So does it mean that a USB to serial converter simply assess the bits from USB after looking at +/- lines and transfers them to the micro. On the reverse part it takes the serial info and converts them to the equivalent signals for +/- right?

No.
Go read the FTDI FT232R datasheet at www.ftdichip.com, or the atmega32U4 datasheet at www.atmel.com, to see what's involved in USB communications and the signal levels involved. The master & slave talk back & forth to start, even if your end goal is one-way comm's only; both have a transceiver to process the differential USB signal and turn it into a digital signal stream that can be processed.

The 32U4 used in the Leonardo uses ~2K of the 32K of flash memory for USB processing, and that's with dedicated hardware available.

What I am trying to do is to hold the D+ line at logic 1, and read it using a digital pin. It would be possible to hold the USB at logic 1 using a custom app coded in C on the PC side right?

I doubt it, but I know nothing of writing custom apps to output data to the USB port.

Go read here

especially about 1/2 way down and farther on.

Thanks for all the help…:slight_smile: