Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help me to build a data base using EEPROM read values

Status
Not open for further replies.

london

Member level 4
Joined
Jun 30, 2006
Messages
79
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,945
data base build

hi,
if any one help me to build a data base using EEPROM read values. Eg:
My data base,

typedef struct{
int read;
int write;
unsigned long address;
int secon;
int minit;
int hour;
int dd;
int mm;
int yy;
char temp;
}Data;

my eeprom reading values always 1 byte. Pls help me.
 

data base build

i think make a fucntion to assign these value with auto incremet of address for eeprom
 

Re: data base build

Append this


#define NUMBER_OF(x) sizeof(x)/sizeof(x[0])

typedef union{
Data DataBase_st;
char DataBuffer_c[sizeof(Data)];
}EEPROM_Data_tu;



________________
EEPROM_Data_tu EEPROM_Data_u;

// clear buffer
memset(EEPROM_Data_u.DataBuffer_c,0,NUMBER_OF(EEPROM_Data_u.DataBuffer_c));

// fill datastruct
EEPROM_Data_u.DataBase_st.minit = 100;

// put/get data
for(i=0; i < NUMBER_OF(EEPROM_Data_u.DataBuffer_c), i++)
{
put/get (EEPROM_Data_u.DataBuffer_c);
}


Gomez
 

    london

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top