/home/daqweb/fgddaq/c8051/lpb.h File Reference

Go to the source code of this file.

Data Structures

struct  EEPAGE
struct  user_data_type

Defines

#define VREF   2.50f
#define ADT7486A_ADDR0   0x4C
#define NCHANNEL_ADT7486A   1
#define SST_LINE1   1
#define CLEAR   0
#define SET   1
#define DONE   1
#define FAILED   0
#define ON   1
#define OFF   0
#define IntGAIN1   0
#define IntGAIN2   1
#define IntGAIN4   2
#define IntGAIN8   3
#define IntGAIN16   4
#define SERIALN_LENGTH   4
#define SERIALN_ADD   (PageAddr[3])
#define PAGE_SIZE   (unsigned int) sizeof(eepage)
#define EEP_CTRL_KEY   0x3C000000
#define EEP_CTRL_READ   0x00110000
#define EEP_CTRL_WRITE   0x00220000
#define EEP_CTRL_INVAL_REQ   0xff000000
#define EEP_CTRL_INVAL_KEY   0x00ff0000
#define EEP_CTRL_OFF_RANGE   0x0000ff00
#define EEP_RW_IDX   0x0a
#define IDXDAC   21
#define IDXCTL   2
#define IDXEEP_CTL   48
#define IDXDELAY   6
#define UCTEMPERATURE_MASK   0x0080
#define BTEMPERATURE_MASK   0x0600
#define VOLTAGE_MASK   0x0005
#define CURRENT_MASK   0x0008
#define MAIN_CURRENT_MASK   0x8000
#define humsense   1

Functions

float read_voltage (unsigned char channel, unsigned int *rvalue, unsigned char gain)

Variables

float code coeff [8] = {4.615, 3.136, 0.1, 3.136, 0.4, 0.4, 0.2, 0.01}
float code offset [8] = { 0, 0, 0, 0, 0, 0, 0, 0}
unsigned int xdata ltc2620mirror [16]
unsigned int xdata PageAddr [] = {0x000, 0x200, 0x400, 0x600}
struct EEPAGE xdata eepage
struct user_data_type xdata user_data
unsigned char bdata rCTL
sbit CPup = rCTL ^ 0
sbit Cmode = rCTL ^ 3
sbit CeeS = rCTL ^ 4
sbit CeeR = rCTL ^ 5
sbit CeeClr = rCTL ^ 6
sbit CmSd = rCTL ^ 7
unsigned char bdata rCSR
sbit SPup = rCSR ^ 0
sbit S6dd = rCSR ^ 1
sbit Smode = rCSR ^ 3
sbit SeeS = rCSR ^ 4
sbit SeeR = rCSR ^ 5
sbit SsS = rCSR ^ 6
sbit SmSd = rCSR ^ 7
unsigned int bdata rESR
sbit Vss = rESR ^ 8
sbit Iss = rESR ^ 9
sbit Vdd = rESR ^ 10
sbit Idd = rESR ^ 11
sbit I5 = rESR ^ 12
sbit I33 = rESR ^ 13
sbit I18 = rESR ^ 14
sbit uCT = rESR ^ 15
sbit IntssTT = rESR ^ 0
sbit Ext1ssTT = rESR ^ 1
sbit Ext2ssTT = rESR ^ 2
sbit EEPROM = rESR ^ 3
sbit pcbssTT = rESR ^ 4
sbit RdssT = rESR ^ 5
sbit V6Fault = rESR ^ 7
sbit VCC_EN = P1 ^ 3
sbit VREG_5 = P2 ^ 5
sbit VREG_3 = P2 ^ 6
sbit V6ddFlag = P1 ^ 6
sbit DELAY_0 = P0 ^ 6
sbit DELAY_1 = P0 ^ 7

Define Documentation

#define ADT7486A_ADDR0   0x4C

Definition at line 20 of file lpb.h.

#define BTEMPERATURE_MASK   0x0600

Definition at line 187 of file lpb.h.

#define CLEAR   0

Definition at line 25 of file lpb.h.

#define CURRENT_MASK   0x0008

Definition at line 189 of file lpb.h.

#define DONE   1

Definition at line 27 of file lpb.h.

#define EEP_CTRL_INVAL_KEY   0x00ff0000

Definition at line 103 of file lpb.h.

#define EEP_CTRL_INVAL_REQ   0xff000000

Definition at line 102 of file lpb.h.

#define EEP_CTRL_KEY   0x3C000000

Definition at line 99 of file lpb.h.

#define EEP_CTRL_OFF_RANGE   0x0000ff00

Definition at line 104 of file lpb.h.

#define EEP_CTRL_READ   0x00110000

Definition at line 100 of file lpb.h.

#define EEP_CTRL_WRITE   0x00220000

Definition at line 101 of file lpb.h.

#define EEP_RW_IDX   0x0a

Definition at line 105 of file lpb.h.

#define FAILED   0

Definition at line 28 of file lpb.h.

#define humsense   1

Definition at line 206 of file lpb.h.

#define IDXCTL   2

Definition at line 133 of file lpb.h.

#define IDXDAC   21

Definition at line 132 of file lpb.h.

#define IDXDELAY   6

Definition at line 135 of file lpb.h.

#define IDXEEP_CTL   48

Definition at line 134 of file lpb.h.

#define IntGAIN1   0

Definition at line 32 of file lpb.h.

#define IntGAIN16   4

Definition at line 36 of file lpb.h.

#define IntGAIN2   1

Definition at line 33 of file lpb.h.

#define IntGAIN4   2

