Flash Magic Forum

In-System Programming Support => P89C51Rx+/P89C51Rx2/P89C66x/P89C6xX2/P89V66x => Topic started by: KS Tan on May 31, 2005, 08:39:49 PM

Title: 89C664
Post by: KS Tan on May 31, 2005, 08:39:49 PM
I have problem using Flash Magic to program a 89C664.  I followed the document stated in the AN461 but no luck.  Can anyone help?

thanks,
Title: Re: 89C664
Post by: Andy Ayre on May 31, 2005, 10:08:47 PM
Try working through the Flash Magic application note "What to do when ISP does not work" and let us know the results of the tests. We will then be in a better position to pinpoint the cause of the problem.

Are you pulling both P2.6 and P2.7 high while resetting into ISP mode?

Title: Re: 89C664
Post by: KS Tan on June 01, 2005, 02:14:34 AM
Hi Andy,
I have read thru' the application notes.  The fmd debug file as below:

debug> Short timeouts set to 4000 milliseconds
debug> Long timeouts set to 60000 milliseconds
debug> opened com 2
debug> hwconfig=3
debug> attempting to use baudrate 7200
debug> GetCommProperties - dwMaxTxQueue = 0 - no max size given
debug> GetCommProperties - dwMaxRxQueue = 0 - no max size given
debug> SetupComm successful. Configured txbufsize=16384,rxbufsize=16384
debug> comport configuration completed.
debug> RST asserted (DTR TTL = 0)
debug> PSEN asserted (RTS TTL = 0)
debug> COM Port RX flushed
debug> COM Port TX flushed
tx> U
debug> ReadFile - not enough or too many bytes read
debug> wanted 1 bytes, read 0 bytes
rx>
debug> Comport closed

Yes, I have 2.6, 2.7 pulled high, PSEN low, ALE High all conditions as specified by the AN461 but still cannot get to communicate with the device.

regards,
Title: Re: 89C664
Post by: erikm on June 01, 2005, 05:15:22 AM
did it communicate once?
If not in any way, the chip should still be "factory fresh" and thus already in ISP mode.
If so, and oscillator and reset is correct, it is the path PC - MAX232(equivalent) - uC that is your problem.

Erik
Title: Re: 89C664
Post by: Andy Ayre on June 01, 2005, 08:11:48 AM
Also test sending the 'U' with hyperterminal. That will narrow the problem down to the device/hardware or Flash Magic.

Title: Re: 89C664
Post by: KS Tan on June 03, 2005, 02:54:09 AM
Hi Erik,
The board I am using already have a MAX232 equivalent build in. Its ST202.  I followed the application specs stated http://www.st.com/stonline/prodpres/standard/interfc/st202_1.htm, with the AN461 notes, but still can't get it to communicate.

Hi Andy,
As explained above to Erik, I cannot get it to communicate, therefore, can't send a 'U' thru' hyperterminal.

regards,
KS
Title: Re: 89C664
Post by: Andy Ayre on June 03, 2005, 08:00:12 AM
Check with a scope to see if the 'U' you are sending in Hyperterminal is being received at RxD. If so is anything coming out of TxD?

If nothing at RxD - check your hardware, the path from the PC's COM Port to the RxD pin. Likewise if you see something coming out of TxD.

If the U is reaching RxD but nothing is coming out of TxD then you likely haven't satsified the requirements to get the device into ISP mode. Double check all voltages on pins and check for glitches, ripple, etc. with a scope. Check for a sine wave on the XTAL pins.