??? 10/17/06 22:58 Read: times |
#126618 - More basic arithmetic Responding to: ???'s previous message |
Ap Charles said:
The chip wraps after 65536 decimal adress write. No, it doesn't. As already explained to you, this chip has 8192 = 8K locations, each of which holds 1 byte (8 bits) the 1st location is at address 0; the 2nd location is at address 1; the 3rd location is at address 2; the 4th location is at address 3; the 5th location is at address 4; : etc : the 8190th location is at address 8189 = 0x1FFD; the 8191st location is at address 8190 = 0x1FFE; the 8192nd location is at address 8191 = 0x1FFF; As the datasheet says on p3, the part uses a 13-bit address; ie, the address of the 1st location is: 0 0000 0000 0000 = 0x0000 = 0; the address of the 2nd location is: 0 0000 0000 0001 = 0x0001 = 1; the address of the 3rd location is: 0 0000 0000 0010 = 0x0002 = 2; the address of the 4th location is: 0 0000 0000 0011 = 0x0003 = 3; the address of the 5th location is: 0 0000 0000 0100 = 0x0004 = 4; : etc : the address of the 8190th location 1 1111 1111 1101 = 0x1FFD = 8189; the address of the 8191st location 1 1111 1111 1110 = 0x1FFE = 8190; the address of the 8192nd location 1 1111 1111 1111 = 0x1FFF = 8191; Now you can see that all 13 bits of the address are set for the final byte location at address 0x1FFF - if you add 1 to this, the 13-bit address will roll-over to 0x0000 if you give it an address 65539 the data will go to memory location 3 ? why this . 65539 = 0x10003 - it should be obvious already. However, in case it's not, read on... Look at the diagram on p11 of the Datasheet. The 13-bit address is carried in two 8-bit "chunks" - that's a total of 16 bits, so 3 of them are ignored. That's what the note means when it says "* = DON'T CARE bits" So: 65539 = 0x10003 = 1 0000 0000 0000 0011 | <->|<------------>| | | 13 bits used | | by the chip | | | +-- 3 DON'T CARE bits ignored by the chip | +-- 1 excess bit that won't even fit at all! do it and and see for yourself There you go! |
Topic | Author | Date |
64K electrical-erasable-prom addressing | 01/01/70 00:00 | |
there is NO SUCH THING as "AN" 24x64 eeprom. All | 01/01/70 00:00 | |
x = C , pardon for using short form | 01/01/70 00:00 | |
double post, ignore | 01/01/70 00:00 | |
where did you get that number? | 01/01/70 00:00 | |
524280bits of space | 01/01/70 00:00 | |
look at this | 01/01/70 00:00 | |
'k' vs 'K' | 01/01/70 00:00 | |
Contradiction | 01/01/70 00:00 | |
I give up | 01/01/70 00:00 | |
me too | 01/01/70 00:00 | |
OK cardboard did not work, let's try bending it in | 01/01/70 00:00 | |
OK cardboard did not work, let's try bending it in | 01/01/70 00:00 | |
Cardboard | 01/01/70 00:00 | |
More basic arithmetic | 01/01/70 00:00 | |
On atmel datasheet page 8 | 01/01/70 00:00 | |
Think about it... | 01/01/70 00:00 | |
put this away, go get some sleep![]() | 01/01/70 00:00 | |
It's basic arithmetic! | 01/01/70 00:00 | |
Have you read the datasheet? | 01/01/70 00:00 | |
See diagram | 01/01/70 00:00 | |
Lookup table or what ? | 01/01/70 00:00 | |
2 suggestions | 01/01/70 00:00 | |
Review questions | 01/01/70 00:00 |