fixed horizontal offset error

Basically, the LPM instruction (3 cycles) does not always take 3 cycles,
(I think because of the timing needed to read the Flash memory),
and this disrupts the timing of the signal, leading to some offsets
depending on what is shown on the line.

Thus, the LPM instruction has been replaced with an RJMP one, which,
instead, always takes 3 perfect cycles to be performed, timing is
not disrupted anymore, and image appears ok.
This commit is contained in:
giomba committed 2021-08-11 11:24:41 +02:00
1 parent eaef011cbd
commit 02a19ef783
2 files changed
+13026 -11030

No files matched your search

+13024 -11029
View File
File diff suppressed because it is too large. Load diff
+2 -1
View File
@@ -100,7 +100,8 @@ int main(int argc, char** argv) {
outfile << '\t' << "brne 1b" << std::endl;
}
outfile << '\t' << "lpm" << std::endl;
outfile << '\t' << "rjmp 2f" << std::endl;
outfile << "2:" << std::endl;
last = current;
count = 1;