2019-04-10 09:45:10 +00:00
|
|
|
#include "analogout.h"
|
|
|
|
#include <avr/io.h>
|
|
|
|
|
|
|
|
void
|
|
|
|
analogout_init(void)
|
|
|
|
{
|
2019-07-17 14:13:50 +00:00
|
|
|
DDRD |= _BV(PD5) | _BV(PD6);
|
|
|
|
TCCR0A = _BV(COM0B1) | _BV(WGM01) | _BV(WGM00) | _BV(COM0A1);
|
2019-04-10 09:45:10 +00:00
|
|
|
TCCR0B = _BV(CS00);
|
|
|
|
OCR0B = 0xff / 2;
|
2019-07-17 14:13:50 +00:00
|
|
|
OCR0A = 0xff / 2;
|
2019-04-10 09:45:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|