?? readme.txt
字號(hào):
This is the README file for the PowerSwitch USB device.PowerSwitch is an example application using Objective Development'sfirmware-only USB driver for Atmel's AVR microcontrollers. It provides 8 bitsof parallel output intended to switch e.g. the power supply to electronicdevices. The PowerSwitch firmware is accompanied by a command line tool forUnix to control the device.Objective Development's USB driver is a firmware-only implementation of theUSB 1.1 standard (low speed device) on cheap single chip microcomputers ofAtmel's AVR series, such as the ATtiny2313 or even some of the small 8 pindevices. It implements the standard to the point where useful applicationscan be implemented. See the file "usbdrv.h" for features and limitations.BUILDING AND INSTALLINGBoth, the firmware and the Unix command line tool are built with "make".You may need to customize both makefiles.Firmware:The firmware for PowerSwitch requires avr-gcc. Although we don't requireavr-libc (a C-library for the AVR controller), we recommend reading theinstructions at http://www.nongnu.org/avr-libc/user-manual/index.html underthe link "Related Pages" for setting up the GNU toolchain (avr-gcc, assembler,linker etc.).Once you have the GNU toolchain for AVR microcontrollers installed, you canrun "make" in the subdirectory "firmware". You may have to edit the Makefileto use your preferred downloader with "make flash". Our current version isbuilt for uisp with the AVR910 serial programmer connected through a KeyspanUSB to serial adapter to a Mac running Mac OS X.Unix command line tool:The command line tool requires libusb. Please download libusb fromhttp://libusb.sourceforge.net/ and install it before you compile. Change todirectory "commandline" and edit the Makefile to reflect the path to your"libusb" installation. Then type "make". This will build the unix executable"powerSwitch" which can be used to control the device.WORKING WITH POWERSWITCHOnce you have compiled and flashed the firmware and compiled the command linetool, you can move on to the fun part: Connect the device to a free USB portof your computer or USB-hub. You should now be able to find the device inany USB analyzer tool, e.g. SystemProfiler on Mac OS X. If you connect itto a Windows PC, the "New Hardware" dialog will pop up. But we don't supplydrivers for Windows...The next step is to try the command line tool, e.g.: ./powerSwitch off 3to turn off port 3 (all ports are on when the device has been cleared) or for i in 0 1 2 3 4 5 6 7; do ./powerSwitch off $i; donein an sh or bash (not csh or tcsh) type shell to turn off all ports.You can also switch a port on or off temporarily. Try ./powerSwitch on 0 2.5to activate port 0 for two and a half seconds.FILES IN THE DISTRIBUTIONReadme.txt ...... The file you are currently reading.firmware ........ Source code of the controller firmware.commandline ..... Source code of the host software (needs libusb).circuit ......... Circuit diagrams in PDF and EAGLE 4 format. A free version of EAGLE is available for Linux, Mac OS X and Windows from http://www.cadsoft.de/.License.txt ..... Public license for all contents of this project.Changelog.txt ... Logfile documenting changes in soft-, firm- and hardware.USING THE USB DRIVER FOR YOUR OWN PROJECTSPowerSwitch is mainly an example, although it may be very useful by itself.If you want to implement your own application based on our USB driver, seethe file "firmware/main.c" for the application specific part of the firmware.A technical description of the driver's interface can be found in"firmware/usbdrv.h". Please review the USB descriptors in "firmware/usbdrv.c"and change at least the device-ID. Do not use Atmel's vendor-ID forproduction! For more information about USB descriptors and IDs see thedocument "USB in a Nutshell" available athttp://www.beyondlogic.org/usbnutshell/usb1.htm or the USB 1.1 standardavailable at http://www.usb.org/. Don't forget to check the licenseagreement for Objective Development's firmware-only USB driver!ABOUT THE LICENSEIt is our intention to make our USB driver and this demo application availableto everone. Moreover, we want to make a broad range of USB devices and ideasfor USB devices available to the general public. We therefore require thatall projects built with our USB driver are published under the same license.Our license for the USB driver and demo code is based on the GNU GeneralPublic License (GPL). We add some special requirements and privileges, though.See the file "License.txt" for details.If you don't want to meet the requirements of this extended GNU GPL, we offera pay-by-unit business license. All we require in this type of license is thatyou pay a small per-unit license fee (a share of the savings from using amicrocontroller without hardware USB support) and the right to list yourcompany name in our references section. MORE INFORMATIONFor more information about Objective Development's firmware-only USB driverfor Atmel's AVR microcontrollers please visit the URL http://www.obdev.at/products/avrusb/Technical documentation of the driver's interface can be found in the file"firmware/usbdrv.h".(c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH.http://www.obdev.at/
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -