Author Topic: P89C51 / P89V51 FLash Magic ISP programming compatability  (Read 16470 times)

phonoplug

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
P89C51 / P89V51 FLash Magic ISP programming compatability
« on: June 07, 2006, 09:11:20 am »
Hello.

Have just tried the P89V51RD2 on an existing design that uses the 'C51RD2 chip.

Previously the 'C51 was programmed using Flash Magic and the DTR / RTS lines to trigger ISP entry. However, now programming the 'V51, I find that the DTR line holds the processor permanently in reset so it cannot enter ISP mode.

When I cut the track on the application PCB that connects DTR to the watchdog trip input to reset the processor all I have to do is just plug in the power once I 'START' Flash Magic, and it all runs fine. Unfortunately this means a new board issue for production though.

Question is this - is there any reason why Flash Magic has to hold the DTR in the state that on the 'C51 would be permanently resetting the processor? Sureley I am not the only one being forced to change from C51 to V51 that would be very grateful for a bit of compatability here? Perhaps implement the same use of DTR and RTS for the V51 as was the case for the C51?

Any comments from those at ESA would be much appreciated!



Post Edited (06-07-06 09:12)

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: P89C51 / P89V51 FLash Magic ISP programming compatability
« Reply #1 on: June 07, 2006, 09:16:48 am »
Assuming the DTR/RTS options in Flash Magic are either disabled or not visible...

When an application opens the COM port, Windows asserts DTR to indicate to whatever is connected that the COM port is open. Hence the name "Data Terminal Ready". The best that could be done in Flash Magic would be to deassert DTR after opening, but this would mean a pulse on DTR and I'm sure other users would not be happy with that.

I think that unfortunately this is a side effect of doubling up the use of COM port signals for another use.

Embedded Systems Academy, Inc.
support at esacademy dot com

phonoplug

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: P89C51 / P89V51 FLash Magic ISP programming compatability
« Reply #2 on: June 07, 2006, 09:30:08 am »
"Assuming the DTR/RTS options in Flash Magic are either disabled or not visible..."

Have I missed something here? I cant find any DTR/RTS options when set to 'V51RD2. The Hardware config page under advanced options page is blank, but this is where that stuff is for the 'C51RD2.

Just wondering because these lines were used for programming the C51, whether they could do a similar job when programming the V51? For the C51 they could be turned off so I guess that could also be done for the V51?

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: P89C51 / P89V51 FLash Magic ISP programming compatability
« Reply #3 on: June 07, 2006, 11:05:11 am »
No options = everything turned off.

Embedded Systems Academy, Inc.
support at esacademy dot com

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89C51 / P89V51 FLash Magic ISP programming compatability
« Reply #4 on: June 08, 2006, 12:02:26 am »
This sounds similar than my question here a few days ago. Fortunately, the status quo suited my purpose well; but I investigated this a little bit then, and now I am uncertain: couldn't this be solved somehow by using the commandline version of FM (using the HARDWARE option)?

Jan Waclawek

phonoplug

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: P89C51 / P89V51 FLash Magic ISP programming compatability
« Reply #5 on: June 08, 2006, 02:26:03 am »
Thanks Jan, I have been looking at using the command line version, however....

Is the 89V51 supported in the command line version? As far as I can tell it doesnt seem to be.

Andrew - is this correct? Are there any plans to support it in command line version?

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89C51 / P89V51 FLash Magic ISP programming compatability
« Reply #6 on: June 08, 2006, 02:45:37 am »
Alex, you are right, sorry. I haven't really tried, just had a look at it... But Andy recently published a "hack" here: http://www.esacademy.com/software/flashmagic/forum/read.php?f=1&i=2815&t=2815

Other - maybe stupid, too - thing came into my mind, couldn't you simply cut the DTR line in the cable?

Jan Waclawek

phonoplug

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: P89C51 / P89V51 FLash Magic ISP programming compatability
« Reply #7 on: June 08, 2006, 03:36:32 am »
Aaaha, sounded like that hack would be just the job, but... it no longer works! using a negative oscillator frequency gives:

ERROR: Invalid parameters for DEVICE directive: DEVICE(89C51RD2xx,-1)

I see from the other thread Andy says 'using DTR and RTS are still on the to-do list' so I can stay in hope that its not too far down the list :thumbsup:

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: P89C51 / P89V51 FLash Magic ISP programming compatability
« Reply #8 on: June 08, 2006, 10:00:28 am »
The hack should still work. I'll check into it.

Embedded Systems Academy, Inc.
support at esacademy dot com

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: P89C51 / P89V51 FLash Magic ISP programming compatability
« Reply #9 on: June 08, 2006, 03:19:54 pm »
Try this:

DEVICE(89C51RD2Hxx, -1.000)

I think that you need the decimal point for the value to be recognized as a floating point number.

Embedded Systems Academy, Inc.
support at esacademy dot com

Jan Waclawek

  • Full Member
  • ***
  • Posts: 220
    • View Profile
    • EFTON homepage
Re: P89C51 / P89V51 FLash Magic ISP programming compatability
« Reply #10 on: June 09, 2006, 01:55:39 am »
> Try this:
>
> DEVICE(89C51RD2Hxx, -1.000)

Now THIS is something I call a HACK !!!  :)

JW



Post Edited (06-09-06 01:57)

rik

  • Jr. Member
  • **
  • Posts: 1
    • View Profile
Re: P89C51 / P89V51 FLash Magic ISP programming compatability
« Reply #11 on: June 16, 2006, 01:00:30 pm »
HI

With all informations I have found, I was finaly able to program a P89V51RC2FA by selecting 89C51RX2XX but only in 12clock mode.

It seems that 6clock mode option is not working.

Does anybody knows why?

Rik