From 71bf07341af90944cd8cbd598bdab143104ba8fc Mon Sep 17 00:00:00 2001 From: Ivan Stefanov Date: Mon, 30 Nov 2020 01:47:16 +0200 Subject: [PATCH] Update Timer_1_COMPA_Toggle_pin_13_at_1Hz.ino --- .../Timer_1_COMPA_Toggle_pin_13_at_1Hz.ino | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Examples/Timer_1_COMPA_Toggle_pin_13_at_1Hz/Timer_1_COMPA_Toggle_pin_13_at_1Hz.ino b/Examples/Timer_1_COMPA_Toggle_pin_13_at_1Hz/Timer_1_COMPA_Toggle_pin_13_at_1Hz.ino index d51c257..d603aa4 100644 --- a/Examples/Timer_1_COMPA_Toggle_pin_13_at_1Hz/Timer_1_COMPA_Toggle_pin_13_at_1Hz.ino +++ b/Examples/Timer_1_COMPA_Toggle_pin_13_at_1Hz/Timer_1_COMPA_Toggle_pin_13_at_1Hz.ino @@ -36,13 +36,13 @@ void loop() { // put your main code here, to run repeatedly: } -// Timer1 Interrupt Service Routine (ISR) -// Toggle pin 13 (LED) every 1s -ISR(TIMER1_COMPA_vect) { - /* - * Generates pulse wave of frequency 1Hz/2 = 0.5Hz - * Takes two cycles for full wave - toggle high then after 1s toggle low after 1s repeat - */ +/* + Timer1 Interrupt Service Routine (ISR) + Toggle pin 13 (LED) every 1s + Generates pulse wave of frequency 1Hz/2 = 0.5Hz + Takes two cycles for full wave - toggle high then after 1s toggle low after 1s repeat +*/ +ISR(TIMER1_COMPA_vect) { if (toggle == 1) { digitalWrite(13, HIGH); toggle = 0; -- 2.39.5