Reset FSR
This commit is contained in:
@ -241,8 +241,7 @@ public class Controller_Frontend {
|
|||||||
}
|
}
|
||||||
WatchdogTimer.testAndTrigger();
|
WatchdogTimer.testAndTrigger();
|
||||||
Table.refresh();
|
Table.refresh();
|
||||||
Stage stage = (Stage) stepintoButton.getScene().getWindow();
|
CreateWindow.refreshTable();
|
||||||
CreateWindow.refreshTable(stage);
|
|
||||||
IOPorts.refreshUI(getTRISbuttons(), getPORTbuttons());
|
IOPorts.refreshUI(getTRISbuttons(), getPORTbuttons());
|
||||||
updateStack();
|
updateStack();
|
||||||
updateWatchdog();
|
updateWatchdog();
|
||||||
@ -578,15 +577,6 @@ public class Controller_Frontend {
|
|||||||
stackVisual.setItems(observedList);
|
stackVisual.setItems(observedList);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// @FXML
|
|
||||||
// private static Label dummyLabel;
|
|
||||||
//
|
|
||||||
// public static void triggerTableRefresh(){
|
|
||||||
// dummyLabel.setText(" ");
|
|
||||||
// CreateWindow.refreshTable((Stage) dummyLabel.getScene().getWindow());
|
|
||||||
// }
|
|
||||||
|
|
||||||
private void updateWatchdog (){
|
private void updateWatchdog (){
|
||||||
wdtCheck.setText("Watchdog-Timer: " + WatchdogTimer.get() + "µs");
|
wdtCheck.setText("Watchdog-Timer: " + WatchdogTimer.get() + "µs");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ public class CreateWindow extends Application {
|
|||||||
launch(args);
|
launch(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void refreshTable(Stage stage) {
|
public static void refreshTable() {
|
||||||
grid.getChildren().remove(table);
|
grid.getChildren().remove(table);
|
||||||
table= Table.refresh();
|
table= Table.refresh();
|
||||||
grid.add(table, 1, 1);
|
grid.add(table, 1, 1);
|
||||||
|
|||||||
@ -44,6 +44,7 @@ public class DataRegister {
|
|||||||
dataRegister[TRISB] = 0b11111111;
|
dataRegister[TRISB] = 0b11111111;
|
||||||
dataRegister[0x80 + PCLATH] = dataRegister[PCLATH];
|
dataRegister[0x80 + PCLATH] = dataRegister[PCLATH];
|
||||||
dataRegister[0x80 + INTCON] = dataRegister[INTCON];
|
dataRegister[0x80 + INTCON] = dataRegister[INTCON];
|
||||||
|
IOPorts.resetTRIS();
|
||||||
System.out.println(Arrays.toString(dataRegister));
|
System.out.println(Arrays.toString(dataRegister));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -188,10 +188,9 @@ public class IOPorts {
|
|||||||
allLEDsB = b;
|
allLEDsB = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void refreshTable(ToggleButtonGroup parent) {
|
public static void refreshTable(ToggleButtonGroup parent) {
|
||||||
Stage stage = (Stage) parent.getScene().getWindow();
|
|
||||||
Table.refresh();
|
Table.refresh();
|
||||||
CreateWindow.refreshTable(stage);
|
CreateWindow.refreshTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int[] getToggleParams(ToggleButtonGroup parent) {
|
private static int[] getToggleParams(ToggleButtonGroup parent) {
|
||||||
@ -219,4 +218,8 @@ public class IOPorts {
|
|||||||
dataLatch = new int[2];
|
dataLatch = new int[2];
|
||||||
refreshPorts();
|
refreshPorts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void resetTRIS (){
|
||||||
|
trisLatch = new int[] {0xFF, 0xFF};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -110,11 +110,9 @@ public class Table {
|
|||||||
VBox labels = new VBox();
|
VBox labels = new VBox();
|
||||||
labels.getChildren().addAll(spacing, pcLabel, pclLabel, pclathLabel, wRegisterLabel, cLabel, dcLabel, zLabel, statusLabel, fsrLabel, prescalerLabel, intconLabel);
|
labels.getChildren().addAll(spacing, pcLabel, pclLabel, pclathLabel, wRegisterLabel, cLabel, dcLabel, zLabel, statusLabel, fsrLabel, prescalerLabel, intconLabel);
|
||||||
VBox button = new VBox();
|
VBox button = new VBox();
|
||||||
Button resetButton = new Button("Register reset");
|
Button resetButton = new Button("SFR reset");
|
||||||
resetButton.setOnAction(e -> {
|
resetButton.setOnAction(e -> {
|
||||||
DataRegister.initDataRegister();
|
triggerReset();
|
||||||
DataRegister.setPC(DataRegister.getPC()-1);
|
|
||||||
triggerRefresh();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
button.getChildren().addAll(spacing2, resetButton);
|
button.getChildren().addAll(spacing2, resetButton);
|
||||||
@ -131,9 +129,10 @@ public class Table {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void triggerRefresh() {
|
private static void triggerReset() {
|
||||||
//Controller_Frontend.triggerTableRefresh();
|
DataRegister.initDataRegister();
|
||||||
IOPorts.refreshUI(Controller_Frontend.getTRISbuttons(), Controller_Frontend.getPORTbuttons());
|
IOPorts.refreshUI(Controller_Frontend.getTRISbuttons(), Controller_Frontend.getPORTbuttons());
|
||||||
|
CreateWindow.refreshTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
Reference in New Issue
Block a user