517 Universal Binary to Segment Decoder

517 : Universal Binary to Segment Decoder

Design render
  • Author: Rebecca G. Bettencourt
  • Description: Decodes various binary codes to various segmented displays.
  • GitHub repository
  • Clock: 0 Hz

How it works

This project is composed of four modules:

  • A BCD to seven segment decoder with a wide variety of options for customizing the appearance of digits
  • An ASCII to seven segment decoder with two different “fonts”
  • A dual BCD to Cistercian numeral decoder
  • A BCV (binary-coded vigesimal) to Kaktovik numeral decoder

BCD to seven segment decoder

This mode converts a decimal digit in BCD to its representation on a standard seven segment display. There are inputs that affect the display of the digits 6, 7, and 9, and eight different options for handling out-of-range values. These inputs allow this decoder to match the behavior of just about any other BCD to seven segment decoder, making it universal.

The signals used in this mode are:

  • /AL - Active low. If HIGH, outputs will be HIGH when lit. If LOW, outputs will be LOW when lit.
  • /BI - Blanking input. If LOW, all segments will be blank regardless of other inputs, including /LT.
  • /LT - Lamp test. When /BI is HIGH and /LT is LOW, all segments will be lit.
  • /RBI - Ripple blanking input. If the BCD value is zero and /RBI is LOW, all segments will be blank.
  • V0, V1, V2 - Selects the output when the BCD value is out of range.
  • X6 - When HIGH, the extra segment a will be lit on the digit 6.
  • X7 - When HIGH, the extra segment f will be lit on the digit 7.
  • X9 - When HIGH, the extra segment d will be lit on the digit 9.
  • A, B, C, D - BCD input from least significant bit A to most significant bit D.
  • a, b, c, d, e, f, g - Outputs for a seven segment display.
  • /RBO - Ripple blanking output. HIGH when BCD value is nonzero or /RBI is HIGH.

The pin assignments in this mode are:

Dedicated Input Dedicated Output Bidirectional
0 A Segment a Input - X6
1 B Segment b Input - X7
2 C Segment c Input - X9
3 D Segment d Input - /LT
4 V0 Segment e Input - /BI
5 V1 Segment f Input - /AL
6 V2 Segment g Input - LOW
7 /RBI /RBO Input - LOW

ASCII to seven segment decoder

This mode converts an ASCII character to a representation on a standard seven segment display. Like with the BCD decoder, there are inputs that affect the display of the digits 6, 7, and 9. There are also two choices of “font” and the option to display lowercase letters as uppercase or as lowercase.

The signals used in this mode are:

  • /AL - Active low. If HIGH, outputs will be HIGH when lit. If LOW, outputs will be LOW when lit.
  • /BI - Blanking input. If LOW, all segments will be blank regardless of other inputs.
  • FS - Font select. Selects one of two “fonts.”
  • LC - Lower case. If LOW, lowercase letters will appear as uppercase.
  • X6 - When HIGH, the extra segment a will be lit on the digit 6.
  • X7 - When HIGH, the extra segment f will be lit on the digit 7.
  • X9 - When HIGH, the extra segment d will be lit on the digit 9.
  • D0...D6 - ASCII input from least significant bit D0 to most significant bit D6.
  • a, b, c, d, e, f, g - Outputs for a seven segment display.
  • /LTR - Letter. LOW when the input is a letter (A...Z or a...z).

The pin assignments in this mode are:

Dedicated Input Dedicated Output Bidirectional
0 D0 Segment a Input - X6
1 D1 Segment b Input - X7
2 D2 Segment c Input - X9
3 D3 Segment d Input - FS
4 D4 Segment e Input - /BI
5 D5 Segment f Input - /AL
6 D6 Segment g Input - HIGH
7 LC /LTR Input - LOW

Dual BCD to Cistercian numeral decoder

This mode converts two decimal digits in BCD to their representations on the segmented display for Cistercian numerals shown below.

The patterns produced for each input value are shown below.

The signals used in this mode are:

  • /AL - Active low. If HIGH, outputs will be HIGH when lit. If LOW, outputs will be LOW when lit.
  • /BI - Blanking input. If LOW, all segments will be blank regardless of other inputs, including /LT1 and /LT2.
  • /LT1 - Lamp test for digit 1. When /BI is HIGH and /LT1 is LOW, all segments for digit 1 will be lit.
  • /LT2 - Lamp test for digit 2. When /BI is HIGH and /LT2 is LOW, all segments for digit 2 will be lit.
  • A1, B1, C1, D1 - BCD input for digit 1 from least significant bit A1 to most significant bit D1.
  • A2, B2, C2, D2 - BCD input for digit 2 from least significant bit A2 to most significant bit D2.
  • U1, V1, W1, X1, Y1 - Outputs for digit 1 on a Cistercian segmented display.
  • U2, V2, W2, X2, Y2 - Outputs for digit 2 on a Cistercian segmented display.

