Better performance with AVR XMEGA microcontrollers

It seems that ATMEL do not want to limit the AVR branch with 20MIPS AVR microcontrollers. Recently they introduced new AVR microcontroller family – XMEGA – which is still based on AVR core but has a higher performance along with low power feature. AVR microcontrollers are really optimal where high performance is needed with relatively low code size. Probably XMEGA microcontrollers will fill the gap between standard AVRs and AVR32 microcontrollers. XMEGA microcontrollers are featured with: 2nd generation picoPower technology; faster and innovative inter-peripheral communication; 4 channel DMA controller; Real Time Clock; 8 Event System channels; fast 12-bit and DAC; Cryptography support for AES and DES.

Continue reading

AVR internal oscillator jitter research

If you go to AVR site and open an AVR application note AVR053, you will notice that there are different RC oscillators installed into AVR chips during history. In the table, you can see tunable oscillator versions and their features. Simply speaking each new version of oscillator introduces better features and improvements. But is it truth? ChaN has made exciting research on this oscillator version. He simply tested output signal with fixed width and measured timing fluctuations of it. And he found out, that RC generator frequency slowly fluctuates during the time. Of course, RC oscillator fluctuations are not a problem as this type of clock source isn’t considered to be stable. In time critical applications it is better to use crystals. But the most exciting thing is that newer versions of tunable oscillators were generating much more jitter than older ones. In the picture, you can see that chips introduced 2-3 years ago show almost no noticeable jitter, while new ones give about 0.5% maximum. It seems that significant fluctuation appeared from 4.0 RC oscillator version. It is hard to tell the reason why it is so. Probably it is a result of some efficiency improvements, that resulted in…

Continue reading

One click project with USBasp programmer

UASBASP is an efficient programmer for Atmel AVR microcontrollers that works under multiple operating systems including Linux, Mac OS X, and windows. How to assemble this simple programmer read the previous article in this site or go to the original website of Thomas Fischl. As it was mentioned USBasp has two available programming frequencies – high when jumper disconnected and low when connected. These frequencies are 375kHz and 8kHz. To use 375kHz speed, target MCU’s clock frequency has to be at least 1.5MHz – four times higher than SCK. If the target is clocked with low-speed oscillator like 32kHz, then jumper has to be connected as it gives 8kHz SCK which is also 4*8kHz=32kHz.

Continue reading

DIY AVR Graphical LCD test board

Once I’ve got several HQM1286404 graphical LCDs around so I decided to build a prototyping board where I could easily plug LCD to it, read data via ADC and display graphs, plug keypad if needed for some menu functions. Earlier I was testing graphical LCD on prototype breadboard, but dealing with multiple wires (GLCD needs 20 of them) resulted in many failures. It is OK to do simple tasks, but more complex applications require a more stable platform. So here it is: This type of GLCD is standard 128×64 pixel matrix controlled by KS0108 LCD controller. Ones I have comes with smaller non-common pin-header where pins have 2mm step, so I had to draw it for Eagle library which you will find in project files. I decided to make a simple circuit so it could fit in 100x50mm single sided PCB. As base MCU I used Atmega16 which can be replaced with Atmega32 which is pin compatible with Atmega16 have more data memory.

Continue reading

Testing AVR universal bootloader on Atmega128

After project source code is developed there is always a need to flash it to the microcontroller. There are a few ways to program AVR microcontrollers. Usually, we used to flash AVR’s with ISP adapter (or another programmer) that is not always handy especially when designing device for the end user who doesn’t have ISP adapter or doesn’t know much about flashing MCU. So it is better to flash a bootloader program AVR MCU once with programming adapter and later load firmware interactively when starting AVR. Bootloader not only allows to update firmware without programmer but also enables to load different programs for different purposes depending on situation flexibly. But enough about this. So my purpose today is to test AVR universal bootloader which is being developed by Shaoziyang. His aim was to create a universal bootloader that works on different types of AVR microcontrollers with minimal code modifications. Bootloaders you can find on the Internet are mostly available for particular types of microcontrollers, and nobody wants to do a lot of modifications to adapt to different MCU when needed. This AVR universal bootloader can support most types of AVR microcontrollers (Mega series), which have self-programmable capability, boot section and…

Continue reading

AVR based TDA7313 Audio processor control

TDA7313 audio processor has been used for more than ten years in the industry because of its simplicity, functionality, and proper parameters like low distortion, and low noise. Chip is based on BIPOLAR/CMOS technology and can be used in various applications, including car radios, Hi-FI, simple mixers. TDA7313 chip has three external stereo inputs that allow multiplexing three incoming sound sources. It has volume control with steps of 1.25dB, Treble and BASS control, Loudness function. Each of the four outputs has a distinct control that allows balancing outputs. A chip can be controlled via I2C (TWI) interface. Description of Audio processor The idea of this project was to construct an independent audio processor which can be embedded in any sound system with the ability to control settings with simple button interface with menu preview in LCD. The intent was to cover all audio-processor functionality within the LCD menu.

Continue reading