Pololu Orangutan X2 Manuel d'utilisateur Page 1

Naviguer en ligne ou télécharger Manuel d'utilisateur pour Matériel Pololu Orangutan X2. Pololu Orangutan X2 User Manual Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 27
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 0
Orangutan X2 Command
Documentation v1.01
Orangutan X2 Command Documentation v1.01 © 2001–2010 Pololu Corporation
Page 1 of 27
Vue de la page 0
1 2 3 4 5 6 ... 26 27

Résumé du contenu

Page 1 - Documentation v1.01

Orangutan X2 CommandDocumentation v1.01Orangutan X2 Command Documentation v1.01 © 2001–2010 Pololu CorporationPage 1 of 27

Page 2

3.a.10. Command 192: Set Current LimitEffect: Sets the current limit for the specified motor and the current control constant P (proportional componen

Page 3 - 1. Overview

losses, however the motor 1 PWM frequency is used for acceleration timing, so decreasing it below 1 kHz canslightly reduce the frequency at which acce

Page 4

3.b.1. Command 152: Play NoteEffect: Plays the desired note immediately, where note is an 8-bit encoding of the frequencies of the equal-tempered scal

Page 5

data byte 2 = most significant byte of duration word (minus the MSB, which is in the command byte)data byte 3 = least significant byte of duration wor

Page 6 - 3. Low-Level SPI Commands

3.b.4. Command 168: Store NoteEffect: This command is used to store a sequence of notes in the mega168’s EEPROM that can then be playedas a melody. Ea

Page 7

command byte = 1863.b.7. Command 226: Set VolumeEffect: Sets the buzzer volume by affecting the duty cycle of the PWM sent to the buzzer. The formula

Page 8

in normal mode:baud = ( 20 MHz / 16 ) / ( UBRR + 1 ) = 1.25 MHz / ( UBRR + 1 ), soUBRR = ( 1.25 MHz / baud ) – 1in double-speed mode:baud = ( 20 MHz /

Page 9

data byte 1 = (permanent program mode bit << 6) | (stop-bits bit << 5) | (2x-speed bit << 4) | (UBRRH << 1) |MSB of UBRRLdata

Page 10

Values sent: UART byte (8 bits)command byte = 220 | MSB of send bytedata byte = seven lowest bits of send byte3.c.04. Command 222: Get Free Space in S

Page 11 - 3.b. Buzzer Commands

3.c.07. Command 252: Get UART ErrorEffect: This command loads into the mega168’s SPDR (SPI data register) the UART error byte, which reflectsany UART

Page 12 - 3.b.1. Command 152: Play Note

1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 13

• bit 3: STATUS_BUZZER_FINISHED — the buzzer has finished playing and is now silent. This bitreflects the real-time state of the buzzer and is not cle

Page 14

3.d.03. Command 248: Read from EEPROMEffect: This command will read a byte from the specified address of the mega168’s EEPROM and return it to themega

Page 15 - 3.c. UART Commands

7. read SPDR to obtain the minor version byteValues sent: nonecommand byte = 253data byte = any seven-bit value3.d.06. Command 255: NULL CommandEffect

Page 16

4. Attention and SPI PinsOrangutan X2 SPI and attention pins4.a. ATmega168's Attention LineWhenever a bit gets set in the mega168’s status byte,

Page 17

(2×3) holes next to the Slave Select hole contain the SPI MISO (Master In, Slave Out), MOSI (Master Out, SlaveIn), and SCK (SPI Clock) lines. If you w

Page 18

5. ATmega168's EEPROM AddressesThis section details the mega168 settings that can be saved to EEPROM, the format of those settings, and theaddres

Page 19 - 3.d. Miscellaneous Commands

13: ADDR_SERIAL_SETTINGS —• bit 7: unused• bit 6: normal UART functionality if cleared, enables permanent program mode (and overrides all otherserial

Page 20

20: ADDR_SCK_DURATION — programmer SPI SCK setting (0 is fastest). This determines how quickly youcan upload a hex file from the mega168 to the mega64

Page 21

1. OverviewNote: As of October 25, 2010, all Orangutan X2 versions are shipping with programmableATmega1284P microcontrollers instead of the ATmega644

Page 22

2. ATmega644 SPI ConfigurationThe mega644 SPI module should be configured as follows:• SPI enabled• MSB first• master mode• clock polarity 0 (clock li

Page 23 - 4. Attention and SPI Pins

{__asm__ volatile ("1: push r22" "\n\t"" ldi r22, 4" "\n\t""2: dec r22" "\n\t"

Page 24

3. Low-Level SPI CommandsWe will now elaborate on the low-level SPI commands.Some commands produce immediate results (e.g. non-acceleration motor comm

Page 25

If you want to run your X2 in joint motor mode, you should connect one terminal of your motor to the two M1outputs and the other terminal of your moto

Page 26

3.a.05. Command 144: Joint Motor Operation (inA1 = inB1 = in1; inA2 = inB2 = in2)Effect: Use dual motor drivers together as a single, more powerful mo

Page 27

command byte = 208 | motor bitdata byte = 7-bit acceleration (MSB always zero)3.a.08. Command 188: Set Brake DurationEffect: Sets the duration the spe

Commentaires sur ces manuels

Pas de commentaire