min max detection/ higher clokrate

This commit is contained in:
7u83 2024-05-05 01:02:06 +02:00
parent 3c0c81df2e
commit 89487aebb5

View File

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