Interrupt system of ARM LPC2000 microcontrollers

Microcontrollers aren’t imaginable without interrupts. The arm isn’t an exception. There were SWI exceptions mentioned in earlier articles, but there are two more sources of exceptions: IRQ(General Purpose Interrupt) and FIQ(Fast Interrupt). ARM Pin Connect Block All I/O pins of LPC2000 ARM can be multiplexed to several functions via pin select block. Pin selection bloc allows selections up to three more other functions except for GPIO. Pin Connect block gives flexibility to ARM MCU because each PIN can have different functionality. After reset, all pins are configured as GPIO. As the example above, you can see that the P.1 pin function can be assigned by PINSEL0 register 3 and 2-bit configurations. So if you write PINSEL0|=(1<<3)|(1<<2), then the pin will be assigned to the EINT0 function. Pretty simple. So before using External interrupt EINT0, first, you have to select the pin function for the P0.1 pin.

Continue reading

Power modes of LPC2000 ARM MCU

Power modes especially become more important where power saving is needed. All common microcontrollers have several power control modes.LPC21xx series microcontrollers have to reduced power modes: idle and power-down mode. Idle mode Execution of instructions is suspended until reset or another interrupt signal occurs. In idle mode, peripheral devices (for instance, timer) are running and may generate interrupts that cause the processor to resume execution. So idle mode eliminates power used by the processor itself, memory system, and internal buses.

Continue reading

Clocking ARM with Crystal oscillator and PLL

ARM microcontrollers can be clocked in several different ways. One way is to use an external clock with a duty cycle of 50-50 and a frequency range from 1MHz to 50MHz (LPC21xx series) connected to the XTAL1 pin. Another way is to connect the External crystal oscillator, but its range is lower (1MHz to 30MHz for the LPC21xx series). And last but not least is the on-chip PLL oscillator, then external clock source frequency should not exceed range from 10MHz to 25MHz. Let’s analyze more deeply each clocking mechanism. In the picture above there is fosc selection diagram shown.

Continue reading

Fractal antenna constructions

Among the usual antennas used in today’s data transfer, different types of antennas are used. First publications about electrodynamic characteristics of fractal structures were published in the 1980s, but the first practical approach appeared after 10 years. Dr. Nathan Cohen, professor of Boston University, designed, engineered, and patented many practical fractal antenna solutions and founded “Fractal Antenna Systems” in 1995. Van Koch fractal antenna As Nathan states, there were forbidden to use external antennas in the city in the center of Boston. Hence, he managed to hide the antenna within the design of an amateur radio station. He took aluminum foil and made an antenna as decoration according to Van Koch figure:

Continue reading

What are electrical switches principles and switching problems?

Switches are an important part of electronic systems. It is one of the most frequently used human interaction with electronic devices methods. But switches are the mechanical components that are a vital part of any equipment. Electrical switches Electrical switches are as old as electricity. The function is always the same – it makes or breaks current in a circuit. In early 19th switches were used for DC circuits, while later for AC and then they serves for switching wide spectra signals starting from audio and ending with digital. Well, switches have changed compared to those before 100 years, but the principle is the same old as the electric itself. When the switch connects the circuit path, it has a resistance of mOhm, and when the current path is broken, resistance is high MOhms and higher. This resistance and maximum voltage that can be applied to insulation is often a major important and vital feature that leads to switching stability.

Continue reading

Overview of noises in electronic systems

AVR DDS noise signal

There are several sources of noise in electronic systems. Noises are unwanted signals polluting random or not signals that reduce overall signal quality. Thermal Johnson/Nyquist noise Two scientists, Johnson, discovered this noise who did the experiments and Nyquist, who developed the formula. Thermal noise is present at all frequencies (has a constant power density at all spectra) and is called white noise. This noise can only be reduced by reducing the temperature, resistance, and bandwidth. Let’s see the Noise voltage RMSformula:

Continue reading

Multiple controllers in one design

Actually, many embedded systems use multiple microcontrollers and microprocessors. This is not about multi-core processors but several distinct processors used in one design. Multiprocessor systems allow the distribution of computing power among different processors, and this way, overall speed may be increased, coding simplified, and modularity reached. Using multiprocessor embedded design has many benefits. One of them is modularity. Imagine a situation when a particular microcontroller-based subsystem needs to be installed only if a particular opinion is installed. Another, as we mentioned, is coding simplicity. Instead of writing and debugging one complex firmware, it may be broken into several distinct, easily manageable functions on different MCU’s.

Continue reading

Debugging embedded hardware and software traces

When designing an embedded project, we typically focus on the actual application but do not pay enough attention to the hardware and software debugging process. Adding the debugging capability to the project requires some strategy. Simple situation: hardware may not be installed but connected to another circuit when needed. So software must support the functionality regardless of whether or not hardware is installed. Another example may be Embedded inboard with multiple temperature sensors. Hardware should detect when the sensor is connected or disconnected without interrupt other sensors’ readings. One way of debugging is software trace(log) to provide historical information on what was happening if something went wrong. This technique is a good solution for developers who have no ability to use other debugging tools because of the following reasons:

Continue reading

Long range directional microphones-myth and reality

There are a lot of myths about directed long-range microphones. You can hear like they can reach distances of 100, 200, and more meters, others say that this is a myth and these numbers are commercial purposes. Let us try mathematically to find proof and see the real situation. Introduction to long-range microphones When talking about directed microphones, we usually have in mind that sound sources are in the open air, and there are no reverberation effects. So the only factor is the distance of the sound source object from the microphone. Along with the distance, sound power drops significantly, and in longer ranges, it interferes with other sounds like wind and other noises in the atmosphere. When the distance is about 100m, sound pressure drops more than 40dB(comparing to a distance equal to 1m). If the sound level is 60dB, then from 100m, you will hear 20dB. Sound level 20dB is less than other environmental noise, and many standard microphones are not sensitive enough for such sound levels. So we can say that directed microphones must have: High sensitivity and selectivity from environment noises even if they have a higher level than real sound; High directivity for excluding noise…

Continue reading

Control LPT port under windows XP using Delphi

Another way of controlling the LPT port under Windows 2000 and XP is using the Delphi language. In this case, library, inpout32.dll, is used, which allows controlling LPT port registers. And now how to do this from the beginning. Start Borland Delphi 7.0 and make a simple form where you can enter Data to be sent to the port, Port Address, buttons for writing to and reading from a port. If you are familiar with building forms this should be ease task. Okay, now let’s start programming; first of all wee need to include inpout32.dll in the project. For this, Delphi has several ways, but let’s stay to the easiest one when the library is in the same directory, where the project is. The header in section uses we have to place function prototypes Out32 and Inp32 with special compiler directive external, saying where to find this function.

Continue reading