打印
[AVR单片机]

USB Reference Implementations PowerSwitch

[复制链接]
2864|4
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
宇宙飞船|  楼主 | 2010-9-4 23:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

V-USB Reference ImplementationsPowerSwitch
PowerSwitch is an example application using Objective Development's firmware-only USB driver for Atmel's AVR microcontrollers (V-USB).

PowerSwitch provides 8 bits of parallel output intended to switch e.g. the power supply to electronic devices. The PowerSwitch firmware is accompanied by a command line tool for Unix to control the device. (The command line tool can also be compiled on Windows using minGW and libusb-win32.)
For previous releases of V-USB, PowerSwitch was the reference implementation. There was no separate package for V-USB, it was only available as part of PowerSwitch.
Besides being a reference implementation, PowerSwitch may be very useful by itself. If you have a server farm at your provider's site, you can use it to reboot machines without manual interaction on the site. Contrary to e.g. USB to serial or parallel converters (which would have been a very tempting demo, too), this type of hardware is not available in the stores.
Using PowerSwitchAfter wiring the circuit, flashing the firmware into the controller and installing the command line tool, use the command powerSwitch to control the device. It is probably easiest to explain this tool with some examples:
To switch on port 3, type:
powerSwitch on 3
To switch off port 0, use:
powerSwitch off 0
And to turn off port 3 for 5 seconds (e.g. to reboot a connected computer), use:
powerSwitch off 3 5
If you want to know the status of all outputs, type:
powerSwitch status
(Caution: If a temporary action is active, the output will display it. This may be relevant if you parse it for a web interface!)
If you prefer a Graphic User Interface, please have a look at Krzysiek's gPowerSwitch. This is a GTK+ based application implementing the same functionality as the command line tool described above.
Download
Download PowerSwitch
PowerSwitch.2008-02-28.tar.gz Download240 kB
PowerSwitch.2008-02-28.zip Download263 kB
PowerSwitch.2008-02-16.tar.gz Download239 kB
PowerSwitch.2008-02-16.zip Download262 kB
PowerSwitch.2008-02-05.tar.gz Download239 kB
PowerSwitch.2008-02-05.zip Download262 kB
PowerSwitch.2008-01-21.tar.gz Download238 kB
PowerSwitch.2008-01-21.zip Download262 kB
PowerSwitch.2007-12-01.tar.gz Download238 kB
PowerSwitch.2007-12-01.zip Download261 kB
PowerSwitch.2007-10-23.tar.gz Download238 kB
PowerSwitch.2007-10-23.zip Download265 kB
PowerSwitch.2007-08-07.tar.gz Download237 kB
PowerSwitch.2007-08-07.zip Download264 kB
PowerSwitch.2007-07-19.tar.gz Download234 kB
PowerSwitch.2007-07-19.zip Download257 kB
PowerSwitch.2007-06-25.tar.gz Download234 kB
PowerSwitch.2007-06-25.zip Download257 kB
PowerSwitch.2007-03-29.tar.gz Download227 kB
PowerSwitch.2007-03-29.zip Download241 kB
PowerSwitch.2006-07-18.tar.gz Download190 kB
PowerSwitch.2006-07-18.zip Download202 kB
PowerSwitch.2006-06-26.tar.gz Download188 kB
PowerSwitch.2006-06-26.zip Download199 kB
PowerSwitch.2006-03-26.tar.gz Download186 kB
PowerSwitch.2006-03-26.zip Download198 kB
PowerSwitch.2006-03-14.tar.gz Download183 kB
PowerSwitch.2006-03-14.zip Download193 kB
PowerSwitch.2006-02-20.tar.gz Download179 kB
PowerSwitch.2006-02-20.zip Download188 kB
PowerSwitch.2006-02-07.tar.gz Download179 kB
PowerSwitch.2005-06-14.tar.gz Download170 kB
PowerSwitch.2005-04-18.tar.gz Download169 kB
PowerSwitch_DelphiSource.zip Download294 kB

Recent Changes to the USB DriverRelease 2008-02-28
    Added hooks so that application firmware can be informed about USB reset and address assignment.
  • Added optional routine usbMeasureFrameLength() which can be used to calibrate the AVR's internal RC oscillator based on the USB frame time.
Release 2008-02-16
    Fixed a bug in 16.5 MHz module where interrupt handler modified a register before it was pushed. This bug was introduced with code restructuring in version 2007-12-01.
  • Optimized CRC computation (saved a couple of bytes in code size).
Release 2008-02-05
  • Fixed bug in 15 and 16 MHz module which caused USB enumeration to fail on some hosts.
Release 2008-01-21
    Renamed all include-only assembler files from *.S to *.inc so that users don't accidentally link them.
  • Distribute leap bits more evenly in transmit loop of 16 MHz module.
Release 2007-12-01
    Made endpoint numbers configurable so that given interface definitions can be matched. See USB_CFG_EP3_NUMBER in usbconfig-prototype.h. Store endpoint number for interrupt/bulk-out so that usbFunctionWriteOut() can handle any number of endpoints.
  • Define usbDeviceConnect() and usbDeviceDisconnect() even if no USB_CFG_PULLUP_IOPORTNAME is defined. Directly set D+ and D- to 0 in this case.
Release 2007-08-07
    Added a 15 MHz version.
  • Name of interrupt vector can now be configured. This makes it easier to work with other hardware interrupts than INT0.
Release 2007-07-07
  • 16.0 MHz version: Check for SE0 in stuffed bits. Hubs may delay end of packet by up to one bit.
Release 2007-06-25
    USB version is now 1.1 instead of 1.01. This is what the standard demands. Internal RC oscillator at 16.5 MHz now supported.
  • Crystal oscillator at 16 MHz now supported.
Release 2007-03-29
    Merged in some code size improvements suggested by Dick Streefland. Removed special alignment requirements for usbRxBuf (thanks again to Dick for this hint).
  • Driver is now published under the GNU General Public License Version 2.
Release 2007-02-01
    Further improved compiler compatibility.
  • usbDeviceDisconnect() takes pull-up resistor to high impedance now.
Release 2006-07-18
    Documentation updates. Allow flexible control over all USB descriptors. Implementation of USB STALL is now more standards conformant.
  • Improved IAR compiler compatibility.
Release 2006-06-26
    Added provision for one more interrupt-in endpoint (endpoint 3). Added provision for one interrupt-out endpoint (endpoint 1). Added flowcontrol macros for USB. Added provision for custom configuration descriptor. Allow any two port bits for D+ and D-.
  • Use USB_CFG_IOPORTNAME instead of USB_CFG_IOPORT. We now construct the variable name from the single port letter instead of computing the address of related ports from the output-port address.

V-USB
InformationCommunity Resources

Related Information



Sponsored Ads







Copyright © 2010 Objective Development Software GmbH english | deutsch

相关帖子

沙发
dreampet| | 2010-9-6 10:03 | 只看该作者
转帖请注明原文出处并排版
www.obdev.at/products/vusb/powerswitch.html

使用特权

评论回复
板凳
宇宙飞船|  楼主 | 2010-9-6 12:44 | 只看该作者
想编辑加上,但没法编。谢谢 2 楼加上。

使用特权

评论回复
地板
粉丝| | 2010-9-16 14:42 | 只看该作者
不懂用虚拟机的人就完蛋了。

使用特权

评论回复
5
粉丝| | 2010-9-25 13:28 | 只看该作者
建身一顶!

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:技术是玩出来的!

75

主题

1664

帖子

4

粉丝