Буду ОЧЕНЬ благодарен любой помощи !!!! Зарание благодарю.
Так выглядит борт :

CODE
#include <stdint>
#include <avr>
#include <avr>
#include <avr>
#include <avr> // In/Outputs
short cntr = 0;
int a=0;
int b=0;
void lampochki()
{
if(PORTB==1)
{
PORTB=3;
}
else if(PORTB==3){
PORTB=4;
}else if(PORTB==4)
{
PORTB=2;
}else if(PORTB==2)
{
PORTB=1;
a=1;
PORTC = 1;
//long i;
//for(i = 0; i < 1000000; i++);
}
PORTC = 0;
}
int main()
{
DDRB=7;
DDRD=0;
PORTB=1;
DDRC = 7;
PORTC=0;
TCNT0 = 244;
cntr = 28;
TCCR0 = 5;
TIMSK = 1;
GICR = 64; // interrupt port D0 ein
MCUCR = 1; // oder 2
sei();
while(1){}
}
SIGNAL(SIG_OVERFLOW0){
if(!(cntr--))
{
TCNT0=244;
cntr=28;
if(a==0)
lampochki();
}
}
SIGNAL(SIG_INTERRUPT0){
a=0;
}
#include <avr>
#include <avr>
#include <avr>
#include <avr> // In/Outputs
short cntr = 0;
int a=0;
int b=0;
void lampochki()
{
if(PORTB==1)
{
PORTB=3;
}
else if(PORTB==3){
PORTB=4;
}else if(PORTB==4)
{
PORTB=2;
}else if(PORTB==2)
{
PORTB=1;
a=1;
PORTC = 1;
//long i;
//for(i = 0; i < 1000000; i++);
}
PORTC = 0;
}
int main()
{
DDRB=7;
DDRD=0;
PORTB=1;
DDRC = 7;
PORTC=0;
TCNT0 = 244;
cntr = 28;
TCCR0 = 5;
TIMSK = 1;
GICR = 64; // interrupt port D0 ein
MCUCR = 1; // oder 2
sei();
while(1){}
}
SIGNAL(SIG_OVERFLOW0){
if(!(cntr--))
{
TCNT0=244;
cntr=28;
if(a==0)
lampochki();
}
}
SIGNAL(SIG_INTERRUPT0){
a=0;
}