Applications 4

De la WikiLabs
Versiunea din 10 martie 2019 16:25, autor: Zhascsi (discuție | contribuții) (Pagină nouă: == Exercise 1 == Make a 7-segment display transcoder using a '''case''' block that displays values ​​from 0 to 9. The input of the module will be called '''value''' and the ou...)
(dif) ← Versiunea anterioară | Versiunea curentă (dif) | Versiunea următoare → (dif)
Jump to navigationJump to search

Exercise 1

Make a 7-segment display transcoder using a case block that displays values ​​from 0 to 9. The input of the module will be called value and the output seg.

The output bits would control the segments of a digit display, one bit for each segment. The segment is light on when the corresponding bit is 0, otherwise it is off (negative logic).

The simplest implementation is a ROM Test the decoder by connecting its 4 bit input to SW[3], SW[2], SW[1] and SW[0], and displaying the output on a 7-segment display, the right digit (Digit0) of DE1-SOC display.

Coding style:

  • case statements should always include the default case.