Flash Magic Forum

In-System Programming Support => P89C51Rx+/P89C51Rx2/P89C66x/P89C6xX2/P89V66x => Topic started by: Tony G on May 06, 2004, 08:20:21 PM

Title: P89C51RD2 ISP problems
Post by: Tony G on May 06, 2004, 08:20:21 PM
Help please:
I have tried program the P89C51RD2 using an application note which suggested the use of DTR and CTS of the RS232C port. This did not work and I have followed procedures for power up of Vpp and PSEN.
I have been able to program the part using just the RX and TX. However the part insists on setting the FX2 bit and forces the micro to work in the 6 clock mode. Among other possible effects is that the baud rate generator now works at 2 times the rate. Using just TX and RX I have not been able to get FlasMagic to program for 12 clock mode.
I have tried to alter the CKCON register with the user code but am unable to read of alter this register. CKCON always returns FFh.
The user code works because I have used the same code on an ATMEL 89C51RD2 and I am able to read this register and alter it.

Any suggestions?

Thanks
Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on May 07, 2004, 09:55:27 AM
Which device are you using? Is it the P89C51RD2Hxx or the P89C51RD2xx? Are you selecting the correct device in Flash Magic?

Title: Re: P89C51RD2 ISP problems
Post by: Tony Gelonese on May 07, 2004, 06:55:06 PM
Hi Andrew,
Thanks for your reply. The part I am using is P89C51RD2HBP and I have selected the correct on in FlashMagic. FlashMagic seems to have trouble communicating when the signal from RTS DTR are used. If I manually set the part into ISP mode the commas work ok and I can program the part. I do not see any way of controlling the FX2 flag. Hence my code is not able to read or change the CKCON register. My code does work but the serial port which I set up for 19,200 Baud now works at 38kB.

Your help is greatly appreciated.

Cheers,

Tony G.
Title: Re: P89C51RD2 ISP problems
Post by: erikm on May 10, 2004, 06:36:53 AM
the .H devices do not have the CKCON SFR.  Use the coorrect datasheet.

Erik
Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on May 10, 2004, 07:56:21 AM
Tony,

Erik is correct. The Hxx devices can only be placed into 12 clocks/cycle mode using a parallel programmer. The devices cannot be returned to 6 clocks/cycle.

The Rx2xx devices come from the factory in 6 clocks/cycle mode and can be programmed via ISP or in your code using CKCON to 6 clocks/cycle.

Title: Re: P89C51RD2 ISP problems
Post by: Tony Gelonese on May 10, 2004, 06:22:34 PM
Thanks Erik and Andrew for pointing out and confirming  that the H part does not have a CKCON register.  I have now located the data for the P89C51RD2HBP which I have. Unfortunately FlashMagic does not 'know' that it can't program the 6/12 cycle option.
Does anyone know if this part is now obsolete?

Thanks.
Title: Re: P89C51RD2 ISP problems
Post by: Ian Prossor on May 11, 2004, 05:07:33 AM
H part needs a parallel programmer to set the clock back to 12 clock cycles per instruction ... The newer part's without the H can be set by s/w.

IP
Title: Re: P89C51RD2 ISP problems
Post by: selvam on May 25, 2004, 04:13:59 AM
Help please:
I have tried program the P89C51RD2BN using an application note which suggested the use of DTR of the RS232C port.

This did not work and I have followed procedures for power up of Vpp and PSEN.

I am not able to program the P89C51RD2BN.

Flashmagic showing that  "unable to communicate.(transmit/receive) ensure no other aplications are using the comportconfigure.try raising or lowering the baudrate)

wha may be the problem?

Any suggestions?

Thanks

Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on May 25, 2004, 08:33:31 AM
First of all, have you applied the reset workaround in the errata sheet for the device? That is the most common cause of problems.

Second, have you analysed the signals from DTR and RTS to make sure they match the waveforms in the Flash Magic application note that describes ISP entry using the handshaking signals?

Thirdly, have you tried disconnecting DTR and RTS and placing the device into ISP manually by pulling /PSEN during reset?

