|
#include "io8515.h"
#include "ina90.h"
#include "stdio.h"
int t=0x00,i=0x00;
#pragma vector = TIMER0_OVF0_vect
__interrupt void TIMER0_OVF0_interrupt(void)
{
t++;
if (t == 0x32)
{
PORTB = 0xfe;
i = 0x32;
}
i--;
if (i == 0x00)
{
PORTB = 0xff;
t = 0x00;
}
}
void init(void)
{
_CLI();
DDRB = 0xff;
PORTB = 0xff;
TIMSK = 0x02;
TCCR0 = 0x01; //Set Prescale CK/8
_SEI();
}
void main(void)
{
init();
while(1)
{
}
}
E-mail: info@telesys.ru