Flash Magic Forum

In-System Programming Support => P89V51Rx2/P89LV51Rx2 => Topic started by: amax on February 16, 2008, 02:34:38 AM

Title: P89V51RD2 Programmer Circuit
Post by: amax on February 16, 2008, 02:34:38 AM
Hello,
I want to make my own programmer Circuit for P89V81RD2.
Can any one give me Circuit diagram for Programming this Chip?
I want to use Flash magic ISP software For loading the hex file In to chip?

can any one help me.....

Thanks in advance.

amax
Title: Re: P89V51RD2 Programmer Circuit
Post by: Jan Waclawek on February 18, 2008, 12:42:15 AM
None needed. Just use a normal RS232 transceiver such as MAX232 between the RxD and TxD pins of the mcu and PC.

There is an optional reset circuit connected to DTR - see the manual (pdf) which comes with FlashMagic - but this is not necessary.

JW
Title: Re: P89V51RD2 Programmer Circuit
Post by: amax on February 18, 2008, 01:00:21 AM
Thank You very Much for Your reply and suggestions.

I have the 8051 board with serial Inerface.Here I am attaching the Circuit diagram for the Connection of MCU AT89S52 with RS-232 port.
Here the Serial port is used for Communication with MCU AT89S52(Not For programming).
I want to replace AT89S52 with P89V51RD2 for programming it.
Can I program P89V51RD2 with Same circuit diagram by replacing AT89S52?
(http://D:%5Cvijay%5Cethernet%20controller%5CRTL8019AS%5Cserialcommuincation.gif)
 

Thank You...........

amax
Title: Re: P89V51RD2 Programmer Circuit
Post by: Jan Waclawek on February 18, 2008, 02:18:43 AM
Yes. Just hold down the RESET pushbutton, press START in FlashMagic (provided that you have selected the appropriate chip - caution, don't select the P89C51Rx2!!! -  a moderate baudrate (say 9600 for beginning, later you can increase it), selected the hexfile to upload etc. etc.), and when the "Reset now" window appears, release the RESET button.

JW
Title: Re: P89V51RD2 Programmer Circuit
Post by: amax on February 20, 2008, 03:21:57 AM
I have implenented that Circuit diagram.
The reset window is appearing.it is not get vanished.
For how much time Reset window should appear?

I am not getting device programmed.

please, Help me!!

Thank You....

amax
Title: Re: P89V51RD2 Programmer Circuit
Post by: Jan Waclawek on February 20, 2008, 03:48:01 AM
It should disappear immediately after you have released the reset button.

For further help, read
http://forum.flashmagictool.com/index.php?topic=3232.0
http://forum.flashmagictool.com/index.php?topic=3273.0

JW
Title: Re: P89V51RD2 Programmer Circuit
Post by: Je Gold on February 20, 2008, 05:02:31 AM
Please click on [HELP] menu of the Flashmagic program  and select [Manual] there is a good circuit there  page 48...

RS232 level converters (max232's etc) needed are 3,   Tx,  Rx and DTR.... so the schematic in page 48 isn't the whole picture.

Need Flashmagic software option that ticks [DTR] for reset


To program the P89v51  - operation is.....

a) Flashmagic asserts DTR... and this is connected to the RESET of the P89V51 micro  (micro in reset)

b) Flashmagic releases DTR and  RESET is released on the micro

c) Less than 400mS (or less)  after RESET release..... Flashmagic sends a 'U' character via PC serial port, via the RS232 level converters to the Rx of the P89v51 micro...

d) Micro goes in to Programming mode

=====> The trick is to send a 'U' character almost immediately after coming out of RESET.


Joe

Title: Re: P89V51RD2 Programmer Circuit
Post by: Andy Ayre on February 20, 2008, 08:32:22 AM
Jan and Joe are correct. Regarding the window, the "reset the device now" window only appears if Flash Magic is not controlling reset with DTR. In that situation Flash Magic is continually sending out 'U's to the device. Once a 'U' is echoed back the window will close.

