The function returns the high byte and the low byte on the two calls. The integer is constructed by shifting the high byte 8 places to the left and adding the low byte, as was shown in reply #11. It is NOT constructed by simply adding the two bytes.

The values that you are getting are 1 and 67. Shifting the 1 8 places is equivalent to multiplying by 256. So, 256 + 67 = ? That's right. 323.

OP: Start thinking in hex.1511 is 0x05E7, so two bytes only, 0x05 and 0xe7.

I'm dummy. That "B" confused me, I though IT WAS hex 101B. I don't know how they should be expressed in these posts, I like to say "bin" or "hex" just to be sure, not combining binary and decimals in the same sentence.

Cheers,Kari

EDIT. By the way, what does the "OP:" stand for? OT= off topic, but OP?

The only law for me; Ohms Law: U=R*I P=U*INote to self: "Damn! Why don't you just fix it!!!"

This has been very enlighten conversation for me, only thing that bothers me is the short lifeline of the internal eeprom.

If I decide to use external eeprom IC, is there anything that makes life easier or more complicated, comparing to internal eeprom? Is it faster or exactly opposite? Programming issues are more likely the biggest consern, not the speed.

Cheers,Kari

The only law for me; Ohms Law: U=R*I P=U*INote to self: "Damn! Why don't you just fix it!!!"