Miscellany
public text v1 · immutableint main ()
{
DDRC |= 0x0f;
set_wgm1(CTC_OC);
// TCCR1B = (1<<WGM12);
OCR1A = 15624;
TIMSK |= (1<<OCIE1A);
set_cs1(PS1024);
// TCCR1B |= (1<<CS00);
sei();
while (1)
{
}
}
ISR (SIG_OUTPUT_COMPARE1A)
{
static uint8_t i=0x00;
static uint32_t rand; //=0x69a5391b;
if (i == 0 )rand = random();
PORTC = 1 << ((rand >> (2 * i)) & 0x03);
if (i<16) i++;
else i=0;
}