Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to use a Internal Rom of 8051 microntroller

Status
Not open for further replies.

tigerraj

Newbie level 4
Joined
Jan 25, 2009
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,345
As we know 8051 has 4Kb of flash memory and 128 bytes of RAM.
Now I want to design a very simple digital clock which will show the time.
For this we will just inttialize the timers to invoke at a desigered unit of time and show the particular value of time in some output device.
now if we remove the power supply and connect it again then the recent time will be cleared to default value.

For this sort of problem cann't we utilize the remaining 4kb of memory to hold these changing variable so that we could initialize the timer from this value when we reset the system.
 

Depends on your specific 51 derivative. Some are built from EEPROM cells and you could save the last known time when you power off, IF your systems knows ahead of time when that happens (power fail with large C)
You will not be able to track time, but you might be able to track usage of your device. Time will fly by while the device is switched off, usage is "0" during off mode.

hth, Bob
as FvM mentioned a backup battery and a Real-Time-Clock would make life a lot easier though.
 

Not only one needs a battery, but an IC that will count (and remember) the time regardless whether external power is present or not ..
You can select RTCs (real-time-clock) with built-in battery ( DS12877) or with 3V lithium battery support ( DS1302 – DS1307 ) ..
Your call ..

Rgds,
IanP
 

Thanks to all who replied me
But I think You People didn't understand my question.
DS1307 is the easiest way for timing, through Battery backup we can run the system running at least in sleep mode .

timing was only one example for my queries. Actually i want to store the data into the onchip ROM of 8051 while it is running mode.

This will be the good example of this question than timer.
I want to design the visitor counter which will count the no. of visitor and when it reach 1000 it have to alarm or something other indication.
Now at the state when count was 999 power system fails or system get reset that may be any cause. Then when system starts count will begin from 0.

That's why i want to store this variable "count "into the onchip ROM of 8051 so that we can retrive the count during the next startup.
Is it possible to update the ROM of 8051 during run time
 

ROM = READ ONLY memory ..
:cry:

You need external memory, EEProm or NV SRAM ..
**broken link removed**

Rgds,
IanP
 
But 8051 also have flash ROM ? what do u think about this
 

Great Thanks for suggestion

Added after 6 minutes:

now is there any guidence/help source to use this memory
 

As we know 8051 has 4Kb of flash memory and 128 bytes of RAM.
Now I want to design a very simple digital clock which will show the time.
For this we will just inttialize the timers to invoke at a desigered unit of time and show the particular value of time in some output device.
now if we remove the power supply and connect it again then the recent time will be cleared to default value.

For this sort of problem cann't we utilize the remaining 4kb of memory to hold these changing variable so that we could initialize the timer from this value when we reset the system.

haai.....the link below will helps u
https://what-when-how.com/8051-microcontroller/accessing-code-rom-space-in-8051-c/

Go below and see how to access a code memory in 8051.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top