Electronics development

Moderators: None (Apply to moderate this forum)
Number of threads: 512
Number of posts: 1020

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
USB push button!?? Posted by FreakboY on 27 Nov 2001 at 10:29 PM
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...
Report
Re: USB push button!?? Posted by melissa_may1 on 30 Nov 2001 at 4:21 PM
: 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

Report
Re: USB push button!?? Posted by FreakboY on 1 Dec 2001 at 10:18 AM
nope, dosn't have to be the
USB port but i rather use the
USB port!


thanx...
Report
Re: USB push button!?? Posted by melissa_may1 on 2 Dec 2001 at 12:00 PM
: 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

Report
Re: USB push button!?? Posted by super nova on 10 Jan 2002 at 1:53 PM
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
:
:

Report
Re: USB push button!?? Posted by Hylsan on 10 Apr 2002 at 3:47 AM
: : 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
Report
Re: USB push button!?? Posted by FreakboY on 11 Apr 2002 at 2:55 PM
: 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...

Report
Re: USB push button!?? Posted by Hylsan on 12 Apr 2002 at 12:07 AM
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

Report
Re: USB push button!?? Posted by nkaraoglu on 9 May 2002 at 6:22 AM
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








Report
Re: USB push button!?? Posted by FreakboY on 10 May 2002 at 9:55 AM
have you acomplish this before!??
if so do u have pictures, samples or
other useful information about this!??


thank you!

Report
How to Access USB port from pc Posted by afrizal_chen on 24 Jun 2002 at 12:31 AM
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

Report
Re: How to Access USB port from pc Posted by nkaraoglu on 24 Jun 2002 at 11:07 AM
: 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
Report
Re: USB push button!?? Posted by ryo_sama on 10 Jul 2002 at 6:50 AM
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. =)




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.