Definition at line 34 of file lpb.h.

#define IntGAIN8   3

Definition at line 35 of file lpb.h.

#define MAIN_CURRENT_MASK   0x8000

Definition at line 190 of file lpb.h.

#define NCHANNEL_ADT7486A   1

Definition at line 21 of file lpb.h.

#define OFF   0

Definition at line 30 of file lpb.h.

#define ON   1

Definition at line 29 of file lpb.h.

#define PAGE_SIZE   (unsigned int) sizeof(eepage)

Definition at line 96 of file lpb.h.

#define SERIALN_ADD   (PageAddr[3])

Definition at line 59 of file lpb.h.

#define SERIALN_LENGTH   4

Definition at line 58 of file lpb.h.

#define SET   1

Definition at line 26 of file lpb.h.

#define SST_LINE1   1

Definition at line 22 of file lpb.h.

#define UCTEMPERATURE_MASK   0x0080

Definition at line 186 of file lpb.h.

#define VOLTAGE_MASK   0x0005

Definition at line 188 of file lpb.h.

#define VREF   2.50f

Definition at line 17 of file lpb.h.


Function Documentation

float read_voltage ( unsigned char  channel,
unsigned int *  rvalue,
unsigned char  gain 
)

Definition at line 198 of file lpb.c.


Variable Documentation

sbit CeeClr = rCTL ^ 6

Definition at line 142 of file lpb.h.

sbit CeeR = rCTL ^ 5

Definition at line 141 of file lpb.h.

sbit CeeS = rCTL ^ 4

Definition at line 140 of file lpb.h.

sbit Cmode = rCTL ^ 3

Definition at line 139 of file lpb.h.

sbit CmSd = rCTL ^ 7

Definition at line 143 of file lpb.h.

float code coeff[8] = {4.615, 3.136, 0.1, 3.136, 0.4, 0.4, 0.2, 0.01}

Definition at line 50 of file lpb.h.

sbit CPup = rCTL ^ 0

Definition at line 138 of file lpb.h.

sbit DELAY_0 = P0 ^ 6

Definition at line 202 of file lpb.h.

sbit DELAY_1 = P0 ^ 7

Definition at line 203 of file lpb.h.

struct EEPAGE xdata eepage
Initial value:
{

     0x00000000   

   , 0x0000, 0x0000

   , 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
   , 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000


   , 0.0, 3.5, 0.1, 5.5, 0.0, 0.0, 0.0,  0.0


   , 6.0, 5.5, 0.3, 6.5, 1.8, 0.1, 0.5,  0.2  

   , 10., 50.

   , 10., 50.
}

Definition at line 76 of file lpb.h.

sbit EEPROM = rESR ^ 3

Definition at line 174 of file lpb.h.

sbit Ext1ssTT = rESR ^ 1

Definition at line 172 of file lpb.h.

sbit Ext2ssTT = rESR ^ 2

Definition at line 173 of file lpb.h.

sbit I18 = rESR ^ 14

Definition at line 168 of file lpb.h.

sbit I33 = rESR ^ 13

Definition at line 167 of file lpb.h.

sbit I5 = rESR ^ 12

Definition at line 166 of file lpb.h.

sbit Idd = rESR ^ 11

Definition at line 164 of file lpb.h.

sbit IntssTT = rESR ^ 0

Definition at line 171 of file lpb.h.

sbit Iss = rESR ^ 9

Definition at line 162 of file lpb.h.

unsigned int xdata ltc2620mirror[16]

Definition at line 52 of file lpb.h.

float code offset[8] = { 0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 51 of file lpb.h.

unsigned int xdata PageAddr[] = {0x000, 0x200, 0x400, 0x600}

Definition at line 57 of file lpb.h.

sbit pcbssTT = rESR ^ 4

Definition at line 176 of file lpb.h.

unsigned char bdata rCSR

Definition at line 145 of file lpb.h.

unsigned char bdata rCTL

Definition at line 137 of file lpb.h.

sbit RdssT = rESR ^ 5

Definition at line 177 of file lpb.h.

unsigned int bdata rESR

Definition at line 160 of file lpb.h.

sbit S6dd = rCSR ^ 1

Definition at line 147 of file lpb.h.

sbit SeeR = rCSR ^ 5

Definition at line 150 of file lpb.h.

sbit SeeS = rCSR ^ 4

Definition at line 149 of file lpb.h.

sbit Smode = rCSR ^ 3

Definition at line 148 of file lpb.h.

sbit SmSd = rCSR ^ 7

Definition at line 152 of file lpb.h.

sbit SPup = rCSR ^ 0

Definition at line 146 of file lpb.h.

sbit SsS = rCSR ^ 6

Definition at line 151 of file lpb.h.

sbit uCT = rESR ^ 15

Definition at line 169 of file lpb.h.

struct user_data_type xdata user_data

Definition at line 130 of file lpb.h.

sbit V6ddFlag = P1 ^ 6

Definition at line 200 of file lpb.h.

sbit V6Fault = rESR ^ 7

Definition at line 179 of file lpb.h.

sbit VCC_EN = P1 ^ 3

Definition at line 196 of file lpb.h.

sbit Vdd = rESR ^ 10

Definition at line 163 of file lpb.h.

sbit VREG_3 = P2 ^ 6

Definition at line 198 of file lpb.h.

sbit VREG_5 = P2 ^ 5

Definition at line 197 of file lpb.h.

sbit Vss = rESR ^ 8

Definition at line 161 of file lpb.h.


Generated on 1 Feb 2022 for FGDC8051-LPB by  doxygen 1.6.1