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.