From 6074bd8217316ad16ce64776bc99a6b8965d4c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Thu, 11 May 2017 11:43:11 +0200 Subject: [PATCH] INIT-Werte bei RESET --- PIC_Simulator/PIC/PICProgramm.cs | 14 +++++++++++++- Projektinformationen/Tabelle.txt | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/PIC_Simulator/PIC/PICProgramm.cs b/PIC_Simulator/PIC/PICProgramm.cs index 894548c..2ce9ce3 100644 --- a/PIC_Simulator/PIC/PICProgramm.cs +++ b/PIC_Simulator/PIC/PICProgramm.cs @@ -120,7 +120,19 @@ namespace PIC_Simulator.PIC public PICProgramm() { - + // Anfangswerte + + SetRegisterOhneBank(ADDR_PCL, 0x00); + SetRegisterOhneBank(ADDR_STATUS, 0x18); + SetRegisterOhneBank(ADDR_PCLATH, 0x00); + SetRegisterOhneBank(ADDR_INTCON, 0x00); + + SetRegisterOhneBank(ADDR_OPTION, 0xFF); + SetRegisterOhneBank(ADDR_TRIS_A, 0x1F); + SetRegisterOhneBank(ADDR_TRIS_B, 0xFF); + + SetRegisterOhneBank(ADDR_EECON1, 0x00); + SetRegisterOhneBank(ADDR_EECON2, 0x00); } public void Laden(string code) diff --git a/Projektinformationen/Tabelle.txt b/Projektinformationen/Tabelle.txt index b627b2a..04372d6 100644 --- a/Projektinformationen/Tabelle.txt +++ b/Projektinformationen/Tabelle.txt @@ -6,7 +6,7 @@ [/] Kommentare sinnvoll und ausreich [/] Funkt., Meth., Klassen Befehlsnachbild. [/] Variablenbezeichner / Variablennamen -[?] INIT-Werte bei RESET +[X] INIT-Werte bei RESET [X] Laufzeitzähler [?] Latchfunktion der IO-Register [X] frei wählbare Quarzfrequenz