P89C51RD2 replace P80C31

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi all,
    my company has a old product which use intel's p80c31, now my boss
ask me to try to use philips'p89c51rd2 to replace the p80c31, so we
can save the ST  m27c512 on which program runs. I thinked the
p89c51rd2 is 100% compatiable to p80c31, so I just burned the program
into on-chip FLASH, and connectted the !EA to vcc, and power on, but
the program seems not running. Strange I think then I download the
p89c51rd2 mannual(I haven't use p89c51rd2 before). It seems status
byte should be zero if you want run the user's code. So I burned the
status byte to zero and power on again, but again nothing happen. I
feel so distress. Then I used the ATMEL p89c51 to replace the p80c31
but keep the program runs on m27c512, everything is OK. Again I tried
the p89c51rd2 to replace the p80c31 but keep the program runs on
m27c512, I just burned the status byte to zero. But not luck! It
failed.
    So my question are:
    1) Is p89c51rd2 100% compatiable to p80c31? if yes then why it
failed when I exchanged these two chips and didn't change anything
else(include HW & SW), it is so strange because I keepped the program
on the m27c512(!EA connectted to ground), and I burned the status byte
to zero.
    2) We use external RAM, but p89c51rd2 AUX register default value
is 0x00, means using MOVX to access extended ram on chip(768 bytes),
will that be a promblem?
    3) what should I do if I wanna replace the chip. Should the HW or
SW change a little?

thanks

Re: P89C51RD2 replace P80C31
If p89c51rd2 is pin compatible to p80c31 (you should check the datasheets, I
won't do that for you) then I think you should study the registers for
memory
set-up and other initialization registers.

My guess is that your processor isn't even executing the user code but
bootloader
you should check that first so make a small program that will toggle a LED
or a
processor pin, and see if it's working. And when you get that simple program
working
I think you won't have much trouble in using your old program.

Mickey



Re: P89C51RD2 replace P80C31
snipped-for-privacy@126.com (Wu) wrote in message
Quoted text here. Click to load it

The P89C51RD2 requires one pin (is it EA or PSEN?, check with data
sheet) to be connected to ground for the chip to start running at
program address 0000hex. Otherwise it is completely compatible with a
normal 8051

Re: P89C51RD2 replace P80C31
Quoted text here. Click to load it

When I look on programmer options for P89C51RD2, it shows
- Status BYTE
- Boot BYTE
- Div6/Div12 Clock option
- Security bits

The first 3 differ from a P80C31, so check those carefully.

Another subtle delta, is that Atmel 89C51 and romless P80C31
have 128 bytes of RAM, whilst 89C52RD2 has 256.
Normally that should not matter, but you never know :)

-jg



Re: P89C51RD2 replace P80C31
snipped-for-privacy@yahoo.co.uk (ted) wrote in

Quoted text here. Click to load it

Actually, by default, it executes from zero, if the status byte has been
set to zero.  It can be forced to execute the boot loader by holding PSEN
low, P2.7 and P2.6 High, and !EA greater than V(IH) and ALE high at the
falling edge of the Reset.

As to the OPs problem, don't know, have never worked with the 80C31.

--
Richard

Re: P89C51RD2 replace P80C31
Quoted text here. Click to load it

You should instead consider the Atmel AT89C51RD2 part which can byte program
in flash (its 'flash' is really just E^2), its code clocking is 6/12
software selectable, plus it gives you a bit of extra XRAM, too.

Quoted text here. Click to load it

You might want to check pins 18 & 19. Most 8031s are NMOS, and the newer
parts are CMOS, and that requires swapping pins 18 & 19. My synthesizer
upgrade required this.

Quoted text here. Click to load it

If you have peripherals mapped in the xdata 0000h-02ffh range, yes.

Quoted text here. Click to load it

I'd add in a line of code that disables the on chip XDATA, verify that it's
running at 12 cycle instead of 6. Beyond that, there are no other changes
that were required of us to get the Philips part working.

-->Neil

-->Neil



Site Timeline