Discussion in "8051 Discussion Forum" started by    rearthur2003    Jun 14, 2009.
Sun Jun 14 2009, 08:52 PM
#1
you can give it a try
#include "uart.h"
#include "uart.c"

void delay_rony(unsigned int delay_val)
{	
	int temp = 0;
	do
		{
			temp++;
		}
		while(temp<=delay_val);
}

void main(void)
{
	//int i;
	unsigned char usr1, usr2, usr3, usr4, usr5, pass1, pass2, pass3, pass4, pass5;
	while(1)
	{
	uart_init();
start:
	uart_string("******************************\n\r");
	uart_string("  8051 AUTHENTICATION SYSTEM  \n\r");
	uart_string("******************************\n\r\n\r");
	delay_rony(50000);
	uart_string("Username: ");
	usr1 = uart_receive();
	uart_send(usr1);
	usr2 = uart_receive();
	uart_send(usr2);
	usr3 = uart_receive();
	uart_send(usr3);
	usr4 = uart_receive();
	uart_send(usr4);
	usr5 = uart_receive();
	uart_send(usr5);
		if(uart_receive() == 0x0d)
			{
				if(usr1==0x61&&usr2==0x64&&usr3==0x6d&&usr4==0x69&&usr5==0x6e)
				{
				uart_string("\n\r");
				goto passwd;
				}
				else
				{
				uart_string("\n\r\n\rInvalid User!!!\n\r");
				goto start;
				}
			}
		else
			{
				uart_string("\n\r\n\rYOU HAVE EXCEEDED MAX NUMBER OF CHARS. \n\r");
			}
		}
passwd:
	uart_string("\n\rPassword: ");
	pass1 = uart_receive();
	uart_string("*");
	pass2 = uart_receive();
	uart_string("*");
	pass3 = uart_receive();
	uart_string("*");
	pass4 = uart_receive();
	uart_string("*");
	pass5 = uart_receive();
	uart_string("*");
		if(uart_receive() == 0x0d)
			{
				if(pass1==0x61&&pass2==0x64&&pass3==0x6d&&pass4==0x69&&pass5==0x6e)
				{
				uart_string("\n\r\n\rACCESS GRANTED\n\r");
				}
				else
				{
				uart_string("\n\r\n\rInvalid Password!!!\n\r");
				goto start;
				}
			}
		else
			{
				uart_string("\n\r\n\rYOU HAVE EXCEEDED MAX NUMBER OF CHARS. \n\r");
			}
		uart_receive();

}
Tags 8051 uart based authentication systemuart access system
Sun Jun 14 2009, 10:49 PM
#2
Hello rearthur2003

Thanks for the post.
Could you explain a bit more about how your program is used ?.
Mon Jun 15 2009, 01:26 AM
#3
This works with serial port on baud rate 4800 once connected to you will need to authenticate yourself before doing anything, it can be added to uart based code. username is admin and password is admin. hope you like it.
Tue Jun 16 2009, 02:19 PM
#4
good work
Why dont you make an application using this code, will be a good project and can help others too
 rearthur2003 like this.
Tue Jun 16 2009, 05:15 PM
#5
i am working on it, i am working on something to control doors lights in the home so i can do everything from my pc so i dont get interrupted. anyways thanks for the comment

Get Social

Information

Powered by e107 Forum System

Conversation

Thu Jun 11 2020, 06:27 AM
anudee
sir could please send the code for I2C and wifi interfacing with 8051
scena
Tue May 19 2020, 10:29 PM
Does anyone have microcontroller programming software for STC15F104W (core 8051, 4 k, 128 byte, 6 I/O pin, UART ... DIL8), that works?
Sat May 02 2020, 07:38 PM
Tamu Gurung
Hi I am looking for a assembly language program for a digital decimal counter. Time counts max limit of 2 mins starting from 2.00 mins and ending at 0.00. time is to be displayed on 4 7-segment LED displays. Edsim51 simulator to be used. Thanks
Wed Mar 25 2020, 01:39 PM
Tajammul
Sir kindly send the code file i2c for 8051
ExperimenterUK
Fri Mar 13 2020, 10:36 PM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 12:55 PM
ABEBE
how can get hadwere of this project
Rohitnani
Sat Mar 07 2020, 05:11 PM
Sir, Could you please send me the zip file input password....
Wed Feb 26 2020, 04:58 PM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 10:12 AM
Pearl Olin
Hello,
Wed Jan 22 2020, 06:16 PM
MINU CHAUDHARY
I m getting errors while simulation process during interfacing socket output and lcd... Can i get the report of ur project which is same as us.

Downloads

Comments

Mirza123
Thu Jun 25 2020, 03:46 PM
eunicelove124
Mon Jun 22 2020, 03:03 PM
cerouno
Tue Jun 16 2020, 05:10 PM
Marce
Sat Jun 13 2020, 09:43 PM
Davidthils
Thu May 21 2020, 12:44 PM
Jakeror
Thu May 21 2020, 01:28 AM
motorCar
Wed May 20 2020, 07:05 PM
Vordrync
Wed May 20 2020, 11:52 AM

Online

Guests: 76, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 38215
Newest member: Mirza123