hi friends, i need to know that is this programme will helpfull for eeprom in Pic

Status
Not open for further replies.

bikash123

Member level 2
Joined
Feb 19, 2012
Messages
48
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Tezpur University
Activity points
1,672
hi friends plz help me for connection diagramme of this programme and also i need to know the connection diagram of this programme and its procedure.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void WriteEEPROM(char Addre, char DataE)
{
while(EECON1.WR == 1);
EEADR = Addre;
EEDATA = DataE;
EECON1.EEPGD = 0;
EECON1.WREN = 1;
EECON2 = 0x55;
EECON2 = 0xAA;
EECON1.WR = 1;
EECON1.WREN = 0;
}
 
char ReadEEPROM(char addr)
{
EEADR = addr;
EECON1.EEPGD = 0;
EECON1.RD = 1;
asm nop; asm nop;
return EEDATA;
}

 
Last edited by a moderator:

You have only provided a code snippet and you are asking for a connection diagram, it doesn't make much sense.

Describe what you are trying to do and the devices involved.
 

That code matches the standard Microchip PIC EEPROM algorithm, meaning the EEPROM is INSIDE the PIC so there are no connections!

Brian.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…