- This topic has 7 replies, 4 voices, and was last updated 11 years, 10 months ago by AJISH ALFRED.
-
AuthorPosts
-
October 17, 2012 at 3:35 pm #1987Sanket KulkarniParticipant
Hello, I'm performing one of the project mentioned above. I was working on the concept of the program and could'nt get along with this part of the program. If test_final was initialised already to 0 then why the conditional statement was made?
Thank you in advance
s=test_final/100;
test_final=test_final%100;
lcd_cmd(0x8a);
if(s!=0)
lcd_data(s+48);
else
lcd_cmd(0x06);
s=test_final/10;
test_final=test_final%10;
lcd_data(s+48);
lcd_data(test_final+48);October 18, 2012 at 6:12 am #8672AJISH ALFREDParticipantPlease mention the trouble that you are facing with the project.
October 18, 2012 at 10:04 am #8673V.ThenmozhiParticipantDear sir
can you kindly give me the remote controlled ground vehicle circuit.
October 19, 2012 at 12:59 pm #8675AJISH ALFREDParticipantHi Thenmozhi,
Find the link article in this website at.
/contribution/unmanned-ground-vehicle-ugv-or-spycar
The circuit of the same project might be helpful for you.
October 21, 2012 at 12:36 pm #8680Sanket KulkarniParticipantI understood the program and implemented it.. still I’m not getting any output on lcd, its just glowing.
I heard about pull-up resistor is required to connect to port0 of micro-controller? What is it and how to connect?
October 23, 2012 at 6:45 am #8683AJISH ALFREDParticipantHi,
A pull-up or pull-down resistor is basically used to preset a value (logic high or logic low) at any pin.
Find the discussion about pull-up and pull-down concept in this forum itself.
A pull-up is done by connecting a pin to VCC through a resistor (normally 1K) and a pull down is done by connnecting a pin to ground through a resistor (normally 1K). Pull-up make the preset voltage at the pin as logic high and pull-down make the preset voltage at the pin as logic low. We can change those voltages by writing a low or high respectievely.
January 30, 2013 at 4:36 pm #9082Kausu T RParticipantHello sir, I’m performing one of the project Distance measurement Distance measurement using InfraRed sensor. I was working on the concept of the program and could’nt get along with this part of the program.i am so confused this convert function.Because this HEX to ASCII conversion couldn’t understan me.Pls explain ths logic as early as possible….
Thank you in advance…
void convert()
{
int s;
lcd_cmd(0x81);
delay(2);
lcd_data_string(“output:”);
s=test_final/100;
test_final=test_final%100;
lcd_cmd(0x8a);
if(s!=0)
lcd_data(s+48);
else
lcd_cmd(0x06);
s=test_final/10;
test_final=test_final%10;
lcd_data(s+48);
lcd_data(test_final+48);
lcd_data(‘ ‘);
if(shift>16)
{
lcd_cmd(0xc0+(shift-1));
lcd_data_string(” “);
shift=0;
}
lcd_cmd(0xc0+(shift-1));
lcd_data(‘ ‘);
lcd_cmd(0xc0+shift);
lcd_data_string(“CALIBRATE IT”);
delay(30);
}
January 31, 2013 at 6:17 pm #9084AJISH ALFREDParticipantHi Kausu,
It is very difficult to comment on the working of this piece of code only since we don’t have the details of your project and the complete code.
What I understood is that, the “convert()” function does the following operations.
-displays a string “output:”
-it extracts the digits from the digit integer “test_final”
-store the digit into two seperate integrs
-convert the integrs into characters, so that they can be displayed on the lcd
-checks whether the number of characters exeeds the number which can be displayed on the first line
-if exeeds go to the next line
-and print “CALIBERATE IT”
Printing an integer on LCD:
You assume a value to test_final variable, say 567.
s=test_final/100; //now s = 5
lcd_data(s+48); // 48 is the ascii value of ‘0’ and 48+5 gives ascii value of ‘5’
//and hence print ‘5’ on LCD
similary it does for 6 and 7.
Have I made it more complex for you?? Take sample value and analyse yourself.
-
AuthorPosts
- You must be logged in to reply to this topic.