(C)stachan 08.02.2024

Task :: Counter & Lines

  • Schreiben Sie ein Programm mit Endlosschleife, das im Takt 1T=60000 von 0 hochzählt, wobei in der Hälfte der Zeit ein Trennpunkt ausgegeben wird (siehe unten).
  • Beachten Sie, dass die größte Dezimalzahl 255 ist. Durch den Überlauf des Byte-Registers beginnt das Zählen dann wieder bei 0.
  • Wird der rote Button gedrückt, werden drei Linien ausgegeben (programmieren Sie eine Schleife) und der Zähler wird auf 0 zurückgesetzt.
  • Während die 3 Linien ausgegeben werden, passiert Folgendes: bei jeder Linie soll die gelbe LED einmal für 0,5T aufleuchten und dann ebenso lange dunkel sein -> Resultat = Blinken.

  • Write a programme with an infinite loop that counts up from 0 in the cycle 1T=60000, whereby a separating point is output in half the time (see below).
  • Note that the largest decimal number is 255. Due to the overflow of the byte register, counting then starts again at 0.
  • If the red button is pressed, three lines are output (programme a loop) and the counter is reset to 0.
  • While the 3 lines are being output, the following happens: for each line, the yellow LED should light up once for 0.5T and then be dark for the same amount of time -> result = flashing.

counter-lines