Pololu Orangutan X2 Uživatelský manuál Strana 1

Procházejte online nebo si stáhněte Uživatelský manuál pro Hardware Pololu Orangutan X2. Pololu Orangutan X2 User Manual Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 27
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 0
Orangutan X2 Command
Documentation v1.01
Orangutan X2 Command Documentation v1.01 © 2001–2010 Pololu Corporation
Page 1 of 27
Zobrazit stránku 0
1 2 3 4 5 6 ... 26 27

Shrnutí obsahu

Strany 1 - Documentation v1.01

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

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

Strany 9

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

Strany 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

Strany 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

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

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

Strany 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

Strany 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

Strany 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

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

Strany 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

Strany 18

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

Strany 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

Strany 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

Strany 21

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

Strany 22

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

Strany 23 - 4. Attention and SPI Pins

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

Strany 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

Strany 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

Strany 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

Strany 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

Komentáře k této Příručce

Žádné komentáře