Rev 902 | Rev 1437 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 902 | Rev 932 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | #include <avr/io.h> |
22 | #include <avr/io.h> |
23 | #include <avr/interrupt.h> |
23 | #include <avr/interrupt.h> |
24 | #include <util/delay.h> |
24 | #include <util/delay.h> |
25 | #include "usart0.h" |
25 | #include "usart0.h" |
Line -... | Line 26... | ||
- | 26 | ||
- | 27 | #ifdef SERIALDEBUGDRAW |
|
- | 28 | #define USART0ENABLE 1 |
|
26 | 29 | #endif |
|
- | 30 | #ifdef ANTENNATRACKTEST |
|
- | 31 | #define USART0ENABLE 1 |
|
- | 32 | #endif |
|
- | 33 | ||
- | 34 | ||
- | 35 | ||
Line 27... | Line 36... | ||
27 | #ifdef ANTENNATRACKTEST |
36 | #ifdef USART0ENABLE |
Line 44... | Line 53... | ||
44 | // Enable receiver and transmitter; enable RX interrupt |
53 | // Enable receiver and transmitter; enable RX interrupt |
45 | UCSR0B = (1 << RXEN0) | (1 << TXEN0) | (1 << RXCIE0); |
54 | UCSR0B = (1 << RXEN0) | (1 << TXEN0) | (1 << RXCIE0); |
Line 46... | Line 55... | ||
46 | 55 | ||
47 | //asynchronous 8N1 |
56 | //asynchronous 8N1 |
- | 57 | UCSR0C = (1 << URSEL0) | (3 << UCSZ00); |
|
- | 58 | ||
- | 59 | ||
- | 60 | DDRD |= (1 << DDD1); // set TXD pin as output |
|
48 | UCSR0C = (1 << URSEL0) | (3 << UCSZ00); |
61 | PORTD &= ~(1 << PORTD1); // disable pullup on TXD pin |
Line 49... | Line 62... | ||
49 | } |
62 | } |
50 | 63 | ||
Line 99... | Line 112... | ||
99 | 112 | ||
Line 100... | Line 113... | ||
100 | 113 |