Mini Project Report

14
Mini Project Report Design of Hardware lock for Software Developers to prevent piracy of software Team Members Bhargavi Sridhar R.Mahalakshmi E.Malathy S.Shwetha Department: Electrical and Electronics Engineering

Transcript of Mini Project Report

Page 1: Mini Project Report

Mini Project Report

Design of Hardware lock for Software Developers

to prevent piracy of software

Team Members

Bhargavi Sridhar

R.Mahalakshmi

E.Malathy

S.Shwetha

Department: Electrical and Electronics Engineering

III year

Page 2: Mini Project Report

Abstract:

Nowadays Software are getting pirated .To avoid piracy and to build secured

products the embedded industry is looking for a right solution like a Piracy Preventer.

This project employs a hardware interface to prevent software from getting pirated. The

Hardware interface is a plug and play device connected to the PC port and the license

code is embedded. The interface consists of an integrated encryption engine to aid to

security policies.

Hardware Requirements:

AT89S51 Microcontroller

RS232(Serial Conversion)

2x16 LCD Display

Buzzer(Alert)

5V power supply unit

Micro-controller Features:

In our project we are using the AT89S51 micro-controller. The

AT89S51 provides the following standard features: 4K bytes of Flash memory, 128 bytes

of RAM, 32 I/O lines, two 16-bit timer/counters, five vector two-level interrupt

architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition,

the AT89S51 is designed with static logic for operation down to zero frequency and

supports two software selectable power saving modes. The Idle Mode stops the CPU

while allowing the RAM, timer/counters, serial port and interrupt system to continue

functioning. The Power-down Mode saves the RAM contents but freezes the oscillator

disabling all other chip functions until the next hardware reset.

Page 3: Mini Project Report

Assets of AT89S51:

The Micro-controller AT89S51 has many prominent features suitable

for such interfacing and controlling applications. They are also suitable for serial port

interfacing which is very much needed for data transfer. The features of AT89S51 are

listed below

Compatible with MCS®-51 Products

4K Bytes of In-System Programmable (ISP) Flash Memory

4.0V to 5.5V Operating Range

Fully Static Operation: 0 Hz to 33 MHz

Three-level Program Memory Lock

128 x 8-bit Internal RAM

32 Programmable I/O Lines

Two 16-bit Timer/Counters

Six Interrupt Sources

Full Duplex UART Serial Channel

Low-power Idle and Power-down Modes

Interrupt Recovery from Power-down Mode

Watchdog Timer , Dual Data Pointer

Power-off Flag , Fast Programming Time

2x16 LCD

Our 2-line 16-Character LCD reatures easy to read messages and prompts for

users and installers simplying syste operation and programming.

A built in speaker provides status and alarm sounds to alert persons on the

premises of the system status

LCD Features

Page 4: Mini Project Report

Attractive small touchpad with large buttons arranged in familiar phone layout

Complete interface for programming and system operation

Display brightness and contrast adjustments

UART:

The UART controller is the key component of the serial communications sub-

system of a computer.

The UART takes bytes of data and transmits the individual bits in a sequential

fashion.

At the destination, a second UART reassembles the bits into complete bytes

RS232

In telecommunications, RS232(Recommended standard 232) is a standard for

serial binary data signals connecting between a DTE and DCE .

It is commonly used in computer serial ports

Features of MAX-232

Meet or Exceed TIA/EIA-232-F and ITU Recommendation V.28

Operate With Single 5-V Power Supply

Operate Up to 120 kbit/s

Two Drivers and Two Receivers

±30-V Input Levels

Low Supply Current . . . 8 mA Typical

Designed to be Interchangeable With Maxim MAX232

Block Diagram:

Page 5: Mini Project Report

Power Supply Block Diagram:

Power Supply – Circuit Description:

The operation of power supply circuits built using filters, rectifiers, and

then voltage regulators. Starting with an AC voltage, a steady DC voltage is obtained by

rectifying the AC voltage, Then filtering to a DC level, and finally, regulating to obtain a

desired fixed DC voltage. The regulation is usually obtained from an IC voltage regulator

Unit, which takes a DC voltage and provides a somewhat lower DC voltage, Which

remains the same even if the input DC voltage varies, or the output Load connected to the

DC voltage changes.

Codings Used:

#include<reg51.h>

Renesas R8C/Tiny Chip

RS-232Unit

Multi Software Key verification

