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.

Problem with programming Philips P89V51RD2 as communication fails

Status
Not open for further replies.

pravin_kakar

Newbie level 3
Joined
Feb 4, 2007
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
I am programming a P89V51RD2 with a 12MHz crystal using a USB-RS232 adapter and Flash Magic.

However, I keep getting a message which says:-

UNABLE TO COMMUNICATE. TRY REDUCING THE BAUD RATE. RESET THE HARDWARE INTO ISP MODE.

I have tried every Baud rate available and still get this message.

What should I do to solve this problem?

I have tried unchecking the "Use DTR to control RST" box. That gives me the message "RESET THE DEVICE TO ISP MODE NOW". However, switching OFF and ON the power supply or pressing an external RESET button does not help at all.

Added after 12 minutes:

I have a second question too.

How can I specify the address at which my code should be loaded in the Keil C compiler?
 

reset the device into isp mode now

Are you selecting the correct port?
Is the virtual com properly configured?
If don't, check this two things in the system properties.
Or maybe the usb adapter does not support the dtr to control the rst, that is very common in some adapters.
 

flash magic for 89v51rd2bn

Thanks for the advice! I have checked the port as well as the device I have connected and both are correctly chosen. I just tinkered around with the connections a bit and the circuit started working perfectly.

Now, if only someone could answer my Keil question.

Added after 12 minutes:

pravin_kakar said:
How can I specify the address at which my code should be loaded in the Keil C compiler?
 

phillips p89v51rd2

I am trying to perform the In-Application Programming of this microcontroller. I have written this section of code for the program but it doesn't seem to be working at all.

call_iap_write:
PUSH IEN0 ; disable interrupts
CLR EA
MOV B,CMOD
MOV R2,B ; store copy of CMOD
JNB B.6,?IAPTAG11 ; if watchdog enabled then disable
ANL CMOD,#0BFH
?IAPTAG11:
MOV ACC, 55H
MOV DPH, 23H
MOV DPL, 70H
MOV R1, #02H
ANL FCF, #0FEH ; enable bootrom
CALL 01FF0H ; call iap routine
MOV R7, ACC
ORL FCF,#01H ; disable bootrom
MOV CMOD,R2 ; restore CMOD (restore watchdog state)
POP IEN0 ; restore interrupts to initial state
RET

I have ensured that this code is well beyond 1FFFH i.e. the part of memory that the bootloader will occupy.

Can anyone please help?
 

keil c programs on p89v51rd2

the programming technique of 89V51RD2BN is somewhat different. Follow the steps given below to program your IC:
1. Click on "START" button.
2. Then u get the message "Reset the hardware in ISP mode now"
3. put PSEN(bar) to low(ground).
4. reset the MuC.
5. and again put the PSEN(bar) pin to logic high(Vcc)
6. the dialouge box will automatically vanish and the IC gets programed.
 

philips 89v51rd2bn

Dear pravin_dwaramwar,

P89V51Rx2 don't require to use PSEN to enter the bootloader. Please read carefully the datasheet.

JW

Added after 1 hours 8 minutes:

Just for the record, the solution is in **broken link removed**

JW
 

Re: philips 89v51rd2bn

first of all complie ur prgm after creating hex file..... then select the device in flash magic 89v51rd2....
then select erase then browse ur hex file..... then select verify after prgming.... then start.... i think u did small mistake.........
 

Re: Philips P89V51RD2

Which hardware you are using for IAP. you need dedicated hardware.

Next loading the hex code in any memory location you have option in flash magic too
 

Re: Philips P89V51RD2

i am using 8051 development board..:)
 

Re: Philips P89V51RD2

org 02100h

PUSH IE ;DISABLE INTERRUPTS
CLR EA
MOV A, 0B1h
ANL A,#0FCh ;enable boot sector - !!! this command MUST be located ABOVE 2000h!!!
MOV 0B1h, A
MOV A,#1h
CALL 01FF0H ;call to ISP_API (modifies B register but no Rx)

MOV DPH,#00h
MOV DPL,#00h


MOV R1,#02H ; function code
MOV A, 0B1h
ORL A,#001h ;switch back to user FLASH
MOV 0B1h, A
POP IE
END


this is the code for IAP

for more information refer this http://www.efton.sk/t0t1/p89v51rd2 iap.pdf

---------- Post added at 15:29 ---------- Previous post was at 15:26 ----------

the programming technique of 89V51RD2BN is somewhat different. :
1. Click on "START" button.
2. Then u get the message "Reset the hardware in ISP mode now"
3. put PSEN(bar) to low(ground).
4. reset the MuC.
5. and again put the PSEN(bar) pin to logic high(Vcc)
6. the dialouge box will automatically vanish and the IC gets programed.

first of all complie ur prgm after creating hex file..... then select the device in flash magic 89v51rd2....
then select erase then browse ur hex file..... then select verify after prgming.... then start.... i think u did small mistake.........

He is talking of IAP, not ISP
 

Re: 89v51rd2bn datasheet

first of all complie ur prgm after creating hex file..... then select the device in flash magic 89v51rd2....
then select erase then browse ur hex file..... then select verify after prgming.... then start.... i think u did small mistake......... then go to timeouts and select time and go to misc and select wave file.... definitely it will works....



then i cant understand "how can i specify the address at which my..............." why u have to specify the address?
 

Re: 89v51rd2bn datasheet

sir,
to program p89v51rd2 using flash magic it requires the dtr signal which level shifted through max 232 and used in sink mode active to the reset pin.
also enable the option in flash magic that assert the dtr signal the time ratio that i have used is 50 & 100 ms.
 

Re: flash magic for 89v51rd2bn

Thanks for the advice! I have checked the port as well as the device I have connected and both are correctly chosen. I just tinkered around with the connections a bit and the circuit started working perfectly.

Now, if only someone could answer my Keil question.

Added after 12 minutes:

HI Pravin,

I am facing the same problem(Reset in ISP mode). could you plz tell me what correction you did. I am breaking my head to correct this problem. It will be of great help..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top