diff --git a/mote/v2/avr/basiciotest.c b/mote/v2/avr/basiciotest.c index e5cdf3e..d853d69 100644 --- a/mote/v2/avr/basiciotest.c +++ b/mote/v2/avr/basiciotest.c @@ -21,6 +21,9 @@ #include #include +#include + +#include #include "uart.h" #include "spi.h" @@ -40,7 +43,6 @@ #define SPI_FORWARD_TO_UART_PORT 'u' #define SPI_FORWARD_TO_CTRL_PORT 'l' // 'l'ocal port - volatile uint8_t spi_status, high_hex; // hex to binary/byte decoding @@ -167,11 +169,43 @@ ISR(TIMER1_COMPA_vect) /* void */ } -int main(void) +ISR(ANALOG_COMP_vect) +{ + uint8_t i; + + PORTB |= (1< fTOV1 = 3686.4kHz / 65536 = 56.25Hz (DS p.134) TCCR1B |= (1<