Analyzing USB Comm


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Ehhhh, maybe not such a good "Friend".

    Never used that chip, but looking at the datasheet, it seems that it's mostly a "HUB".

    It does accept rs232, keyboards, mice and stuff.
    But the conversion is to USB, not RS232.

    I don't see any way to read the keyboard with an MCU.
    Could be I just haven't read far enough.

    If you want FTDI, then I think the ...

    Vinculum Embedded USB Host Controller
    http://www.ftdichip.com/FTProducts.htm#Vinculum

    might get you closer.

    DT

  2. #2
    Join Date
    Dec 2008
    Posts
    48

    Default

    Darrel,

    You're right (again). Vinculum is the way to go, and that chip I mentioned is a hub with 7 downstream and one upstream.... it may work, but not experimenting any more if I can avoid it. I bought what was available at Akihabara today - a USBN9604, which is a node controller from National Semicon. Can't wait to get out of this meeting and back home to put things together.

    If I may ask another question...
    1) I understand that coding away to filter all the stuff that would come in on a comparator would be an arduous task, but why is speed an issue? People can only type so fast. Or, would the comparator require a couple cycles each time doing it's thing? I know my code would require a couple of cycles to filter the signal as well. Gave up on that route for this particular endeavor, but still fishing around for information just because I want to know more about that function on MCU.
    Last edited by kirtcathey; - 9th January 2009 at 08:40.

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Quote Originally Posted by kirtcathey View Post
    ... but why is speed an issue? People can only type so fast.
    Well, let's say that an 18F is running at 48Mhz. (the fastest 8-bit PIC)
    Divide that by 4, and the CPU core will execute 12 million instructions per second.

    Full-speed USB is 12 million bits per second. So at best, you could only execute 1 instruction of your program per incoming BIT of data.

    Now, considering it takes 4 instructions to copy the state of a pin to a BIT variable. It's easy to see that it just can't be done with software.

    Plus there is a LOT of overhead communication with USB. Even if nobody was typing on the keyboard, there's still a ton of data being passed back and forth. The computer is constantly asking the device ... "Are you there", and the device says ... "Yup, I'm here", over and over and ...
    When it gets unplugged and the computer doesn't get an "I'm here" anymore, it disconnects the device driver and you hear the ding-dong.

    So basically, USB interfaces MUST be done with hardware.

    hth,
    DT

  4. #4
    Join Date
    May 2007
    Posts
    604

    Default

    Technically, the fastest 8-bit PICs are the PIC18FxxKxx series that are rated at 64Mhz. But you are absolutely correct about USB stuff being done in hardware.

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Quote Originally Posted by rmteo View Post
    Technically, the fastest 8-bit PICs are the PIC18FxxKxx series that are rated at 64Mhz.
    I stand corrected!

    I will now have her give me 40 lashes for the error.
    WooHoo!

    DT

  6. #6
    Join Date
    Dec 2008
    Posts
    48

    Default

    Thank you.... soldering the USB controller chip onto a daughter board right now. When I get the whole rig breadboarded and working, will update my schematic and post it here.

    Again, thank you for all the direction.

  7. #7
    Join Date
    Jul 2007
    Location
    Bavaria
    Posts
    28

    Default

    How about a different approach:

    Take a PS/2 keyboard and a PS/2-USB adaptor and tap the data on the PS/2 side.
    There are a lot of keyboard interfacing examples out there...

    Regards,

    Ingo

Similar Threads

  1. USB CDC Communications for Dummies!
    By Squibcakes in forum USB
    Replies: 104
    Last Post: - 15th January 2014, 13:43
  2. Simple USB Comms Problem
    By awmt102 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th January 2010, 20:17
  3. One USB keyboard to Two USB Ports
    By picnaut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th June 2009, 00:04
  4. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  5. USB PIC without USB Connection
    By Tissy in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 26th December 2005, 17:39

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts