min max detection/ higher clokrate

This commit is contained in:
7u83 2024-05-05 01:02:06 +02:00
parent 3c0c81df2e
commit 89487aebb5
1 changed files with 12 additions and 11 deletions

View File

@ -156,8 +156,8 @@ static void handle_switches()
single_step=0;
return;
}
disp_nr--;
if (disp_nr>0)
disp_nr--;
}
}
@ -168,7 +168,9 @@ static void handle_switches()
single_step=0;
return;
}
disp_nr++;
if (disp_nr<99)
disp_nr++;
}
}
@ -205,7 +207,7 @@ static void update_display()
}
#define COU0 11
#define COU1 1000
#define COU1 10
static void cou0()
{
@ -224,19 +226,22 @@ static void pulser()
{
if(pulse>0){
P2_6 = 1;
P1_2 = 1;
P1_3 = 0;
pulse--;
return;
}
P2_6=0;
P1_2=0;
P1_3=1;
}
static void cou1()
{
static int ctr = 99;
static int ctr = 9900;
static int count=COU1;
@ -252,13 +257,9 @@ static void cou1()
ctr-=disp_nr;
if (ctr <=0){
ctr+=99;
ctr+=9900;
pulse=PULSE_LEN;
}
// if (disp_nr>99)
// disp_nr=0;
}