⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 这个开发机器人项目源码
💻
字号:
$Id: README,v 1.11 2003/08/29 05:43:00 dwalters Exp $-- Open Automaton Project: http://oap.sourceforge.net -- INPUT MODULE INTRODUCTION-------------------------This README covers the source code and circuit schematics for the Open Automaton Project Input Module.The Input Module is a hardware device that connects to the PS/2 keyboard socketof a PC motherboard and emulates keypresses when the user presses pushbuttons on the module, or presses the buttons on a separate compatible IR or RF remote control. To the PC, the device just looks like any other typical 102-105 keystandard keyboard.The circuit schematic (input_module.sch) was developed in gschem, part of the gEDA package, version 20030525.Circuit schematic symbols that are not in the symbol library bundled with gEDAare included as separate sym files (these .sym files can be copied into yourlocal symbol directory, typically /usr/local/share/gEDA/sym/local/).LICENSING---------All source code and electronic circuit designs are copyright (C) 2003, Dafydd Walters.The Open Automaton Project software is distributed under the terms of the GNUGeneral Public License. See the file COPYING.SOFTWARE for details.Please see the file COPYING.ELECTRONICS to see the terms under which theelectronic circuit designs of the Open Automaton Project are distributed.CIRCUIT NOTES-------------The circuit is powered directly from the PC motherboard via the keyboardconnector (the PS/2 keyboard connector provides a 5 volt supply at up to 100mA;more than enough to power the Input Module).The IR detectors are 3-pin devices designed to operate with a 5 volt supply.They give a Low output signal when IR energy (at around 940nm wavelength) isdetected that's being pulsed on and off at a frequency of 40kHz. When there is no IR energy present, or there is IR energy present, but it is not being pulsedat or near the detection frequency of 40kHz, the output signal is High. The circuit has been tested with the IR detectors available from Radio Shack (RadioShack part number 276-137B).Between zero and four IR detectors may be used. Obviously with no detectors,the Input Module cannot respond to commands from an IR remote control. With four equally spaced around the perimiter of the robot, it should be possible to control the robot via IR remote control whichever way it is facing.The RF receiver module chosen for the Input Module is the RWS-434 from Reynolds Electronics (www.rentron.com). This was chosen because it is simpleto use and it is inexpensive. It should be easy to adapt the circuit for usewith other RF receiver modules if required; the only requirement is that itcan receive a serial bitstream at 1200 baud.The RF receiver is optional. If you don't fit it, then obviously the InputModule will not be able to receive commands from an RF remote control.NOTE: The use of radio frequency and possibly even infrared components maybe regulated by some governments. Please check your local laws before usingsuch components. 1/8 watt resistors are fine for R1 through R5.The 0.1uF capacitors are all decoupling capacitors that should be placed nearU1, U2 and CONN2 through CONN5.Any momentary action pushbuttons should work in the keypad switch matrix.REMOTE CONTROL COMPATIBILITY----------------------------The Input Module firmware has been designed to be compatible with the Sony IRprotocol, so most universal remote controls should work fine as long as theyare programmed to transmit Sony TV codes (as opposed to Cable, VCR, etc). +Volume  = UP -Volume  = DOWN -Channel = LEFT +Channel = RIGHT Enter    = ENTER Power    = ENTER Mute     = ESCAPEPressing a numeric digit button on the remote control sends the corresponding digit keypress.Infrared remote control can be disabled (useful in situations where theremay be IR remotes operating nearby and interfering with the robot) bypressing and holding down the [Down Arrow] and [Right Arrow] buttons at thesame time for at least 2.5 seconds.  Infrared control is re-enabled byholding down the [Left Arrow] and [Down Arrow] buttons at the same time forat least 2.5 seconds.RF remote control is implemented in the Input Module using a custom protocol, so it follows that the transmitter must be custom made.  A separate hardware component of the Open Automaton Project, the RF Remote, is such a device. See the directory rf_remote for the full details, including circuit schematic and source code.Each RF Remote Module is programmed to include a Robot ID Code within eachtransmission, and the Input Module is programmed to respond to one particularcode. This Robot ID code is akin to a "channel" selection, and the InputModule is "tuned" to a particular RF Remote module to prevent conflicts whenthere's more than one robot in the same vicinity using this RF protocol.Setting the Robot ID on the Input Module is performed by holding down a combination of the buttons in the top row of the keypad (the [Escape], [Up Arrow] and [Enter] keys) for at least 2.5 seconds. When used this way, the three buttons in the top row form a 3-bit binary number, with the right hand button being the least significant bit. So for example, to set the Robot ID to5, you would press and hold down the left and right keys together for at least2.5 seconds (4 + 1 = 5). To program 3, you would hold down the right two keys,[Up Arrow] and [Enter], (2 + 1 = 3). This technique allows a Robot ID Code in the range 1 to 7 to be programmed (it's not possible to set a Robot ID code ofzero).Radio remote control can be disabled (useful in situations where theremay be RF sources operating nearby and interfering with the robot) bypressing and holding down the [Right Arrow] button for at least 2.5 seconds.RF control is re-enabled by holding down the [Left Arrow] button for at least 2.5 seconds.The initial default settings of the Robot ID and IR Remote Enabled/Disabledflag are: * Robot ID = 1 * IR EnabledFIRMWARE NOTES--------------The software for the PIC16F84 PICMicro is written in assembly language, andcompiles using the GNU PIC Assembler, gpasm. To compile the source code into a hex file suitable for programming a PIC16F84 device, type    gpasm -n input_module.asmThe resulting hex file will be called input_module.hex  The -n option putsDOS-style CR-LF newline sequences in the .hex file, required by most deviceprogrammers. It also compiles with the MPASM compiler for Microsoft Windows that is a partof the MPLAB suite from Microchip. However, you must make sure the assembly(.asm) file is in Windows/DOS format (i.e. with CR-LF sequences at the end ofeach line) before it will successfully compile in MPASM for Windows.Some device programmers require the configuration bits to be set manually. Itis very important that these are set correctly. The Input Module requires the following configuration bit settings: - Code Protection off - Crystal oscillator - Power-Up Timer on - Watchdog Timer offThe above settings are represented by the configuration word 3FF1 in hex.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -