81 #define TIMER2_250US (uint8_t)((VALUE2_250US * F_CPU/TIMER2_DIVISOR) - 2) |
81 #define TIMER2_250US (uint8_t)((VALUE2_250US * F_CPU/TIMER2_DIVISOR) - 2) |
82 |
82 |
83 #define TIMER1_DIVISOR 8 |
83 #define TIMER1_DIVISOR 8 |
84 #define VALUE1_7500NS 0.75e-2 |
84 #define VALUE1_7500NS 0.75e-2 |
85 #define TIMER1_7500NS (uint16_t)(VALUE1_7500NS * F_CPU/TIMER1_DIVISOR) |
85 #define TIMER1_7500NS (uint16_t)(VALUE1_7500NS * F_CPU/TIMER1_DIVISOR) |
86 |
86 #define VALUE1_500NS 0.5e-3 |
|
87 #define TIMER1_500NS (uint16_t)((VALUE1_500NS * F_CPU/TIMER1_DIVISOR) + 2) // MEASURE THIS EXACTLY WITH SCOPE |
87 |
88 |
88 #define DDR(x) (*(&x - 1)) // address of data direction register of port x |
89 #define DDR(x) (*(&x - 1)) // address of data direction register of port x |
89 #define PIN(x) (*(&x - 2)) // address of input register of port x |
90 #define PIN(x) (*(&x - 2)) // address of input register of port x |
90 |
91 |
91 |
92 |