Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Jan Waclawek

#151
The P89V51RD2 starts in block1 after reset. If you have erased it, there is no code there to switch to block0 (where the user code is supposed to sit), so it will run through it (8kB) and then continue at the user area at 2000h. I doubt you wanted that.

You can download the bootloader (v5) at Philips's website at the P89V51RD2 page. Program it into block 1.

Jan Waclawek
#152
I think the OP wanted to get a DOS ERRORLEVEL value, which he could check in a bat file.

Jan Waclawek
#153
SoftIce is missing from the upgrade files.
Get the old (v4) bootloader (reading it out from a yet unprogrammed part), program it using the parallel programmer, then get the v5 "upgrader" (not the hex to be programmed using parallel programmer) and follow the instructions given there. That way softice should remain there.

However, you don't need really to make the upgrade, the only difference AFAIK is the possibility to escape the softice mode - but that can be escaped in v4, too - google for unsoftice.

Jan Waclawek
#154
P89V51Rx2/P89LV51Rx2 / Re: 89V51RD2
July 28, 2005, 07:16:11 AM
I am confused: do you see a different Philips-website than me?

http://www.semiconductors.philips.com/pip/P89V51RD2.html -> http://www.semiconductors.philips.com/acrobat/datasheets/P89V51RB2_RC2_RD2-03.pdf -> page 27

Oh yes, it is missing from the first issue of the datasheet, but that was superseded twice since then... You should always start the debugging by downloading the newest datasheets (plus the erratas, if any).

Jan Waclawek
#155
P89V51Rx2/P89LV51Rx2 / Re: 89V51RD2
July 27, 2005, 11:56:30 PM
The FLASH can be erased in 128-byte chunks.
See IAP description in datasheet:
Erase sector Input parameters:
R1 = 08h
DPH = sector address high byte
DPL = sector address low byte
Return parameter(s):
ACC = 00 = pass
ACC = !00 = fail

Good luck!

Jan Waclawek
#156
Dear Andy,
Just an idea for the command-line versuin for the V51: couldn't RTS or DTR be ued for resetting the chip while trying to autobaud?

Jan Waclawek
#157
P89V51Rx2/P89LV51Rx2 / Re: 89V51RD2
July 14, 2005, 08:55:07 AM
FCF gets initialized during hardware reset to 00h. The bootloader code runs, waits the said 400ms and then causes a software reset, setting FCF.1=1. At that moment the user code runs from user program memory starting at address 0.

So your program needs to be something like:
   org   0
   ljmp  2000h
   org   2000h
   mov   fcf,#0
   mov   r1,#2
   mov   dptr,#5000h
   mov   acc,#34h
   lcall  1FF0h
Stop: sjmp Stop

Try assembling this snippet, upload it using FlashMagic to a freshly erased device, run it, then go to FlashMagic and read it back - the address 5000h should contain 34h.

Come back telling us if you succeeded.

Jan Waclawek
#158
P89V51Rx2/P89LV51Rx2 / Re: 89V51RD2
July 14, 2005, 05:48:26 AM
I don't quite understand the following:
> i am starting the program at org 2500h
After reset (and after the bootloader expires the wait for autobaud - datasheet says 400ms) the user program starts at 0 as usually. It is just the part after clearing fcf.0 which has to be above 2000h.

And, you certainly don't need to update the bootloader before each new reprogramming of the chip...

Jan
#159
P89V51Rx2/P89LV51Rx2 / Re: 89V51RD2
July 14, 2005, 02:42:13 AM
Is the target address position erased?

Jan Waclawek
#160
Is the status byte clear (if not, it enters ISP rather than user program).
Is the PSEN floating? (if tied low, it enters ISP rather than user program).

Jan Waclawek
#161
General Discussion / Re: usb - serial
July 12, 2005, 01:37:37 AM
Sometimes it also helps to go to the site of manufacturer of the chip inside the "cable" (there are not too many of them) and find a driver there.

Jan Waclawek
#162
General Discussion / Re: flash magic problem
June 28, 2005, 08:07:30 AM
I spare a couple of keystrokes for Andrew:


http://www.esacademy.com/software/flashmagic/forum/read.php?f=1&i=1814&t=1813#reply_1814
->
http://www.esacademy.com/software/flashmagic/appnotes/HintsandTipsAppNote.pdf
->
"Although COM Ports 1 to 4 are listed in the drop-down list in Flash Magic, it is possible to use any COM Port available on a PC with Flash Magic. To do this simply click on the drop-down list and edit the text to show the following:
COM n
Where n is the number of the COM Port."

JW



Post Edited (06-28-05 08:07)
#163
P89V51Rx2/P89LV51Rx2 / Re: 89V51RD2
June 27, 2005, 12:30:43 AM
I have given no link so I don't know what exactly did you download.
SoftICE comes inside your P89V51RD2, so you need no parallel programmer.
Try googling for "SoftICE IAP"

Jan Waclawek
#164
LPC9xx/LPC9xxx / Re: Programming LPC932 via ISP
June 23, 2005, 01:23:18 PM
Well, you don't _need_ to modify the software, but you may _want_ to do it. It takes as little as setting one SFR bit to enable the bootloader entry by "sending" a break over the serial line. Implementing it, your programming hardware reduces to the serial cable (and the level converter), reducing the possibility of  similar error you did.

Many success with your diploma work!

Jan Waclawek
#165
LPC9xx/LPC9xxx / Re: Programming LPC932 via ISP
June 23, 2005, 05:29:30 AM
> I need to use the LPC932

There are two versions of it, LPC932 and LPC932A1. Can you be please more specific which one are you using?


> I downloaded and installed the FlashMagic software,
> with witch I am only able to program the device once,
> but not a second time.

You have probably set the status bit to 0 (I think FlashMagic does this by default) so the processor now starts your application rather than the bootloader code.
Other things you could do wrong is to erase the bootloader (which is located at the last 512 bytes of the device) or to change the boot vector; but FlashMagic explicitly warns not to do any one of these.

Can you recall the steps you did while programming the device?

> I have read, that there is a special software patch
> need to be included to my sourcecode witch provides
> re-programming in ISP mode.

This is the most convenient way and it has several options. See the recent discussion here.
http://www.esacademy.com/software/flashmagic/forum/read.php?f=1&i=2103&t=2103
But for the device you already programmed, it is now late to do it...

Another option is to build the circuit needed to produce the 3-pulse reset (that one you are mentioning above); that needs no modification to the application.

And, of course, if you have LPC932A1, you can resort to the ICP method (that needs some sort of a "bridge" or a dedicated programmer), or even to parallel programming.

> Why is all this documentation I can find not really complete?
> Why is it all made so complicated to do that simple programming
> operation???

Well, this question should really go to Philips... But wait, this is in a short term the second request/complaint from somebody related to Philips...
http://www.esacademy.com/software/flashmagic/forum/read.php?f=1&i=2037&t=2037
Although I understand you are a student, and Philips is a big concern, I still somehow feel you should get more help somwhere from inside...


Jan Waclawek