====== 7-Segment Display - Binary Interface ====== The four 7-segment displays can jointly display a 16-bit value as a four digit HEX number. \\ In this mode the display can't be switched off, use the [[7segment_raw|segment control interface]] instead. \\ \\ > {{ctboard:ctboard_mode_1.svg?48px }} {{ctboard:ctboard_mode_2.svg?48px }} {{ctboard:ctboard_mode_3.svg?48px }} {{ctboard:ctboard_mode_4.svg?48px }} Please make sure the CT Board is in the correct mode. > Supported [[ctboard:mode_switch|modes]]: **1**, **2**, **3**, **4** \\ ===== Registers ===== The registers are read / write. \\ {{ctboard_7seg_bin_reg.svg}} \\ \\ ===== Diagram ===== \\ {{ctboard_7seg_bin.svg?700em}} \\ \\ ===== Programming Example ===== The code snippet below shows how to use the 7-segment display as HEX display. #include "reg_ctboard.h" CT_SEG7->BIN.BYTE.DS1_0 = (uint8_t) data_byte; /* Write byte of binary data to DS1..0. */ CT_SEG7->BIN.HWORD = (uint16_t) data_halfword; /* Write half word of binary data to all displays. */ \\ ADDR_SEG7_BIN EQU 0x60000114 LDR r0, =ADDR_SEG7_BIN STRB r1, [r0, #0] ; Write byte of binary data to DS1..0. STRH r1, [r0, #0] ; Write half word of binary data to all displays. \\