Compare commits
2 Commits
clrwdtInst
...
watchdog
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab07a0d708 | ||
|
|
2b1f8871d2 |
@@ -1,24 +0,0 @@
|
|||||||
package de.darkress.pic16f84sim.commands;
|
|
||||||
|
|
||||||
import de.darkress.pic16f84sim.microcontroller.*;
|
|
||||||
|
|
||||||
public class Clrwdt extends LiteralCommandUtils implements Command
|
|
||||||
{
|
|
||||||
|
|
||||||
public Clrwdt()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute()
|
|
||||||
{
|
|
||||||
ProgramCounter.incPC();
|
|
||||||
Cycles.incCycles();
|
|
||||||
|
|
||||||
Memory.setRegister(0x03, Memory.getRegister(0x03) | 0x18);
|
|
||||||
if(Timer.getPrescalerAssignment()) {
|
|
||||||
Timer.resetTimeToTimerIncrease();
|
|
||||||
Watchdog.resetWatchdogTimer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -97,7 +97,7 @@ public class CommandDecoder
|
|||||||
|
|
||||||
if (input == 0x0064)
|
if (input == 0x0064)
|
||||||
{
|
{
|
||||||
return new Clrwdt();
|
//clrwdt();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (input == 0x0009)
|
if (input == 0x0009)
|
||||||
|
|||||||
@@ -8,10 +8,6 @@ public class Watchdog
|
|||||||
return watchdogTimer;
|
return watchdogTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void resetWatchdogTimer() {
|
|
||||||
watchdogTimer = 18000;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void decreaseWatchdogTimer()
|
public static void decreaseWatchdogTimer()
|
||||||
{
|
{
|
||||||
watchdogTimer--;
|
watchdogTimer--;
|
||||||
|
|||||||
Reference in New Issue
Block a user