SLEEP command
This commit is contained in:
parent
7cb924f580
commit
23ecfdd906
@ -114,6 +114,7 @@ namespace PIC_Simulator.PIC
|
|||||||
public uint Register_W = 0;
|
public uint Register_W = 0;
|
||||||
public uint[] Register = new uint[0x100];
|
public uint[] Register = new uint[0x100];
|
||||||
public Stack<uint> Stack = new Stack<uint>();
|
public Stack<uint> Stack = new Stack<uint>();
|
||||||
|
public bool IsSleeping = false;
|
||||||
|
|
||||||
public List<int> Breakpoints = new List<int>();
|
public List<int> Breakpoints = new List<int>();
|
||||||
|
|
||||||
@ -203,6 +204,8 @@ namespace PIC_Simulator.PIC
|
|||||||
|
|
||||||
PICBefehl aktueller_befehl = befehle[PCCounter];
|
PICBefehl aktueller_befehl = befehle[PCCounter];
|
||||||
|
|
||||||
|
if (IsSleeping) return false;
|
||||||
|
|
||||||
if (aktueller_befehl.befehl == ADDWF)
|
if (aktueller_befehl.befehl == ADDWF)
|
||||||
{
|
{
|
||||||
// Add the contents of the W register with
|
// Add the contents of the W register with
|
||||||
@ -697,7 +700,17 @@ namespace PIC_Simulator.PIC
|
|||||||
// mode with the oscillator stopped. See
|
// mode with the oscillator stopped. See
|
||||||
// Section 14.8 for more details.
|
// 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)
|
else if (aktueller_befehl.befehl == SUBLW)
|
||||||
{
|
{
|
||||||
|
BIN
Projektinformationen/PIC16C84 - Datenblatt - Full.pdf
Normal file
BIN
Projektinformationen/PIC16C84 - Datenblatt - Full.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user