I have no problem to program with flashmagic in ISP mode a P89C51RC2BDD on my target application but if I want program
a 89V51RD2 (with the good choice of
I don't recognize the message "the uC is not in mode ISP, you must reset the ISP mode" because it doesn't make sense, so I doubt that is the exact message you are getting from Flash Magic.
Have you selected the 89V51RD2 in Flash Magic? If so then when you click on Start a small window will pop up telling you to reset the device now. When you reset the device that small window will automatically dissappear. Are you going through this process? If not then you have the wrong device selected.
Note that you should ensure you are using the latest version of Flash Magic as recently there were some improvements made for the 89V51RD2 and 89LV51RD2.
I had the same probleme with a P89LV51RD2, and the probleme was thas this serie of microcontrolleurs didn't have the bootcode inside.
With an other serie, more recent i didn't have this probleme no more
pls go below web-site to download the HEX code into your P89V51RD2 via parallel programmer.
http://www.semiconductors.philips.com/files/products/standard/microcontrollers/flash/philips_ice_block_1.hex
regarding to 89v51rd2,i have one problem that how to use SOFTICE mode feature of this uC. Also how start-up configuration bits means,how it is done?
if any available please send me so that i can have clear idea & if u know explain me in detailJeff Liu wrote:
> pls go below web-site to download the HEX code into your
> P89V51RD2 via parallel programmer.
>
>
> http://www.semiconductors.philips.com/files/products/standard/microcontrollers/flash/philips_ice_block_1.hex
regarding to 89v51rd2,i have one problem that how to use SOFTICE mode feature of this uC. Also how start-up configuration bits means,how it is done?
if any available please send me so that i can have clear idea & if u know explain me in detailJeff Liu wrote:
> pls go below web-site to download the HEX code into your
> P89V51RD2 via parallel programmer.
>
>
> http://www.semiconductors.philips.com/files/products/standard/microcontrollers/flash/philips_ice_block_1.hex
i m having same problem with
89V51RD2
when i start downloading flashmagic shows "reset device in isp mode now"
but I can't make this .
and i cant download program in flash manish wrote:
i counted very much on my luck when flash magic prompted a red message "reset the device into isp mode now"!!
When the red messsage prompted, i reset my V51RD2 (by pressing a reset button connected to the RST pin of my V51RD2) not everytime will my V51RD2 goes into isp.
When i failed i will retry several times, eventually isp will be engaged.
i also noticed that it is easier to engage isp with certain baud rate settings ie:57600 and 19200. By the way i am using 11.0592Mhz crystal running in 6clock.
I'm not suprised it can sometimes fail, due to the way ISP entry works. After reset the device has to receive a 'U' within the watchdog timeout period - which is a function of the crystal frequency. So if you vary your crystal frequency, you will not only make the autobaud result at specific baud rates change, you will also change the reliability of the connection.
Thanks Andrew, perhaps u could help me with this:-
1) I am confused with the FST register. In page 59 of the datasheet,
there it mentioned reset value for FST is xxxxx0xxB but, the SB is bit 6,
and EDC is bit 3 how could the reset value gives me an unknown?
2) Couldn't i just set these two bits by writing 01001000B to FST register within my code? i tried but it is not working. if i could do this then i could allow my production operators to conveniently forget about the two check boxes in flash magic both the Set security bit 1 and the 6 clks/cycles.
3) Could you suggest me an example code to engage IAP within my code?
Lets say i want to set the security bit and set 6 clocks
Appreciate very much for your kind assistance, Andrew.
from the datsheet: "Clock double mode can be enabled either by an external programmer or using IAP. When set, the EDC bit in FST register will indicate 6 clock mode."
So, the 'default' is what the clock mode is profgrammed to.
from the datrasheet: "Supports 12-clock (default)"
so the bit in a unprogrammed chip will indicate 12clock mode.
It i amazing what you can find out if you STUDY the datasheet. This was forund on a simple acrobat search on FST and then default.
Erik
Hi Erik, thanks for clearing up my brain blockage.
Hi Erik, Its me again, hope in the next Flash Magic release, i could have a check box in step 4 allowing me to automate the programming of serial number as i press Start in step 5.
Flash Magic is great and you guys are greatest!
jackyc wrote:
"but if I want program
a 89V51RD2 (with the good choice of
Dear Sir,
1. What is this softICE mode in above stated IC and where to find literature on this.
2. I have enabled SoftICE mode using FlashMagic. How I can bring back my controller in ISP Mode without using forced ISP Mode booting via hardware at reset.
Kindly reply back to help me. Urgent.
Regards.
Bineet Kumar
bineetkumar@rediffmail.com
Sorry, I don't have any information on SoftICE. I suggest you contact Philips directly to see if they can give you any information.
To any other people reading, don't put these devices into SoftICE mode unless you know all about it, otherwise you will find yourself stuck in the same situation.
89V51RD2 does not go into ISP mode evev when supply is cut off and re-established.
Does this device requires pin 31 to be connected to 12v and pin 29 to gnd at time of reset. or at pw up like 89c51rd2?
Andrew Ayre wrote:
pin 31 ... and pin 29
OF which package, please use names, NOT numbers.
Erik
All you need to do is connect the device up for normal operation and reset it (or remove and reapply power). You don't need to mess with PSEN, etc.
Because the device needs a 'U' within a specific time after reset, you must have the "Reset the device into ISP mode" window showing at the time you reset the device. While that window is showing, Flash Magic is sending out hundreds of 'U's continuously.
I have no problem to program with flashmagic in ISP mode a P89C51RD2 on my target application , becuase it support RTS,DTR control PSEN,RESET pin
but 89V51RD2 not Support Control via serial port to reset automatic from RTS or DTR of Serial port from Computer
Possible. if you can update Flash Magic this problem.
Hi,
We will add the to the list of features requested and investigate the fesability. Thanks!
but 89V51RD2 not Support Control via serial port to reset automatic from RTS or DTR of Serial port from Computer
A simple way (NoTouch flavor) would be that when a stream such as "qweryt" came down the serial port, all interrupts would be disabled and the watchdog activated. Then the 'U's that CodeWright hammers out would be detected immediately after the WD reset took effect.
Erik
Dear Sir
I have ISP Flash Magic software I can not program this uc
can u help me how to down load .hex file & setting of isp? or other ISP patch for 89VRD2
sachin
Hi, that is not enough information for me to go on. For example, are you selecting the correct device? What crystal frequency are you using? What error message are you getting? Think about if someone sent you the same message - what information would you ask for?
Hello Sir,
I can program satisfactorily only upto 8K in 89v51rd2. Above 8K, 89v51rd2 is not getting reset. I am using SUPERPRO/Z parallel programmer.
Kindly suggest. My code size is upto 40K.
With regards,
Sorry, this forum is for discussion of ISP issues, not parallel programming issues. Try 8052.com.
I am Programming 89c51rc2m using ISP .I trised null modem connection as well as circuit which has given in Flash magic manual. but i could not be able to communicate it is giving error try to redude ot increase baud ratr.
Help me.
Have you tried going through the steps in the Flash Magic application note "What to do when ISP does not work?". It contains steps that will identify any cable or wiring problems.
If it doesn't help, post ALL your results here.
Hi,
could any one tell me the conditions at which the pins should be held (like psen, ea/vpp.....) for ISP? I'm unable to get the chip into ISP mode, though i followed the conditions mentioned in the philips application note. Please reply asap.
You just need to power it up and send a 'U' within the maximum watchdog timeout period for your crystal frequency. When you select to start an ISP operation in Flash Magic a window pops up telling you to reset the device. While this window is open, Flash Magic is streaming 'U's to the device.
The faster your crystal frquency, the harder it will be to get a 'U' within the timeout period.
I am also facing same problem in isp, and i have tried a lot resetting chip too much some time it shows erasing block 0 and after 2 t othree minute it shows programming...... and than give error message of communication of receiving/transmitting error. Please tell me how to sort out this problem.and which one is the latest version i have downloaded ur softwre just one month b4.
Please read the application note on the Flash Magic web page titled "what to do when ISP does not work" and complete the "last resort" steps, so I can see what is going on.
We use 89C51RD2BA's in our product and want to make the 89V51RD2 a second source.
I am trying to support 89V51RD2 programming into our test program so I monitored your serial transmissions to determine the programming sequence.
Why to you read security bit (020000057000F2 command) twice before any function and once after function?
Other comments on Flash Magic on 89V51RD2 chips.
Using "Display Flash Memory",
1. Program appeas to hang for about 30 seconds and then starts dump. Why?
2. Why do you dump the whole memory? Other ISP chips (89C51RD2BA) do it in 2000 hex segments which seems more logical. Alternatively let user select range.
Peter Kay
Regarding reading the security bits. It is partly to do with the way the software is constructed and partly for historical reasons regarding some of the older devices.
I don't know why it hangs for 30 seconds. Are you using a slow baud rate? The 30 seconds is probably when it is reading in the data. See the response below.
Flash Magic is designed to read in the memory one flash block at a time. That method never envisioned a Philips device with a single flash block. We will add your suggestion of a user selected range to our to-do list. Thanks!
sir,
i am using p89v51rd2bn dip microcontroller. i am not having a parallel programmer. i am communication using isp with rs-232, with a clock frequency of 11.0592Mhz.
the problem i am unbale to communicate with the microcontroller. flash magic software is displaying"UNABLE TO COMMUNICATE.RESET THE HARDWARE INTO ISP MODE, TRY REDUCING THE BAUD RATE"
just i am using rs-232 null modem connections with Tx,Rx, Gnd pins. i had left the remaining pins of rs-232 left open.
is any pins of microcontroller need to be checked?
what should be the status of the PSEN and ALE and EA pins . i am not using any external memory.?
what should be the status of psen pin during normal operation mode and during isp mode?
ravikiran
Is a window popping up saying "reset the device now" with a cancel button? If not then you have the wrong device selected.
I believe the /EA pin should be pulled high. PSEN is not used to switch between ISP mode and regular mode. All the details are in the datasheet.
Hi there,
I've had the problem with the 89v51rd2 too. I spent a week trying, and now i know what's wrong. I tried to program the (new) bootloader software in the processor, but that didn't do any good. The solution was to just set the program offset at 10000h, couse that is where the bootblock starts. et voila!.. it works!
Dear Karst,
Are u facing problem in ISP,if it is than dont mix up 89v51rd2 with previous 89c51rd2 series. 89v51rd2 is more simpler than "C" series.Just u need to on flash magic select 89v51rd2 select any command like read signature byre from ISP menu and than software will ask for RESET the chip in ISP mode just put on ur target board but please dont pull down PSEN(29 pin in dip ) it will detect and now u will be able to read signature byte and can do rest of other works.
i face a problem with 89v51rd2 in isp mode. when i select a device , load a hex file , and selecting a baud rate of 9600 ,
when i start to programmed a ic it shows a message that reset the device in ISP node now.
for that time i reset the system with the help of reset ckt (RC) and RSTEST signal connected to RST pin. but every time it shows again the
same message . after that i cut the power supply and again do the same thing . but no result..
Kindly \give me the solution of this problem as earliy as possible. Nishant wrote:
> Dear Karst,
> Are u facing problem in ISP,if it is than dont mix up
> 89v51rd2 with previous 89c51rd2 series. 89v51rd2 is more
> simpler than "C" series.Just u need to on flash magic select
> 89v51rd2 select any command like read signature byre from ISP
> menu and than software will ask for RESET the chip in ISP mode
> just put on ur target board but please dont pull down PSEN(29
> pin in dip ) it will detect and now u will be able to read
> signature byte and can do rest of other works.
i am face a problem with 89v51rd2 setting 6 clock mode to the 12 clock.
i want to device in 12 clock mode.
how to swet it.
did you consider looking at the datsheet?
I do believe that that might help
but of course, that would require a small effort from you
sorrt
Erik
Hi,
Is there any particular crystal frequency i need to select to operate ISP in P89V51RD2 ? or will it work with any crystal frequency?
thx
The proper operation of the autobaud routine in P89V51RD2 depends on the _combination_ of crystal frequency _and_ chosen baudrate.
You can always chose a lower baudrate to enable the autobaud routine "catch up" with a particular crystal.
See and try http://www.efton.sk/t0t1/autobaud_error.htm
Jan Waclawek
What if i am using a 16Mhz crystal. Will it suffice for the autobaud of ISP or will it cause problems. should i change to a standard 11.0592Mhz. Will a 16M give me problems. Because it cannot be divided as a whole no for baud rate.
Hoping for an early reply.
Thanks.
Generally the faster the better. Anything above 6MHz should work ok, so pick the appropriate frequency for your application.
Note that dividing nicely from the crystal frequency to a baud rate doesn't apply for autobauding, because the baud rate is measured not calculated. The performance of the autobauding depends on how the autobauding code has been written, so generally you just have to try it and see.
Again, it depends on the _combination_ of crystal frequency and baudrate (and, slightly, also on the RS232 convertor you use).
And there is always a tolerable error in the setting of the baudrate, say 3% or so.
You can try to set your crystal frequency to the excel sheet at the link I gave and you will see...
For 16MHz, at 9600, you should be on the safe side.
Jan Waclawek
Hi,
As advised by you, i tried the baud rate setting of 9600 at a 16Mhz crystal. i am using a 232 convertor of intersil 3221.
I am unable to Flash my code, and get a message of "unable to connect at the specified baud rate. Try reducing the baud rate and connect again" .
I have tried all possible baud rates..
Can u please tell me the possible problem ..
Hoping for an early reply
Thanks,
Try disable auto-powerdown on the 3221. Many have had problems with that.
Erik
I just tried the 16MHz crystal and the autobaud works well up to 28800 (the 3.5% error is probably acceptable if small pulse distortion is present - short cable). At 38400 bauds it was unreliable, kicking in perhaps once in 5 attempts - the xls table predicted 1 out of 3 but this really does not matter here.
So you need to go down checking the usual things - get a terminal program, set 9600, press and hold "U" and reset the controller. If it does not start echoing "U"s, check the UART using a loopback connector. If OK, check the cable placing the loopback at its end. Then connect to your board and short together Tx and Rx pin at the controller - this should make no harm and you should see the echo (if the controller is socketed, you can take it out if you don't feel comfortably shorting pins together...). If the whole datapath is OK, it's time to check the circuit - check power supply directly at the controller's pins, check RESET, check if the oscillator is running (and oscillating at 16MHz...). As a last option, try an another controller - the bootloader can be damaged, and/or missing; and/or the controller itself can be damaged.
Hope some of these will help.
Jan Waclawek
PS. Ufff, I just see Erik's answer, he probably hit it....
Post Edited (03-31-05 05:31)
I am using Flash Magic V2.07.
Using it to program P89v51rd2.
The tick marks for Set Security Bit 1 and 6 Clks/ cycle always come ticked ON. And when I try to program leaving them that way I get the warning dialog boxes.
I know the tick marks reflect the status of both options.
But how to get out of this nuisance of clearing both tick marks everytime I program ? ( I don't want to set any security bit and leave the 6 clock as it is )
Thanks for any pointers.
Raghu
Doesn't a full device erase clear the security bit? It should, and afterward you should uncheck it. It should then remain unchecked. Let me know.
I did in fact try out a full flash erase. But still the security bit remains set.
Most probably there is some issue with the MCU as a full erase is completed within a second - just click the option and it immediatley says " Erase Complete " . Reason why I think that there is some problem with the MCU.
I shall check out with another MCU and revert.
Thanks for responding.
Regards
Raghu
Hello All!!!!!!!!!
Can anybody suggest me how I can get baud rate of 38400 using 89C51RD2 and 22.1184(or 18.432)MHz? Because I am unable to achieve this baudrate using 89C51RD2HBP and the above two crystals.......
Selva
Can anybody suggest me how I can get baud rate of 38400 using 89C51RD2 and 22.1184(or 18.432)MHz? Because I am unable to achieve this baudrate using 89C51RD2HBP and the above two crystals.......
keil baudrate calculator
http://www.keil.com/c51/baudrate.asp
Will show you that you need to use T2 with the 18.432 and T2 or SMOD=1 for the 22.1184.
DO note that you can not use 6 clock mode with the 22.1184 xrtal.
Erik
oops, sorry
This should not have been answered in this forum
Erik
sir,
we are doing serial programing of 89c51rd2bn, but it is not working. with use of 89c51rd2hbp itis possible. plz give us solution.
thank you
nitin
Please post a detailed description of the problem, so we know what to start checking. Thanks.
I want to know if 89c51rd2 can be directly replaced by 89v51rd2 without any changes (hardware or software)?
Else please list out the differences.
There are two kinds of RD2, there is the P89C51RD2Hxx and the P89C51RD2xx. The best way to find the differences is to compare the datasheets of the two devices.
Hi Andy,
I know about the "P89C51RD2Hxx" & the "P89C51RD2xx" versions. What I asked was the difference between "89C51rd2" & "89V51rd2". Can I replace the "C" version with "V" version without any software or hardware changes?
I will refer the datasheet but it would help if somebody can share his experience.
Sud.
Sud wrote:
> Can I replace the "C" version with "V" version
> without any software or hardware changes?
Generally, not.
For example, in the "C" you can set the 6-clock mode from software (and you can set the core speed 6-clk while the peripherals 12-clk), while in the "V" you can set the speed to 6-clk only by programming.
An another example, if you are using the IAP, the "C" has a different set of commands and a different way how to approach the IAP routines than the "V".
But in other respects the chips are quite similar, so it really depends on your particular application, whether the "C" can be replaced by the "V" with no changes or not.
Jan Waclawek
Dear sir.
I alway can't connect to the p89v51rd2,it display "reset device into ISP mode now"with red color,i press the button of "RESET" to reset 89v51rd2,here nothing happened,why?i try 11.0592mhz and 12mhz,and set the baud rate with different value,the chip is a new onewithout any operation.i connect the cable's RXD(2) to a MAX232 in 14 pin,TXD(3) in 13 pin,and the MAX232's 12 pin connect to p89v51rd2's RXD(P3.0),and 11 pin to TXD(P3.1).
Please give me some idea.
Thanks.
When you click on start a window should pop up telling you to reset the device, along with a Cancel button. Are you seeing this? If not then you do not have the correct device selected in Flash Magic. The 89C51Rx2 devices are not the same as the 89V51Rx2 devices. If you have tried to program the V device with the C device selected, then your V device is probably now stuck in SoftICE mode. Not sure how you get it out of that mode.
To test if P89V51RD2 in in SoftICE mode: get a terminal emulator program capable of sending non-ascii characters (e.g. term by Bray, use google); then reset the mcu and send 11h characters (at some reasonable speed, e.g. 9600baud, 8N1, no handshake). If the mcu responds with alternating 00h and FFh, you are in SoftICE mode.
To get rid of SoftICE mode:
http://www.efton.sk/t0t1/unsoftice.htm
Hope this helps a bit.
Jan Waclawek
Dear sir.
Thanks for yours answer.
Now i change a chip and get in connection.i read the device signature,it return "manufacture id :BF".i remeber that the PHILIPS product id maybe
15,it is correct i get ?
Yes, the P89V51RD2 returns BFh as manufacturer ID and 91h as device ID.
This might have something to do with the remarkable similarity between this part and certain SST parts...
Jan Waclawek
i've got 50 pcs of 89v51rd2 to program using isp. i find that i got a failure rate of almost 20%.
i don't understand why some was able to program successfully and others don't.
all of them should work the same, right?
In what way are the devices failing? Does lowering the baud rate help? It sounds like something is marginal.
I tried lowering the baud rate, but only a few worked this way. I even tried programming those which were successful the first time, and some couldn't even engage in isp mode.
i've check the RxD pin, there's 'U' received, but the V51 just did not respond.
i'm confused, if it works on some, then all should respond the same way.
The PCBs are manufacured the same way.
Can you recommend a parallel programmer?
What crystal frequency are you using? The higher the frequency, the less time there is after reset for the device to receive a 'U' to enter ISP mode.
I don't know which parallel programmers support these devices. Sorry.
If a voltage on one of the pins, for example VCC, is almost near a limit, then the solder joints or resistor tolerances, etc. could vary the performance of the hardware in a production run. Check all voltages at the microcontroller pins are within limits, free from glitches and ripples, etc. Check the signals on the XTAL pins are glitch free, etc.
hi, i'm using a P89V51RD2FBC, from what i know, this device has only this way to go into ISP:-
during a power up or reset, this device will tempt to autobaud, after 400ms of autobaud failure, user code will be executed......
but when i float the pin PSEN, i cant get into ISP, can i know what is wrong???
> but when i float the pin PSEN, i cant get into ISP
PSEN should be left floating.
Have you tried everything from
http://www.esacademy.com/software/flashmagic/appnotes/ISPProblemsAppNote.pdf
?
Jan Waclawek
thanks Jan, thanks for giving me a reply.
actually i have no problem to enter into ISP mode, by pulling PSEN pin to ground, but when i try to let this pin float, i cant enter ISP mode anymore, FM will prompt me a message "transmit/receive fail"......
Respected Sir,
I am working on P89V51RD2. Is there any circuit or software by which i can emulate my controller in circuit. please semd me your answer.
thanking you
best regards
ikram.
Hmmmm.... The P89V51RD2 itself? :-)
Try looking for SoftICE.
Jan Waclawek
Hi,
i am interested to know about the failure rate of 89v51rd2 in the field condition (ex:process control,stepper motor application).lpease put if any design ideas for very safe operation.
i am interested to know about the failure rate of 89v51rd2 in the field condition (ex:process control,stepper motor application).lpease put if any design ideas for very safe operation.
do not know, but I am using the "sister" P89c668 and the failure rate after 2 years is zero, excluding failures by external causes.
After we changed the power supply to a PowerTrends (TI) PT6302 the rate has been a virtual zero.
Erik
Thank you for you reply,
But I do not know how to use SoftICE feature of 89v51RD2. I have down loaded that hex file from your given address, but still i have not downloaded in my controller since i have parallel programmer but it is not supporting v51 but it is supporting P89C51RD2. Can I use That one. and if i download that hex code in my 89v51rd2, then after what should i have to do? please send my your reply.
Thanking You,
Best Regards,
Ikram
I'm not sure about SoftICE (try a web search for SoftICE), but I don't think the parallel programming method is the same as the P89C51RD2.
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
hello everybody
I am using p89v51rd2fa and i want to activate the iap on the IC
as per the data sheets and sheets provided by phillips
1. I use flash magic erase the whole flash and load the p89v51rd2_vo5_upd_isp.hex file.(i am using a serial programmer with crystal freqency 22.118mhz)
2. I launch a terminal program ,set the baudrate(9600) and thecom port,
power cycle the target,and type U it echoes and gives me details that the version has been updated and programmed in the ic .
3. now i erase the hex file from the user space and load my application program Ihave started the program from 2100h location considering the overlay and memory mapping.Inthe program i pass 0000h to the b1h location (fcf register location).then set the R1=02H,DPH=50H,DPL=00H,ACC=A BYTE TO PASS(the data sheet have asked to set the registers in this order to acess the write function)
then i make a LCALL to 1FF0H location (stated in data sheets that the pgm_mtp at this location datasheet page no 24)
now the acc is supposed to become 00 if the write is sucessful as the function returns 00 to ACC.However this does not happen.
could U PLEASE guide me ?what needs to be done?
Ansh
Is the target address position erased?
Jan Waclawek
Thankyou for replying my query Jan Waclawek
I update the new version then I erase the flash before loading my applicaton program
Actually as per my observations when i set the register values(fcf,r1,dph.dpl,acc) and make a call to the 1ff0h location it does not return from that location and resets to the zeroth location of my application program i am starting the program at org 2500h after viewing the flash (with the flash read option in flash magic) after updating the bootloader before burning my application program.
Ansh
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
hello Jan,
certainly, iam not updating the bootloader before each new reprogramming of the chip.I have done it once .now i have to activate the iap .so i load an application program in which i make the FCF.0=0
and also acess the program user code iap function for which i set the required parameters now if the iap is enabled because of the FCF.0=0
they say it will overlay the 8kb of the flash hence i am loading the program at 2500h.I reset the target after my program is loaded i.e fcf.0=0 ,it should do the autobaud in 400ms and overlay the 8kbisn't it?.
Ansh
hello Jan,
I have tried one more way i have loaded an application program at org 0000h in which i have made the fcf.0=0
then i reset the target device and then read the flash with flash magic read flash facility. it does not show the 8kb flash overlayed with iap routines.
Is making FCF.0=0 enough for activating the iap or somethingmore needs to be done?
Ansh
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
hello Jan,
i tried doing the same alas! no go
i tried send 's' on the serial if it suceeds(ie the acc=0) however no go
also tried just making the bsel =0 and then sending the contents on 1ff0h(16 bytes ) on the serial it gives just blank spaces.
i doubt if something more needs to be done.
ansh
HEY JAN,
DONE IT'S DONE!!!!!!!!!!!!!!!!!!!!!!!
THANK U VERY MUCH FOR ALL UR ASSISTANCE THANK U ONCE AGAIN
ANSH
hey Jan,
hello once again !!
The iap for p89v51rd2fa iap is functional I really thank u for all the support u have offered.
Actually i have another related issue :
If we write some data on flash at some location and then try to rewrite once again at the same location it does not permit us to do the same.
even power cycling the target does not help.
hence, i tried erasing and actually the erase function erases the whole 0 block i.e., the whole flash however my application code via which i activate the iap and perform the read write operations is also erased.
Is there any means via which i can erase the flash byte by byte or let say
is there any means via which i can make my application code resident and erase the remaining flash?
Ansh
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
hello ,jan
Could you help me locate the same in the datasheet actually i could not find something like that in the iap functions at 1ff0h location that have been mentioned in the datasheets that i posses (I have downloaded them from philips site ).
Anyways it does work .
Thank you once again
I am really obliged by all your cooperation .
Ansh
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