Kód: Vybrat vše
#include <htc.h>
__CONFIG(INTRCRB4 & WDTDIS & UNPROTECT & MCLRDIS);
void init(void)
{
TRISB = 0;
PORTB = 0;
}
void DelayUs(unsigned char us)
{
unsigned char time;
time = (us/25);
while(--time != 0)
continue;
}
void main(void)
{
init();
while (1)
{
DelayUs(100);
RB1 = 0;
DelayUs(100);
RB1 = 1;
}
}