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.

Speed of 89s52 with external ROM in comparison to one with in-built ROM

Status
Not open for further replies.

Medtronic

Full Member level 5
Full Member level 5
Joined
May 19, 2005
Messages
246
Helped
29
Reputation
58
Reaction score
16
Trophy points
1,318
Location
Egypt
Activity points
2,736
hi all
i have a problem which is i made a program run at a board of 89s52 with external rom and after i program another 89s52 built in rom with the same program the speed of excution is diferent i note the program excutes faster.
any one can explain why...
thanks for all
 

89s52 oscillator problem

Well that's one sure thing.
Your ROM's writing and reading times are much longer than those of the internal memory inside the controller.
Remember that the controllers internal memory (89s52) is a flash memory which is very fast in reading and writing.
For more info on the 89s52 just check it's datasheet at:
https://www.keil.com/dd/docs/datashts/atmel/at89s52_ds.pdf

Salam.
 

flash memory+89s52

The fetch/execute sequences are the same whether the Program Memory is internal or external to the chip. Execution times do not depend on whether the Program Memory is internal or external.

Quoted from(P11):
**broken link removed**
 

89s52 cycle

hi ianp
i know what you said but the machin cycle is clock/12 in all cases,even not please can you explain the factor of speed,and how can i make a acurate delay if the machin cycle is chenged from ex memory to int flash memory
 

89s52 based counter

Always the machine cycle is clock/12, as 89S52 is standard speed part. There is not difference in execution time if the program is located in the internal rom or in external!!! Every instruction takes a number of cycles to execute according datasheet.
There is no delay if you use external eprom in standard parts. Some fast 8051 cores add wait states for flash reading, but not the 89C52/89S52 (Actually, speeds up to 20 MHz are OK for flash chips, RD pulse=3tcl)
We have difference only in ram access! Internal RAM is much faster than external XRAM.

PS: Look at datasheet, at AC Characteristics. There are no wait states. One byte is readed in less than 12 clock cycles (=1 cpu cycle). Make a small test programm, toggling the state of an output and measure the frequency. You will see that frequency is the same, no matter where the program is.
 

89s52 internal on chip oscillator

- faulty oscillator/crystal?
- hardware+software depending on pulses on /PSEN

wek
 

89s52 machine cycle

hi wek
i can not understand you what do you mean by
- faulty oscillator/crystal?
- hardware+software depending on pulses on /PSEN
thanks
 

89s52 memory details

As said, "normally" the "classic" 8051 does execute code in the same speed both from internal and external memory.
So, if you use EXACTLY the same code in both cases, my conclusion is that either your code somehow finds out that it runs from internal memory (which can be accomplished (IMHO only) by examining presence or absence of pulses on /PSEN using some extra hardware (e.g. counter or single-shot)); or you run on a different hardware (e.g. swapped chips and they have different oscillator value).

We know little or nothing on your hardware and software. If you want more help, give more details. Try perhaps a very simple "LED-blinking" program (only a few lines, to exclude possible errors) and post the results here.

wek
 

led 89s52 . pdf

Medtronic said:
hi ianp
i know what you said but the machin cycle is clock/12 in all cases,even not please can you explain the factor of speed,and how can i make a acurate delay if the machin cycle is chenged from ex memory to int flash memory

hey Medtronic, making a delay doesn't depend at all whether you're working on internal or external memories !!!
you just start a timer and keep your microcontroller pending untill your timer overruns or whatever your condition is.
What will that have to do with internal and external memories ?!?! your timers are already built internally in the controller.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top