|
void main(void)
{
// Declare your local variables here
// Input/Output Ports initialization
// Port B initialization
// Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out
// State5=1 State4=1 State3=1 State2=1 State1=1 State0=1
PORTB=0x3F;
DDRB=0x3F;
// Port C initialization
// Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out
// State5=1 State4=1 State3=1 State2=1 State1=1 State0=1
PORTC=0x3F;
DDRC=0x3F;
// Port D initialization
// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=In Func1=In Func0=In
// State7=1 State6=1 State5=1 State4=0 State3=0 State2=P State1=T State0=T
PORTD=0xE4;
DDRD=0xF8;
// Timer/Counter 0 initialization
// Clock source: System Clock
// Clock value: Timer 0 Stopped
TCCR0=0x00;
TCNT0=0x00;
// Timer/Counter 1 initialization
// Clock source: System Clock
// Clock value: Timer 1 Stopped
// Mode: Normal top=FFFFh
// OC1 output: Discon.
// Noise Canceler: Off
// Input Capture on Falling Edge
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
OCR1H=0x00;
OCR1L=0x00;
// External Interrupt(s) initialization
// INT0: Off
// INT1: Off
GIMSK=0x00;
MCUCR=0x00;
// Timer(s)/Counter(s) Interrupt(s) initialization
TIMSK=0x00;
UBRRHI=0x00;
// Analog Comparator initialization
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
// Analog Comparator Output: Off
ACSR=0x80;
while (1);
/*{
PORTD.5=0;
PORTD.5=1;
};*/
}
E-mail: info@telesys.ru