Demo entry 6350101

m

   

Submitted by anonymous on Mar 05, 2017 at 19:12
Language: C. Code size: 348 Bytes.

2.2.1
#include <reg52.h> 
int count=0;   
void main(void) 
{         
	TMOD = 0x01;  
	TH0 = 0x3C;
	TL0 = 0x0B0;     
	EA = 1;
	ET0 = 1;     
	TR0 = 1;    
	while(1)
	{       
	} 
} 
void Timer0Interrupt() interrupt 1 
{     
	TH0 = 0x3C;
	TL0 = 0x0B0;  
   	count++;
   	if(count==10){
   		P2=~P2;
   		count=0;
   	} 
}  

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).