User manual IROBOT COMMAND MODULE

DON'T FORGET : ALWAYS READ THE USER GUIDE BEFORE BUYING !!!

If this document matches the user guide, instructions manual or user manual, feature sets, schematics you are looking for, download it now. Diplodocs provides you a fast and easy access to the user manual IROBOT COMMAND MODULE. We hope that this IROBOT COMMAND MODULE user guide will be useful to you.


IROBOT COMMAND MODULE : Download the complete user guide (1813 Ko)

Manual abstract: user guide IROBOT COMMAND MODULE

Detailed instructions for use are in the User's Guide.

[. . . ] iRobot Command Module ® Owners manual www. irobot. com Important Safety Instructions General saFeTY InsTruCTIOns · Read all safety and operating instructions before operating iRobot Command Module. · Retain the safety and operating instructions for future reference. · Refer all non-routine servicing to iRobot. ePort saFeTY InsTruCTIOns The maximum voltage available on the ePor t is 21V, so the ePort pins will not shock you if they contact your skin. In the event of an electrical fault, this can generate enough heat to burn you or start a fire in the event of an electrical fault. [. . . ] The remaining pins are reserved for the Command Module's own hardware and the Create Cargo Bay Connector on the underside of the Command Module: Pin PB4 Description Serial port select. Change Create's baud rate to 19200 by toggling this pin 3 times with 200 ms pulses (or use the Baud command - see the Open Interface documentation) USB Detect Command Module Soft Button Command Module LED 1 Command Module LED 2 Create Power Toggle. Direction Output Input Input Output Output This sets the value of bit 2 to be 1, but doesn't affect the other bits in DDRB. The following code sets pin D7 as an input: DDRD &= ~0x80; PB5 PD0 PD1 PD2 This sets bit 7 in DDRB to be a 0 without affecting the other bits. Once you've set pin B2 as an output, the following code sets its state to high: PORTB |= 0x04; PD3 PD4 PD5 Input Input Output Output Output The following code sets pin B2 low: PORTB &= ~0x04; PD6 PD7 If you just want to flip the state of the pin (low to high or high to low), you can use the bitwise-exclusive-or operator. The following code flips the state of pin B2: PORTB ^= 0x04; To check whether a pin is high or low, read the PINx register and then use the bitwise-and operator to check only the associated bit. The following code branches your code according to the state of pin D7: if(PIND & 0x80) { /* if D7 is high, run this code */ } else { /* otherwise, if D7 is low, run this code */ } For these pins, only use the direction stated in the table above. The remaining pins (B6-7, C6-7) are for Command Module internal use only. Their direction is set in hardware and cannot be changed with software. If D7 was connected to a button, you could use this code to perform different actions depending on whether the button was being pushed. iRobot Command Module Owner's Manual 17 4. 11 adding a button and leD to the input example program In chapter 3, you saw that the input example program looks for button presses on Create and on the Command Module and plays a song and lights an LED when a button is pressed. The program is also looking for button presses on a top center ePort input pin and setting an ePort output pin to drive an LED. Buy a standard pushbutton and an LED from one of the sources listed in Appendix A. The button is connected to pin 3 (B1) and pin 5 (GND), and the LED is connected to pin 2 (C1) and pin 4 (5V), with the flat side toward pin 2 and the longer lead connected to pin 4. leD Longer leg of LED Flat side of LED 4. 12 Taking an analog measurement using the aDC The I/O pins on PORTC of the Command Module can be used to take analog measurements with the processor's 10-bit Analog-to-Digital converter (ADC). For full details on the ADC, see the "Analog to Digital Converter" section of the processor datasheet, included on the Product CD. The 10-bit ADC uses a 5V reference, so the result of an analog measurement on the Command Module is an unsigned 10-bit number with a value from 0 to 1023, representing input voltages from 0 V to 5 V. For instance, an input voltage of 1 V gives you an ADC reading of 205 according to the formula: ADC reading = Vin * 1024 / Vref = 1 V * 1024 / 5V = 205 To take an analog measurement, you need to set up the ADC, start the measurement, and then store the result when it is done. Each of these operations uses registers which are predefined in the WINAVR environment in the <avr/io. h> header. The following code uses predefined registers to set the processor up to take analog measurements on pins C4 and C5 (located on pin1 of the Cargo Bay and top center ePorts respectively): DDRC &= ~0xC30;/* set C4, C5 as inputs */ Back side of male DB9 connector DIDR0 |= 0x30; /* disable digital input on C4, C5 */ PRR &= ~0x01; /* disable ADC power reduction */ Pin 4 (5 VDC) Button ADCSRA = 0x87; /* enable ADC, prescale = 128 */ Pin 3 (B1) Pin 2 (C1) ADMUX = 0x40; /* set voltage reference */ Create Figure 4 Button and LED assembly for the input example program Plug this assembly into the top center ePort. Reload the input example program onto the Command Module if necessary and restart it by removing the USB cable and pressing the Command Module's reset button. You should notice three LEDs flashing, including the one on the assembly you just installed. If you press the button on your assembly, the input program will light the LED solid and play a third song. The first line above sets up pins C4 and C5 as inputs. The second line disables the digital inputs on these pins to save power when you only want to use them as analog inputs. [. . . ] The connections labeled as "Digital I/O or ADC Input" can be configured in software to be either type (see sections 4. 5 and 4. 12). The ePorts' Digital I/O and ADC input lines have the electrical circuit model shown in the following schematic. The connector's pins are connected to the Command Module's internal processor through an electrical protection network to protect against electrostatic shock damage. Serial port connector select. Clock line Clock line Digital I/O or Analog Input Digital I/O or Analog Input Digital I/O or Analog Input Digital I/O or Analog Input Digital I/O or Analog Input Digital I/O or Analog Input Reset Line Serial Rx Serial Tx Create Device Detect Input USB Detect Command Module Soft Button Command Module LED 1 Command Module LED 2 Create Power Toggle (on rising edge) Analog Input Analog Input Create connector pins 10-13 Internal Use only Internal Use only Cargo Bay ePort pin 2 Top Center eport pin 2 Top Right ePort pin 2 Top Left ePort pin 2 Cargo Bay ePort pin 1 Top Center eport pin 2 Internal Use only Create connector pin 2 or USB Create connector pin 1 or USB Create connector pin 15 USB port Left button Left green LED Right green LED Create connector pin 3 Top Right ePort pin 1 Top Left ePort pin 1 To Processor PROC +5V +5V RPU 1nF 470 To ePort EPORT The RPU pull-up resistor shown in the schematics is internal to the processor, and is only available on the Digital I/O lines and not the ADC input lines. [. . . ]

DISCLAIMER TO DOWNLOAD THE USER GUIDE IROBOT COMMAND MODULE




Click on "Download the user Manual" at the end of this Contract if you accept its terms, the downloading of the manual IROBOT COMMAND MODULE will begin.

 

Copyright © 2015 - manualRetreiver - All Rights Reserved.
Designated trademarks and brands are the property of their respective owners.