Skip to main content

Posts

Showing posts with the label AVR

DC motor with L298N driver by ATmega16A

This project is about connecting a DC motor to ATmega16A. I used a variable resistor connected to A7 as an analog reference for controlling motor speed. PORTD.7 is used as a PWM port and it is connected to L298N driver ENABLE pin. We can not connect the motor directly to our micro controller because micro controller's ports are not strong enough to provide that amount of current for motor. I wrote my codes in Arduino IDE, that means I did not use codevision and do all my programming in Arduino IDE and then exported HEX file and transfered it into ATmega16A. There is a simulation in Proteus. Download link: https://drive.google.com/open?id=1Ajby-pgiQ6JoATmxOYWNndSCTNNeJvbz

Digital clock with alarm

In this project I want to show you how a digital clock can be designed with AVR micro controllers . Atmega16 chip has 3 internal timers that get their pulses from micro frequency clock unit that can be an external oscillator or internal clock. But for precision I recommend you using the external clock. This clock is not just a clock, it can be a chronometer with the precision of showing 1 percent of a second and hold unlimited time. It is also a calendar for the year of 2016 And the most interesting feature is it has alarm and you can set your alarm. for this I used a speaker that plays a song on alarm's time. You can set the time and date with push buttons and run the chronometer with the buttons on the left. This picture is about it's clock state:  Chronometer mode is here: Simulation in Proteus: here is the HEX file code exported from Codevision: https://drive.google.com/open?id=0B5WLZo9Cie21dmZQODZJcGdQVDA here is the codes in notepad: https://drive.g...

Equation solver

In this post we have a machine that I called it equation solver. As the name refers it can solve four kinds of the most popular equations. Equation degree 2, degree 3, and the equations with 2 or 3 unknown. I t supports float numbers and have a perfect speed for solving your equation.  As always I used ATmega16 and 16*2 LCD with three additional buttons on the board. It also supports negative numbers. here in the link for program in Codevision: https://drive.google.com/open?id=0B5WLZo9Cie21Y1VPdVN1bWN5ZnM here is the link for schematic in Proteus: https://drive.google.com/open?id=0B5WLZo9Cie21WjJJUlRjTGx1ZkU

Calculator with AVR

In this project we have quite a good calculator that supports all main operations like:  +   -   *   %  with integer and float numbers and even it can calculate Sin(x), Cos(x), Tan(x) and Cot(x) for all angles. This is a two line calculator that shows you what you are entering just like scientific calculators and of course it is as fast as them. You can also do multi operations at the same time. Accuracy is really acceptable due to using float numbers  and also it can do some conversions for some units like : inch-->mm mm-->inch ft-->m m-->ft F-->C C-->F Cal-->J J-->Cal. here is the program in Codevision: https://drive.google.com/open?id=0B5WLZo9Cie21WU5qaW5fcDdDRlk here is the schematic in Proteus: https://drive.google.com/open?id=0B5WLZo9Cie21Vk5SSmEzR0h5YmM                          

Binary to decimal converter

In this post there is a converter that can convert binary numbers to decimal numbers. I used 8 LED's that can show you what the number is in binary by being on or off. You give your number and then micro controller converts the number into it's decimal counterpart. LED on means 1 and LED off means 0. For example if we have number 0111010011 in binary we have 467 in decimal. here is the schematic in Proteus: https://drive.google.com/open?id=0B5WLZo9Cie21Ylh6aENWSHVuclE here is the codes in Codevision: https://drive.google.com/open?id=0B5WLZo9Cie21VFhFZDR6bVZkMEU

How to read keypad using LCD

This post is about showing how you can read a keypad and see what you just typed on it. I used a keypad as an input device and used one LCD that shows us what we just typed. We don't want to do any mathematics operation with keypad. All we want is just showing what we are typing. here is the codes in Codevision: https://drive.google.com/open?id=0B5WLZo9Cie21RGVvbzhSdHVaS1U here is the schematic in Proteus: https://drive.google.com/open?id=0B5WLZo9Cie21Y1hiR0lfOEtBV2s

Creating string with LCD

This post is about creating simple string in 2*16 LCD that is a really popular code in AVR applications and you can use it as a part of your project. I  tried to show you the practical circuit too.                    here is the program in Codevision: https://drive.google.com/open?id=0B5WLZo9Cie21aHJBWmFHdXJTQ2c here is the schematic in Proteus : https://drive.google.com/open?id=0B5WLZo9Cie21aEUtMXFvZjRlWjg

Up-Counting 1 digit 7-segment using ATmega16 AVR

This project is about 1-digit common anode 7-segment that its value increases when you press the button connected to PIND6 that is used as an input. Numbers are from 0 to 9. We have to define an array to write on 7-segment. There is a simulation in Proteus. Download link

Switch on and off a LED with AVR ATmega16

This project is about turning on and off one led by ATmega16 AVR microcontroller. One push button is used for turning LED on and one is used for turning it off. There is a simulation in Proteus.   Download link