Monday, November 18, 2013

AVR REGISTER ANDROID APP


Instead of being a micro-controller freak I always was afraid of remembering the names of the registers used in the micro-controllers and remembering the bits in them was even more difficult for me. So I decided to come up with a handy android app which can help me with this problem and here is the link to AVR Register, an app on android platform. AVR Register is based on ATMEL's MEGA series of controllers. It's a very handy app to help you out when you need to remind which bit of which register is used to do what. Every bit has been explained in a very brief manner. Below are some of the screenshot for the app.







Monday, February 18, 2013

AVR Control Android App



If you want to learn AVR controller and you are an android user but you don't want to go through those hectic books available in market, then you can do it smartly................with your android device. The app discusses the functionality of AVR controller in an interactive manner and explains it using few basic codes in C language.



You just need to go to Google Play and download AVR Control app on your android device

Monday, February 11, 2013

Android ADT Bundle



The Android SDK provides you the API libraries and developer tools necessary to build, test, and debug apps for Android.

For rookies, who have not started working on Android yet and wants to try their hands at it, ADT bundle is a tool for quickly starting to develop android applications. With this you don't need to go through the hectic process of installing plugins for Eclipse separately.  The Android SDK includes the essential Android SDK components and a version of the Eclipse IDE with built-in ADT (Android Developer Tools) to streamline your Android app development.


With a single download, the ADT Bundle includes everything you need to begin developing apps:
  • Eclipse + ADT plugin
  • Android SDK Tools
  • Android Platform-tools
  • The latest Android platform
  • The latest Android system image for the emulator

Sunday, February 3, 2013

Switch and LEDs

In this tutorial I am going to show you, how to blink a LED whenever a switch is pressed using AVR micro controller. I am using ATmega128/ ATmega64 (both of the micro controller can be used interchangeably as they differ in the size of flash memory only). The LED is connected to pin 0 of PORTC (PC0) and the switch is connected to the pin 0 of PORTA (PA0) of the micro controller. I have assumed that the LED is connected in sinking logic i.e. whenever +5V is provided by the controller the LED will be OFF and whenever the 0V is supplied the LED will be ON and the switch is ACTIVE LOW i.e. it provides a 0V on being pressed.

The step to program are as follow-

1. Set the corresponding PORTs as input or output.
2. Enable pull-up resistors for the input pin.
3. Check for the input continously.
4. Whenever the switch is pressed, turn on the LED.

Here is the code:

//Include AVR Header file
#include"avr/io.h"

void main()
{ 
//Set pin 0 of PORTC as output
DDRC |= (1<<0);

//Set pin 0 of PORTA as input
DDRA &=~ (1<<0);

//Enable pull-up resistor so that false inputs can be ignored
PORTA |= (1<<0);

  //infinite loop
while(1)
{
//Check for any input if an input (0v) is detected, turn ON the LED
if( !(PINA & (1<<0)))
PORTC &=~ (1<<0);

else //turn OFF the LED
PORTC |= (1<<0);
}
}
In place of LED you can connect different output devices such as Buzzer, Relays etc.

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews