Tag Archives: AVR

Open source color video game development system based on AVR

This project describes an open source color game development platform based on an AVR microcontroller. You can code a color, high resolution, smooth video game, like Super Mario Bros or Commander Keen on this system. All video processing is done by software in background using interrupts, with no external active components. You only need to connect the AVR to a RGB monitor. AVRs don’t have enough RAM for direct video memory, and therefore a TILE based graphics driver is used. In TILE, the display screen is divided into X*Y tiles and each tile graphic is addressed from reference table located in RAM, whereas the true bitmaps are stored somewhere else, in a ROM for example.

“The AVGA instantly turns any Mega AVR to a powerful game console.”

Read more

AVR: self-monitoring its own power supply

How would a microcontroller know how it’s own supply voltage is changing? Well, most microcontrollers have built in analog-to-digital converters that can read an input analog voltage and convert it to a digital number. So, it might be suggestive to use a similar technique. But the problem is, any ADC operation requires a reference voltage, which in most cases, is either the source voltage or one derived from it. So, how would you monitor the source voltage through ADC that uses the same source voltage as reference?

The following article describes a way to do this without using any additional external components. It uses the internal band gap reference voltage of an AVR microcontroller to correct any error in the measurement of the supply voltage through the built in ADC. The band gap voltage of AVR is fixed 1.1 V that you can feed to ADC input using software. You know what would be the ADC output for this fixed band gap input voltage, with the known supply voltage as reference. If you find any drift in the measurement output, you can calculate the drift in the reference voltage, and so in the supply voltage.


50 MHz range frequency counter using AT90S2313

A wide range frequency meter is an useful tool for an electronics lab. This projects describes a frequency meter based on AT90S231 microcontroller that can measure input frequencies up to 50 MHz. The measured frequency is displayed on 6 digit multiplexed seven segment displays.

It uses two external high-speed 8-bit counters (74HC590) in cascade to count the incoming pulses. Depending upon the input frequency, the counting interval for the external counter circuit is changed by the microcontroller for getting better accuracy. The firmware for AT90S231 is provided in C.
Read more

External Interrupts in Atmega AVR

An interrupt is a process of forcing a microcontroller to temporarily suspend the current job and perform a higher priority task. Once the new request is served, the micrcontroller resumes the original task. Interrupts are powerful tools in embedded system design, and special cares must be taken while implementing them. This tutorial teaches how to use an external and pin change interrupts on an AVR microcontroller.


Using Timer interrupts in AVR

Timers are vital in embedded systems design. Timer module inside a microcontroller can be used to measure time interval, generate exact duration pulse, count external pulses, etc. Their proper use could reduce the overall consumption of available resources. This tutorial from Protostack teaches you about the 8 and 16 bit timers on an ATmega168 microcontroller. The concept of Timer is fundamental and is similar with other microcontrollers too.

Recent Entries »