+ Post New Thread
Results 1 to 7 of 7
  1. #1
    Full Member level 6
    Points: 5,131, Level: 16
    Achievements:
    7 years registered
    welove8051's Avatar
    Join Date
    Jul 2009
    Location
    india
    Posts
    357
    Helped
    52 / 52
    Points
    5,131
    Level
    16

    how usb to serial signal logic level works

    hello, how it is possible to use micro controller like atmega8 for USB communication with PC. since USB uses NRZ protocol( +ve and -ve signal) how is it possible to achieve it using atmega8 without any driver in between them.

    thanks in advance

    •   AltAdvertisment

        
       

  2. #2
    Super Moderator
    Points: 246,612, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,878
    Helped
    13050 / 13050
    Points
    246,612
    Level
    100

    Re: how usb to serial signal logic level works

    Are you referring to a specific circuit?

    There have been designs, that managed to implement a low speed USB device as a pure software solution. It's a nightmare of assembler code and a good idea to drive someone mad.

    See e.g. this design for ATtiny http://www.obdev.at/products/vusb/index.html

    According to ATmega port properties, the design can't implement e.g. a true differential input receiver. But that's only a minor problem. The USB D+ and D- signals have at least typically sufficient swing to be read by single ended CMOS/TTL inputs.

    Better, you'll use dedicated USB enabled microcontrollers, e.g. AT90USBxxx devices if you rely on AVR topology.



  3. #3
    Full Member level 6
    Points: 5,131, Level: 16
    Achievements:
    7 years registered
    welove8051's Avatar
    Join Date
    Jul 2009
    Location
    india
    Posts
    357
    Helped
    52 / 52
    Points
    5,131
    Level
    16

    Re: how usb to serial signal logic level works

    Quote Originally Posted by FvM View Post
    Are you referring to a specific circuit?

    There have been designs, that managed to implement a low speed USB device as a pure software solution. It's a nightmare of assembler code and a good idea to drive someone mad.

    See e.g. this design for ATtiny http://www.obdev.at/products/vusb/index.html

    According to ATmega port properties, the design can't implement e.g. a true differential input receiver. But that's only a minor problem. The USB D+ and D- signals have at least typically sufficient swing to be read by single ended CMOS/TTL inputs.

    Better, you'll use dedicated USB enabled microcontrollers, e.g. AT90USBxxx devices if you rely on AVR topology.
    yes as i given in the previous post, it is a USB to serial convereter using atmega8. how it is possible to use a CMOS/TTL based device like atmega8 to swing for -ve value, and use it for USB communication with PC. i just want to know how that logic conversion is carried out.



    •   AltAdvertisment

        
       

  4. #4
    Super Moderator
    Points: 246,612, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,878
    Helped
    13050 / 13050
    Points
    246,612
    Level
    100

    Re: how usb to serial signal logic level works

    A regular USB-to-serial adapter can be expected to use a hardware USB interface component. The said software USB solution can work for low-speed USB (1.5 MBaud) only.



  5. #5
    Full Member level 6
    Points: 5,131, Level: 16
    Achievements:
    7 years registered
    welove8051's Avatar
    Join Date
    Jul 2009
    Location
    india
    Posts
    357
    Helped
    52 / 52
    Points
    5,131
    Level
    16

    USB communication through stm32 controller

    hello everyone, i need to work on a project using STM32F030R8 for USB communication. this MC doesnt have any USB hardware support in it and hence software USB has to be created. no USB to serial converter can be used as this IC should dirtectly perform USB comm for cost reduction. all i want is your comment/ view/advise about what should be done to achieve the objective.


    thanks in advance



    •   AltAdvertisment

        
       

  6. #6
    Advanced Member level 5
    Points: 8,573, Level: 22
    Easyrider83's Avatar
    Join Date
    Oct 2011
    Location
    Tallinn, Estonia
    Posts
    1,525
    Helped
    348 / 348
    Points
    8,573
    Level
    22

    Re: USB communication through stm32 controller

    There was an example for USB HID device for Atmel somewhere. It used s/w USB handling. But I'm not sure about statibily of such system. My opinion that it is a bad idea.
    Love me or hate me. All infractions will be ignored.



  7. #7
    Super Moderator
    Points: 246,612, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,878
    Helped
    13050 / 13050
    Points
    246,612
    Level
    100

    Re: how usb to serial signal logic level works

    The answer to the question doesn't basically change if you are asking about software with STM32 instead of AVR, except for having a faster hardware.

    I guess you are not actually motivated (or able at all) to design the software USB solution?



--[[ ]]--