Andy
Title: Re: P89V51RD2 Programmer Circuit
Post by: H_D_R on February 20, 2008, 09:15:14 PM
what is the purpose of doing it..??
and what will heppen if i am doing it or not..??

==> The trick is to send a 'U' character almost immediately after coming out of RESET.


can you please clarify it in detail...???


thank you..
Title: Re: P89V51RD2 Programmer Circuit
Post by: Jan Waclawek on February 21, 2008, 12:16:54 AM
Quotewhat is the purpose of doing it..??
and what will heppen if i am doing it or not..??

Doing what?


Quote==> The trick is to send a 'U' character almost immediately after coming out of RESET.


can you please clarify it in detail...Huh
This refers to "manual" programming, e.g. from a general-purpose terminal emulator. You don't need to be bothered by this when using FM.

JW
Title: Re: P89V51RD2 Programmer Circuit
Post by: H_D_R on February 21, 2008, 03:16:37 AM
==> The trick is to send a 'U' character almost immediately after coming out of RESET.

what is the purpose of doing it..??
and what will heppen if i am doing it or not..??

i am asking about above bold line instruction, which i have read from mannual but could not clear the purpose behind it.
thats what i want to know..

can anyone please clarify it in detail...???
thank you..
Title: Re: P89V51RD2 Programmer Circuit
Post by: Jan Waclawek on February 21, 2008, 03:41:20 AM
Quote==> The trick is to send a 'U' character almost immediately after coming out of RESET.
As I said above: This refers to "manual" programming, e.g. from a general-purpose terminal emulator. You don't need to be bothered by this when using FLashMagic - FM sdends out a stream of Us when the "reset now" window appears, so if you reset the mcu at that moment, it will catch on one of the Us.

The reason why U shall be sent immediately after reset lies in the method how 'V51RD2's bootloader is entered. It is not entered upon pulling down a pin like the older P89C51RD2. Rather, after hardware reset, the P89V51RD2 waits for an 'U' to arrive, but it times out after a fraction of second and then starts the user application (performing a so called software reset).

Refer to the P89V51RD2's datasheet for further details.

JW


Title: Re: P89V51RD2 Programmer Circuit
Post by: amax on February 21, 2008, 04:32:11 AM
Dear Sir,
I am not getting the P89V51RD2 programmed with that Circuit of AT89S52.

I have adopted all the process that You have told to me.

When I clicked on 'start' ,It display "reset device in to ISP mode Now" with red color, I pressed the Reset button to Reset P89V51RD2, here nothing happened.Why?
I am not using DTR pin of COM port and I am not using PSEN also.

Can you give me the sample code or Hex file to start with?
I was programming with attached asm file after converting it in to hex File.
plese Find the attachment.
Do I need any modification in it?

--------------
Thank You....

vmax




Title: Re: P89V51RD2 Programmer Circuit
Post by: Jan Waclawek on February 21, 2008, 05:23:50 AM
It does not matter what do you attempt to program into the mcu, as the bootloader won't start.

You might first want to verify that the serial path is OK. Read e.g. http://www.8052.com/forum/thread.phtml?thread=151229 and the links given there.

If the serial path is OK and still problems programming, you might want to make a screenshot (Alt+PrintScreen, then paste into a suitable graphics program, e.g. IrfanView) of your setup of FlashMagic and post it here.

JW


Title: Re: P89V51RD2 Programmer Circuit
Post by: amax on February 21, 2008, 09:57:21 PM
Hello,

I have implemented all the Circuit.
And now I am getting all the things right and I have programmed the MCU P89V51RD2 succesfully.

Thank You very much for all your support.

one more question appart:
I have parallel programmer for AT89S52 with SPI interface.
P89V51RD2 has also SPI interface.
Can I build a programmer P89V51RD2 For with SPI interface?
If it is possible then which software I need for Programming P89V51RD2 from LPT port?

