Fixed reset Program on WatchDog Timeout
This commit is contained in:
@@ -15,7 +15,7 @@ class Main
|
|||||||
{
|
{
|
||||||
public static void main(String[] args) throws InterruptedException {
|
public static void main(String[] args) throws InterruptedException {
|
||||||
|
|
||||||
Command[] program = Parser.parser("de/darkress/pic16f84sim/TestPrograms/TPicSim10.LST");
|
Command[] program = Parser.parser("de/darkress/pic16f84sim/TestPrograms/TPicSim11.LST");
|
||||||
|
|
||||||
Memory.initMemory();
|
Memory.initMemory();
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ public class Watchdog
|
|||||||
|
|
||||||
public static void resetProgram()
|
public static void resetProgram()
|
||||||
{
|
{
|
||||||
Memory.setRegister(0x03, Memory.getRegister(0x03) | 0x10);
|
Memory.setRegister(0x03, Memory.getRegister(0x03) | 0x10); //Set !T0 in StatusReg
|
||||||
|
ProgramCounter.resetProgramCounter();
|
||||||
watchdogTimer = 18000;
|
watchdogTimer = 18000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user