LCDDisplay Unit

`

JTAG

Power supply

Page 6: Mini Project Report

char trans=0,ch;sbit RS = P3^5;sbit RW = P3^6;sbit lcd_e = P3^7;void lcd_init(void);void lcd_cmd(unsigned char);void lcd_display(unsigned char);void delay(void);code unsigned char msg_a[] = {"SOFTWARE PIRACY"};code unsigned char msg_a1[] = {" HARDWARE LOCK "};code unsigned char f1[] = {" SOFTWARE "};code unsigned char s1[] = {" DETECTED "};code unsigned char f2[] = {" SOFTWARE "};code unsigned char s2[] = {" NOT AVAILABLE "};code unsigned char key1[25]={"SECRET CODE1000123451356"};code unsigned char key2[25]={"SECRET CODE1000123451357"};code unsigned char key3[25]={"SECRET CODE1000123451358"};code unsigned char key4[25]={"SECRET CODE1000123451359"};void delayms(int h){int i,j;for(i=0;i<h;i++)for(j=0;j<1000;j++);}void lcd_cmd(unsigned char value){ P1 = value; RS = 0; RW = 0; lcd_e = 1; delay(); lcd_e = 0;}void lcd_display(unsigned char dat){ P1 = dat; RS = 1; RW = 0; lcd_e = 1; delay(); lcd_e = 0;}void delay(void){ unsigned int a; for(a=0;a<=3000;a++);

Page 7: Mini Project Report

}void lcd_init(void){ unsigned char i; lcd_cmd(0x38); delay(); lcd_cmd(0x0c); delay(); lcd_cmd(0x06); delay(); lcd_cmd(0x01); delay(); lcd_cmd(0x80); delay(); delay(); i=0; while(msg_a[i]!='\0') { lcd_display(msg_a[i]); i++; } delay(); lcd_cmd(0xc0); delay(); delay(); i=0; while(msg_a1[i]!='\0') { lcd_display(msg_a1[i]); i++; } delay();}void main(){int b,i;lcd_init();SCON=0x50;TMOD=0x20;TH1=0xFD;TR1=1;TI=1;EA=1;ES=1;while(1){

Page 8: Mini Project Report

if(trans>=1) { lcd_cmd(0x80); delay(); delay(); i=0; while(f1[i]!='\0') { lcd_display(f1[i]); i++; } delay();lcd_cmd(0xc0); delay(); delay(); i=0; while(s1[i]!='\0') { lcd_display(s1[i]); i++; } delay(); }

if(trans ==1){

for(b=0;b<24;b++) { SBUF = key1[b];

delayms(1); trans =0; lcd_cmd(0x8D); delay(); delay(); lcd_display(0x41); delay(); delay(); }

} else if(trans ==2)

{for(b=0;b<24;b++)

{SBUF = key2[b];delayms(1);//trans =0;

lcd_cmd(0x8D);

Page 9: Mini Project Report

delay(); delay(); lcd_display(0x42); delay(); delay(); }

}else if(trans ==3){for(b=0;b<24;b++)

{SBUF = key3[b];delayms(1);//trans =0;

lcd_cmd(0x8D); delay(); delay(); lcd_display(0x43); delay(); delay(); } }

else if(trans ==4){for(b=0;b<24;b++)

{SBUF = key4[b];delayms(1);//trans =0;

lcd_cmd(0x8D); delay(); delay(); lcd_display(0x44); delay(); delay(); }

} else { lcd_cmd(0x80); delay(); delay(); i=0; while(f2[i]!='\0') { lcd_display(f2[i]);

Page 10: Mini Project Report

i++; } delay();lcd_cmd(0xc0); delay(); delay(); i=0; while(s2[i]!='\0') { lcd_display(s2[i]); i++; } delay(); }}}void seriall(void) interrupt 4{if(RI==1){ch = SBUF ;switch(ch){

case 0x41:trans =1;break;case 0x43:trans =2;break;case 0x45:trans =3;break;case 0x47:trans =4;break;case 0x49:trans =5;break;

}SCON = 0x50;}RI=0;SCON = 0x50;}

Applications

Page 11: Mini Project Report

TIA/EIA-232-F

Battery-Powered Systems

Terminals

Modems and computers

Conclusion Thus the embedded c program is executed in order to generate the code

which has to be fetched from the micro controller in order to open the required software

and hence the software piracy is prevented.