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
hello friends, plz tell me how i will display in lcd using interna eeprom of pic16f877a microcontrollers.plz hel me . my compiler is micro c. i have written to this programme . what will require t0 write plz tell me. urgent one.diagram also tell me. plz...
Code:
/
/ LCD module connections
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
// End LCD module connections
void WriteEEPROM(char Addr, char Data);
char ReadEEPROM(char addr);
void main()
{
PORTB=0;
TRISB=0;
TRISA=0xFF;
}
void WriteEEPROM(char Addr, char Data)
{
while(EECON1.WR == 1);
EEADR = Addr;
EEDATA = Data;
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;
}