Salem TANG / SLCD

Dependents:   FRDM-KL46Z_Debug

Fork of SLCD by Erik -

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers FRDM-s401.h Source File

FRDM-s401.h

00001 #pragma once
00002 /*^^^^^^^^^^^^^^^^      LCD HARDWARE CONECTION ^^^^^^^^^^^^^^^^^^^^^^^^*/
00003 #define  _LCDFRONTPLANES   (8)            // # of frontPlanes
00004 #define  _LCDBACKPLANES    (4)            // # of backplanes
00005 
00006 /*
00007    LCD logical organization definition
00008    This section indicates how the LCD is distributed  how many characteres of (7-seg, 14,seg, 16 seg, or colums in case of Dot Matrix) does it contain
00009    First character is forced only one can be written
00010 
00011 */
00012 // HARDWARE_CONFIG Changing LCD pins Allows to verify all LCD pins easily
00013 // if HARDWARE_CONFIG  == 0 FRDM-KL46 RevB
00014 // if HARDWARE_CONFIG  == 1 FRDM-KL46 RevA
00015 #ifdef FRDM_REVA
00016 #define HARDWARE_CONFIG 1
00017 #else
00018 #define HARDWARE_CONFIG 0
00019 #endif
00020 
00021 #define _CHARNUM     (4)  //number of chars that can be written
00022 #define _CHAR_SIZE   (2)  // Used only when Dot Matrix is used
00023 #define _LCDTYPE     (2)  //indicate how many LCD_WF are required to write a single Character
00024 
00025 /*
00026   Following definitions indicate how characters are associated to waveform
00027 */
00028 /* Hardware configuration  */
00029 #if HARDWARE_CONFIG == 0
00030 
00031 // LCD PIN1 to LCDWF0  Rev B
00032 #define   CHAR1a    37      // LCD Pin 5
00033 #define   CHAR1b    17      // LCD Pin 6
00034 #define   CHAR2a    7       // LCD Pin 7
00035 #define   CHAR2b    8       // LCD Pin 8
00036 #define   CHAR3a    53      // LCD Pin 9
00037 #define   CHAR3b    38      // LCD Pin 10
00038 #define   CHAR4a    10      // LCD Pin 11
00039 #define   CHAR4b    11      // LCD Pin 12
00040 #define   CHARCOM0    40    // LCD Pin 1
00041 #define   CHARCOM1    52    // LCD Pin 2
00042 #define   CHARCOM2    19    // LCD Pin 3
00043 #define   CHARCOM3    18    // LCD Pin 4
00044 
00045 // LCD PIN1 to LCDWF2   for FRDM-KL46Z
00046 #elif HARDWARE_CONFIG == 1
00047 #define   CHAR1a    37      // LCD Pin 5
00048 #define   CHAR1b    17      // LCD Pin 6
00049 #define   CHAR2a    7       // LCD Pin 7
00050 #define   CHAR2b    8       // LCD Pin 8
00051 #define   CHAR3a    12      // LCD Pin 9
00052 #define   CHAR3b    26      // LCD Pin 10
00053 #define   CHAR4a    10      // LCD Pin 11
00054 #define   CHAR4b    11      // LCD Pin 12
00055 #define   CHARCOM0    51    // LCD Pin 1
00056 #define   CHARCOM1    52    // LCD Pin 2
00057 #define   CHARCOM2    19    // LCD Pin 3
00058 #define   CHARCOM3    16    // LCD Pin 4
00059 
00060 #endif
00061 
00062 /*Ascii Codification table information */
00063 #define ASCCI_TABLE_START '0'   // indicates which is the first Ascii character in the table
00064 #define ASCCI_TABLE_END   'Z'   // indicates which is the first Ascii character in the table
00065 #define BLANK_CHARACTER   '>'  // Indicate which ASCII character is a blank character (depends on ASCII table)
00066 
00067 #define _ALLON 0xFF     // Used for ALL_on function 
00068 
00069 #define SEGDP 0x01
00070 #define SEGC  0x02
00071 #define SEGB  0x04
00072 #define SEGA  0x08
00073 
00074 #define SEGD  0x01
00075 #define SEGE  0x02
00076 #define SEGG  0x04
00077 #define SEGF  0x08
00078 
00079 /* Fault detect initial limits */
00080 
00081 /* Fault detect initial parameters and limits */
00082 #define FAULTD_FP_FDPRS  FDPRS_32
00083 #define FAULTD_FP_FDSWW  FDSWW_128
00084 #define FAULTD_BP_FDPRS  FDPRS_64
00085 #define FAULTD_BP_FDSWW  FDSWW_128
00086 
00087 #define FAULTD_FP_HI  127
00088 #define FAULTD_FP_LO  110
00089 #define FAULTD_BP_HI  127
00090 #define FAULTD_BP_LO  110
00091 #define FAULTD_TIME   6
00092 
00093 extern const uint8_t  WF_ORDERING_TABLE[];   //   Logical Front plane N to LCD_WFx