Programming for delay generation and effect of CPU clock
Procedure
Simulator :
- step 1 : Select clock frequency.
- step 2 : Enter Total Delay(ms) between 1 ms to 1000 ms.
- step 3 : Enter ON Delay and OFF Delay in milliseconds. The Addition of ON Delay and OFF Delay must be same as Total Delay.
- step 4 : Click on "SUBMIT" button.
- step 5 : Select Pin.
- step 6 : Select LED Configuration.
- step 7 : Click on "GENERATE CODE" button to generate code.
- step 8 : Click on "COMPILE" button to compile code.
- step 9 : Click on "EXECUTE" button to execute code and goto mimic.
- step 10 : If you want to download code click on "DOWNLOAD" button.
- step 11 : The MIMIC will open on left side of screen.
- step 12 : Click on selected pin terminal(red circle) and click on anode terminal(red circle) for connection of the selected pin to anode or vice versa.
- step 13 : Click on cathode terminal(red circle) and click on resistor terminal(red circle) for connection of cathode to resister or vice versa.
- step 14 : Click on "Check Connection" button.
- step 15 : If connection is wrong, click on "Reset Connection" button and follow step 1, 2 and 3.
- step 16 : If connection is successful, click on "Run" button.
- step 17 : Output LED is on. Observe the square wave graph.
- step 18 : Click on "REFRESH" button to re-executing the experiment.