This is an old revision of the document!
Segment Control
This is the “raw” interface. Each segment of the display can be controled independently. The segments are “active-low”, e.g. the segment is on if a logical “0” is written to it.
Programming Example
The code snippet bellow shows how to use the 7 segment display in segment control mode.
#include "reg_ctboard.h" CT_SEG7->RAW.BYTE.DS0 = (uint8_t) data_byte; /* Write byte of segment data to DS0. */ CT_SEG7->RAW.HWORD.DS3_2 = (uint16_t) data_halfword; /* Write half word of segment data to DS3..2. */ CT_SEG7->RAW.WORD = (uint32_t) data_word; /* Write word of segment data to all displays. */
ADDR_SEG7_RAW EQU 0x60000110 LDR r0, =ADDR_SEG7_RAW STRB r1, [r0, #0] ; Write byte of segment data to DS0. STRH r1, [r0, #2] ; Write half word of segment data to DS3..2. STR r1, [r0, #0] ; Write word of segment data to all displays.