Title: Re: P89C51RD2 ISP problems
Post by: erikm on May 25, 2004, 01:34:52 PM
fourthly, if you had implemented NoTouch, you would not have had any of these problems.

Erik
Title: Re: P89C51RD2 ISP problems
Post by: selvam on May 26, 2004, 06:22:51 AM
Hi Andrew,

Already i used to program the p89c51rd2bn by superpro2000 programmer
at that time i erased the flash full. after a long time, now only i am trying for isp, now i am facing these problems.

Is it the problem is becos of erase all flash?

I iinstalled everything in the erratta

But still i am facing the problem
Pls help me

Thank and Rgds
selvam
Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on May 26, 2004, 08:27:07 AM
I have no idea if that programmer erased the boot vector of the device. If it did then you wouldn't be able to program it via ISP. I would put it back into the programmer and check the boot vector value.

Don't forget to answer my other questions. :)

Title: Re: P89C51RD2 ISP problems
Post by: selvam on May 28, 2004, 02:15:23 AM
Hi Andrew,

Now i purchased new p89c51rd2bn controller for that also showing the communication problem.

i checked the psen pin that is going high after some duration
and reset is going low after some duration.
i implimented the rc circuit for vpp also.
what else i need to do
and what else i need to check.


Pls help me

Thank and Rgds
selvam
Title: Re: P89C51RD2 ISP problems
Post by: erikm on May 28, 2004, 05:22:42 AM
>>Now i purchased new p89c51rd2bn controller for that also showing the communication problem.<<
If you have a problem THE FIRST TIME you try to program a chip, the problem us in your serial link.  Is the MAX232 (equivalent) operative, are the connections good etc.

You are not one of those that believe that a MAX232 (equivalent) is not necessary are you?

Erik
Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on June 01, 2004, 09:50:23 AM
Erik is right. Devices come from the factory with the status byte set, so on power up they are in ISP mode. If you cannot communicate with the device then there is something stopping the data getting from your PC to the device.

Power up your device
Connect to it using Hyperterminal with: 8 bits, no parity, 1 stop bit, no flow control, 9600 baud.
Send a single 'U'.

Is the 'U' echoed back? If not then you need to put a scope on the TxD and RxD pins to see if the 'U' is getting to the device at all and if it is, whether it is also coming out of the device at all.

Title: Re: P89C51RD2 ISP problems
Post by: Jigar on June 23, 2004, 12:48:42 AM
Please Help....
While programming P89C51RD2HPB through WinISP software, I am getting the message, "Flash Programming Successful". But then when i try to verify it, it shows error.  The boot vector is FC H and staus is FF H. When i try to read the chip, it shows FF h at all memory locations.

Need a quick reply.
Thanking you,
Jigar Shukla
Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on June 23, 2004, 08:09:18 AM
See reply in other thread. Please only post your question once!

Title: Re: P89C51RD2 ISP problems
Post by: Cagdas on July 15, 2004, 04:28:31 AM
Hi friends i need parallel programmer to set the clock  to 12 clock mode.
where I will find that. I use  P89C51RD2 to make an emulator to 8051
but it is working faster.I need the circuit of parallel programer.
Thanks
Title: Re: P89C51RD2 ISP problems
Post by: erikm on July 15, 2004, 05:43:33 AM
i need parallel programmer to set the clock to 12 clock mode.
where I will find that. I use P89C51RD2 to make an emulator to 8051
but it is working faster.I need the circuit of parallel programer.



Thankfully, Philips does not release parallel programming info except to professional programmer manufacturers so we do not have to debate all the problems that are, but "can not possibly be" due to the (mal)function of a kitchen table programmer.

IF the RD2 is not RD2H, software can change from 12 to 6 clock and back.

On another note, you go ahead with your "emulator", but all amateurs that have tried to build an emulator has failed so far.  An emulator takes about 5 man years to develop.

Erik
Title: Re: P89C51RD2 ISP problems
Post by: girish on July 20, 2004, 05:11:16 AM

I am not able to program the P89C51RD2BN.

