QUESTIONS:-
1) Print a character on lcd
2) Print your name
3) Print a to z
4) Blink a character on lcd
5) Print a b c d…z on only 1 coordinate after delay of 100ms
6) Moving name
7) Print name on pressing switch
8) Make clock
9) Make calendar: having condition of leap year and leap year of century, each month having appropriate days.
SOLUTION TO ASSIGNMENT
I WILL BE USING PORT C BY
DEFAULT FOR INTERFACING LCD
1. Print
a character on lcd
while (1)
{
lcd_gotoxy(0,0); // 1st coordinate of lcd
lcd_putchar('A');
}
2. Print your name
while (1)
{
lcd_gotoxy(0,0); // 1st coordinate of lcd
lcd_putsf("katrina");
}
3. Print a to z
a=65;
b=0;
c=0;
while (1)
{
// intialise b
as integer variable at top of
program
lcd_gotoxy(b,c);
lcd_putchar(a);
delay_ms(100); // header file delay.h
a++;b++;
if(a==91){a=65;}
if(b==16){c++;b=0;}
if(c==2){c=0;}
}
}
//a is taken as 65 as ascii
value of 'a' is 65
//b specifies coloumn number
//c specifies row in lcd
4.
while (1)
{
lcd_gotoxy(0,0);
lcd_putchar('a');
delay_ms(100);
lcd_clear();
delay_ms(100);
}
5. Print a b c
d…z on only 1 coordinate after delay of
100ms
b=65;
// intialise b as integer
variable at top of program
while (1)
{
lcd_gotoxy(0,0); // 1st coordinate of lcd
lcd_putchar(b);
b++;
delay_ms(100); // header file delay.h
}
}
//b is taken as 65 as ascii
value of a is 65
6. Moving name
a=0;b=0;
while (1)
{
lcd_gotoxy(b,a);
lcd_putsf("anshul");
b++;
if(b==10){b=0;}
delay_ms(100);
lcd_clear();
}
}
7.
DDRB.0=0;
while (1)
{
if(PINB.0==1)
{
lcd_gotoxy(0,0);
lcd_putsf("anshul");
}
}
}
CLOCK AND CALENDER : DO
YOURSELF…IF YOU WANT PROGRAM, COMMENT
YOUR EMAIL BELOW AND I WILL SEND IT
display your name in 2x16 LCD using ATmega 8
ReplyDeleteabhishekarmaan91@gmail.com ..
ReplyDeletecan u plz send me the program to make stop watch n calender with atmega 16..
thnk u
kumarankur860@ gmail.com ..
ReplyDeletecan u plz send me the program to make stop watch n calender with atmega 16..
thnk u
samshankya@gmail.com
ReplyDeletepls send the program for clock and calendar
tapaskumar61@gmail.com
ReplyDeleteplz send me the program for clock & calendar.....
thank you....
Plz send me the program for clock and calender
ReplyDeletearkasur80@gmail.com
ReplyDeleter4saumya@gmail.com I want program for calendar
ReplyDeletesumitchamp1995@gmaio.com
ReplyDeleteI want the clock and calendar program
pavanirajitha777@gmail.com
ReplyDeleteplzz send me clock and calendar