Task B
a)
Your task now is to design embedded system software (in Assembly) for simplified model of a conveyor
belt driver. The task should be solved with flowchart and writing the codes on Mplab platform.
It should also be implemented either on Picsimlab - PICGenios board or 44 pins board.
The values, a and b are based on the LSB digit your ID number. For example, if your ID number is
20032978, a = 8 and b =7. And if the value of a or b is '0', please use 5 instead. For example, if your ID
number is 20032908, a = 8 and b =5.
The task will involve the use of two (2) buttons, three (3) LEDs, one (1) 7-segment display, and one (1)
potentiometer. Depending on the state, the corresponding LED will light up, and shows a certain
display on seven segments.
STATES
FIRST: First press of the switch indicates that the device is switched on. The device goes into
the FIRST state. LED1 should light up immediately and display shows '1'
SECOND: Turning the potentiometer to $\ge$ 2 x a x 0.1 volts (but $\le$ 3 x a x 0.1) will simulate the
SECOND state in which the conveyor belt is operated in the forward direction. The SECOND state is
simulated as LED1 remains lighted up, LED2 lights up and display shows '2'
THIRD: Turning the potentiometer to $\ge$ 3 x a x 0.1 volts will simulate the THIRD state in which
the conveyor belt is operated in the forward direction and switch on the fan with b kHz with 40% duty
cycle. LED1 remains lighted up, LED2 turns off, LED3 lights up and display show '3'.
STOP: First press of the Stop button will close everything.
b)
Marking
The marking will be based on practical demo and report.
Please show your working code to a demonstrator to have the \"completion\" parts of the assessment
ticked off. The other elements of the assessment will be marked based on your submitted code,
which should be included as a project along with your other tasks.