Re: msp430 EEPROM

Started by Rachel Adamec September 7, 2005
>From: sharf lader <sharf_lader@shar...>
>Subject: [msp430] msp430 EEPROM

>hello all;
>how could it be dealt with EEPROM if I would like to
>read from or write to EEPROM in msp430 mcu.


I am not sure if I understand you fully. I think you are asking how to interface
to the FLASH memory that is on the MSP430Fxxxx chips. You may be asking how to
interface to an external EEPROM. While there are others who have done this, I
have not. IIRC, the EEPROMs are accessed using the SPI connection.

The MSP430 follows the Von Neumann structure where data memory and program
memory 'the same'. In this case, while there is RAM for variables, there is also
FLASH memory space that is accessed via the same address and data path.

So, when these chips are described in the data sheets, the RAM address range is
given, as is the FLASH address space. Note that device registers are also mapped
into this space.

The big issue comes with clearing and writing to FLASH locations. 

FLASH is cleared in blocks. When you clear one of these sectors, you clear all
address locations in that sector. You cannot clear just one location.

On the otherhand, writing to a location, for the FLASH type that's used in these
parts, resets specific bits (from 1 to 0). A cleared FLASH location has the
value 0xFF. a bit can be reset so that it becomes 0xF7, and another to take it
to 0xE7 (note one bit switched from 1 to 0 in each case). But you cannot then
'write' a value of 0xEF to this location because you cannot set a bit (0 ->
1) in FLASH.

Writing to FLASH requires some care with timing and voltages. For this, please
see the User's Guide's chapter about the FLASH interface (e.g. slau049e.pdf
chapter 5).

Good luck,

Rachel Adamec
Norristown, PA, USA

Beginning Microcontrollers with the MSP430