Assistance needed with P89V51RD2BN

Started by haresh, November 29, 2006, 04:56:30 AM

Previous topic - Next topic

haresh

Hello everyone,

Can any one assist me with the issue am experiencing.

I am using Philips P89V51RD2BN for my project; Flash Magic to program it.

The issue:-

I was able to read the device signature 4 or 5 times earlier.

After that when I built a simple project using Keil uVision 3 that  toggled pin 1.0 of  the micro-controller it would not run.

The project included a simple file with the following code:-

#include
 
#include

void main(void)
{
 unsigned int i;

  while(1)
 {
   P1 = 0x01;
   for(i=0;i<50000;i++);
   P1= 0x00;
 }  
}

Using the debug utility of Keil I found that the code was correct and was giving the desired output.

With a Digital Multi-meter I tried to check if the output at the pin was toggling or not. There was no change at the pin it remained 5V. Also, all the other pins showed 5 V. I reset the device, and then tried to re-program the device. But still there was no desired output.

I attempted once more, Then mid way, I attempted to cancel the burning. While the cancellation was going on, there was a power failure.

After that whenever I try to read the device, I am prompted to reset the device in ISP mode. I tried reducing the Baud Rate (as prompted a few times), but with no results.

For the reset circuit, I have connected a 10uF (electrolytic) capacitor in series with a 8.2K resistor between the Vcc[5V] and ground.The node of R-C  has been connected to the pin 9 of the controller. A push-button switch has been connected across the capacitor.

Andy Ayre

For flash based devices a reset supervisor is recommended.

The interruption of the power may have damaged the device. Did you decouple of power supply, ensured it was clean, etc.?

You could try putting the device into a parallel programmer and see if it still works, but probably you will need to switch to another device and check your power circuit.

Embedded Systems Academy, Inc.
support at esacademy dot com

haresh


Andrew,I appreciate your prompt response.

 I would be glad if you could explain what do you mean by:-

"Did you decouple of power supply, ensured it was clean, etc.?"

Regards,
Haresh

Andy Ayre

When the power is removed and applied have you make sure there are no spikes on VCC or GND? have you made sure there are no spikes on the reset signal at power up? Does your circuit conform to the DC and AC requirements specified in the microcontroller datasheet?

Andy

Embedded Systems Academy, Inc.
support at esacademy dot com

haresh

Hello Andy

As per your instructions, I checked the "cleanliness" of the power supply and if the DC and AC requirements were being met. Both are OK.

Am I correct to anticipate that the Boot-block of the chip has been erased or corrupted?

If, yes, then can it be re-programmed?

The reason for me thinking this way is the data sheet states that Boot Block can be erased using a parallel programmer and then it can be re-programmed with ISP/IAP code from Philips.

The code is available at the url: http://www.nxp.com/files/products/standard/microcontrollers/flash/philips_ice_block_1.hex