diff --git a/avr.h b/avr.h index ac611f0..3031cae 100644 --- a/avr.h +++ b/avr.h @@ -8,7 +8,7 @@ // Make sure JIFFY_uS is going to be an integer and not a float! #define JIFFIES_PER_SECOND 100 -#define JIFFY_uS (10000000 / JIFFIES_PER_SECOND) +#define JIFFY_uS (1000000 / JIFFIES_PER_SECOND) #define bit(pin, bit, on) pin = (on ? (pin | bit) : (pin & ~bit)) diff --git a/main.c b/main.c index de16dc4..8f867b8 100644 --- a/main.c +++ b/main.c @@ -249,7 +249,9 @@ loop() update_controller(); if (jiffies % (JIFFIES_PER_SECOND / 10) == 0) { - PORTB ^= 0xff; + if (jiffies % JIFFIES_PER_SECOND == 0) { + PORTB ^= 0xff; + } switch (state) { case SETUP: break;