Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

EEPROM write question.

Status
Not open for further replies.

birdman0_o

Active Member
Hey guys,

This should probably be on the actual Microchip forum as it is a very technical question. Google and the 16F manual came up with no answers so I turn to the best!

My question: Why is it that when writing to an EEPROM you must write 0X55 then 0XAA to the EECON2 register?

Does this apply to all EEPROMS (serial and parallel)?

Thanks
 
It is just to stop accidental writes to the EEPROM. The chances of that exact sequence of instruction appearing in the rom somewhere is very remote and so, if the chip glitches and executes random code, it is extremely unlikely to corrupt the EEPROM.

Mike.
 
Hey guys,

This should probably be on the actual Microchip forum as it is a very technical question. Google and the 16F manual came up with no answers so I turn to the best!

My question: Why is it that when writing to an EEPROM you must write 0X55 then 0XAA to the EECON2 register?

Pommie has already answered this, but I thought it was clearly explained in the datasheet anyway?.
 
And another hidden secret why the hell use only those two values 0X55 & 0XAA!

Because the two values are inverse of each other full filling all 8bits in the internal register in two steps.

What a method :D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top