Main Menu

CheckSum error...

Started by tapan, November 09, 2004, 09:46:34 PM

Previous topic - Next topic



I have a board designed using P89C51RD2BN. The board was working fine untill yesterday. Today the FlashMagic does not recognize it.
Then I tried using older version P89C51RD2HBP on the same board and it
works!!! So it is quiet clear that board and com port are fine.

So, with P89C51RD2BN replaced on the board, I started debugging where the problem is!!! I used HyperTerminal to communicate with the board. The controller responded back with 'U' when I sent it to the controller.
Then I tried to send record to specify the controller frequency. The controller sent an 'X' indicating that the checksum failed to match.

Then I used P89C51RD2HBP and sent the same commands using HyperTerminal. But this time controller sent '.' indicating that the command was successfully executed!!!

What I suppose is that by some way the Boot Code for checksum calculation is corrupted. I hope I am correct. I would like to know whether there is a way out or the IC can never be used in ISP mode again???

Awaiting your clarification.


Andy Ayre

What is the exact hex record you are sending for the osc frequency? Can you cut and paste from the hyperterminal window?

Embedded Systems Academy, Inc.
support at esacademy dot com


The exact hex record I am sending is as follows:


In HyperTerminal I have turned off the local echo.
Initially I send 'U' and in response I am getting a 'U' back.
Then I send the record for osc frequency.

I am operating at 11.0592MHz. So it rounds off to 11(0Bh).
Here nn = 01
      aaaa=XXXX(don't care!!) . So I am setting it to 0000
       record type = 02
       ff = 0B(frequency)
       cc = F2(checksum).

After sending the record I get an 'X' indicating a checksum error.

Since I have turned off the local echo what I am transmitting by
typing is received back correctly. In this case the controller is receiving
correctly and transmitting it back correctly. Ideally it should find the checksum correct. So I suppose that some part of the Boot ROM code is
corrupted. Is it possible that such a thing could happen????


Andy Ayre

Does lowering the baud rate help? What about sending other records - do you get the same problem?

Embedded Systems Academy, Inc.
support at esacademy dot com



I have not tried lowering the Baud Rate. I have kept it at 9600 in HyperTerminal. I am operating at 11.0592MHz so this should not be problem..!! Also when I replaced the problamatic IC with P89C51RD2HBP it works fine even at 14400 Baud.

Well with Flash Magic I tried lowering the Baud Rate but still it gave the problem. So I think reducing baud rate will not solve the problem.

Regarding sending other records, I have tried that but same response was received.

Thanks. Awaiting your reply.



P89C51RD2BP .... I replaced ... with P89C51RD2HBP it works

Did you read and implement the errata for the non-H.
Did you change the chip type in the FlashMagic