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!
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. |
Parallax, well known for its successful Basic Stamp IC, has recently introduced the Propeller: a new microcontroller with a certain difference. It packs no less than eight 32-bit processors (referred to as COGs in Propeller jargon) into a single package with only 40 pins. That design makes genuine simultaneous multiprocessing possible, and the sophisticated internal structure of the device makes it relatively easy to implement video and signal-processing applications.
The Propeller can be programmed in assembly language or the high-level Spin language. The processor and the programming tools were developed entirely in-house by Parallax, with the hardware being designed from scratch starting at the transistor level. The basic idea behind that was to avoid becoming involved in all sorts of patent disputes with other manufacturers. The result is astounding, and for software developers it certainly requires a change in mental gears.
As is customary with modern microprocessors, the Propeller has a simple serial programming interface. The developer’s toolkit from Parallax has a modern USB port for that purpose, but a reasonably simple alternative (illustrated here) is also possible for anyone who prefers to work with the familiar RS232 port. Don’t forget that the Propeller works with a 3.3-V supply voltage.
(Elektor Electronics Magazine – 07-08/2006)
| Download this article (direct link #064005-uk.pdf) |
When computer makers switched from RS232 to USB, one of the collateral benefits was TTL compatibility with regard to the supply voltage as well as signal levels. Unfortunately, there was also collateral damage, primarily in the form of an enormous increase in the complexity of the data transmission process. All you need for connection to an RS232 serial port is a level converter, but USB requires an extra IC (such as the Cypress CY7C68000 or a special-purpose microcontroller, such as the PIC18F4550) to make data transmission possible. That sounds like a zero-sum game, which raises the question: if you already have to use an extra IC, why not go directly to Bluetooth? And in fact, there are already several Bluetooth modules available, complete with an integrated antenna and simple serial inputs and outputs. However, many of them have the disadvantage that they are controlled using AT commands, which makes it necessary to use an additional controller.
However, there are also autonomous models available, such as the new LinkMatik module (www.flexipanel.com). If its Mst/Slv pin is held low, it waits until something wants to connect to it. If the pin is high, the module actively searches for devices that are ready to establish a connection. That means you can set up a shortrange radio link without using a computer by simply coupling two modules together. However, generally speaking you will probably want to control an external device from a PC. In that case, you can let your PC search for devices that are ready to establish a connection. When the PC finds a module, it lists its available services. The service known as ‘Serial Port Profile’ (SPP) is the appropriate service of the LinkMatik module. If the security function is enabled, you will have to enter the PIN code of the module (set to ‘0000’ when first delivered). Once a connection has been established, the Status pin of the module goes to a high level to indicate that it is ready for bidirectional data transmission.
Now you can simply use the familiar TxD and RxD lines to transmit serial data. The RTS and CTS lines are also available for controlling the data flow. If you do not need that function, you
can simply connect these two lines together. However, this wireless serial interface does not allow you to use these lines for purposes other than their intended use, as is often done with ‘normal’ serial interfaces. As the data is buffered in the module before and after wireless transmission, RTS and CTS are generated locally. These two signals only control data flow to or from the module, but not over the wireless link.
It is generally not possible to have more than one serial link via Bluetooth per PC. However, Bluetooth-2.0 compatible modules have recently become available, and they allow up to four serial links to be used concurrently along with other functions.
Author: Richard Hoptroff
(Elektor Electronics Magazine – 7-8/2006)
| Download this article (direct link #060077-uk.pdf) |
Labels
- * Elektor 2005 (9)
- * Elektor 2006 (72)
- Adapters (1)
- ADC / DAC (1)
- AM / FM (2)
- Amplifiers (3)
- Antennae (2)
- Articles List (1)
- Audio (1)
- Automatic (2)
- Batteries (3)
- Bluetooth (1)
- Breakers / Contacts (1)
- Buzzers / Sirens (1)
- Clocks / Timers (2)
- Computer (2)
- Converters (2)
- Coolers / Fans (1)
- Counters (1)
- Datasheets (7)
- E-blocks (1)
- Energy (2)
- Flash / Light (8)
- Frequency (1)
- Fuse (1)
- Generators (2)
- High-voltage (1)
- Indicators (2)
- Infrared (IR) (4)
- LCDs (1)
- LEDs (7)
- Magazines (1)
- Meters (5)
- Microcontroller (9)
- Mobile Phone (1)
- Motors (1)
- OPAMP (3)
- PCB (1)
- Photosensors (1)
- Power Supply (2)
- Preamplifiers (1)
- Programming (3)
- Radio (1)
- Rectifiers (1)
- Regulators (1)
- Relays / Switches (10)
- Remote Control (7)
- RS232 (3)
- Security (4)
- Sensors (2)
- Servo (2)
- Simulators (1)
- Small Circuits (46)
- Telephones (2)
- TENS (1)
- Testers (3)
- Timebase (1)
- Tools (1)
- Transmitters (1)
- Trigger (1)
- USB (2)