и написал такой код для диодной матрицы
Код: Выделить всё
#include <avr>
#include <avr>
int main (void)
{
PORTD |= 0x01;
while(1)
{
if (bit_is_clear(PIND,PD0))
{
DDRA |= 0x01;
PORTA |= 0x01;
DDRB |= 0x01;
}
else
{
DDRA |= 0x00;
PORTA |= 0x00;
DDRB |= 0x00;
}
}
return 0;
}



