Debugging tools for ARM7

Usually, one solution of debugging is to run compiled code on a PC simulator. You can download a limited version of the instruction set simulator from Hitex for free. Of course, better simulators aren’t for free. More advanced simulators you can purchase at Keil. More advanced, I mean that there is the ability to simulate peripherals by additional scripting and so on. But again, simulators are virtual tools, and usually, it is hard to simulate real-world events. Once you face this problem, you are going to switch to real-world simulation using JTAG.

Continue reading

RS232 emulates I2C for 24cXX memory programming

Sometimes you need a quick and easy solution for programming serial EEPROM memory chips. I think the easiest and well-known method is to use a simple programmer adapter with very few components: This adapter is connected to the RS232 port, and there is no need for an additional power supply as it comes from the PORT pin. The adapter is compatible with JDM Programmer so that you can use its programming software like IC-PROG. Just make a couple of settings, and you are ready to go:

Continue reading

Desoldering Atmega128 using a lighter

I heard about this method and decided to try it with my board. I needed to replace the Atmega128 chip but didn’t have hot air solder for desoldering IC. I tried this weird desoldering technique, and I can say that I was satisfied. Tracks and other parts weren’t damaged. The Atmega128 board is working again as before.

Continue reading

Interesting research on ceramic capacitors

I found an interesting article about the capacitance of ceramic capacitors may depend on voltage applied. In some designs, you can face a problem when ceramic capacitor capacitance may strongly depend on voltage. Few tests were done with various capacitors using the following circuit: In the circuit CX – tested capacitor; C0 – known capacitor. Voltage vas regulated from 0 to 50V using potentiometer R1. 50V is taken as the nominal voltage of the ceramic capacitor. Because Two capacitors are connected in series the total capacitance is C=CX·C0/(CX+C0) then we find the capacitance of tested capacitor CX=C·C0/(C0-C); C0 is about 10 % of CX value. There were several capacitors tested and stunning results were found. – Some of the capacitors lost capacitance from 10 to 15 times due to the increase of voltage up to 50V. Even when 10% of voltage were applied the capacitance was only about 35 – 40% of nominal value. The only explanation may be that low-quality dielectric material is used in (no-name) ceramic capacitors. Of course, not all capacitors gave the following results. But be ready for this when using unknown producer ceramic capacitors.

Continue reading

AVRJTAG clone in action

Building AVR Jtag clone Finally, I found some time to finish the AVRJTAG clone. It was hanging for a while on a breadboard with a bunch of wires. I have made an Eagle CAD project with a PCB layout you will find at the article’s bottom. I didn’t change the circuit very much from the previous, just added ISP header(but didn’t have a chance to test it) and transferred to Eagle project as I didn’t find one ready to build:

Continue reading

Compressed Thumb instructions of ARM MCU

Thumb instructions Thumb instructions shrink ARM instructions from 32 bit to 16-bit length. This allows saving up to 40% of program memory comparing to the ARM instruction set. Maybe this is the main reason for Thumb instructions being used. Thumb instructions lose many properties of ARM instructions and become similar to traditional RISC instructions. Thumb instructions cant be conditional. Data processing has a two-address format where the destination register is one of the source registers. ARM instruction: ADD R0, R0, R1 Thumb instruction: ADD R0, R1 As the Thumb instruction set takes less program space, it allows to upload bigger applications, but with lower speed than using ARM, instructions performance is up to 40% faster. But in noncritical applications or functions speed isn’t a significant factor. Also, Thumb instructions don’t have full access to all registers. Thumb instructions can only access “low registers”(R0-R7). And only a few instructions can access “high registers”(R8-R12).

Continue reading

ARM7 core instruction set explained

ARM7 architecture has a normal 32bit ARM7 instruction set and a compressed 16-bit instruction set, the so-called “Thumb.” ARM7 instructions have complex behavior. As ARM processor programming is usually written in C, there is no need to be an ARM expert, but understanding the basics may help develop efficient programs. ARM7 datatypes ARM7 processor can support following datatypes: 8 bit signed and unsigned bytes; 16 bit signed and unsigned half-words; 32 bit signed and unsigned words But shorter than 32-bit data types are supported only by data transfer functions, but when internally processed, they are extended to 32-bit size. ARM7 core doesn’t support floating point datatypes – they can only be interpreted by software.

Continue reading

Understanding and calculating decibels

A decibel is a special unit that is a little different from other measuring units in everyday practices. This is a nonphysical unit but more mathematical understanding. Decibel (dB) units are similar to percent (%), just different calculations and purposes. As a percent unit, so decibels are used to compare two quantities as the whole value in percents is expressed as 100%, so decibels are more complex, and it is a ratio of two independent quantities. Decibels are mostly used for energetic parameters like power or voltage and current. Decibel (dB), equal to 0.1 bel (B) . Bel – is a decimal logarithm of the ratio of two powers. If these powers P1 and P2, then the expression looks like this:

Continue reading

Low frequency Butterworth and optimal Wiener ECG filters

Regular ad hoc filters don’t guarantee optimal signal filtering as there are no criteria that evaluate filter characteristics. Usually, filter parameters are calculated empirically, and the best results do filtering. To avoid such a shortage, there are optimal filters used where some criteria optimize parameters. Optimal filtering’s main idea is to give bigger weight coefficients to signal spectra parts where signal noise has less power, and true signal spectral components have bigger power. Let’s project a simple Butterworth filter used as a comparative filter to optimal Wiener DSP filter.Butterworth filter transfer characteristics: Where N indicates filter Tap number. I will skip the Butterworth filter description as the main idea is constructing an optimal Wiener filter. Butterworth filter characteristics are pretty plain: The main disadvantage of the Butterworth filter is that signal is distorted on filter output. If you want minimal signal distortions it is better to use an optimal Wiener filter. Filter chart looks as follows:

Continue reading

24×24 LED dot matrix display control

24×24 LED display is formed using nine 8×8 Dot LED matrix displays connected to AT90S2313 MCU. MCU scans an indicator line in series. A special PC program is written to draw images on the screen and transfer them via a COM port to the device. You can send pictures in series that gives an animation effect. Device circuit:

Continue reading