write to memory lpc2148
2006-01-24 by jingsian_lim
Yahoo Groups archive
Index last updated: 2026-04-28 23:31 UTC
Thread
2006-01-24 by jingsian_lim
Hi to all, I am working on lpc2148. I want to store a data into the microcontroller so that the data can be used even after power off/on. Can anybody help me? Thanks, JS
2006-01-24 by Mauricio Scaff
If you have just a few bytes to save, you can keep Vbat and use the alarm registers of the RTC and probably the RTC registers itself if you don't mind loosing it (you probably will have to pull X1 down and select external oscilator, or select the clock derived from the main oscilator and keep resseting the seconds register to avoid changes in the others). But if you need more than a few bytes, then go to an e2prom or even a serial dataflash. They will give you a lot of non volatile memory using just a few i/o pins (2 or 4). jingsian_lim wrote: > Hi to all, > > I am working on lpc2148. > I want to store a data into the microcontroller so that the data can > be used even after power off/on. > > Can anybody help me? > > Thanks, > > JS > > > > > > SPONSORED LINKS > Microcontrollers > <http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=mfaAujKZXA2Z_vxre9sGnQ> > Microprocessor > <http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=9jjd2D3GOLIESVQssLmLsA> > Intel microprocessors > <http://groups.yahoo.com/gads?t=ms&k=Intel+microprocessors&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=OMnZuqMZX95mgutt4B-tDw> > > Pic microcontrollers > <http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=Malspbd0T4Rq3M4Q0nHrfw> > > > > ------------------------------------------------------------------------ > YAHOO! GROUPS LINKS > > * Visit your group "lpc2000 > <http://groups.yahoo.com/group/lpc2000>" on the web. > > * To unsubscribe from this group, send an email to: > lpc2000-unsubscribe@yahoogroups.com > <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/>. > > > ------------------------------------------------------------------------ > [Non-text portions of this message have been removed]
2006-01-24 by Bruce Paterson
> If you have just a few bytes to save, you can keep Vbat and > use the alarm registers of the RTC and probably the RTC > registers itself if you don't mind loosing it (you probably > will have to pull X1 down and select external oscillator, or > select the clock derived from the main oscillator and keep > resetting the seconds register to avoid changes in the others). > But if you need more than a few bytes, then go to an e2prom > or even a serial dataflash. They will give you a lot of non > volatile memory using just a few i/o pins (2 or 4). ....Or use the flash on the lpc. There is Philips software on this yahoo site that emulates an EEprom device using one (or more) flash segments. It's reasonably smart in terms of not needing to erase the whole segment till it's been filled. I have used a modified version of this for both a logging and a parameter storage application and it works fine. Beware you'll need to disable interrupts during IAP calls, and if your application can't allow this you'll have to copy some code into RAM (see other postings).
2006-01-24 by Mauricio Scaff
Yes, that's true, you can use the internal flash.
IMHO, the LPC is a fantastic processor, but it's flash system is a
little bit less than it could be.
400mS for an erase cycle ? 4Kb minimum flash sector ? Minimum write of
16 bytes ?
I only think about using the internal flash if there is no other option
available.
An e2prom is:
cheap (about U$0,50)
low power (less than 1uA in in idle)
small (sot23 if you wish)
fast (2mS to 5 ms per page (16 to 128 bytes depending on device))
reliable (1milion writes cycle or 10milion in selected devices)
you don't have to mind about disable interrupts or copying code
to ram
and LPC devices come with 2 I2C interfaces.
But, Yes, you can always use the internal flash.
I think Philips could put some flash in small sectors (why not 4 or 8
sectors of 128 or 256 bytes) (MSP430 have something like this)
If we can write to it and still execute code from the main flash, even
better...
Hugs, Mauricio
Bruce Paterson wrote:
>
>
> > If you have just a few bytes to save, you can keep Vbat and
> > use the alarm registers of the RTC and probably the RTC
> > registers itself if you don't mind loosing it (you probably
> > will have to pull X1 down and select external oscillator, or
> > select the clock derived from the main oscillator and keep
> > resetting the seconds register to avoid changes in the others).
> > But if you need more than a few bytes, then go to an e2prom
> > or even a serial dataflash. They will give you a lot of non
> > volatile memory using just a few i/o pins (2 or 4).
>
> ....Or use the flash on the lpc. There is Philips software on this yahoo
> site that emulates an EEprom device using one (or more) flash segments.
> It's reasonably smart in terms of not needing to erase the whole segment
> till it's been filled.
> I have used a modified version of this for both a logging and a
> parameter storage application and it works fine. Beware you'll need to
> disable interrupts during IAP calls, and if your application can't allow
> this you'll have to copy some code into RAM (see other postings).
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
> * Visit your group "lpc2000
> <http://groups.yahoo.com/group/lpc2000>" on the web.
>
> * To unsubscribe from this group, send an email to:
> lpc2000-unsubscribe@yahoogroups.com
> <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>
[Non-text portions of this message have been removed]2006-01-24 by lpc2100_fan
There is an Application Note in the Files Section EEPROM... which describes how to use the on chip Flash to simulate EEPROM. Bob --- In lpc2000@yahoogroups.com, Mauricio Scaff <scaffm@g...> wrote: > > If you have just a few bytes to save, you can keep Vbat and use the > alarm registers of the RTC and probably the RTC registers itself if you > don't mind loosing it (you probably will have to pull X1 down and select > external oscilator, or select the clock derived from the main oscilator > and keep resseting the seconds register to avoid changes in the others). > But if you need more than a few bytes, then go to an e2prom or even a > serial dataflash. They will give you a lot of non volatile memory using > just a few i/o pins (2 or 4). > > > jingsian_lim wrote: > > Hi to all, > > > > I am working on lpc2148. > > I want to store a data into the microcontroller so that the data can > > be used even after power off/on. > > > > Can anybody help me? > > > > Thanks, > > > > JS > > > > > > > > > > > > SPONSORED LINKS > > Microcontrollers > > <http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=mfaAujKZXA2Z_vxre9sGnQ> > > Microprocessor > > <http://groups.yahoo.com/gads?t=ms&k=Microprocessor&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=9jjd2D3GOLIESVQssLmLsA> > > Intel microprocessors > > <http://groups.yahoo.com/gads?t=ms&k=Intel+microprocessors&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=OMnZuqMZX95mgutt4B-tDw> > > > > Pic microcontrollers > > <http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microcontrollers&w2=Microprocessor&w3=Intel+microprocessors&w4=Pic+microcontrollers&c=4&s=95&.sig=Malspbd0T4Rq3M4Q0nHrfw> > > > > > > > > ------------------------------------------------------------------------ > > YAHOO! GROUPS LINKS > > > > * Visit your group "lpc2000 > > <http://groups.yahoo.com/group/lpc2000>" on the web. > > > > * To unsubscribe from this group, send an email to: > > lpc2000-unsubscribe@yahoogroups.com > > <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> > > > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > > Service <http://docs.yahoo.com/info/terms/>. > > > > > > ------------------------------------------------------------------------
> > > > > > [Non-text portions of this message have been removed] >
2006-01-24 by Tom Walsh
Mauricio Scaff wrote: >Yes, that's true, you can use the internal flash. > >IMHO, the LPC is a fantastic processor, but it's flash system is a >little bit less than it could be. > > Depends upon your expectations and use, you could always use some Dallas Battery RAMs.. heh. I'm absolutely pleased with what they put together in the LPC2000 family! I have twin LPC2000 processors (LPC2106 + LPC2138) on this board, along with an SD card. The board entirely self programs itself with 156K from the SD card in less than 18 seconds. This is using both the ISP and IAP conmmands to program the two processors. The longest time, and smallest binary, to program is over the ISP connection betwee processors. While the IAP is doing 112K in less than 2 seconds. Not too bad in my opinion, considering past experience with older Flash technologies. This is far, far, better than the older board design this one replaces where the end-customer had to contact the factory to get new EPROMs! Regards, TomW -- Tom Walsh - WN3L - Embedded Systems Consultant http://openhardware.net, http://cyberiansoftware.com "Windows? No thanks, I have work to do..." ----------------------------------------------------