blablabla

Dependencies:   MAG3110 MMA8451Q SLCD- TSI USBDevice mbed

Embed: (wiki syntax)

« Back to documentation index

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

FRDM-s401.h

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