Код: Выделить всё
#include <tiny13>
#include <delay>
#include <stdio>
// Declare your global variables here
void main(void)
{
// Declare your local variables here
// Input/Output Ports initialization
// Port B initialization
// Func5=In Func4=In Func3=In Func2=In Func1=Out Func0=In
// State5=T State4=P State3=P State2=T State1=0 State0=T
PORTB=0x18;
DDRB=0x02;
while (1)
{
PORTB.1=1;
delay_ms(100);
PORTB.1=0;
delay_ms(100);
while (PINB.3 != 0x00 & PINB.4 != 0x00); // Poka ne najata knopka
if (PINB.3 == 0x00)
{
delay_ms(1);
if (PINB.3 == 0x00)
{
PORTB.1=0;
delay_ms(20);
}
}
if (PINB.4 == 0x00)
{
delay_ms(1);
if (PINB.4 == 0x00)
{
PORTB.1=1;
delay_ms(20);
}
}
}
} Какие могут быть предположения?
- Вложения
-
- 1.JPG
- Вот лок фьюзы
- (7.54 КБ) 770 скачиваний
-
- 2.JPG
- Вот остальные фьюзы
- (12.39 КБ) 734 скачивания


