P89C51RD2BN ISP code

Started by Alex, May 23, 2005, 10:53:08 AM

Previous topic - Next topic

Alex

In my project I need to include programming code for the MCU in my main program. So I want to write my own code to program the MCU. Iread the AN461 document and tried its control words. But only thing that worked right it's sending 'U' to MCU and getting it back. Other control words didn't work.

can anyone give me a working code that contains control words?
and how do I calculate the checksum?

hope for fast reply

alex

erikm

So I want to write my own code to program the MCU.
why? FlashMagic is free and works


can anyone give me a working code that contains control words?
what is a "control word"  AN-461 is about calling sequences.

Erik

Andy Ayre

How about calling the command line version of Flash Magic? You can do that from your own program and parse the output very easily.

Embedded Systems Academy, Inc.
support at esacademy dot com

Alex

In some cases the MCU doesn't enter the ISP mode and in some does and I can't understand the difference between the cases. In my understanding if it enters one time so it should enter every time. In my case I have to reset the MCU several times before it enters the ISP mode.

and how do I calculate CheckSum that should come in the end of the sequence?

alex

Andy Ayre

Here is the specification for the Intel Hex File Format:

http://www.precma.it/download/intelhex.pdf

There are lots of reasons why the device cannot reliably enter ISP mode. The baud rate is too high or too low for a given crystal frequency, the hardware conditions for entering ISP mode are not being satisfied fully, etc.

Embedded Systems Academy, Inc.
support at esacademy dot com

Alex

what voltage do i put in Vpp pin?