Note that there are two versions of main()
in the supplied code because for some reason the functions in
eeprom.h differentiate between the addresses a byte can be written
to as opposed to where you can write a word.
eeprom_write_byte() expects a byte
for an address and is therefore limited to the address range 00-FF.
eeprom_write_word() wants a word
for the address and can therefore address all of the EEPROM. What
the address has to do with the type of data you're writing I have
no idea but that's the way it's written and it works so I'll think
about it another day.
To swap main()s just remove the
x_ from one and add it to the other.
If you don't have an analyser you can still verify that the write
has worked by uploading the EEPROM contents from AVR Studio. From
the programming dialogue enter the file name to save the EEPROM
contents to and click "Read".
Look at the file and you'll see something like this, it's a HEX
file format that includes address and checksum information but
you can see the 22 at location 0 as programmed by the sample code.