Initially all the pins of port 2 are pulled up to Vcc. For the circuit to start operating the microcontroller will continuously check the voltage level of port 2 pins.
When the switch is depressed corresponding to a particular condition, it will provide a short circuit path to Vcc through pull up. Therefore the voltage at pin reduces to zero which is detected by the controller. Now the controller will jump to the appropriate subroutine to execute the particular case. In each subroutine the display pattern of LED’s is changed at different instants of time.
This is done in the following way:
The LED’s are controlled by updating IC 7218-A to which they are connected by means of single digit update mode.
When the subroutine is over the controller will jump again to the start of subroutine and the process continues.
At any point of time when the reset button is being pressed the ongoing condition will terminate and the program restarts.
Interfacing IC-7218 A To Microcontroller
The ports of the controller are connected to the data bus of 7218 and port 1 pins are applied as control pins (write, mode) .