hello, i m making one screen in which i m doing increment and decrement and shifting key operation but while doing so, i get '?' when i change the values and if 2 values are present then while changing the values other values shows '?' but if i proceed further i regain the lost values i m using pointer for increment, decrement,shift operation r my values getting lost?
hello i think that the problem lies in the way you express you re sentences so that they are difficult to read by anyone who bothers to read them, so you see the problem then is that most people wo nt want to bother reading the messages maybe only a very small percentage and the, of those, only a very small percentage of those people who bothered to read your message will be bothered to reply and you might find that you get a non sensible message like this one which is probably as difficult for you to read as it is for others to read the message that you originally posted so i hope that i have now made my point and you will endeavour to post messages in future that are more readable and have sufficient details for a potential reader to follow? goodbye
They are quite often involved when web servers break...
As can be seen from this text. Definitely haunted...
I hav a system in which i m using LCD.
In that i hav a screen in which i m setting the values say temperature, volume, time.
My problem is that if i try to change the any one of the value eg. temperature with increment, decrement, shifting keys then my other values are affected.
i.e. some times it gives '?' instead of values. and again it recovers. and sometimes in the same variable e.g. temperature, if i m changing the value it gives '?'. and if i again change it, then it gives me recoverd value
e.g. temp=12.1 incremnting ??.? again incrementing 12.3, same for shift key
I want to know that if i m missing the values I m using pointers for it
Remember, anyone reading your post knows absolutely nothing whatsoever about you or your project apart from what you explicitly state in the post!
You post is meaningless because it lacks any context that would allow anyone to understand what you are talking about!
"i'm making one screen"
What does that mean? What "screen"? How are you "making" it? Are you talking about something displayed on your PC screen by the tools? Are you talking about an LCD screen in your target system? Or what??
"doing increment and decrement and shifting key operation"
What does that mean?
"i get '?' when i change the values"
Where do you get '?' ? What "values"? How do you "change" them?
"i'm using pointer for increment, decrement,shift operation"
How are you "using" this (these?) pointer(s)?
etc, etc,...
Please think about your post, and ask yourself: "will anyone with no other knowledge of my project be able to understand what I am talking about?"
"I hav a system in which i m using LCD."
What LCD? How is it connected to your 8051?
"In that i hav a screen in which i m setting the values say temperature, volume, time."
How are you "setting the values"? Maybe there's a bug in it?
"My problem is that if i try to change the any one of the value eg. temperature with increment, decrement, shifting keys then my other values are affected."
So there's a bug somewhere - it could be in your displaying the values, or storing the data, or doing the changes.
You need to debug your code to find out exactly where it's going wrong; Once you know exactly where it's going wrong, you can find out what is going wrong; Once you know what is going wrong, then you can fix it!
Nobody else can do this for you - certainly not on the information you've provided!
"some times it gives '?' instead of values."
What is "it"?
Think about the code - where could the '?' come from?
Does your display driver insert '?' when you give it an invalid value? etc?
"same for shift key"
What shift key?
"I m using pointers for it"
That's got to be the first place to look - if you mess-up your pointers, you can cause all sorts of bizarre effects!
You should prove that your basic functions are working in the Simulator...
thanx Andy, i think i hav solved the problem
i m using a routine which converts hex to bcd
i m using unsigned long int variable for the operation but for displaying i m using only 1st 4 digits of the variable
variable used for the operation is xdata and counter to separate the digits is unsigned char and internal memory, i mean to say i m using a for loop to separate each digit
so i made that counter as xdata, till now i didnot get the missing value problem on display but i m still looking for it
Where do you get hex data from? You have an input routine taking the characters '0'..'9','A'..'F' ('a'..'f') as input? Or do you have an array of bytes - each containing the values 0..15?
There is nothing haxadecimal about the integers your processor works with - they are just numbers. It isn't until you format them for printing that they may be formatted for base-10, base-16 or whatever you require.