This is an old revision of the document!


Digital i/o

Digital i/o

Schreibe ein Programm das…

  1. … bei dem Drücken von Schalter 1 (S1), LED 2 einschaltet; realisiere dieses analog für S2 ⇒ LED 3 und S3 ⇒ LED 1.
  2. … eine Ampel mithilfe von LEDs simuliert (Gelb blinkt beim Wechsel Grün zu Rot, usw.)
  3. … Tastendrücke zählt und den Wert binär codiert auf den LEDs anzeigt. Max 7. (Ein Tastendruck wird beim Loslassen des Knopfes gezählt)
  4. … simulates memory game. Every LED corresponds a button (LED1⇒S1, etc.) Controller flashed LEDs in random order and user have to repeat this order. Every next step the sequens goes longer. After every insertion controller test the result. If wrong insertion is detected the game is over and result is presented to the user (on the 7-seg display or LCD).
  5. … measures reaction time. Program start when one button is pressed, then a LED goes on and user have to press a button under the LED. Sequence and time when LED goes on is random. Best result in milliseconds is presented to the user (on the 7-seg display or LCD).

Timers

Write the program that …

  1. … flashes LEDs with different frequency using timer. Frequency can be changed by the buttons. (S1 – 1 Hz, S2 – 0,5 Hz, S3 – 0,1 Hz)
  2. … flashes LEDs with different frequency using timer. S1 increases flashing frequency and S3 decreases.

7-seg number inicator

Kirjutada programm, mis …

  1. … counts numbers on 7-seg display from 1 to 9. If button S1 is pressed the counting starts to go backward. If S3 is pressed the counting resumes to go forward. Digit change frequency is 1 second.
de/exercises/digi.1239188450.txt.gz · Last modified: 2020/07/20 09:00 (external edit)
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0