|
@@ -22,11 +22,21 @@
|
|
#include "common.h"
|
|
#include "common.h"
|
|
|
|
|
|
/* Defines */
|
|
/* Defines */
|
|
-/* Timer2 settings */
|
|
|
|
-#define TIMER2_HZ 600
|
|
|
|
|
|
+/* Timer2 settings
|
|
|
|
+ * Prescaler (CS22/CS21/CS20 - value):
|
|
|
|
+ * 0/0/0 - stop
|
|
|
|
+ * 0/0/0 - 1 (no prescale)
|
|
|
|
+ * 0/1/0 - 8
|
|
|
|
+ * 0/1/1 - 32
|
|
|
|
+ * 1/0/0 - 64
|
|
|
|
+ * 1/0/1 - 128
|
|
|
|
+ * 1/1/0 - 256
|
|
|
|
+ * 1/1/1 - 1024
|
|
|
|
+ */
|
|
|
|
+#define TIMER2_HZ 360
|
|
#if F_CPU == 16000000
|
|
#if F_CPU == 16000000
|
|
#define TIMER2_PRESCALER 256
|
|
#define TIMER2_PRESCALER 256
|
|
- #define TIMER2_CS (1<<CS22 | 0<<CS21 | 0<<CS20)
|
|
|
|
|
|
+ #define TIMER2_CS (1<<CS22 | 1<<CS21 | 0<<CS20)
|
|
#elif F_CPU == 8000000
|
|
#elif F_CPU == 8000000
|
|
#define TIMER2_PRESCALER 64
|
|
#define TIMER2_PRESCALER 64
|
|
#define TIMER2_CS (0<<CS22 | 1<<CS21 | 1<<CS20)
|
|
#define TIMER2_CS (0<<CS22 | 1<<CS21 | 1<<CS20)
|
|
@@ -55,7 +65,9 @@
|
|
#define FULL_BRIGHT_OFF 0x22
|
|
#define FULL_BRIGHT_OFF 0x22
|
|
static const uint8_t PROGMEM brightConv[BRIGHT_IDX_MAX+1] = {
|
|
static const uint8_t PROGMEM brightConv[BRIGHT_IDX_MAX+1] = {
|
|
#if F_CPU == 16000000
|
|
#if F_CPU == 16000000
|
|
- 155, 164, 181, 211, 255
|
|
|
|
|
|
+ /* 155, 164, 181, 211, 255 */
|
|
|
|
+ /* for 83: */
|
|
|
|
+ 117, 151, 185, 219, 255
|
|
#elif F_CPU == 8000000
|
|
#elif F_CPU == 8000000
|
|
54, 71, 106, 165, 255
|
|
54, 71, 106, 165, 255
|
|
#endif // F_CPU
|
|
#endif // F_CPU
|