Simple USB Device
Wayne Fulcher
Posts: 3
I have no idea where to start, I have some experience programming the basic stamp and building simple circuts. I have a lot of experience writing software to run on a Windows PC. What I want to do is build a really small circut that is powered by a USB port on a PC that will simply communicate to some software I will write on the PC.
All I want it to do is this. Have the USB port connect to some type of Stamp, pic chip, micro controller (I'm not sure which I should use) and have 2 wires from my circut·go to a manual switch. One wire will be +5v from the USB power source and the other wire go to an Input pin on the chip. The two wires will be connected to a "usually open" push button switch. So when someone or something pushes the button my software on the chip will detect the pin is now High·and send a message to the PC saying "1" or "High" or whatever. Then when the switch is no longer pressed and the input pin goes low it can send a message to the PC saying "0" or "Low" or whatever.
I have attached a drawing of how I imagin this would be connect but I am sure it will take more than just what I have written. What I am specifically asking for in this thread is recommendation to what type of chip will do what I need and if possible a circut diagram for how to build it. I would be very impressed if someone could then give me a code example of what I would need to burn to the chip to make it do what I want.
All I want it to do is this. Have the USB port connect to some type of Stamp, pic chip, micro controller (I'm not sure which I should use) and have 2 wires from my circut·go to a manual switch. One wire will be +5v from the USB power source and the other wire go to an Input pin on the chip. The two wires will be connected to a "usually open" push button switch. So when someone or something pushes the button my software on the chip will detect the pin is now High·and send a message to the PC saying "1" or "High" or whatever. Then when the switch is no longer pressed and the input pin goes low it can send a message to the PC saying "0" or "Low" or whatever.
I have attached a drawing of how I imagin this would be connect but I am sure it will take more than just what I have written. What I am specifically asking for in this thread is recommendation to what type of chip will do what I need and if possible a circut diagram for how to build it. I would be very impressed if someone could then give me a code example of what I would need to burn to the chip to make it do what I want.
Comments
Another approach is to use a stamp or SX chip hooked to a serial port or to USB with a USB-Serial adapter since parallax microcontrollers aren't a good match for USB.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Talbot
New Market, MD, USA
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Do I just write all my code for the BS1 with the assumption that I am talking serial?
How do I burn my code to the BS1?
I have a couple of BasicStamp2 chips and have used them a bit so I know how connect those in order to burn using the BasicStamp Editor version 2.4 but I usually have the stamp plugged into a bread board so I dont know how I would connect the BS1USB so that the editor could see it.
After I install the FTDI USB drivers on my Windows PC what do I do in my windows based software to talk to the device? Do I try using something like COM1 or COM2?
Thanks a million for your help, this is going to be awesome.
the open source V-USB to do this sort of thing.
Or for many more I/O pins a tiny88 (1.60) would work
well. Both tinys would easily operate directly from the
USB 5.0v
Come to think of it a tiny88 would perhaps make a nice and
really cheap USB propeller chip programmer device...hmmm
You could add usb programming to a prop board for nearly
nothing, and still have use of the tiny88 for other things.
www.obdev.at/products/vusb/index.html