diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 42 |
1 files changed, 20 insertions, 22 deletions
@@ -84,7 +84,7 @@ int main(void) | |||
84 | // OCR0A |= (1 << WGM01); // CTC mode | 84 | // OCR0A |= (1 << WGM01); // CTC mode |
85 | 85 | ||
86 | // OCR0A = 149; | 86 | // OCR0A = 149; |
87 | OCR0A = 124; | 87 | OCR0A = 125; |
88 | // OCR0A = CTC_MATCH_OVERFLOW; | 88 | // OCR0A = CTC_MATCH_OVERFLOW; |
89 | TIMSK |= (1 << OCIE0A); // if you want interrupt | 89 | TIMSK |= (1 << OCIE0A); // if you want interrupt |
90 | 90 | ||
@@ -92,27 +92,25 @@ int main(void) | |||
92 | 92 | ||
93 | while (1) | 93 | while (1) |
94 | { | 94 | { |
95 | // uint16_t t = 1; | 95 | //print_data(lastinterval<<1 | (PINB & PB0)); |
96 | // for (uint16_t i=0; i<16; i++) | 96 | // uint16_t data = 0; |
97 | // { | 97 | // for(int i=0; i<16; i++) |
98 | // print_data(t_current.s); | 98 | // { |
99 | // uint16_t p = 0; | 99 | // if(i<4) |
100 | // for(int i=0; i<sizeof(t_current.s)*__CHAR_BIT__; i++) | 100 | // data |= (t_current.s & (1<<i)); |
101 | // p |= t_current.s & (1<<i); | 101 | // else if(i <= 10) |
102 | 102 | // data |= t_current.m & (1<<(i-4)); | |
103 | print_data(t_current.s); | 103 | // else |
104 | // print_data(t_current.s<<10 | interval | ((PINB & PB0) == 1 ? 2 : 0)); | 104 | // data |= t_current.h & (1<<(i-11)); |
105 | // t = t<<1; | 105 | // } |
106 | // } | 106 | // print_data(data); |
107 | // print_data(t_current.s); | 107 | |
108 | 108 | print_data( | |
109 | 109 | (uint64_t) 0 | |
110 | /* | 110 | | t_current.h<<8 |
111 | print_data(0xFFFF); | 111 | | t_current.m); |
112 | _delay_ms(1000); | 112 | //print_data(interval | ((PINB & PB0) == 1 ? 2 : 0)); |
113 | print_data(0x0000); | 113 | // print_data(PINB); |
114 | _delay_ms(1000); | ||
115 | */ | ||
116 | } | 114 | } |
117 | return 0; | 115 | return 0; |
118 | } | 116 | } |