if (prog == 6 || prog == 7) //Morsespeicher Key/Elbug
{
word p, s, l, z;
Beep(); Beep(); Beep();
n = 60;
p = array; //Pointer
z = 0; l = 0;
do
{
if (prog == 6) {Key();} Else {Elbug();}
if (PA.5 == 0) {A = 2;}
} while (A < 2); //Erstes Zeichen abwarten
*p = A;
p++;
do
{
if (prog == 6) {Key();} Else {Elbug();}
*p = A;
p++;
l++;
if (A>1) {z = 0;} else {z++;}
if (Z > 3) {n = 1;}
if (PA.5 == 0) {n = 1;}
}while (--n);
.delay (50000);
s = 0;
do
{
.delay (50000);
p = array;
n = l;
do
{
A = *p;
if (PA.5 == 0) {A = 1;}
if (A > 1) {CW_Out(); s = 0;}
else {s++;}
if (s > 0)
{
if (Speed ==1) {.delay(25000);}
if (Speed ==2) {.delay(18800);}
if (Speed ==3) {.delay(15000);}
if (Speed ==4) {.delay(12500);}
}
p++;
if (PA.5 == 0) {n = 1;}
}while (--n);
Jumper (); //Speed ändern?
} while (PA.5 == 1);
}
if (prog == 11 || prog == 12 ) //CW steuert LEDsInsgesamt können mit den vier Jumpern auf der Platine bis zu 15 Programme ausgewählt werden. Drei davon sind noch frei für künftige Erweiterungen
{
word p, s, l, z;
Beep(); Beep(); Beep();
do
{
do
{
if (prog == 11) {Key();} Else {Elbug();}
if (PA.5 == 0) {A = 2;}
} while (A < 2); //Zeichen abwarten
if (A == 0b00000101) {PA = 0b00000000; PB = 0b00000000;} //A 0
if (A == 0b00011000) {PA = 0b01000000; PB = 0b00000000;} //B 1
if (A == 0b00011010) {PA = 0b10000000; PB = 0b00000000;} //C 2
if (A == 0b00001100) {PA = 0b11000000; PB = 0b00000000;} //D 3
if (A == 0b00000010) {PA = 0b00000000; PB = 0b10000000;} //E 4
if (A == 0b00010010) {PA = 0b01000000; PB = 0b10000000;} //F 5
if (A == 0b00001110) {PA = 0b10000000; PB = 0b10000000;} //G 6
if (A == 0b00010000) {PA = 0b11000000; PB = 0b10000000;} //H 7
if (A == 0b00000100) {PA = 0b00000000; PB = 0b01000000;} //I 8
if (A == 0b00010111) {PA = 0b01000000; PB = 0b01000000;} //J 9
if (A == 0b00001101) {PA = 0b10000000; PB = 0b01000000;} //K 10
if (A == 0b00010100) {PA = 0b11000000; PB = 0b01000000;} //L 11
if (A == 0b00000111) {PA = 0b00000000; PB = 0b11000000;} //M 12
if (A == 0b00000110) {PA = 0b01000000; PB = 0b11000000;} //N 13
if (A == 0b00001111) {PA = 0b10000000; PB = 0b11000000;} //O 14
if (A == 0b00010110) {PA = 0b11000000; PB = 0b11000000;} //P 15
} while (PA.5 == 1);