Discussion in "8051 Discussion Forum" started by    romel_emperado    Nov 4, 2010.
Sun Nov 07 2010, 05:49 pm
#21
no i dont know dear but i think it is not difficult
few things r replace able in mobile not all
Sun Nov 07 2010, 06:40 pm
#22
yes its not difficult. Programming s more difficult than repairing a mobile phone.. My brother has a mobile phone repair shop and as i can see if i compare programming s more difficult. Hehe
Mon Nov 08 2010, 09:44 am
#23
halu majoka, i have a difficulty in coding using class fucntion (i dont know how to call that kind of method of programming hehe)

this is i am doing.. i have a digital clock code from the download section and also i have a 3310 LCD driver code for displaying somthing on the LCD.

now pls teach me how to call the LCD.c/lcd.h file from the clock.c main program.
i dont know what is the proper header to use in calling different code in *.c or *.h file

i will also attach the proteus file i made.
*attached file removed*


[ Edited Mon Nov 08 2010, 09:51 am ]
Mon Nov 08 2010, 09:53 am
#24
here are the file i included the code and the proteus file:

Mon Nov 08 2010, 10:44 am
#25
hi romel_emperado
u mix the clock code of ajay that was for 20*4 lcd in with 3310 it will not run
first just display some characters on different places of lcd then go to next step
it will be difficult of error tracing in coding if u jump on a big step
do code for clock in step by step first display seconds only do experiments on it
if get problem post here
this clock file uses other header files of lcd so it give error with 3310 lcd
as i edit some code see it
Attachment
 romel_emperado like this.
Mon Nov 08 2010, 10:56 am
#26
thaks very much majoka u really understand my query..:D

this code is really what i wanted thanks majoka
#include <AT89X51.H>

#include "lcd.h"


void main()
{
  initlcd();
  cursorxy(1,1);
  putstr("hello");   
  while(1);

}


y does we are just calling the LCD.h? does the compiler allready understand that the lcd.c is included?

---------------------------------------------------------------------------
i just studied the different locations of lcd like character location,lines, x & y position its very nice


[ Edited Mon Nov 08 2010, 10:59 am ]
Mon Nov 08 2010, 11:01 am
#27
hi romel
yes this is u want

y does we are just calling the LCD.h? does the compiler allready understand that the lcd.c is included?


when u add a lcd.h in main file then compiler know that there is a file of lcd.c in the project folder if not find that give error
if it give error even file is there then u can add it to ur project same as u add file in normal keil projects
in c u can add a number of files h or c in a single projects


[ Edited Mon Nov 08 2010, 11:03 am ]
 romel_emperado like this.
Mon Nov 08 2010, 11:08 am
#28
ah okay makoja thanks very much.. i will also practice on that method of programming
Mon Nov 08 2010, 01:42 pm
#29
helo... i have things that i dont understand here

i know this is array but what is that bit _8?

bit_8 code *days[]={"Sun","Mon","Tue","Wed","Thurs","Fri","Sat"};



i there another way in doing this digital clock? hehe the simple way



------------------------------------------------------------------------------------------
how do i display this aray in the lCD? its different on the 16x2 lcd.

char digit[10]={1,2,3,4,5,6,7,8,9,0};


void main()
{


 while(1);
  {
   initlcd();
   cursorxy(3,4);
   putstr(digit[2]);   /// eror how to do this?
  }



}


[ Edited Mon Nov 08 2010, 02:07 pm ]
Mon Nov 08 2010, 02:01 pm
#30
hi romel
u can write this line

bit_8 code *days[]={"Sun","Mon","Tue","Wed","Thurs","Fri","Sat"};


as

unsigned char code *days[]={"Sun","Mon","Tue","Wed","Thurs","Fri","Sat"};



bit_8 is define in h file see that
typedefine keyword is used
see that

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Michailqfh
Fri Mar 29 2024, 01:53 am
Bobbyerilar
Thu Mar 28 2024, 08:08 am
pb58
Thu Mar 28 2024, 05:54 am
Clarazkafup
Thu Mar 28 2024, 02:24 am
Walterkic
Thu Mar 28 2024, 01:19 am
Davidusawn
Wed Mar 27 2024, 08:30 pm
Richardsop
Tue Mar 26 2024, 10:33 pm
Stevencog
Tue Mar 26 2024, 04:26 pm