0% found this document useful (0 votes)
45 views

Algorithms Satish Kumar A & Anvesh D: N E W S Yellow Green

The document discusses four algorithms: 1. A communication protocol for transmitting data packets over serial port with a specific header and checksum format. 2. A digital security lock that opens only when a specific 10-button sequence is entered correctly. 3. A state machine to control the traffic lights at a four-way intersection, with different green/yellow timings for each direction. 4. A state machine to control an elevator system with up and down buttons on each floor.

Uploaded by

satish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Algorithms Satish Kumar A & Anvesh D: N E W S Yellow Green

The document discusses four algorithms: 1. A communication protocol for transmitting data packets over serial port with a specific header and checksum format. 2. A digital security lock that opens only when a specific 10-button sequence is entered correctly. 3. A state machine to control the traffic lights at a four-way intersection, with different green/yellow timings for each direction. 4. A state machine to control an elevator system with up and down buttons on each floor.

Uploaded by

satish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Algorithms

Satish kumar A & Anvesh D


1. Communication protocol


Here the system will send the data through the serial port and the microcontroller serial port
peripheral will collect the data.
Data will be in the form of Bytes of hexadecimal numbers
In the data only some part of the data will be a valid data and remaining will be garbage
The valid data has the following protocol
Hdr1(AA)+Hdr2(CC)+record length(2Bytes)+Source address + Destination address+
command code + Data(variable size)+Checksum(2Bytes)
Record length will tell the length of stream has to be collected after it has received = src add
to checksum
Here the objective is to receive the data from the stream and copy it (all packet) to the
temporary array and to enable a flag so that data is available

2. Digital security lock
This digital security lock operates on the
following sequence of steps to open the lock

RESET+KEYIN+F2+F1+F2+F0+F0+F1+F2+ENTER
Only in this combination only, the door should be opened and in the other
combinations, it should not opened
3. Construct a state machine for the four way traffic junction with the following
a. Each way has 3 lamps RED, Yellow, Green
b. Way timings are as follows
N E W S
Yellow 3 3 3 3
Green 25 12 23 15

4. Construct the state machine for the following elevator
a. A lift with each floor has two buttons, one for UP and other for Down
System
with serial
port
Micro
controller
R
e
s
e
t

E
n
t
e
r

K
e
y
-
i
n

F
0

F
1

F
2

Algorithms
Satish kumar A & Anvesh D

Algorithms
Satish kumar A & Anvesh D
5.

You might also like