Saturday, 17 September 2016

Token Display

Token Display: Code: #include<lpc214x.h> #define PLLE 0 #define PLLC 1 #define PLOCK 10 #define rs 16 #define rw 17 #define en 18 #define lcdport IO0SET #define lcdportclr IO0CLR void daten(void); void cmnd(void); void pllinit(void); void delay(int); void convert(unsigned long int); void lcdcmd(char); void lcddata(char); void lcdinit(void ); void lcdstring(char *); int main() {  IO0DIR=IO0DIR|(0x7f<<16);  pllinit();  lcdinit();  //PINSEL0=PINSEL0|0x20 IO0DIR=IO0DIR|(0xff<<19); PINSEL0=PINSEL0|(2<<4);//select...

GSM Based System:

GSM Based System: Code: #include<lpc214x.h> #include<string.h> #define THRE 5 #define TEMT 6 #define RDR 0 #define PLOCK 10 #define DLAB 7 #define lcdport IO0SET #define lcdportclr IOCLR0 #define rs 16 #define rw 17 #define en 18 void uart0_init() { PINSEL0|=5; U0LCR=0x83; U0DLL=97; U0DLM=0x00; U0LCR=U0LCR&~(1<<DLAB); } void delay(int ms) { T1CTCR=0x00; T1TC=0; T1PC=0; T1PR=59999; T1TCR=0x02; T1TCR=0x01; while(...

RFID Attendence System

RFID Attendence System: Code: #include<lpc214x.h> #include<string.h> #define PLLE 0 #define PLLC 1 #define PLOCK 10 #define DLAB 7 #define TEMT 6 #define DR 0 #define rs 16 #define rw 17 #define en 18 #define lcdport IO0SET #define lcdportclr IO0CLR void pll_init(void); void delay(int); void uart0_init(void); void lcd_init(void ); void daten(void); void cmnd(void); void delay(int); void lcdcmd(char); void lcddata(char); void lcdstring(char...

Friday, 16 September 2016

LINE_FOLLOWER

LINE_FOLLOWER: Code: #include<avr/io.h> #define F_CPU 8000000ul #include<util/delay.h> void main() { DDRD=0b00000000;   //set PORTC as input port DDRC=0b00111100;  //PB1, PB2, PB3, PB4 as output port int ls=0, rs=0;   // define & initialize ls, rs integer as 0 to // acquire the left sensor status in ls and right sensor // status in rs PORTD=0XFF; while(1)          // create infinite...

Mobile_Controlled_Robot

 Mobile_Controlled_Robot: Code: #include <avr/io.h> #define key2 0xfd #define key4 0xfb #define key6 0xf9 #define key8 0xf7 #define key5 0xfa #define left 0x01 #define right 0x02 #define forward 0x03 #define reverse 0x0c #define stop 0x00 #define key PINA #define direction PORTC int main(void) { DDRA=0xf0; DDRC=0xff;     while(1)     { PORTA=0xff;       if(key==key2)  direction=forward;...

Home_security_system

Home_security_system: Code: #define F_CPU 8000000UL #include <avr/io.h> #include <util/delay.h> void lcdcmd(char); void lcddata(char); void lcdcmdwrite(); void lcddatawrite(); void lcdstring(char *); void serial_init() {   UCSRB=0x18;   UCSRC=UCSRC|(1<<URSEL)|(1<<UCSZ1)|(1<<UCSZ0);   UBRRL= 0x33; } void send(char item) { UDR=item; while(!(UCSRA & (1<<UDRE))); UCSRA|=1<<UDRE; } void...

Voting_Machine:

Voting_Machine:  Code: #include <avr/io.h> #include"lcd_header.h" #define bjp PD3 #define aap PD4 #define cong PD5 #define oth PD6 #define results PD2 #define party PIND #define vote PORTC #define buzzer PA7 unsigned int count1,count2,count3,count4; unsigned char result1[3],result2[3],result3[3],result4[3]; int temp=0; char rfid[13]; void clear(); void serialinit() { UCSRB=0x18; UCSRC=0x86; UBRRL=0x33; } void beep() { PORTA|=1<<buzzer; ...

DTMF_controlled_home_appliances

DTMF_controlled_home_appliances Code:  #include <avr/io.h> #define F_CPU 8000000ul #include<util/delay.h> #define key PINC #define key1 PC4 #define key2 PC5 #define key3 PC6 #define out PORTA #define out1 PA0 #define out2 PA1 #define out3 PA2 #define lcd PORTB #define lcd_cmd PORTD void lcdcmd(char ch) { lcd=ch; lcd_cmd=0x04; _delay_ms(50); lcd_cmd=0x00; } void lcddata(char ch) { lcd=ch; lcd_cmd=0x05; _delay_ms(50); ...

Digital_Thermometer

Digital_Thermometer: Code: #include<avr/io.h> #define F_CPU 80000000 #include<util/delay.h> unsigned char arr1[10]={0X3F,0X06,0X5B,0X4F,0X66,0X6D,0X7D,0X07,0X7F,0X6F}; #include <inttypes.h> unsigned int i,j; void initadc() { ADMUX=(1<<REFS0); ADCSRA=(1<<ADEN) | (1<<ADPS2) | (1<<ADPS1) | (1<<ADPS0); } uint16_t ReadADC(uint8_t ch) { //Select ADC Channel ch must be 0-7 //ch=ch&0b00000111; ...

Bluetooth_controlled_robot

 Bluetooth_controlled_robot: Code: #include <avr/io.h> #define F_CPU 8000000ul #include<util/delay.h> #define forward 0x14 #define backward 0x28 #define left 0x10 #define right 0x04 #define stop 0x00; #define motor PORTC char str[3],i=0; void serialinit() { UCSRB=0x18; UCSRC=0x86; UBRRL=0x33; } void send(char p) { UDR=p; while(!(UCSRA & (1<<UDRE))); } void txstring(char *ptr) {   while(*ptr)  ...