Skip to content

Instantly share code, notes, and snippets.

@hutt
Created February 14, 2014 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hutt/808b3265f697cb4aebb1 to your computer and use it in GitHub Desktop.
Save hutt/808b3265f697cb4aebb1 to your computer and use it in GitHub Desktop.
include reg51.inc
Init: mov A, #11111111b
mov P1, #11111111b; alle Zeilen dauerhaft high, mit Spalten wird Rotation gesteuert
Eins: mov A, #11110111b
Start: mov P0, A; erste Spalte muss low sein, da nur wenn Spalte low und Zeile high ist dann leuchtet Licht
RR A; Akku nach rechts rotieren
mov P0,A; Akku in P0
CJNE A, #0F7h, Start; Vergleiche A mit 1111 0111d wenn ungleich nach Start springen
JMP Eins
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment