diff --git a/PIC_Simulator/PIC/PICProgramm.cs b/PIC_Simulator/PIC/PICProgramm.cs index 56937b4..7f4ff9a 100644 --- a/PIC_Simulator/PIC/PICProgramm.cs +++ b/PIC_Simulator/PIC/PICProgramm.cs @@ -119,7 +119,7 @@ namespace PIC_Simulator.PIC public List Breakpoints = new List(); public int TaktgeberFrequenz = 100000; - public int TaktgeberZahler = 100000; + public int TaktgeberZahler = 0; public bool TaktgeberAktiviert = false; public uint TaktgeberAdresse = 0; public uint TaktgeberBitnummer = 0; @@ -188,7 +188,7 @@ namespace PIC_Simulator.PIC if (cmd[i] == 'b' && bin[i] == '0') { p_b <<= 1; p_b |= 0; continue; } if (cmd[i] == 'b' && bin[i] == '1') { p_b <<= 1; p_b |= 1; continue; } if (cmd[i] == '0' && bin[i] == '1') { ok = false; break; } - if (cmd[i] == '1' && bin[i] == '0') { ok = false; continue; } + if (cmd[i] == '1' && bin[i] == '0') { ok = false; break; } throw new Exception("Falscher wert in cmd"); } diff --git a/PIC_Simulator/PIC/RS232Verbindung.cs b/PIC_Simulator/PIC/RS232Verbindung.cs index f9415cf..73674c1 100644 --- a/PIC_Simulator/PIC/RS232Verbindung.cs +++ b/PIC_Simulator/PIC/RS232Verbindung.cs @@ -41,6 +41,7 @@ namespace PIC_Simulator.PIC List result = new List(); ArrayComPortsNames = SerialPort.GetPortNames(); + if (ArrayComPortsNames.Length == 0) return result; do { index += 1;