Programming with on-chip Timers/Counters
Procedure
Simulator:
- step 1 : Select Operating Frequency.
- step 2 : Select Timer.
- step 3 : Select Prescaler.
- step 4 : Select Enable Interrupt.
- step 5 : Enter ON Delay (in mS).
- step 5 : Enter OFF Delay (in mS).
- 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 : Click on selected output pin terminal(blue circle) and click on anode terminal(blue circle) for connection of the selected output pin with anode or vice versa.
- step 11 : Click on cathode terminal(blue circle) and click on resistor terminal(blue circle) for connection of cathode with resister or vice versa.
- step 12 : Click on "Check Connection" button.
- step 13 : If connection is wrong, click on "Reset Connection" button and follow step 10, 11 and 12.
- step 14 : If connection is successful, click on Run Button.
- step 15 : Output LED is on. Observe the square wave graph.
- step 16 : Click on "REFRESH" button to re-executing the experiment.