Pololu Orangutan X2 Manual de usuario Pagina 1

Busca en linea o descarga Manual de usuario para Hardware Pololu Orangutan X2. Pololu Orangutan X2 User Manual Manual de usuario

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 27
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 0
Orangutan X2 Command
Documentation v1.01
Orangutan X2 Command Documentation v1.01 © 2001–2010 Pololu Corporation
Page 1 of 27
Vista de pagina 0
1 2 3 4 5 6 ... 26 27

Indice de contenidos

Pagina 1 - Documentation v1.01

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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 /

Pagina 9

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

Pagina 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

Pagina 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

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

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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,

Pagina 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

Pagina 18

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

Pagina 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

Pagina 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

Pagina 21

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

Pagina 22

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

Pagina 23 - 4. Attention and SPI Pins

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Comentarios a estos manuales

Sin comentarios