X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=projects%2Fmicrob2010%2Ftests%2Fstatic_beacon%2Fstatic_beacon.c;h=caf0934971d1641329a496ff4e61400ae10d9293;hp=d2accb33b514a46c88b9d0ff01e2b89a845baed6;hb=8d6a47e9e21a9a31f4bc12d32fb3d11091a4b305;hpb=7bca487a2198825b6d7caabcd1143e2d5e19dd43 diff --git a/projects/microb2010/tests/static_beacon/static_beacon.c b/projects/microb2010/tests/static_beacon/static_beacon.c index d2accb3..caf0934 100755 --- a/projects/microb2010/tests/static_beacon/static_beacon.c +++ b/projects/microb2010/tests/static_beacon/static_beacon.c @@ -358,6 +358,23 @@ int main(void) while (1); #endif +#if 1 + /* test freq ~ 400khz */ + ICR1 = 38; + OCR1A = 19; + TCCR1B = _BV(WGM13) | _BV(WGM12); + TCNT1 = 37; + TCCR1A = _BV(COM1A1) | _BV(WGM11); + TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); + + /* motor PWM 50%, 8khz */ + DDRB |= 0x08; + OCR2 = 50; + TCCR2 = _BV(WGM21) | _BV(WGM20) | _BV(COM21) | _BV(CS21) ; + + while (1); +#endif + /* configure timer 0, prescaler = 64 */ TCCR0 = _BV(CS01) | _BV(CS00);