Flashmagic showing that "unable to communicate.(transmit/receive) ensure no other aplications are using the comportconfigure.try raising or lowering the baudrate)

wha may be the problem?

Any suggestions?

Thanks
Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on July 21, 2004, 03:11:10 PM
Have you tried going through all the steps in the Flash Magic Application Note "what to do when ISP does not work"? If so what results did you get for each test?

Title: Re: P89C51RD2 ISP problems
Post by: ravi kiran on August 12, 2004, 05:47:49 AM
sir,
 i am using p89c51rd2hbp micro conrtroller  and i am using flash magic
software to download hex files to the controller through RS-232c port
the problem is the micro contoler is not communicating with the port of the computer . the flash magic software is showing the following message
" UNABLE TO COMMUNICATE. TRY REDUCING THE  BAUDRATE. RESET THE HARDWARE INTO ISP MODE AGAIN"

the same message is displaying for various baud rates.

can anyone please solve my problem and even i dont know how to reset the hardware into ISP mode.


waiting for the reply
ravikiran
Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on August 12, 2004, 07:58:57 AM
The first thing to check is that you are pulling P2.6 AND P2.7 high during reset. If you don't, the device won't function properly in ISP mode. Are you doing that?

What crystal frequency are you using? If you are above 6MHz then make sure you are starting off with 9600 baud and you have high speed communications turned off in the Advanced Options. If you are below 6MHz then keep reducing the baud rate. Make sure you reset the device after each try.

If that doen't help, then set up hyperterminal to use 8 bits, no parity, 1 stop bit, no flow control, 9600 baud and send a single uppercase 'U'. Is it echoed back from the device? If not then use a scope to see if the 'U' is making it to the RxD pin of the device.

Title: 89C5RDxx ISP problems
Post by: Rane Milind E. on September 01, 2004, 03:30:22 AM
I am interested in ISP for microcontroller suggest the software for it where it will available on net
Milind Rane
Title: Re: P89C51RD2 ISP problems
Post by: erikm on September 01, 2004, 05:26:44 AM
>>I am interested in ISP for microcontroller suggest the software for it where it will available on net<<

How ignorant can you be?

the answer to your questions is:

HERE

Erik
Title: P89C51RD2BN ISP problems
Post by: Sreedharan.Nandu on September 07, 2004, 02:36:09 AM
Hi ,
   Am new to this grp,infact i have also faced several problems with p89c51rd2hbp,but was resolved by deliberate analysis and testing.Now am using p89c51rd2bn which is the recent micro available in the marke. As per the errata i did the modification ,still the controller is not entering the ISP mode.I changed the C and R value for 5V Vpp ,still the user code is executed.How can i rectify this issue???
Is anybdy facing  this same problem with rd2BN micro???
Plz mention if you have any concerns on this.

Regards,
Nandu.S
Title: P89C51RD2BN ISP problems
Post by: Sreedharan.Nandu on September 07, 2004, 02:38:52 AM
Hi ,
   Am new to this grp,infact i have also faced several problems with p89c51rd2hbp,but was resolved by deliberate analysis and testing.Now am using p89c51rd2bn which is the recent micro available in the marke. As per the errata i did the modification ,still the controller is not entering the ISP mode.I changed the C and R value for 5V Vpp ,still the user code is executed.How can i rectify this issue???
Is anybdy facing  this same problem with rd2BN micro???
Plz mention if you have any concerns on this.

Regards,
Nandu.S

Title: P89C51RD2BN ISP problems
Post by: Sreedharan.Nandu on September 07, 2004, 02:41:40 AM
Hi ,
   Am new to this grp,infact i have also faced several problems with p89c51rd2hbp,but was resolved by deliberate analysis and testing.Now am using p89c51rd2bn which is the recent micro available in the marke. As per the errata i did the modification ,still the controller is not entering the ISP mode.I changed the C and R value for 5V Vpp ,still the user code is executed.How can i rectify this issue???
Is anybdy facing  this same problem with rd2BN micro???
Plz mention if you have any concerns on this.

