Author Topic: 89v51rd2 programming problem  (Read 7762 times)

keets

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
89v51rd2 programming problem
« on: May 16, 2009, 06:38:41 am »
I am using flash magic for programming 89v51rd2 devices for past few years.
But recently i have come acroos a problem.
when I start flash magic a window comes up saying "reset the device into ISP mode now" as usual, but before resetting suddenly an error message saying "unable to read signature bytes, please try to connect at lower baud rate" appear on the screen. and then even after resetting it doesnot program the device.
I changed my com port/cable/reinstalled latest flash magic software,tried with no. of devices. But the problem persists.

does anyone came across such a problem anytime? How to overcome it?

dptxp

  • Jr. Member
  • **
  • Posts: 31
    • View Profile
Re: 89v51rd2 programming problem
« Reply #1 on: May 16, 2009, 09:47:12 am »
It sometimes takes quite a few attempts and the behavior (the messages) of Flashmagic is erratic at times. The funny part is that it has gone worse in the last few days. It also says that comport maybe in use.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: 89v51rd2 programming problem
« Reply #2 on: May 18, 2009, 08:11:42 am »
What do you mean that it has gotten worse in the last few days? What changed for you in the last few days? Did you install a new version of Flash Magic? If so what was the old version number?
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: 89v51rd2 programming problem
« Reply #3 on: May 18, 2009, 08:12:11 am »
Please generate and send us a debug file. The instructions are here:

  http://www.flashmagictool.com/debugfile.html

Reference this thread in your email.
Embedded Systems Academy, Inc.
support at esacademy dot com

keets

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: 89v51rd2 programming problem
« Reply #4 on: May 19, 2009, 02:07:06 am »
Thanks here is the debugfile.
I started the flash magic. pressed F1. and tried to write hex file into device.
The usual window "reset the device" poped up.
and after few seconds an error window" Failed to read device signature( unable to connect transmit/receive)) ..." was seen on the screen. I pressed F2.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: 89v51rd2 programming problem
« Reply #5 on: May 19, 2009, 08:28:31 am »
The device echoes back the autobaud character then echoes NUL characters. I think the device is incorrectly measuring the baudrate for some reason. It could be a COM port problem or an electrical problem. Can you try a different PC, preferably with a built-in COM port?

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

keets

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: My observations
« Reply #6 on: May 19, 2009, 08:20:44 pm »
1)When I start FM without connecting cable to com port,the usual window of "reset the device"pops up & remain.
But the moment try to connect cable to unpowered 8051 board the unusual message i.e. unable to connect....comes on the screen.
One more thing if I remove MAX232 Chip and start FM it waits for resetting the device.

And more interestingly when I put MAX232 chip from my older tested board everything works fine.
That suggests MAX232 ic is faulty. But I tried out by changing almost dozen Ics. But system works with only with the older Ic.
I am confused... It never happenned.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: 89v51rd2 programming problem
« Reply #7 on: May 21, 2009, 09:14:39 am »
The 8051 board is probably holding the transmit signal at a certain voltage. When you connect the cable it's not a nice, clean connection straight away of the cable to the board, so it probably generates a series of glitches and pulses. The UART inside the PC might interpret one of these as the start bit and then the rest as eight bits of junk. This is then passed to Flash Magic, which thinks the device is sending junk.

I think you have some kind of electrical problem that just happens to be fixed with the older MAX232 but not the newer ones. The best way to learn more is to put a scope on the various signals. Swap the working MAX232 with a non-working one and look for any kind of difference.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com