Flash Magic Forum

In-System Programming Support => P89C51Rx+/P89C51Rx2/P89C66x/P89C6xX2/P89V66x => Topic started by: a9o1o8o on November 19, 2015, 11:41:06 PM

Title: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: a9o1o8o on November 19, 2015, 11:41:06 PM
I need help about NXP MCU,P89C662HBA,which can start user's code but can't start ISP masked-ROM boot loader code.But why?even though I push PSEN pin to GND. when I want to down load my code,I have to push PSEN pin to GND in order to start ISP masked-ROM boot loader code,after a few sucess times,Now,fail to start boot loader code ,so I can't down load my code using this way. what's wrong my Behavior? I need Help.

I Push EA to VCC and PSEN to GND directly,Push ALE,P2.6,P2.7 to VCC through pull-up resistor,But I still can't down load my code
Title: Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: a9o1o8o on November 19, 2015, 11:50:06 PM
NOW, I still have a Good chip which I can Read device signature and bank check(Rxd,Txd,Gnd)
Title: Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: Andy Ayre on November 20, 2015, 06:10:54 AM
Put a scope on the microcontroller Rx pin and check it is receiving characters. Also measure the bitrate using the scope.

If that looks good then put your scope on the microcontroller Tx pin and check if anything is being transmitted. During the autobaud process with Flash Magic the device echoes back the characters it receives.

BTW please don't report your own posts just to try and get a faster response. Thank you.

Andy
Title: Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: a9o1o8o on November 22, 2015, 06:52:44 PM
OK I'm sorry for that behavior,Both Txd and Rxd pin will light corresponding LED if there have data.When I want to reload my codes(PSEN Low,EA/P26/P27 High),Microcontrollers sometimes run my previous code to send stable data(such as "test program") through Txd pin and sometimes do nothing for a while and then run my previous code to send stable data through Txd pin  .But Rxd pin everytimes have data.And everytime fail to reload my codes.
Title: Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: Andy Ayre on November 23, 2015, 03:34:56 AM
LED is not enough to debug this problem, you need a scope on the pins and only look at the activity when Flash Magic is trying to connect. Please post waveforms showing the 'U' going in and the 'U' coming out.

Andy
Title: Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: a9o1o8o on November 23, 2015, 07:19:58 PM
Schematic
Title: Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: a9o1o8o on November 23, 2015, 07:21:44 PM
Debugging environment
Title: Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: a9o1o8o on November 23, 2015, 07:36:05 PM
because flash magic software so quickly that I can't capture waveforms in time ,so I use Serial debugging assistant software Send "U" persistent. The good chip will Reply "U". Good chip waveforms
Title: Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: a9o1o8o on November 23, 2015, 07:39:30 PM
Good chip Serial debugging assistant software Screen
Title: Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: a9o1o8o on November 23, 2015, 07:40:38 PM
May be bad chip waveforms
Title: Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: a9o1o8o on November 23, 2015, 07:48:55 PM
May be bad chip Serial debugging assistant software Screen On,the last picture upload failed. The picture is stable data which is not "U"
Title: Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: Andy Ayre on November 24, 2015, 12:55:38 AM
Quote from: a9o1o8o on November 23, 2015, 07:36:05 PM
because flash magic software so quickly that I can't capture waveforms in time ,so I use Serial debugging assistant software Send "U" persistent. The good chip will Reply "U". Good chip waveforms

You need a scope that can trigger on an edge then show you what it captured. Essential for working with embedded systems.
Title: Re: Can't start ISP masked-ROM boot loader code ,P89C662HBA
Post by: Andy Ayre on November 24, 2015, 12:58:38 AM
Try using a terminal program such as PuTTY. Send a 'U' to the device and see if you get a 'U' back. Use 9600 baud then 19200 baud, 8N1. If you get that working then compare the waveforms at RxD and TxD with the ones generated by Flash Magic.