mirror of
https://github.com/nealey/hw-rollerderby-scoreboard
synced 2025-01-17 04:14:36 -07:00
Accurate with 16MHz crystal
This commit is contained in:
parent
4dd06dfa5f
commit
65cbd98027
2 changed files with 4 additions and 2 deletions
2
avr.h
2
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))
|
||||
|
||||
|
|
4
main.c
4
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;
|
||||
|
|
Loading…
Reference in a new issue