Regards,
Nandu.S
Title: Re: P89C51RD2 ISP problems
Post by: Deepen Shah on October 07, 2004, 03:21:14 AM
dear sir,
           i am student in embedded field and i am also usin philips  plcc an dip 89c51rd2bbp kit and the ic is not more working and it is not available in the market so i can buy it so please if you can suggest me that which other ic's i can use as the substitute of the ic as i have mentioned above .

sir i want one more help from you i got another board which can work with 89S52 but i dont have the ISP software for atmels 89S52 so if have please do forward me on my email id or just give me the link of net so i can download it.
Thanking you,
Sorry for the trouble
Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on October 07, 2004, 08:12:21 AM
If you can live with smaller on-chip flash size, then there is the RC2, RB2, etc. Otherwise check out the datasheets on www.philipsmcu.com.

Sorry, this is a Philips based forum. Try asking on www.8051.com.

Title: P89C51RD2 ISP problems
Post by: kanwal on October 12, 2004, 12:55:17 AM
i tried to use WINISP for flash programming of PHILIPS 89C51RD2.I ensured
following settings:
PIN32 (PSEN') : LOW,
PIN31 (P2.7) : HIGH,
PIN33(ALE): HIGH,
PIN35 (VPP): +12V

but the controller still doesnt jump to BOOT PROGRAM  at location FC00.i cross check every settings but still it jumps to application program at 0000H.WINISP sends U character but controller sends no response.
Suggest me how to tackle this problem

kanwal preet singh
Title: Re: P89C51RD2 ISP problems
Post by: erikm on October 12, 2004, 05:40:09 AM
1) you are using WinIsp, IMMEDIATELY switch to FlashMagic
2) P2.6 need be high also.
3) is it a 'h' chip? list ALL letters on the chip
4) are you trying to program a non-h with h code or vv?

Erik
Title: P89C51RD2 ISP problems
Post by: kanwal on October 21, 2004, 12:40:45 AM
hi
I finally implemented ISP for P89C51RD2-PLCC.I programmed blank chip on EEPROM programmer and then i tried to use FLASH ISP software.this was the problem.EEPROM programmer somehow secured the status byte and boot vector which software was nt able to read.
Then i got somehelp frm philips support and finally eliminted the problem.
now i m working to develop IAP application program on it.
anybody who cn help me in this regard pls reply,i will surely help u if i can
kanwal
Title: Re: P89C51RD2 ISP problems
Post by: erikm on October 21, 2004, 05:14:17 AM
i m working to develop IAP application program on it.

A lot of "IAP" development is due to a misunderstanding of ISP.  95% of the IAP can be converterd to ISP simply by adding NoTouch.

Erik
Title: Re: P89C51RD2BN ISP problems
Post by: selvam on January 30, 2005, 12:58:27 AM
hi friends,
I am not able to program the P89C51RD2BN.

Flashmagic showing that "unable to communicate.(transmit/receive) ensure no other aplications are using the comportconfigure.try raising or lowering the baudrate)

what may be the problem?

if i use new P89C51RD2BN its working
but the old two controllers not entering into isp mode.

can anybody give suggestion?
thanks

Title: Re: P89C51RD2 ISP problems
Post by: erikm on January 31, 2005, 08:07:41 AM
if this is the case with a brand new chip, your problem is in the PC -> MAX232(equivalent) -> uC chain.

Erik
Title: Re: P89C51RD2 ISP problems
Post by: Sud on February 10, 2005, 03:57:09 AM
I am using Flash Magic to program P89c51RD2BA running at 16MHz. but it works only upto 4800 Baud. It takes a long time to program the chip at this rate. What can I do to improve the Baud Rate?

Title: Re: P89C51RD2 ISP problems
Post by: erikm on February 10, 2005, 05:05:25 AM
sounds like you believe in the urban legend that no MAX232(equivalent) is required.

Erik
Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on February 10, 2005, 06:27:23 AM
Try using the High Speed Communications feature. It is fully described in the manual. You might be able to get a higher baud rate using it.

