hassanmahmoud
New Member
I made a new project with the 16C73B microcontroller, but when adding the words, the random memory was not enough, so I added the EEPROM, but I had difficulty adding the words to the EEPROM 24C08B.
And I use Micro C program.
Thank you for all the help you give me
And I use Micro C program.
Thank you for all the help you give me
Code:
// Lcd pinout settings
sbit LCD_RS at RB0_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D7 at RB7_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D4 at RB4_bit;
// Pin direction
sbit LCD_RS_Direction at TRISB0_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D7_Direction at TRISB7_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB4_bit;
// I want save this (words) in EEprom "24C08B" ?
char txto[] = "ok";
char txtg[] = "welcom";
char txtf[] = "thanks";
char txtn[] = "No Information";
char txtr[] = "Ready"; //Ready Test
// // I want save this (words) in EEprom "24C08B" ?
void main()
{
trisa.f0=1;
trisa.f1=1;
trisa.f2=1;
trisa.f3=1;
trisa.f4=1;
trisa.f5=1;
trisa.f6=1;
trisa.f7=1;
porta=0;
Lcd_Init(); // Initialize LCD
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Out(1,6,"Welcome"); // "welcome"
Lcd_Out(2,1,"Test");
delay_ms(2000);
Lcd_Cmd(_LCD_CLEAR);
while(1) // <-- Need a forever loop here
{
if(porta==0b0000000) // test your money
{
Lcd_Out(1,7,txtr);
Lcd_Out(2,2,txtt);
delay_ms(500);
Lcd_Cmd(_LCD_CLEAR);
}
}
}