- CODE: SELECT_ALL_CODE
#include<htc.h>
#define _XTAL_FREQ 20000000
void main()
{
TRISB0=1;
TRISB1=1;
TRISD0=0;
TRISD1=0;
do
{
if(RB0==0)
{
__delay_ms(100);
if(RB0==0)
{
RD0=1;
__delay_ms(2000);
RD0=0;
}
}
}while(1);
do
{
if(RB1==0)
{
__delay_ms(100);
if(RB1==0)
{
RD1=1;
__delay_ms(2000);
RD1=0;
}
}
}while(1);
}
any idea what happen?