









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A declaration and acknowledgment for a microcontroller-based encryption project report submitted by Sabrina Jalil, Fahim Istiak, Moshiur Rahman Faisal, Rubayet Kabir Tonmoy, Nazmul Hasan Shaikot, and Awsaf Mahmood Lisan. The report details the implementation of an encryption table using a microcontroller, using single pole, double throw switches and LEDs to represent input and output statuses. The project description includes the use of Arduino IDE and Proteus software, and a simple flow chart of the encryption process. The document also includes the derived Boolean expressions and equations for each output.
Typology: Assignments
1 / 16
This page cannot be seen from the preview
Don't miss anything!










This is to clarify that this report is our original work. No part of this report has been copied from any source or has been used before for any other course related purpose. Any material reproduced in this report has been properly acknowledged.
Sincerely,
We would like start off by thanking the Almighty for giving us the strength to complete the project and the report. We are also deeply grateful to all of our teachers who have supported us and provided us the knowledge to carry out this project.
It is imperative to show our appreciation for our honorable faculty member Dr. Dihan Md. Nuruddin Hasan who has given us proper guidelines to prepare the project. His undivided attention and advices have helped us to achieve this milestone. We are also very grateful to the department of Electrical and Computer Engineering of North South University for providing us with a course like CSE 331 where we learn about microprocessor and implement our knowledge by working on a project like this.
We thank our friends and family for their moral support throughout the project.
Encryption is a method of converting information into a secret code that requires a โkeyโ or password to decode. This process is used by many websites that transmit credit card and bank account numbers to prevent identity theft and fraud.
In this project we input a 4-bit data and the microcontroller converts it to a 4-bit encrypted data. The output corresponds to the input given in the table. 0โs are considered low and 1โs are considered high. Single pole and double throw switch are used to configure high and low conditions of the inputs. LEDs are used to denote the output. If the LED lights up its high (1) and if it is turned off then itโs low (0).
1. Arduino IDE: The Arduino Integrated Development Environment (IDE) is a cross- platform application for Windows, macOS and Linux. It supports the languages C and C++ with special rules of code structuring. The program written with Arduino IDE is known as sketch. Arduino IDE is an open-source software that is mainly used for writing and compiling the code into the Arduino Module. It is an official Arduino software. The IDE environment mainly has the editor where the program is written and the compiler which compiles and uploads the file onto the Arduino model.
2. Proteus: Proteus is a proprietary software tool that is used for electronic design automation. It is mainly used to create schematics and electronic prints along with simulation of electronic designs.
Figure 1: Simple Flow Chart of the Encryption Process
In order to find out the required algorithm we use K-map to derive the Boolean expressions. K- maps or Karnaugh maps are used to simplify Boolean algebraic functions. There are two forms of K-map- (i) Sum of Products (SOP) and (ii) Product of Sums (POS). Either can be used according to the problem. K-map is a table like representation where the grids are filled with 0โs and 1โs according to the given problem and solved by making groups. For our project we are using SOP to find out when the output is high (1).
Equation: I 0 โI 3 โ + I 1 โI 3 โ + I 0 โI 1 โI 3 โ + I 0 โI 1 I 2
Output 4:
00 01 11 10 00 01 11 10
Equation: I 0 โI 1 โI 2 โI 3 + I 0 โI 1 โI 2 I 3 โ +I 0 I 1 โI 2 โI 3 โ + I 0 I 1 โI 2 I 3 + I 0 I 1 I 2 I 3 โ
The obtained Boolean expressions gives us the following results in C/C++ language-
Output 1: (!I 0 && !I 2 && !I 3 โ) || (!I 1 && I 2 && I 3 ) || (I0 && I1 && I3) || (I0 && I1 && I2)
Output 2: (I 2 && !I 3 ) || (I 0 && I 2 ) || (!I 0 && I 1 && !I 2 ) || (I 1 && !I 2 && I 3 )
Output 3: (!I 0 && !I 3 ) || (!I 1 && !I 3 ) || (!I 0 && !I 1 && !I 3 ) || (!I 0 && I 1 && I 2 )
Output 4: (!I 0 && !I 1 && !I 2 && I 3 ) || (!I 0 && !I 1 && I 2 && I 3 ) || (I 0 && !I 1 && I 2 && I 3 ) || (I 0 && I 1 && I 2 && !I 3 )
AB
CD
const int O2 = 9;
const int O3 = 10;
const int O4 = 11;
int I0 = 0;
int I1 = 0;
int I2 = 0;
int I3 = 0;
void setup() {
pinMode(StateI0, INPUT); pinMode(StateI1, INPUT); pinMode(StateI2, INPUT); pinMode(StateI3, INPUT); pinMode(O1, OUTPUT); pinMode(O2, OUTPUT); pinMode(O3, OUTPUT); pinMode(O4, OUTPUT);
}
void loop() {
I0 = digitalRead(StateI0);
I1 = digitalRead(StateI1);
I2 = digitalRead(StateI2);
I3 = digitalRead(StateI3);
if( (!I0 && !I2 && !I3) || (!I1 && I2 && I3) || (I0 && I1 && I3) || (I0 && I1 && I2) ){ digitalWrite(O1, HIGH); } else{ digitalWrite(O1, LOW); }
if( (I2 && !I3) || (I0 && I2) || (!I0 && I1 && !I2) || (I1 && !I2 && I3) ){ digitalWrite(O2, HIGH); } else{ digitalWrite(O2, LOW); }
if( (!I0 && !I3) || (!I1 && !3) || ( !I0 && !I1 && !I3) || ( !I0 && I1 && I2) ){ digitalWrite(O3, HIGH);
arduino uno. We simply imported the Atmega328p board in the workspace and connected the needed peripherals by importing them in similar manner. After that we flashed the Hex file onto the board and carried out our simulation. A screenshot taken during simulation of our project:
Answer: Yes, The project is working perfectly for encryption or decryption from input to output as shown in the truth table.