diff --git a/analogout.c b/analogout.c new file mode 100644 index 0000000..f78a8eb --- /dev/null +++ b/analogout.c @@ -0,0 +1,13 @@ +#include "analogout.h" +#include + +void +analogout_init(void) +{ + DDRD |= _BV(PD5); + TCCR0A = _BV(COM0B1) | _BV(WGM01) | _BV(WGM00); + TCCR0B = _BV(CS00); + OCR0B = 0xff / 2; +} + + diff --git a/analogout.h b/analogout.h new file mode 100644 index 0000000..0fbcac9 --- /dev/null +++ b/analogout.h @@ -0,0 +1,7 @@ +#ifndef _ANALOGOUT_H_ +#define _ANALOGOUT_H_ + +void +analogout_init(void); + +#endif