Subscribe

89LPC9xx USB Programming

Posted by Circuit Labs on Sunday, November 23, 2008

Back in November 2003 you could already read about a small development system for the (then) new series of controllers from the 8051-compatible 89LPC9xx-family. A nice feature of the current 89LPC9xx-series is that these chips can remain in the circuit while (re-)programming. All that’s required for this programming is an RS232 port. But because many modern computers do not have an RS232 connection any more, we propose here a USB version. For this we use a well-known USB/RS232-converter chip, the FT232R.

The 89LPC9xx series can be placed in programming mode in two different ways: by transmitting a ‘break’ over the serial port or by providing three defined reset pulses immediately after power-on. We use the latter method, because this is a hardware solution. This is because the ‘break’ has to be sensed by software. In plain language: this method only works with a well-behaved program. And this is obviously not always the case in a development environment!

Click to enlarge...

When you also look at the schematic from 2003, you will see that very little has changed. Really the only difference is that the RS232 interface chip has been replaced with the FT232R. As you will know, the USB-interface is terribly slow when the handshake lines such as DTR and RTS are used. Fortunately that is not the case here, since DTR and RTS are used just once at the beginning and end of the programming cycle. The actual programming is done by transmitting commands and data across the serial port.

A few remarks:
To be able to program you will have to change a jumper each time. On the one hand this is a little tedious, but on the other hand it gives a little bit of security. During software development a double pole change-over switch does wonders! Note that the processor is placed in programming mode by three reset pulses after power-on. If the power supply voltage does not drop sufficiently beforehand (<2.7 V), then the processor will not be placed in power-up mode by the brownout circuit and therefore cannot be placed in programming mode either. That is why a resistor of 4k7 has been added to drop the power supply voltage faster and lower. Check the inputs in your application. If these are powered from another voltage then the processor will be powered from its inputs via the protection diodes and programming will not work then!

It is possible (but not necessary) to power the circuit through a low-drop regulator from the USB-connection. You can also omit L1, but it is better to put a few turns of wire through a ferrite bead. The pin numbering shown is for the SSOP-28 package.

Author: _

(Elektor Electronics Magazine – 2006)



* Download this article.

0 comments:

Subscribe to: Post Comments (Atom)