Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/26/10 05:37
Modified:
  10/26/10 05:44

Read: times


 
Msg Score: -1
 -1 Didn't Search First
#179335 - LCD interfacing
Responding to: ???'s previous message
pl. can you help me in writing any character e.g 'A' on LCD in 'C' lang (SDCC Compiler).

RS= P2.0
R/W=P2.1
E=P2.2

AND PORT DATA IS COMING ON P1.0 TO P1.7....please tell me about the header files that are to be included. i have made simple lcd programs using assembly but i m new to 'C'. i m using 8051 uC.

i tried this code but its giving too many errors such as implicit declaration,,,too many parameters etc.how to make delay_ms function.

#define rs P2_0
#define rw P2_1
#define enable P2_2
#define lcd_port P1

main()
{
Lcd_Ini();
lcd_command(0x86);
lcd_display(‘V’);
lcd_display(‘I’);
lcd_display(‘J’);
lcd_command(0x0C4);
lcd_display(‘A’);
lcd_display(‘B’);
lcd_display(‘C’);
lcd_display(‘D’);
lcd_display(‘E’);
lcd_display(‘F’);
lcd_display(‘G’);
lcd_display(‘H’);
lcd_display(‘I’);
lcd_display(‘J’);
while(1)
{

}
}

void Lcd_Ini()
{
lcd_command(0x38);
delay_ms(30);
lcd_command(0x0c);
delay_ms(10);
lcd_command(0x06);
delay_ms(10);
lcd_command(0x01);
delay_ms(10);
}

void lcd_command(unsigned char command)
{
rw=LOW;
rs=LOW;
lcd_port=command;
enable=HIGH;
enable=LOW;
delay_ms(5);
}

void lcd_display(unsigned char display)
{
rw=LOW;
rs=HIGH;
lcd_port=display;
enable=HIGH;
enable=LOW;
delay_ms(1);
}


Thanks...



List of 48 messages in thread
TopicAuthorDate
8051 c assembler            01/01/70 00:00      
   To get you started right away...            01/01/70 00:00      
      Beware            01/01/70 00:00      
         You're complicating the question            01/01/70 00:00      
            You're right            01/01/70 00:00      
   Try Raisonance's tool chain            01/01/70 00:00      
   After assembling.            01/01/70 00:00      
      prog.ihx            01/01/70 00:00      
         ihx...            01/01/70 00:00      
            It's not a shortcut!            01/01/70 00:00      
               Where is the 8051?            01/01/70 00:00      
                  everything about compiling a C program            01/01/70 00:00      
                     So ... which toolchain should the PC-user use?            01/01/70 00:00      
                        Already covered in linked thread            01/01/70 00:00      
                        Which toolchain?            01/01/70 00:00      
                           Design for whom?            01/01/70 00:00      
                  Debugging normally so much easier on PC            01/01/70 00:00      
               SDCC "shortcut"            01/01/70 00:00      
                  Presumably, from the extension?            01/01/70 00:00      
                     Could be a linker input file too, for some tool chains            01/01/70 00:00      
            syn            01/01/70 00:00      
   Books; Study.            01/01/70 00:00      
   if you want to take the difficult road ...            01/01/70 00:00      
   compilie error            01/01/70 00:00      
      no other files are seen in bin folder            01/01/70 00:00      
         yes..            01/01/70 00:00      
            You need to engage the environment variable PATH            01/01/70 00:00      
               I don't think PATH is used for finding "documents"?            01/01/70 00:00      
                  use current directory            01/01/70 00:00      
                     paths?            01/01/70 00:00      
                        files without paths            01/01/70 00:00      
            bin vs src            01/01/70 00:00      
   ...            01/01/70 00:00      
   Got the .ihx            01/01/70 00:00      
      which derivative            01/01/70 00:00      
         linking            01/01/70 00:00      
            include            01/01/70 00:00      
               ...            01/01/70 00:00      
                  version?            01/01/70 00:00      
                     2.9.0            01/01/70 00:00      
                        Remove it            01/01/70 00:00      
                           What is a "C" assembler?            01/01/70 00:00      
                              Already answered!            01/01/70 00:00      
   thanks everyone for help            01/01/70 00:00      
      fine, could you share how you got there?            01/01/70 00:00      
         ..            01/01/70 00:00      
   LCD interfacing            01/01/70 00:00      
      New Thread!            01/01/70 00:00      

Back to Subject List