adc works
This commit is contained in:
parent
545af2648e
commit
467ebb3e9c
|
@ -5,7 +5,7 @@
|
|||
#include <util/delay.h>
|
||||
|
||||
void adc_init() {
|
||||
//DDRA=0x0; // does not exist but is default?
|
||||
DDRC=0x0; // does not exist but is default?
|
||||
ADCSRA = (1<<ADEN)|(1<<ADPS1)|(1<<ADPS2);
|
||||
ADMUX = (1<<REFS0);
|
||||
}
|
||||
|
|
|
@ -14,10 +14,11 @@
|
|||
int main (void)
|
||||
{
|
||||
uart_init();
|
||||
adc_init();
|
||||
sei();
|
||||
|
||||
char buf[10];
|
||||
int sensor[2];
|
||||
uint16_t sensor[2] = { 0, 1 };
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue