You are on page 1of 2

Kodigoa:

#include <Aduc812.h>

void activo ();
void noActivo();

void main (void)
{

int pulso=0;

TMOD = 0x01;

TR0 = 1; //Activar timer

while(1){

pulso=1;

activo();

pulso=0;

noActivo();

}
}

void activo () {

TH0 = 0xFB;

TL0 = 0x4B;

while(TF0 == 0){

}



TF0 = 0;
}
void noActivo() {

TH0 = 0xB7;

TL0 = 0xA8;

while(TF0 == 0){

}



TF0 = 0;
}










Simulazioa






Fluxu diagrama

You might also like