Title: Re: P89C51RD2 ISP problems
Post by: kundan on February 14, 2005, 01:57:33 AM
hello
i used the P89c51rd chip for the timer2 opretion but there are result will be shown on the simulator. and how it properly work.
and my other problem is that the chip load the program but it can not provided the output
Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on February 14, 2005, 05:40:44 AM
This forum is for discussing ISP issues. You might want to post your question on 8052.com in the forum, however you will need to post a lot more detail than that if you expect helpful replies. Try to include as much information as possible.

Title: Re: P89C51RD2 ISP problems
Post by: Sachin Doshi on February 15, 2005, 10:00:38 PM

Help please:

I am using MC P89C51RD2BN and want to programming using ISP.
For voltage convertor I use IC HIN232CP.

Is there something special to do for programming controller first time??

(e.g. send 'U' )

what may be the problem??

plz. answer briefly and as quick as possible..

Regards,
Sachin Doshi
Miracle Techology.Andrew Ayre wrote:
Title: Re: P89C51RD2 ISP problems
Post by: erikm on February 16, 2005, 05:12:21 AM
Is there something special to do for programming controller first time??

a) if you mean "first time" as in "brand new chip, fresh from factory" see 2)
b) if you mean "every time before programming commences" see 1) and 2)

1) AN461 show you which signal levels must be there to "kick the chip into ISP"
2) after that or with a factory fresh chip connect FlashMagic and run it.

notes

If you use RC reset you are screwed
the easy way is NoTouch (no levels, no swithches, just do it)

Erik
Title: Re: P89C51RD2 ISP problems
Post by: Arch Yap on February 18, 2005, 01:09:37 AM
i'v faced the similiar problems with 89C51RB2, and i've follow the same instruction as belows;-

a) PSEN held low with R 2k Ohm
b) P2.6 or P2.7 are high or floating
c) ALE is high or floating

and i've check the signal from scope, and the char "U" is seen at the RXD of the MCU, but not signal is out from TXD signal.

As i read from Kanwal, Do we need to blank the chip before we start our ISP. ??

TQ
Title: Re: P89C51RD2 reprogromming problems
Post by: Arch Yap on February 20, 2005, 08:35:35 PM
Erik,

I've tried to blank the chip before the programming step.  But after it program for the first time, it faced problems when i tried to reprogram the chip again.  It only can be reprogram if i erase and blank the chip again.  
How's the problems here ? as far as i know the Flash magic will configure the status byte as zero and thus it kick start the user application code.  

I've forced it to ISP mode duirng the 2nd time but facing problems in reprogramming the chip again !!
Would it be caused by reset circuit as i  currenlty deployed the simple RC circuit !!
Please advise ! TQ
Title: Re: P89C51RD2 ISP problems
Post by: erikm on February 21, 2005, 05:45:43 AM
1) anything but a supervisor chip is asking for it.
It only can be reprogram if i erase and blank the chip again
FlashMagic automatically does this, what are you doing????

It all sounds like loss bootvector, which can only be restored by parallel programming.

Next time install NoTouch (and, if developing, "the backdoor") and live happily ever after.

Erik
Title: Re: P89C51RD2 ISP problems
Post by: Arch Yap on February 22, 2005, 12:14:57 AM
1)  It only can be reprogram if i erase and blank the chip again
FlashMagic automatically does this, what are you doing????  

I mean i restored by a parallel programming

2)Next time install NoTouch (and, if developing, "the backdoor") and live happily ever after.

I read the Back door article, does it mean the start Go to Boot is activated by helding one of the pin low and jump into the loop that actual write status byte, boot vector and wait for the watchdog to reset it.

I didn't implement watchdog circuit, it's only the RC circuit, how do i proceed with my current design.  and Why is the MCU did 't jump to ISP even  i held the /PSEN low and p.2.6 7 P2.7 high, ALE high.  ?? Anyother ways to solve my problesm since my circuit is designed utilising the RC circuit.

Thanks for your information
Title: Re: P89C51RD2 ISP problems
Post by: erikm on February 22, 2005, 04:49:54 AM
I read the Back door article, does it mean the start Go to Boot is activated by helding one of the pin low and jump into the loop that actual write status byte, boot vector and wait for the watchdog to reset it.

