display string on 16*2 lcd without using headrer file
#include <avr/io.h>
#include<util/delay.h>
int main(void)
{
DDRC=0b11111111;
DDRD=0b11111111;
PORTD=0x38;
PORTC=0b00000100;
_delay_ms(10);
PORTC=0b00000000;
_delay_ms(10);
PORTD=0x0E;
PORTC=0b00000100;
_delay_ms(10);
PORTC=0b00000000;
_delay_ms(10);
PORTD='S';
PORTC=0b00000101;
_delay_ms(10);
PORTC=0b00000001;
_delay_ms(10);
PORTD='O';
PORTC=0b00000101;
_delay_ms(10);
PORTC=0b00000001;
_delay_ms(10);
PORTD='N';
PORTC=0b00000101;
_delay_ms(10);
PORTC=0b00000001;
_delay_ms(10);
PORTD='U';
PORTC=0b00000101;
_delay_ms(10);
PORTC=0b00000001;
_delay_ms(10);
}
#include<util/delay.h>
int main(void)
{
DDRC=0b11111111;
DDRD=0b11111111;
PORTD=0x38;
PORTC=0b00000100;
_delay_ms(10);
PORTC=0b00000000;
_delay_ms(10);
PORTD=0x0E;
PORTC=0b00000100;
_delay_ms(10);
PORTC=0b00000000;
_delay_ms(10);
PORTD='S';
PORTC=0b00000101;
_delay_ms(10);
PORTC=0b00000001;
_delay_ms(10);
PORTD='O';
PORTC=0b00000101;
_delay_ms(10);
PORTC=0b00000001;
_delay_ms(10);
PORTD='N';
PORTC=0b00000101;
_delay_ms(10);
PORTC=0b00000001;
_delay_ms(10);
PORTD='U';
PORTC=0b00000101;
_delay_ms(10);
PORTC=0b00000001;
_delay_ms(10);
}
Comments
Post a Comment