Author Topic: P89V51RD2 Programmer Circuit  (Read 32908 times)

amax

  • Newbie
  • *
  • Posts: 5
    • View Profile
P89V51RD2 Programmer Circuit
« on: February 16, 2008, 11: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
« Last Edit: February 18, 2008, 09:55:33 AM by amax »

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89V51RD2 Programmer Circuit
« Reply #1 on: February 18, 2008, 09: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

amax

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: P89V51RD2 Programmer Circuit
« Reply #2 on: February 18, 2008, 10: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?

 

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

amax
« Last Edit: February 18, 2008, 10:44:25 AM by amax »

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89V51RD2 Programmer Circuit
« Reply #3 on: February 18, 2008, 11: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
« Last Edit: February 19, 2008, 10:30:37 AM by Jan Waclawek »

amax

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: P89V51RD2 Programmer Circuit
« Reply #4 on: February 20, 2008, 12:21:57 PM »
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

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89V51RD2 Programmer Circuit
« Reply #5 on: February 20, 2008, 12:48:01 PM »
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

Je Gold

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: P89V51RD2 Programmer Circuit
« Reply #6 on: February 20, 2008, 02:02:31 PM »
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


Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 1916
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: P89V51RD2 Programmer Circuit
« Reply #7 on: February 20, 2008, 05:32:22 PM »
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
Embedded Systems Academy, Inc.
support at esacademy dot com

H_D_R

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: P89V51RD2 Programmer Circuit
« Reply #8 on: February 21, 2008, 06:15:14 AM »
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..

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89V51RD2 Programmer Circuit
« Reply #9 on: February 21, 2008, 09:16:54 AM »
Quote
what 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

H_D_R

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: P89V51RD2 Programmer Circuit
« Reply #10 on: February 21, 2008, 12:16:37 PM »
==> 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..

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89V51RD2 Programmer Circuit
« Reply #11 on: February 21, 2008, 12:41:20 PM »
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



amax

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: P89V51RD2 Programmer Circuit
« Reply #12 on: February 21, 2008, 01:32:11 PM »
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





Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89V51RD2 Programmer Circuit
« Reply #13 on: February 21, 2008, 02:23:50 PM »
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



amax

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: P89V51RD2 Programmer Circuit
« Reply #14 on: February 22, 2008, 06:57:21 AM »
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