Test Cases
Test Cases
Floor
1 on ground floor
1 on second floor
2 on first floor
Seven Segment Display
Inside Lift:
Floor selection buttons -3
Door Close button
Seven Segment Display
Sensors:
Ground Floor /2nd Floor -2 Sensors each
1st floor Sensors 3 sensors
Crystal oscillator of 19.6608 MHz
Motor control:
PWM
Direction
Door control
Speed at which the lift moves is proportional to the duty cycle.
For acceleration, duty cycle has to be gradually increased from 20 % to 50 %.
And for deceleration, the duty cycle reduced from 50 % to 20 %. The increase is
in steps of 10 %
Assumption :
Lift is at the ground floor initially.
Door is open initially at the end of 2 minutes a logic high should be generated
on Port 2.2 (High to be given to relay for door open).
Timer1 Overflow Mode1 for 2 minutes:
Use Timer1 in mode1 overflows 25 times in a second.
Timer 0 Overflow Mode 0 for PWM:
19.6608 x106 / 12 = 1.6384 x 106 /8192 = 200 Hz
20 Hz 0.05 s steps of 10 % - 0.005s = 200 Hz 1 overflow period
Use port pins P2.0 for PWM o/p
P2.1 for DIR
Keyboard interrupt:
Keyboard input enable register
0-standard I/O
1- Enable interrupt
Keyboard Flag register (KBF)
Set by hardware on interrupt
Cleared by software
Keyboard level select Register (9CH)
0- Low level
1-High level