The pin assignments in this mode are:

Dedicated Input Dedicated Output Bidirectional
0 A1 Segment U1 Output - Y1
1 B1 Segment U2 Output - Y2
2 C1 Segment V1 Input - /LT1
3 D1 Segment V2 Input - /LT2
4 A2 Segment W1 Input - /BI
5 B2 Segment W2 Input - /AL
6 C2 Segment X1 Input - LOW
7 D2 Segment X2 Input - HIGH

BCV to Kaktovik numeral decoder

This mode converts a vigesimal (base 20) digit in BCV (binary-coded vigesimal) to its representation on the segmented display for Kaktovik numerals shown below.

The patterns produced for each input value are shown below.

The signals used in this mode are:

  • /AL - Active low. If HIGH, outputs will be HIGH when lit. If LOW, outputs will be LOW when lit.
  • /BI - Blanking input. If LOW, all segments will be blank regardless of other inputs, including /LT.
  • /LT - Lamp test. When /BI is HIGH and /LT is LOW, all segments will be lit.
  • /RBI - Ripple blanking input. If the BCV value is zero and /RBI is LOW, all segments will be blank.
  • /VBI - Overflow blanking input. If the BCV value is out of range and /VBI is LOW, all segments will be blank.
  • A, B, C, D, E - BCV input from least significant bit A to most significant bit E.
  • a, b, c, d, e, f, g, h - Outputs for a Kaktovik segmented display.
  • /RBO - Ripple blanking output. HIGH when BCV value is nonzero or /RBI is HIGH.
  • V - Overflow. HIGH when BCV value is out of range (greater than or equal to 20).

The pin assignments in this mode are:

Dedicated Input Dedicated Output Bidirectional
0 A Segment a Output - h
1 B Segment b Output - V
2 C Segment c
3 D Segment d Input - /LT
4 E Segment e Input - /BI
5 Segment f Input - /AL
6 /VBI Segment g Input - HIGH
7 /RBI /RBO Input - HIGH

How to test

The test directory includes extensive tests for each of the four modules.

External hardware

For the BCD and ASCII modes, a standard seven-segment display is used.

For the Cistercian mode, a segmented display like the one below is used. There are design files for such a display here.

For the Kaktovik mode, a segmented display like the one below is used. There are design files for such a display here.

IO

#InputOutputBidirectional
0A; D0; A1; ASegment a; U1; aX6; X6; Y1; h
1B; D1; B1; BSegment b; U2; bX7; X7; Y2; V
2C; D2; C1; CSegment c; V1; cX9; X9; /LT1; -
3D; D3; D1; DSegment d; V2; d/LT; FS; /LT2; /LT
4V0; D4; A2; ESegment e; W1; e/BI (blanking input)
5V1; D5; B2; -Segment f; W2; f/AL (active low)
6V2; D6; C2; /VBISegment g; X1; gM0 (mode select)
7/RBI; LC; D2; /RBI/RBO; /LTR; X2; /RBOM1 (mode select)

Chip location

