Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/26/10 16:03
Read: times


 
#176929 - Serial communication
Responding to: ???'s previous message
Howdy Nathan,

The short answer is no. You can not plug an 8052 directly into a USB port. But then again, you can't plug an 8052 directly into a standard serial port either.

The more helpful answer is that you need at minimum a level shifter to take the µ-controller signals from TTL, 0 - 5 V, 0 - 3 V, whatever your device produces, to the standard ±12V of RS232. They make chips that do this (e.g. MAX232). You can find them by searching for rs232 level shifting chips.

When it is said that the µ-controller has a built in serial port, it's the protocol that's built in. The signals still have to be conditioned for whatever you're sending them to, but you don't have to worry about setting and clearing all of the start/stop/parity bits, etc., associated with "bit banging" your own interface. Read the tutorial, found to the left of the screen, about using the serial port.

Now USB is a whole "nother" matter. It's a complete protocol. And while you could, in principle, bit bang your own, it's highly unlikely you'd be successful in any kind of reasonable time frame. Moreover, unless you just want to do it for the learning exercise, there's really no need.

There are chips available that take care of it for you (Silabs CP2102, or FTDI makes a selection too). They're called UART to USB bridge chips. They will take, as input, the output from your built in UART protocol and convert it to USB. Search for these and you'll find that interfacing to a USB port really isn't any more difficult, at least not appreciably so, than to a standard serial port.

Good luck,

Joe

List of 11 messages in thread
TopicAuthorDate
8052 and USB            01/01/70 00:00      
   USB            01/01/70 00:00      
      Just being serial isn't enough            01/01/70 00:00      
      simple; simplest            01/01/70 00:00      
   Serial communication            01/01/70 00:00      
   Yes, but it won't work            01/01/70 00:00      
   USB            01/01/70 00:00      
      Voltage isn't enough            01/01/70 00:00      
         Mixing with keyboard/mouse protocols?            01/01/70 00:00      
         Thanks            01/01/70 00:00      
            Not easy to know everything about USB            01/01/70 00:00      

Back to Subject List