ISP Programmer P89LPC932 A1FDH

Started by Laurens, July 02, 2005, 02:49:40 AM

Previous topic - Next topic

Laurens

Hello!

I've got some unsolved misteries about programming the P89LPC932 A1FDH (12Mhz). Maybe someone can help me out. (I've tried to figure it out by reading the datasheets and the topic on this forum). I'm completely new with this microcontroller and programming method.
I need to figure out a way to (re)program a P89LPC932 A1 FDH which is already on a PCB. Nothing is attached to the TxD and RxD pins (is this still ISP then?).
The fresh new (non-programmed) microcontrollers were programmed (already in circuit on the PCB) using a simple RS232 converter with MAX3232 directly to the COM port.  Now I have to reprogram the devices. So I've also made a simple RS232 converter, connected it to the microcontroller and tried to read the configuration and memory contents. To see if it is possible to communicate with the microcontroller. This all fails.
Now I like to know how to tackle this problem? Do I need to make the Keil software ISP programmer? To get the microcontroller in some sort of programminh mode??

Oh and is it possible to use a MAX3232 instead of the MAX563?? As far as I can see the max3232 is only missing the EN' and SHUN' pins??


Hope someone can help! Thanks in advance

Laurens

Werner Fritsch

Hello Laurens,

I had the same problems like you and solved them as follows:
A simple RS232 converter is not enough,  because you need somethig to set the LPC into ISP-mode (a number of pulses on the RESET pin during power-up). All in all you need five connections: GND, TXD, RXD, RESET and VCC. It depends on your actual harware if you have to cut the VCC and RESET line from the rest of the hardware or the driver are capable to supply the lines with connected load.  In a 5V environment (3.3V made of 5V with a green LED as described in a Philips Application Note) this is usually no problem.
I didn't get the MAX563 as well, so i built a similar ISP-programmer with an MAX3232 instead.  I can send you a schematic if you want.

Regards
Werner Fritsch


Laurens

Hello Werner,

Thanks for your reaction. I would be very grateful If you can send your schematic, my email address: hlvoogd at gmail dot com

Today I've made the Keil software programmer with instead of the MAX563 an MAX3232. Still this does not work, the microcontroller doesn't go in ISP mode.
It seems that the pulses on the RST are ok, however I can only see one pulse on the RST pin with a scope (just like in the application note which describes the circuit).
I hope you circuit can do the trick.

This is the strangest microcontroller to program I've come across sofar.

Thanks in advance.


Laurens

Werner Fritsch

Hi Laurens,

my schematic is on the way.
When you progemmed the LPC the first time, it ran on the internal RC-oscillator at 7.3728MHz. That is easy. Now (the 2nd time) you try to force the LPC into ISP-mode at 12MHz crystal oscillator. Are you sure that the crystal oscillator starts quickly enough? Perhaps try a lower frequency crystal (8MHz or so).
Do you know the Philips application note about the LPC9XX crystal start-up? Try an additional 1.5MOhms resistor from Pin8 (XTAL1) to ground to improve startup gain.

Now i've got no more trick.
I hope you can solve your problem.

Werner


Laurens

Hello Werner,

Your schematic seems to do the trick! I'm now able (or was able because by mistake I ruined my max3232) to (re)program in ISP mode. My circuit was almost the same as yours, I added the two transistors in the RxD line towards the microcontroller and it worked!

Thanks again for your help!

Laurens

Pedro

Hello Werner,

Can you send me your schematic?

My email is: pedro dot carvalho at tecmic dot pt

Thanks

Alessandro

Hello Werner,


I would be very grateful If you can send your schematic to me too. I'm having the same problem programming the LPC932. My email address is abandiera at viasatonline dot it

Thanks

Alessandro

Hello Werner,


I would be very grateful If you can send your schematic to me too. I'm having the same problem programming the LPC932. My email address is abandiera at viasatonline dot it

Thanks

John D. Maniraj

Hello Werner,
Can you please email the schematic to : mercyjohn@hotmail.com
I tried with circuit similar to Keils, but with no success.
Regards,
John.


erikm

"I tried with circuit similar to Keils, but with no success."

That is THE PROBLEM.

ISP/IAP/ICP depend on tightly controlled pulses etc, thus "similar to" is 99.18% likely to fail.

Anyhow, why all the trouble? install NoTouch and stop worrying

Erik

Bhavik

Hello Werner,

Can you please send me your schematic?

My email is: writetobhavik@yahoo.co.in

Thanks

Je Gold

Yes, You need to use the hardware entry method....ie 3pulse on RESET line after power up.

1.   Keil MCB900 is very cheep at $50 USD+ shipping
(you should consider this as there will be less problems over all)

The Keil MCB900 schematic does work... and is available here
http://www.keil.com/mcb900/mcb900-schematics.pdf

Here's a similar version of the ISP programming circuit very similar to the MCB900
http://www.8052.com/forum/read.phtml?id=98937

So copy this part of the circuit accurately.

2. Flashmagic Config
Also.... You need to set Flashmagic Configuration
Options ==> Advanced Options ==> Harware Config
Tick - Use DTR and RTS to enter ISP mode
[Hardware] [Keil MCB900]
T1 250mS T2 120

3.  RESET Pulses
The 3 pulses are very quick 50uS.  It is difficult to capture on a CRO, becuase there is an initial power up Vdd pulse,
not related to the 3pulses, and digital CRO's will trigger on the power up pulse and not the 3pulses.

The Flashmagic Manual  shows the waveforms in detail

4. You should check your circuit statically....
Does it swtich the VDD to the target micro correctly?
How about he logic from the Tx and DTR and RTS lines, does the logic switch correctly?

In summary... if you are a newbie (begineer) with the LPC900 then I highly recommend getting the MCB900 kit 1st... and get some confidecne with the 28pin PLCC parts..... then work down to the SMD parts.

If time is more important than money then there are other development tools, like the PDS900 and others
http://www.lpctools.com/index.asp?PageAction=VIEWCATS&Category=12
http://www.acqura.com/product.asp?products=PDS900

that can do ISP programming in circuit.


Regards
Joe


Je Gold

If you have a virgin chip.... You can load some "NoTouch" code in to it..... along with your original code.

So.... you can be happily  running your original code..... and then say.... check for a port pin high.... if the port pin is low...  jump to      1F00 hex to activate ISP bootloader....

More details here http://forum.flashmagictool.com/index.php?topic=3281.0

**** Notes
a)..... if you can't jump to 1F00 hex then you can't activate the bootloader (so hardware 3pulse method is needed, like MCB900) **** So you code... must have some way of jumping to 1F00 hex to activate the bootloader.

b) The NoTouch must be loaded on each sucessive programming... starting from a virgin chip
**** 

My code is here
http://www.flashmagictool.com/assets/resources/NoTouchLPC93x.zip


Other neat tricks are
1. Check the port pin status, just after power up... if pin is high... jump to 1F00 hex.
OR
2. After power up programme the UART and look for some characters from the serial port...
    If characters are recognised.... jump to 1F00 hex.

Regards
Joe




Je Gold

PS...

Make sure you are runing the latest version of Flashmagic

joe