📄 readme.txt
字号:
Readme for IRMouse - infra red controlled USB mouse device (HID class)http://szczuka.eu/avr/irmouse.phpFile created: 2007-02-18 by Krzysiek Szczuka <kszczuka@gmail.com>Last modified: 2007-03-01First of all, sorry for any kind of errors in this and other files, englishisn't my native language, feel free to correct it e.g. via email.. ABOUT IRMouseIRMouse is an USB mouse controlled by ir remote..It receives packets from remote, decodes, and (if ir code matching) sends reports to PC via USB.. Reports are as in standard USB mouse, so there is noneed for additional programs/drivers on PC side, everything is done in IRMouseand system recognizes it as standard USB mouse..It is built on two ATtiny2313 uC's connected via USART..I've tried to make it on one ATmega8, but there was too much interrupts atthe same time (from USB host and from IR), and one AVR couldn't make it work,after few packets received from remote, the device was disapeared from USB bus.If you're more interested on this problem, seehttp://forums.obdev.at/viewtopic.php?t=243 (-; HARDWARE / FIRMWARE MISC INFORMATIONFor now firmware decodes only SPACE_ENCODED standards of IR transmittion,if you'll add your own, let me know..The USB ATtiny is clocked by external 12MHz crystal, IR ATtiny by internal 8MHz clock.Aditionally I've used some strange Sanyo remote, that for every ir packet was sending different code, and only first was always the same, so there is an option for check only first code, and send reports without later ir code recheck. This happens when JP1 is closed to GND.. PRE-BUILD CONFIGURATIONYou probably want to change the remote codes and timings, I'm using separate .hfile for every remote, in remotes/ there is remote_template.h as template, justrename it to yours remote and define it's timings and codes. Then changeREMOTE in Makefile and add #ifdef in main-ir.cIf ZERO_TEST in main-ir.c is defined, device comparing the TZEROH time, else TONEH. You may need to compare other times, you can change it in main-ir.c in main() and makeReport() functions..In usbconfig.h you can change the device/vendor names, but be careful, becausethe compilers' output file for USB is 2036B size, so it's almost full..USART speed is 38400bd, it can be changed in defines.h BUILD INFORMATIONThe firmware code was written for and tested with avr-gcc (avr-libc 1.4), compiled on Linux, but with WinAVR on Windows should work fine too.. For programming the AVR's I've used great AVRDUDE.. See Makefile for info and someconfig options..To build firmware, just 'make' and there should be two .hex files.. 'make flashir' flashes the IR target, and 'make flashusb' - USB target. Also you can set fuses of both targets ('make fuseir' and 'make fuseusb'). For more details see Makefile's comments.. LICENSEThe project is built with AVR USB driver by Objective Development, which ispublished under a proprietary Open Source license. To conform with thislicense, IRMouse is distributed under the same license conditions. See thefile usbdrv/License.txt for details. FILES IN THE DISTRIBUTIONReadme.txt ............. The file you are currently readingusbdrv ................. AVR USB driver by Objective Developmentusbdrv/License.txt ..... Public license for AVR USB driver and IRMousecircuit ................ Circuit diagram in PNG and EAGLE formatremotes ................ Different remotes header filesmain-ir.c .............. Main file for IR ATtinymain-usb.c ............. Main file for USB ATtinyusbconfig.h ............ USB configuration filedefines.h .............. Some definitions for both IR and USB uC's
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -