Tag Archives: program

AVR Project – Relay Timer with ATmega8 AVR MCU

Timers are widely used in industrial and domestic application for automating tasks. Microcontrollers can be used to design versatile and accurate timers with ease. Here I present a simple timer that can be used to turn on/off a load after user specified time. The Timer uses a standard 16×2 lcd module for user interface (UI). User can set the time using a 3 button keypad. After that Timer is started. While count down is in progress, the time left is displayed on screen. The program use our LCD driver library more details of which can be found in here. Use avr-gcc + AVR Studio to compile. The prototype was developed using xBoard MINI, a low cost easy to use ATmega8 development board. The program was burned to the MCU’s flash memory using eXtreme Burner – AVR Software and Hardware. A basic knowledge of working with different tools of AVR development is required, so please refer to following articles. Note: Fuse Must be set as follows, HIGH FUSE=C9 LOW FUSE=FF (Very Important) If display is blank please adjust RV1 Part List 01 ATmega8-16 PU U1 02 16×2 LCD Module LCD1 03 16 MHz Crystal X1 04 BC548 Transistor Q1 05 1N4007 Diode D1 06 4.7K Resistor R1,R2 07 10K Variable Resistor VR1 08 22pF Disk Capacitor c1,c2 09 0.1uF Disk Capacitor […]

AVR Project – Digital Stop Watch with ATmega8

Hello Friends, In this tutorial we will make a "Digital Stop Watch" using an AVR ATmega8 Microcontroller. This will help you learn many concepts like Multiplexed Seven Segment Display Interfacing Using AVR Timers Using Interrupts And many others too. The code is written in C language for avr-gcc (WinAVR) . Fig.: Digital Stop Watch Prototype Steps to Build the "Digital Stop Watch" using AVR ATmega8 MCU Make the circuit according to the schematic on general purpose PCB or a BreadBoard. Make a project in AVR Studio and add a new file to the project. Copy/paste the "c" code. Set optimization as "o2" and CPU frequency as 16000000Hz. Save and Build the project. You will get a HEX file. Burn this HEX file to an ATmega8 MCU using a tool such as eXtreme Burner AVR. Set High Fuse = C9(Hex) Low Fuse = FF(Hex). How to do this depends on you programmer software. I have use a xBoard MINI development board for fast and easy prototyping. The Displays+Transistors+Key are on the Veroboard while the Core CPU unit + power supply is in the xBoard MINI. It can be programmed "In System" over USB Port using eXtreme Burner – AVR software toolkit. Fig.: Digital Stop Watch made using xBoard MINI   How to Use the "Digital Stop Watch" When initially powered up […]