EEPROM

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a interesting question about the actual size of the eeprom inside a ATtiny45 chip. It says it has 256 bytes of memory but from what i can make out it has 241bytes of actual writable data which is most likely wrong. Data will be stored in the eeprom & read later. I have planned to read this data out of the IC via the ISP & save it as a text file to be interpreted later.
I get this blank file from the IC.

:10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
:10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
:10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0
:10004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0
:10005000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0
:10006000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0
:10007000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF90
:10008000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
:10009000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF70
:1000A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF60
:1000B000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF50
:1000C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF40
:1000D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF30
:1000E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF20
:1000F000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF10
:00000001FF

Ignoring the :10000000etc. So looking above 17bytes wide * 15bytes high = 255 + 1 = 256. Great! The problem is i cant seem to write to any of the bytes in last position on the right say F0 etc. Further more they change by them self when i write to other areas which may indicate they are used for something else. Im guessing a maths problem or im being told lies e.g. missed some fine print somewhere. Any ideas?

Quote:

Data data everywhere & not a byte to eat.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The last byte in an intel hex file is the checksum. From my counting there is 16 bytes time 16 lines = 256.

The last line is the end of file.

http://en.wikipedia.org/wiki/Int...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So how come there is no more "FF" in column :00000001 to the 16th position? Its just space, does it need to have something written there?

Edit: Oh damn it!! It is 16 Deep. I cant tell you how many times i counted that & got 15.
I actually had to do this to get it correct. Is a sad day but its got me written all over it.

:10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00   1
:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0   2
:10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0   3
:10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0   4
:10004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0   5
:10005000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0   6
:10006000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0   7
:10007000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF90   8
:10008000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80   9
:10009000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF70   10
:1000A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF60   11
:1000B000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF50   12
:1000C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF40   13
:1000D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF30   14
:1000E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF20   15
:1000F000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF10   16
:00000001FF

FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16

So bad!!
Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hehe

You're mis-counting.

The first 2 digits of each line are the number of bytes (in hex). See that they're all 0x10 or 16.

Then you see the starting address, 0000 through 00f0. That's 16.

16 times 16 is 256.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Use avr-size on an Intel hex file and it'll tell you how many bytes are encoded within.