USB push button!??

Well, as title says. i want to build
a push button that is connected to my
usb port & detect when that button is
preassed!


thanx...

Comments

  • : Well, as title says. i want to build
    : a push button that is connected to my
    : usb port & detect when that button is
    : preassed!
    :
    :
    : thanx...
    :
    Hi!

    Does it have to be on the USB port? You can do this easily by using the serial port.

    Melissa

  • nope, dosn't have to be the
    USB port but i rather use the
    USB port!


    thanx...
  • : nope, dosn't have to be the
    : USB port but i rather use the
    : USB port!
    :
    :
    : thanx...
    :

    Sorry, can't help with USB. I think you'd need a USB controller of some sort, but I don't knwo for sure. I haven't had the need to look into it so far.

    I'll just drop down to the serial port version of this question :)

    Melissa

  • Hi
    http://www.intel-u-press.com/usb_dbe/USBdocs/index.htm

    : : nope, dosn't have to be the
    : : USB port but i rather use the
    : : USB port!
    : :
    : :
    : : thanx...
    : :
    :
    : Sorry, can't help with USB. I think you'd need a USB controller of some sort, but I don't knwo for sure. I haven't had the need to look into it so far.
    :
    : I'll just drop down to the serial port version of this question :)
    :
    : Melissa
    :
    :

  • : : Well, as title says. i want to build
    : : a push button that is connected to my
    : : usb port & detect when that button is
    : : preassed!
    : :
    : :
    : : thanx...
    : :
    : Hi!
    :
    : Does it have to be on the USB port? You can do this easily by using the serial port.
    :
    : Melissa
    :
    :

    Hi
    Im doing some experiments with 2 buttons and 2 leds. can you show me some code to control the button states and howto light the leds?
    im using vc++ 6, but can in worst case use vb 6.
    would appreciate it very much :)
    thanks in advance

    /Hylsan
  • : Hi
    : Im doing some experiments with 2 buttons and 2 leds. can you show me some code to control the button states and howto light the leds?
    : im using vc++ 6, but can in worst case use vb 6.
    : would appreciate it very much :)
    : thanks in advance
    :
    : /Hylsan
    :


    yes i need this!!!
    this is what i need using the USB ports!
    is simple stuff!!! c'mon someone post some code!


    laterz...

  • from what ive heard/read its quite hard to use the usb...sadly.
    id use the serial or parallel if i could to say time, tho usb would be cooler :)

    /Hylsan

  • Although your application seems quite simple, doing it with USB
    can be much more complexer than you think.

    USB has several advantages compared to the classical bus types like RS232. It is fast, easy to configure (hot plug'n play), less cables etc.
    However due to these benefits USB devices are quite sophisticated.
    You can compare USB protocol architecture with TCP/IP. This
    means that for every application regardless of the simplicity of the application:

    - You will need a USB I/O controller for the device.
    - You will need a microcontroller to drive the USB I/O controller
    - You will need some firmware to do the actual communication with the host (PC).
    - You will need a device driver on the PC to handle the USB comm.
    - And of course your PC software which uses the button press information.

    Before a devices begins actual data transfer, the device has to send
    some information about itself. Your firmware running on the device has to
    initialize the descriptors on the USB I/O controller when device is
    powered on. When device is connected to a PC, PC tries to recognize
    the device plugged in by requesting the descriptors from USB I/O chip.
    If it recognizes (enumerates) the device it loads the appropriate device
    driver to communicate with the device.

    If the system doesn't find the suitable driver asks for the device driver
    from the user. For a custom device you will a custom device driver, that's
    for sure. This means that you have to develop a device driver!!!
    If it's Windows system you will need to tap into the world of WDM...
    I can assure you that writing WDM drivers is a quite complex and
    serious task...

    You can use USB I/O chips from National (USBN9602) or Philips (D12).
    Those two are the simplest ones. You can drive it with an 8051 micro controller. You can use Keil C compiler for writing your firmware.
    And it seems that you can fake an HID (keyboard/joystick) device with
    the firmware. So the operating system will think that your device is a
    keyboard or a joystick and use the HID device driver. You can report the button press as keypress or joystick button press. Then your PC software
    has to use the HID library to access the features of your HID device.

    Or you can forget all the things above and implement your device with
    the parallel port. Just put your button between any of the error reporting
    pins and a positivie source. And drive the error pin to high when button is pressed. On PC side just open the parallel port and check if error flag is set.

    Regards,

    Nihat Karaoglu

    USB Consultant
    Centrillium IT Consulting
    http://www.centrillium-it.com








  • have you acomplish this before!??
    if so do u have pictures, samples or
    other useful information about this!??


    thank you!

  • I have got the Philips PDIUSBP11D (It's a USB interface), I know how to initialize the chips, but i don't know how to access the usb port from windows. I need any information about accessing the usb port from windows in visual c++ or visual basic.

    Thanks

  • : I have got the Philips PDIUSBP11D (It's a USB interface), I know how to initialize the chips, but i don't know how to access the usb port from windows. I need any information about accessing the usb port from windows in visual c++ or visual basic.
    :
    : Thanks
    :
    :
    Philips has a USB evaluation kit for this PDIUSBP11D/PDIUSBP12D
    (known as D11/D12) chips which you can use. This kit has
    the firmware source and device drivers etc.

    Accessing the USB port is not as easy as accessing RS232,
    you need to have a device driver for your device.

    I don't know what you mean by initializing the chip, but
    in order to use these chips you have define the USB device
    descriptors etc. on the device itself. And for this you
    will need a microcontroller which loads these values
    to the chip before operation.

    Anyway I suggest using the evaluation kit, unless you want
    to do some serious firmware and Windows device driver
    development.

    I can also suggest our USB developers toolkit which
    has a universal device driver and rapid application
    development utilities, but you have to be a bit
    patient till we finish the beta testing.

    Regards,

    Nihat Karaoglu

    USB Consultant
    Centrillium IT Consulting
    http://www.centrillium-it.com
  • A lot of work to get an extra key, but who am i to question.

    : - You will need a USB I/O controller for the device.
    : - You will need a microcontroller to drive the USB I/O controller
    : - You will need some firmware to do the actual communication with the host (PC).
    : - You will need a device driver on the PC to handle the USB comm.

    Found a cool link fore driver development, its a 30 day tryout of a development kit, haven't tested it my self but it looks fast and cool. =)
    http://www.jungo.com/wdusb.html

    : - And of course your PC software which uses the button press information.

    Good luck. =)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories