I am new to avr programming and I am looking to create a usb device that I can switch on or off two leds from my PC. I have an attiny45 and a windows 7 pc. I think if I can switch on and off leds I can later control relays.
I have seen a project that is similar but it is for linux and the source code no longer seems to be available http://davehillier.wordpress.com/2009/0 ... -the-cube/
Can anybody give me some ideas where to begin with this project?
switch on leds from windows pc with attiny45
-
- Posts: 6
- Joined: Mon Aug 15, 2011 2:31 pm
Re: switch on leds from windows pc with attiny45
The catch is to understand USB.
I have begun to understand USB, but I have not finished yet.
There are likely many device classes which you could get this going under, but the one you choose should probably be one that you will use for future projects. Then you will move more cleanly. 'Cleanly' here is pejorative, and the overhead of USB is worthy but expensive as well.
- Tim
I have begun to understand USB, but I have not finished yet.
There are likely many device classes which you could get this going under, but the one you choose should probably be one that you will use for future projects. Then you will move more cleanly. 'Cleanly' here is pejorative, and the overhead of USB is worthy but expensive as well.
- Tim
-
- Rank 1
- Posts: 20
- Joined: Fri Dec 02, 2011 12:25 pm
Re: switch on leds from windows pc with attiny45
The powerSwitch project on this site will give all the info you need!
I have recently used an atTiny45 to do just that, ie a one channel external switch/relay.
A slight re-hash of the firmware source code is all that is needed for it to work.
LibUsb employs a driver wizard which will create the required 32/64 bit driver,
and is the approach that I would recommend.
The example host command-line c code shows how to handle send/receive,
it is also possible to port this to other languages...
I have recently used an atTiny45 to do just that, ie a one channel external switch/relay.
A slight re-hash of the firmware source code is all that is needed for it to work.
LibUsb employs a driver wizard which will create the required 32/64 bit driver,
and is the approach that I would recommend.
The example host command-line c code shows how to handle send/receive,
it is also possible to port this to other languages...