Re: Q: lpc921 compatiblity with 8051?
- From: "An Schwob in the USA" <schwobus@xxxxxxx>
- Date: 24 Aug 2005 16:59:31 -0700
Petar Silic wrote:
> hi,
>
> I have a project with philips p89lpc921, and need to use it as standard 8051
>
> now, this two chips have different clocks per cycle, as I understood,
>
> so delay and timer do not work corectly
>
>
> anyone knows how to make this work? i tried writing DIVM=3,
> but it didn't work
>
> help please, I am out of ideas :o)
Petar,
while the LPC900 family is clock cycle compatible which means that
every instruction takes 1/6 the time of a standard 12 clock 80C51,
timers are based on the input clock without any changes to a standard
51. What you would like to do seems between very difficult and not
possible. I do not know your software but I hope you did not write
delay loops that are based on execution speed. If you use the same
timers on the LPC921 as you used on the 51, running at the same
frequency, the timer delays should be indentical. However, your code
executes 6 times faster. This is a significant difference to other
cores from Dallas, Atmels new "single cycle" or Silabs which are not
cycle compatible. Their 3-4 clock cores or so called single cycle cores
will use a different number of cycles to execute an instruction that do
not scale from the original 80C51.
As a summary, the LPC921 core is fully compatible to the 8051 core, 6x
faster for any instruction. The timers are "even more compatible", no
changes required. This is great for most applications that used timers
for specific wait time for events to happen. The code will be faster
and just waiting longer for the wait to finish. The only problem is
when programmers were counting instruction cycles to calculate delays,
the the relationship between CPU clock and timer clock does not work
any more.
btw. using DIVM slows down the clock to the whole chip, not just
peripherals.
An Schwob
.
- Follow-Ups:
- Re: Q: lpc921 compatiblity with 8051?
- From: Petar Silic
- Re: Q: lpc921 compatiblity with 8051?
- From: Jim Granville
- Re: Q: lpc921 compatiblity with 8051?
- References:
- Q: lpc921 compatiblity with 8051?
- From: Petar Silic
- Q: lpc921 compatiblity with 8051?
- Prev by Date: Re: 4 line LCD drivers in assembler needed.
- Next by Date: Re: FPGA/CPLD vs uC / uP based embedded system
- Previous by thread: Re: Q: lpc921 compatiblity with 8051?
- Next by thread: Re: Q: lpc921 compatiblity with 8051?
- Index(es):
Relevant Pages
|