What is DebugWire interface

Debug wire is an interface that enables debugging AVR microcontrollers by using one wire. All new AVR microcontrollers with less than 16kByte memory have a built-in one-wire bidirectional debugging interface that allows debugging devices in real-time. Like the JTAG interface, DebugWIRE can handle full execution and program flow control. It also supports an unlimited number of breakpoints, adjusting memory contents. The good thing is that interface doesn’t require additional pins as only the RESET pin is used for debugging purposes.

Continue reading

Major programmer types for 8 bit AVR microcontrollers

AVR microcontrollers have many ways to be programmed. One type of adapters are used only to program AVR memory others are used to program and debug. AVRISP The most known and common programming adapter is AVRISP, which is the basic tool and can be used to program Flash, EEPROM memory, most of the fuses, lock-bits for probably all 8bit AVR MCU’s. The programmer connects to a computer via an RS232 serial interface powered from the target board with no need additional power supply. The programmer connects to the target board via one of two headers – 6 or 10pin. AVRISP from Atmel Corporation is designed to work from AVRStudio as front end software and is upgradable. However, AVRISP is discontinued due to the newer adapter appearance –  AVRISP MKII. There are cheap third party clones available. But most of them aren’t compatible with AVRStudio but work well with programs like PonyProg or AVRDUDE.

Continue reading

ATTiny2313 Monitor tester

This project was born for repairing broken PC monitors. This allows avoiding using a computer while testing monitor patterns. The Tiny monitor tester uses ATTiny2313 AVR MCU running at 20MHz speed. Such speed allows running synchro H and V signals directly from MCU ports. Also circuit converts R, G, B signals to analog using a simple R-2R resistor network. ATTiny2313 Monitor tester:

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

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

IR remote control signal receiver using AVR microcontroller

IR remote control is a device you can find everywhere to find a TV, VCR, or home theatre. Why not use one of them for controlling your own devices like light, air conditioning, etc. As we know, remote control devices use IR light. This is invisible light of about 950nm wavelength. One most significant problem in using IR light is that there many other sources of it like the sun, light bulbs, fire. To exclude other sources, the IR signal is modulated by some frequency. The receiver has to be tuned for this frequency. Mostly remote controls transmit IR signals using 36kHz frequency signals. Transmitting and coding is one part that can be done more efficiently than receiving and decoding. Decoding is usually performed by using microcontrollers. First of all, the receiver has to get rid of the 36kHz carrier frequency. This is not a simple task to demodulate the signal; this is why particular IR receiver IC’s are produced. One of them is TSOP1736:

Continue reading

More about microcontroller oscillators

The choice of the microcontroller oscillator depends on many factors. Before choosing one, you should consider Cost, accuracy, and environmental parameters. Clock sources can be grouped into two major groups: mechanical resonance(crystals and ceramic resonators) and RC (resistor, capacitor) oscillators. The most popular form of mechanical resonant generators in microcontrollers is Pierce oscillators: Ceramic and crystal-based generators provide very high accuracy and low-temperature coefficient. But they have a slower startup comparing to RC generators. But the RC generator’s precision suffers from temperature variations and supply voltage. Nominal frequency can variate from 5% to 50%:

Continue reading

Use neural sensors to build smart sensor systems using microcontrollers

Neural networks are a broad topic. But this small example demonstrates how to create a primary neural sensor that takes resistive readings from multiple sensors and multiply it by weight factor and then sum the results. Results are compared to a three-level threshold. Without going too deep into neural networks, we can say that neural cell thresholds are similar to natural biological neurons. For instance, pain levels: itch is a low pain level while burning sensations are combined with cold and warm feelings. Neural sensors can operate in the same way. Let’s take typical neural sensors, which consist of two inputs with some weights and three outputs. Depending on the threshold level that the sum of inputs gives – we have an output signal on three outputs.

Continue reading

Build your own AVR JTAG ICE clone

After unsuccessful attempts to run a few programs which drive peripherals like USART and Timers on Atmega128, I decided to make a JTAG debugger. I hope it will allow me to see what is happening may atmega128 corrupted, or something is wrong with the software or hardware. The most widely used AVR JTAGICE clone is AVR miniICE, which is compatible with the original AVR JTAGICE. AVR JTAG is mainly used for target board debugging in the real world. And of course, you also can program your AVR’s with it.

Continue reading