Controller Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux tt_um_chip_rom (Chip ROM) tt_um_factory_test (TinyTapeout Factory Test) tt_um_MichaelBell_tinyQV (TinyQV Risc-V SoC) tt_um_urish_silife_max (Game of Life 8x32 (siLife)) tt_um_vc32_cpu (VC 16-bit CPU) tt_um_tinytapeout_logo_screensaver (VGA Screensaver with Tiny Tapeout Logo) tt_um_htfab_rotfpga2 (ROTFPGA v2a) tt_um_htfab_latch_test (Latch test) tt_um_no_time_for_squares_tommythorn (No Time For Squares, IHP edition) tt_um_tommythorn_maxbw (Asynchronous Multiplier) tt_um_urish_simon (Simon Says memory game) tt_um_htfab_rotfpga2_ff (ROTFPGA v2b) tt_um_meiniKi_ttihp_fazyrv_exotiny (FazyRV-ExoTiny) tt_um_rebeccargb_hardware_utf8 (Hardware UTF Encoder/Decoder) tt_um_rebeccargb_universal_decoder (Universal Binary to Segment Decoder) tt_um_algofoogle_raybox_zero (raybox-zero TTIHP0p2 edition) tt_um_z2a_rgb_mixer (RGB Mixer demo) tt_um_vga_clock (VGA clock) tt_um_frequency_counter (Frequency counter) tt_um_brandonramos_VGA_Pong_with_NES_Controllers (VGA Pong with NES Controllers) tt_um_demosiine_sda (DemoSiine) tt_um_toivoh_demo_deluxe (Sequential Shadows Deluxe [TT08 demo competition]) tt_um_edwintorok (Rounding error) tt_um_2048_vga_game (2048 sliding tile puzzle game (VGA)) tt_um_hpretl_spi (SPI Test) tt_um_top_mole99 (One Sprite Pony) tt_um_urish_spell (SPELL) tt_um_rebeccargb_vga_pride (VGA Pride) tt_um_autosel (I2C EEPROM Project Selection) tt_um_a1k0n_nyancat (VGA Nyan Cat) tt_um_a1k0n_vgadonut (VGA donut) tt_um_rebeccargb_colorbars (Color Bars) tt_um_crispy_vga (Crispy VGA) tt_um_kbeckmann_flame (Flame demo) tt_um_jamesrosssharp_1bitam (1bit_am_sdr) tt_um_simon_cipher (simon_cipher) tt_um_htfab_bouncy_capsule (Bouncy Capsule) tt_um_phansel_laplace_lut (Experiment Number Six: Laplace LUT) tt_um_kianv_bare_metal (KianV RISC-V RV32E Baremetal SoC) tt_um_calonso88_rsa (8 bit RSA encryption) tt_um_silice (Warp) tt_um_rejunity_vga_test01 (VGA Drop (audio/visual demo)) tt_um_a1k0n_demo (Demo by a1k0n) tt_um_MichaelBell_canon (TT08 Pachelbel's Canon demo) tt_um_htfab_caterpillar (Simon's Caterpillar) tt_um_ravenslofty_chess (Chess) tt_um_fountaincoder_top_V2 (maddihp) tt_um_tomkeddie_a (VGA Experiments in Tennis) tt_um_MichaelBell_mandelbrot (VGA Mandelbrot) tt_um_MichaelBell_rle_vga (RLE Video Player) tt_um_jayjaywong12 (mulmul) tt_um_wokwi_392873974467527681 (PILIPINASLASALLE) tt_um_froith_goldcrest (Goldcrest RISC-V) tt_um_dvxf_dj8v (DJ8 8-bit CPU) tt_um_hpretl_minilogix (Minilogix) tt_um_tomkeddie_b (Transmit UART) tt_um_joerdsonsilva_modem (Multimode Modem) tt_um_oled_frequency_counter (Frequency Counter SSD1306 OLED) tt_um_stochastic_addmultiply_CL123abc (Stochastic Multiplier, Adder and Self-Multiplier) tt_um_QIF_8bit (8 Bit Digital QIF) tt_um_toivoh_retro_console (Retro Console) tt_um_cejmu (CEJMU Beers and Adders) tt_um_rejunity_sn76489 (Classic 8-bit era Programmable Sound Generator SN76489) tt_um_dlmiles_tt05_i2c_bert (I2C BERT) tt_um_dlmiles_muldiv8 (MULDIV unit (8-bit signed/unsigned)) tt_um_dlmiles_loopback (IHP loopback tile with input skew measurement) tt_um_dlmiles_bad_synchronizer (Example of Bad Synchronizer) tt_um_wokwi_407306064811090945 (DDR throughput and flop aperature test) tt_um_urish_giant_ringosc (Giant Ring Oscillator (3853 inverters)) tt_um_digital_clock_example (Digital Desk Clock v2.0) tt_um_rejunity_z80 (Zilog Z80) tt_um_rejunity_ay8913 (Classic 8-bit era Programmable Sound Generator AY-3-8913) tt_um_rtfb_collatz (Collatz conjecture brute-forcer) tt_um_ccattuto_conway (Conway's Game of Life on UART and VGA) tt_um_snow (Snow) tt_um_calonso88_74181 (8-bit ALU based on 2x 74181) tt_um_rejunity_vga_logo (VGA Tiny Logo (1 tile)) tt_um_NicklausThompson_SkyKing (SkyKing Demo) tt_um_htfab_cells (Cell mux) tt_um_htfab_pg_1x1 (Power gating test (1x1)) tt_um_htfab_pg_1x2 (Power gating test (1x2)) tt_um_dlmiles_ringosc_5inv (Ring Oscillator (5 inverter)) tt_um_devinatkin_pulse_width_counter (Pulse Width Counter) tt_um_algofoogle_vga_fun_wrapper (TTIHP VGA FUN!) tt_um_cfib_demo (cfib Demoscene Entry) tt_um_vga_glyph_mode (Glyph Mode) tt_um_favoritohjs_scroller (VGA Scroller) tt_um_pulse_generator (TTL Pulse Generator) tt_um_rajum_iterativeMAC (Iterative MAC) tt_um_algofoogle_tinyvga_fun_wrapper (TTIHP TinyVGA FUN!) tt_um_urish_sram_test (SRAM (1024x8) test) tt_um_one_bit_puf_wrapper (One Bit PUF) tt_um_multi_bit_puf_wrapper (One Bit PUF) tt_um_gray_sobel (Gray scale and Sobel filter) tt_um_rebeccargb_intercal_alu (INTERCAL ALU)