Programming for I/O interfacing (LED and Switch interfacing)

Procedure

Simulator :
  • step 1 : Select Input Pin For Switch.
  • step 2 : Select Output Pin For LED.
  • step 3 : Select Switch Configuration.
  • step 4 : Select LED Configuration.
  • step 5 : Click on "GENERATE CODE" button to generate code.
  • step 6 : Click on "COMPILE" button to compile code.
  • step 7 : Click on "EXECUTE" button to execute code and goto mimic.
  • step 8 : If you want to download code click on "DOWNLOAD" button.
  • step 9 : The MIMIC will open on left side of screen.
  • step 10 : Connect the Output Pin to the Anode.
  • step 11 : Click on the cathode terminal (red circle) and then click on the resistor terminal (red circle) to connect the cathode with the resistor or vice versa.
  • step 12 : Click on the selected input pin terminal (blue circle) and then click on the switch terminal (blue circle) to connect the input pin with the switch terminal or vice versa.
  • step 13 : Click on "Check Connection" button.
  • step 14 : If connection is wrong, click on "Reset Connection" button and follow steps 10, 11, 12 and 13.
  • step 15 : If connection is successful, click on Switch available on the screen with black color and hold the switch for a few seconds.
  • step 16 : While holding the switch, Output LED is on. Observe the square wave graph to see how the output changes until you complete the observation.
  • step 17 : Click on "REFRESH" button to re-executing the experiment.