SLAAEE9 November 2023
Sysconfig is utilized to select and name the needed GPIO pins and timer resource needed by the software LCD solution. The provided Sysconfig file already has the appropriate naming provided for a working solution. Add, remove, or modify the provided pin-out to suit your application needs, while observing the recommendations provided in the Section 2 section. Sysconfig is also where you can change timer clock settings, and thus the LCD refresh rate. If you need to hit a specific refresh rate, keep in mind that the LCD_Update_Clock described in Section 3.2, needs eight update cycles to refresh the entire LCD screen. This means you will need to be servicing the timer interrupt at eight times the refresh rate. For example, if one wanted an LCD refresh rate of 30Hz, then the timer must be setup to interrupt the device at a rate of 240Hz to meet that refresh rate.
Table 3-1 showcases the code definitions and maps that need to be modified to fit your solution. This includes customizing to your chosen pins and the characters to LCD mapping as discussed in Section 1.2. These definitions are found at the beginning of the principle .c file for each project.
Type | Name | Details |
---|---|---|
#define | COM_LINE_TOTAL | Number of COM lines used - default 4 |
#define | SEGMENT_LINE_TOTAL | Number of Segment lines used |
#define | SEGMENT_LINE_LOWER_PORT_MASK | Port mask of used pins for segments in lower Port A |
#define | SEGMENT_LINE_UPPER_PORT_MASK | Port mask of used pins for segments in upper Port B |
#define | SEGMENT_LINE_PORT_SPLIT | First segment where an upper port pin is assigned. Corresponds to first upper port assignment in gSegmentOffsetMap |
uint8_t array | gNumberMap[] | Array that maps different characters to LCD map. |
uint8_t array | gSegmentOffsetMap[] | Map of
different segments lines across a port. SEGMENT_LINE_LOWER_PORT_MASK must map these segments to port. All Port A segments (lower) must be listed before Port B segments (upper). |