diff --git a/PIC_Simulator/PIC/PICProgramm.cs b/PIC_Simulator/PIC/PICProgramm.cs index 67aa402..3ebc253 100644 --- a/PIC_Simulator/PIC/PICProgramm.cs +++ b/PIC_Simulator/PIC/PICProgramm.cs @@ -114,6 +114,7 @@ namespace PIC_Simulator.PIC public uint Register_W = 0; public uint[] Register = new uint[0x100]; public Stack Stack = new Stack(); + public bool IsSleeping = false; public List Breakpoints = new List(); @@ -203,6 +204,8 @@ namespace PIC_Simulator.PIC PICBefehl aktueller_befehl = befehle[PCCounter]; + if (IsSleeping) return false; + if (aktueller_befehl.befehl == ADDWF) { // Add the contents of the W register with @@ -697,7 +700,17 @@ namespace PIC_Simulator.PIC // mode with the oscillator stopped. See // Section 14.8 for more details. - //TODO + if (GetRegisterOhneBank(ADDR_OPTION, OPTION_BIT_PSA)) + { + SetRegisterOhneBank(ADDR_OPTION, OPTION_BIT_PS0, false); + SetRegisterOhneBank(ADDR_OPTION, OPTION_BIT_PS1, false); + SetRegisterOhneBank(ADDR_OPTION, OPTION_BIT_PS2, false); + } + + SetRegisterOhneBank(ADDR_STATUS, STATUS_BIT_TO, true); + SetRegisterOhneBank(ADDR_STATUS, STATUS_BIT_PD, false); + + IsSleeping = true; } else if (aktueller_befehl.befehl == SUBLW) { diff --git a/Projektinformationen/PIC16C84 - Datenblatt - Full.pdf b/Projektinformationen/PIC16C84 - Datenblatt - Full.pdf new file mode 100644 index 0000000..1b89956 Binary files /dev/null and b/Projektinformationen/PIC16C84 - Datenblatt - Full.pdf differ