Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

8051 programming problem

Status
Not open for further replies.

amarhw

Junior Member level 1
Joined
Nov 15, 2008
Messages
15
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Uk
Activity points
1,406
flash magic for 8051

Hi
I have a strange problem.
I am using Flash Magic to program a 8051 microcontroller.
While I am programming it reached to (0x13f0) the programming stopped then returned "Unable to communicate.(transmit/receive)" I reset the microcontroller then the programmer returned ( failed to read the device signature then the microcontroller stopped working.
I replaced the microcontroller but the same thing happened but this time the microcontroller working but do not accept to be reprogrammed.
Any idea ?
urgent help needed.
 

8051 programming

your programmer is not good or out of order.
use asim khan's programmer.Get that by searching the "asim khan's flash programer" on google. that is perfact and works very good and very very easy to make.
bye
 

check 8051 working

Thanks for your replay
I will try to find it
but the strange thing I've used this programmer more than 100 time with the same microcontroller.
And the problem know with the second microcontroller is that it do not turn to ISP mode and still working with last program. Do you have any idea ?
 

8051 programming device

have u checked the virus in your computer?
the strange problem may appears due to virus as well.
or may be your mcu is out of order.
check other new one.
 

Try to reduce the baud rate and try out.
I have faced this problem with philips controllers.
Programming used to stop in between when high baud rate was used.

Even though if it doesn't happen after changing baud rate,there may be problem with the ISP circuit.
Have u checked ur level converter and DTR,RTS pins?
 

Hi dharanidhar
Thanks for replay
I am using Philips XAG49 microcontroller
The baud rate used was 4800.
I am using max 232 as a level converter , I replaced it when the first microcontroller stopped working.
The microcontroller do not have DTR,RTS pins or you mean other thing ?

Thanks

Added after 4 minutes:

Noman Yousaf said:
have u checked the virus in your computer?
the strange problem may appears due to virus as well.
or may be your mcu is out of order.
check other new one.
Hi Noman Yousaf
I am using an up-to-date antivirus.
I faced this problem with two microcontroller. Is it possible that both of them out of order , but the strange thing that the first microcontroller was working fine I can program it easily for more than a month.
Strange, isn't it ?
 

is it possible that you are overwriting the boot block?
 

My code size is 15Kbite
therefore I do not thing I overwrite the boot block.
 

check the reset circuit on your programmer, it is possible that the device may be coming out of reset.

You should also pay particular attention to the PSEN pin. If it is not low during programming, the device won't enter programming mode. I have seen some programmers control the PSEN pin from the RS232 port.

You can try and disable the circuit and tie the PSEN pin low temporarily to diagnose the problem.

Other than that, you should post a schematic of your programmer if you require more help.

Good Luck
 

amarhw said:
My code size is 15Kbite
therefore I do not thing I overwrite the boot block.
As is known 8051 has 4K of prog memory and your program size is 15 K, does this conflict help in resolving the issue !!
Raoof
 

Reset circuitary may be a problem.
But are u sure ur MAX232 is OK.
the significance of baud rate is max232 has to support such speed.
during program loading this becomes critical.
there are several high end versions of it available for MAX232.

There must be some pin to enable the controller to execute bootloader, only TXD and RXD won't do it.
once check ur datasheet
 

Hi
I am using 8051 XAG-49 family. This contain 64K byte flash program memory.
The schematic I am using for programming is shown in the attachment.
I am controlling PSEN and RST manually by switches but I replaced them just in case any problem with them. The baud rate used is 4800.I direct connected PIN 32 (PSEN ) to GND while I try to program it. The strange thing is that the controller was accept the programming normally when the program was about 8Kbyte ( I programmed it over a 100 times ) but when I programmed it with 15Kbyte after few test it I've got this error.
What do you think the problem is ?
 

On some of those devices you could send an uppercase "U" through a terminal to the ISP circuit. Do this in hyperterminal or any terminal software for windows. Select a low baudrate, like 9600.

If the "U" is returned by the board, you have successfully entered ISP mode.

Are you using winisp to program it? Did you try to program another chip with your board?

Do a google search for the application note titled
"what to do when ISP does not work". THis was originally written for Flash Magic, however there may be some similarities.

Other things you can check.

PSEN must first be low BEFORE power is applied. Judging by the schematic you posted, you should not need to do anything with the reset pin.

PSEN LOW, apply power. If all is well, you should be in boot mode.
On some devices P2.6 & P2.7 must either be high, or unconnected. If they are not, you may have trouble entering ISP mode.

I remember some old Temic 89C51RD2's I tried to program were very troublesome. I found that in those older devices the boot code was in flash. If the whole flash was erased, the device would never enter boot mode. You would then need a parallel programmer to restore the boot code in the flash. Not sure if this applies here or not.

You can also try using a serial port logger to see if any data is being sent & received from the device.

Good Luck
 

    amarhw

    Points: 2
    Helpful Answer Positive Rating
Hi
I tried to send 'U' character but i did not receive anything.
I replaced the microcontroller and programmed it normally. Therefore I do not think there is with the board. But I find that when I program the microcontroller with baud rate greater than 9600 it will stop working after few times of programming but I do not know why .
Thanks for your helping.
 

I am not sure if your bootloader is in the flash or not. (As I mentioned above, some older devices had this, and it was very troublesome)

If you can try the chip with a universal programmer or a parallel programmer, you may be able to repair it by reprogramming the bootloader section (that is, if it resides in flash) I fixed many of the older temic (atmel's) this way.

Good Luck
 

Hi

I did not know why this problem happened ,but I know it was because of using Flash Magic with 8051 XAG-49. I used WinISP and I did not face this problem again

Thanks a lot for all.
 

amarhw said:
Hi

I did not know why this problem happened ,but I know it was because of using Flash Magic with 8051 XAG-49. I used WinISP and I did not face this problem again

Thanks a lot for all.
Report FlashMagic problem to ES Academy. I am not sure if they will fix it since NXP site says XAG-49 is no longer in production.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top