diff --git a/module01/ex00/main.c b/module01/ex00/main.c index 247c7c8..c29a1f6 100644 --- a/module01/ex00/main.c +++ b/module01/ex00/main.c @@ -49,17 +49,18 @@ #define BUTTON2 (D, SW2) // TIME -#define PRESCALE_VALUE 1024 +#define PRESCALE_VALUE 1024 // can be 1, 8, 64, 256, 1024 +// table 16-5 : prescale sets #if (PRESCALE_VALUE == 1) - #define PRESCALE_SET (1 << CS10) + #define PRESCALE_SET (0<= TIME_MS(500)) { // 16.11.4 : read timer with register TCNT1 (read/write allowed), that combines two 8 bits registers diff --git a/module01/ex01/main.c b/module01/ex01/main.c index 0f52965..a097c97 100644 --- a/module01/ex01/main.c +++ b/module01/ex01/main.c @@ -49,17 +49,18 @@ #define BUTTON2 (D, SW2) // TIME -#define PRESCALE_VALUE 1024 +#define PRESCALE_VALUE 1024 // can be 1, 8, 64, 256, 1024 +// table 16-5 : prescale sets #if (PRESCALE_VALUE == 1) - #define PRESCALE_SET (1 << CS10) + #define PRESCALE_SET (0<