Yes,

I didn't implement watchdog circuit, it's only the RC circuit, how do i proceed with my current design. and Why is the MCU did 't jump to ISP even i held the /PSEN low and p.2.6 7 P2.7 high, ALE high. ?? Anyother ways to solve my problesm since my circuit is designed utilising the RC circuit.

Do NOT confuse a supervisor with a watchdog.  The fact that some suprevisors also function as a watchdog is irrelevant for this purpose.  I would recommend using a tripod supervisor and the internal watchdog.


You can't.  If you read the errata it states (in polite words) "if you use RC reset you are screwed".

Erik
Title: Re: P89C51RD2 ISP problems
Post by: Arch Yap on February 23, 2005, 11:23:33 PM
HI Erik,

Thanks for your information, i've succeffully put the chip in ISP mode thru the "back door' as suggested by you guys !!

Thanks !!
Title: Re: P89C51RD2 ISP problems
Post by: erikm on February 24, 2005, 06:24:16 AM
I read the Back door article, does it mean the start Go to Boot is activated by helding one of the pin low and jump into the loop that actual write status byte, boot vector and wait for the watchdog to reset it.



Yes,

Erik
Title: Re: P89C51RD2 ISP problems
Post by: Manjeet Singh on February 26, 2005, 04:50:47 AM
Help Please...

after getting frustrated from 89S8252 I switched to P89C51RD2. On the first shot I was able to progam the blank chip using Flash Magic.

But now when every I tried to reprogram chip again every time it says "unable to connect at specified baud rate try reducing the baud rate.

I read the AN461 article. I pulled the PSEN LOW on reset but the chip doesnt run in the Bootcode but insted it always runs the user code starting at 0000H

Pleae help

regards.........Manjeet
Title: Re: P89C51RD2 ISP problems
Post by: erikm on February 28, 2005, 05:26:03 AM
get rid of the RC reset, then restore the chip in a parallel programmer.

Erik
Title: Re: P89C51RD2 ISP problems
Post by: erikm on February 28, 2005, 05:28:45 AM
dorry - incomplete, should be

get rid of the RC reset, add a supervisor, then restore the chip in a parallel programmer.

Erik
Title: P89C51RD2HBP programmation problems
Post by: lechevelu on April 05, 2005, 02:25:02 PM
Hi,

I'm trying to program my P89C51RD2HBP and i have every time the message "unable to read the security bit ...". I have the same message when nothing is connected. I think my rs232 line is god and my max232 ok too. Ready the data sheet of the micro controller, i have read that 2.6 and 2.7 must be "1". How can i do that ??

Thanks in advance for your help !
Title: Re: P89C51RD2HBP programmation problems
Post by: Andy Ayre on April 05, 2005, 04:10:35 PM
"1" means logic 1. So connect those pins to VCC via pull ups. If you don't, then the bootloader won't work properly.

Title: Re: P89C51RD2 ISP problems
Post by: Brumy on April 07, 2005, 05:48:11 PM
hi there. i'm need to create network with 2 p89c51rd2. The trouble is that ( and after following the datasheet ) it doesn
Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on April 07, 2005, 06:29:01 PM
If it's a programming problem, then it is best to post your question at 8052.com, but provide as much specific information as you can. What your setup is, what you have tried, what steps you have taken to pin the problem down, etc. etc.

Title: Re: P89C51RD2 ISP problems
Post by: mahesh h. bhendarkar on April 27, 2005, 02:30:45 AM
  i want winisp sofrware from it will get .
   winisp software for philips microcontroller
Title: Re: P89C51RD2 ISP problems
Post by: erikm on April 27, 2005, 05:55:07 AM
i want winisp sofrware from it will get .

translated "I want problems"

use FlashMagic, it is soo much "safer"

Erik
Title: Re: P89C51RD2 ISP problems
Post by: Andy Ayre on April 27, 2005, 08:02:33 AM
WinISP has been replaced by Flash Magic. If you manage to find a copy you will find that (along with the bugs) it only supports old Philips devices.