----------
Thank You

vmax


Title: Re: P89V51RD2 Programmer Circuit
Post by: Je Gold on February 22, 2008, 06:51:01 AM
Yes P89v51 can be parallel programmed....

BUT...

I believe NXP only support "profesional - dedicated" programmers... as there some tricky timing requirements...

NXP  --> Use  UART ISP method... there is no SPI method...


Hint...... the smaller  LPC900 micro's  (3volt) like the P89LPC935.... you can use UART, SPI (UART MODE 0) to program the parts


Joseph
Title: Re: P89V51RD2 Programmer Circuit
Post by: erikm on February 22, 2008, 07:03:42 AM
P89V51RD2 has also SPI interface.
Can I build a programmer P89V51RD2 For with SPI interface?
If it is possible then which software I need for Programming P89V51RD2 from LPT port?


sure,
if you do not like the car you drive, but some sheet metal and start bending it.

P89V51RD2 has also SPI interface.
Can I build a programmer P89V51RD2 For with SPI interface?

yes, but why? NXp never intended the SPI interface to be used for programming.

If it is possible then which software I need for Programming P89V51RD2 from LPT port?
a bootloader and a PC program written by you

why are you trying to make a NXP chip behave as an Arghmel chip?

Erik

Title: Re: P89V51RD2 Programmer Circuit
Post by: KHALID KHAN on March 20, 2008, 09:12:23 AM
Hello,
I want to make my own programmer Circuit for P89V81RD2.
Can any one give me detailed Circuit diagram for Programming this Chip is there any hardware changes in running the program?
I want to use keil software For loading the hex file In to chip?

can any one help me.....
khalid
Title: Re: P89V51RD2 Programmer Circuit
Post by: Andy Ayre on March 20, 2008, 09:15:56 AM
You need to connect the on-chip UART to a PC's COM port via an RS232 transceiver. You also need a way of resetting the device - typically via a pushbutton.

Sorry, no detailed schematic available, but there are plently easily found using Google.

Andy
Title: Re: P89V51RD2 Programmer Circuit
Post by: Je Gold on March 24, 2008, 05:41:35 AM
With reference to a "fresh"  / unprogrammed  P89v51 ;

a) You can not program via the SPI.

b) Only programming  via the UART and a profesional parallel programmer


You can write your own bootloader software .... but then it would not be a "fresh" / Unprogrammed part.


Joe
Title: Re: P89V51RD2 Programmer Circuit
Post by: bugmike25 on April 08, 2008, 11:06:36 AM
Hi, i just designed a programmer circuit for the P89V51RD2.  I am just going to use the RX and TX to program the device.  Since i am not using the PSEN pin shall i leave it floating or shall i connect it to +5V or GND??
Title: Re: P89V51RD2 Programmer Circuit
Post by: Andy Ayre on April 08, 2008, 11:55:38 AM
What does the datasheet say? Typically you set that pin according to whether you are using external memory or not.

Andy
Title: Re: P89V51RD2 Programmer Circuit
Post by: Jan Waclawek on April 08, 2008, 12:21:06 PM
Andy,

Are you sure you are not confusing /PSEN (output, to be connected to code memory output enable pin), with /EA (input, determining whether external or internal code memory is to be used)?

/PSEN should be left floating.

Jan Waclawek
Title: Re: P89V51RD2 Programmer Circuit
Post by: bugmike25 on April 08, 2008, 01:25:11 PM
Thanks Jan. Andy you are confusing PSEN with the EA pin.
Title: Re: P89V51RD2 Programmer Circuit
Post by: Andy Ayre on April 08, 2008, 01:28:58 PM
Sorry, misread your question. I didn't see the part where you said you wern't using it.
Title: Re: P89V51RD2 Programmer Circuit
Post by: tusharbanne on April 10, 2011, 12:50:34 AM
In the data sheet of MAX 232 it is stated that 1uf capacitors should be used. but u have used 10uf. how does this change things.  :-\