int_rb
/*************************entegreterbiyecisi@yahoo.com******************************/
int ca,ne,can,nec,change;
/***entegreterbiyecisi@yahoo.com***/
#int_rb
sensor(){
if (bit_test(port_b,7)) {ca=1;}
if (bit_test(port_b,6)) {ne=1;}
change=1;}
/***entegreterbiyecisi@yahoo.com***/
void main() {
enable_interrupts(int_rb);
/***entegreterbiyecisi@yahoo.com***/
while(true){
if(!input(dwn)){ //start
dsp_data=0;
change=false;
data_bitti=false;
output_high(role_1);
/***entegreterbiyecisi@yahoo.com***/
while(!data_bitti){
while(!change){
dsp_yaz(10);
if(!input(up)){ //stop
goto stop;}}
/***entegreterbiyecisi@yahoo.com***/
if(dsp_data<9999){
dsp_data++;
dsp_ayir(dsp_data);
change=false;
/***entegreterbiyecisi@yahoo.com***/
if(dsp_data>=role1_data){
output_low(role_1);}
if(dsp_data>role1_data){
/***entegreterbiyecisi@yahoo.com***/
data_bitti=true;
change=true;
}}}} }}
/*************************entegreterbiyecisi@yahoo.com******************************/
#fuses xt,noPROTECT,nowrt,noPUT,BROWNOUT,nolvp,WDT
//watchdog timer fuse a
WDT
void main()
set_rtcc(0);
setup_counters(RTCC_INTERNAL,WDT_2304MS);
//olarak yazılırsa 2304ms den önce
restart_wdt();
//program içinde değişik yerlere yazılmalıdır
//aksi takdirde WDT pic i reset eder
/**********
www.picproje.org TURKiYE de*****************/