ExecutionTime Multiplier, Hex Format

This commit is contained in:
2024-06-02 21:41:00 +02:00
parent 8bc6d5cfd0
commit 0ed167f822
6 changed files with 37 additions and 20 deletions

View File

@ -13,7 +13,7 @@ public class Timer {
if (DataRegister.getDirectBit(OPTION, T0CS) == 0){
if (PreScaler.isPrescalerOnTimer()){
for (int i = 0; i < cycles; i++){
PreScaler.decrement();
PreScaler.decrement(false);
}
} else {
increment(false);
@ -26,12 +26,11 @@ public class Timer {
if ((DataRegister.getDirectBit(OPTION, T0CS) == 1) && !Controller_Frontend.isSleeping()){
int newpin = (register >> 4) & 1;
if (newpin != oldpin) {
System.out.println(newpin + " " + oldpin);
if (DataRegister.getDirectBit(OPTION, T0SE) == 0) {
// Low to high
if (newpin == 1 && oldpin == 0) {
if (PreScaler.isPrescalerOnTimer())
PreScaler.decrement();
PreScaler.decrement(true);
else
increment(true);
}
@ -39,7 +38,7 @@ public class Timer {
// High to low
if (newpin == 0 && oldpin == 1) {
if (PreScaler.isPrescalerOnTimer())
PreScaler.decrement();
PreScaler.decrement(true);
else
increment(true);
}