Pololu Orangutan X2 User Manual
Page 27
20: ADDR_SCK_DURATION — programmer SPI SCK setting (0 is fastest). This determines how quickly you
can upload a hex file from the mega168 to the mega644 while programming. This parameter can be changed
setting the ISP frequency in Main tab of AVR Studio’s AVRISP dialog window. Default value is 0.
21: ADDR_ISP_STATE — mega168 ISP state (in progmode or not). This is used internally by the mega168 to
determine if the mega644 has potentially corrupted flash. If the ISP state ever disagrees with what the mega168
thinks it should be, the mega168 concludes something bad has happened during programming, such as a loss of
power, and will not allow the mega644 to run. Instead it will alternately flash the red and yellow LEDs below the
reset button until the mega644 is reprogrammed. You should never write to this EEPROM address.
22: ADDR_ISP_SW_MINOR — AVRISP software version major byte. Default value is 0x0A.
23: ADDR_ISP_SW_MAJOR — AVRISP software version minor byte. Default version is 0x02.
At the time of the X2’s release, the current AVR Studio AVRISP version is 2.0A. These bytes represent the
version AVRISP version number the mega168 will transmit to AVR Studio when you attempt to program the
mega644. If the two version don’t match, you will have to first cancel out of an “upgrade your firmware?” dialog
box every time you try to program your mega644 (you cannot upgrade your programming firmware in this way,
so this dialog is nothing more than an annoyance). As such, you might have a better programming experience if
you set these version values to match the AVRISP version used by the AVR Studio you’re running.
24: ADDR_MELODY_START_PTR_MSBS — the mega168’s EEPROM is can be addressed by 9-bit values
(512 bytes); this byte stores the ninth bits of the melody pointers according to the formula: bit i = bit 9 of melody
i+1. Bit 9 of “melody 8” is really bit 9 of ADDR_MELODY7_END_PTR (melody 7 termination pointer).
25: ADDR_MELODY1_START_PTR — address of low byte of pointer to melody 1 start.
26: ADDR_MELODY2_START_PTR — address of low byte of pointer to melody 2 start.
27: ADDR_MELODY3_START_PTR — address of low byte of pointer to melody 3 start.
28: ADDR_MELODY4_START_PTR — address of low byte of pointer to melody 4 start.
29: ADDR_MELODY5_START_PTR — address of low byte of pointer to melody 5 start.
30: ADDR_MELODY6_START_PTR — address of low byte of pointer to melody 6 start.
31: ADDR_MELODY7_START_PTR — address of low byte of pointer to melody 7 start.
32: ADDR_MELODY7_END_PTR — address of low byte of pointer to the end of melody 7.
33: ADDR_MELODY0_START — address of 1st note of melody 0.
There is room in EEPROM for 159 notes. Notes are stored sequentially in three-byte blocks starting at EEPROM
address 33.
Orangutan X2 Command Documentation v1.01
© 2001–2010 Pololu Corporation
5. ATmega168's EEPROM Addresses
Page 27 of 27