| ??? 06/01/15 16:58 Read: times |
#190510 - A simple code...not working |
The code below is a simple trial to update two values - one is a unsigned int and the other is a float - when the user presses a button. The float updates as expected but the unsigned int does not. Wonder why. ( the unsigned int mlvalue is not there in any other place in the whole code after the defenition )
unsigned int binval1, binval2, binval3, mlvalue ;
void main (void)
{
//============= START WHILE ===================
// ..... Various Init code goes here
while(1)
{
msDelay(200); // Update clock every xxx ms
HeartBeatLED = ~HeartBeatLED ;
// == SET VALUE UPDATE =========================
if ( get_key_press( 0x01))
{
mlvalue += 100 ;
floatval += 0.01;
sprintf( dis_buf, "Rs.%04u SET:%04u T:%010.3f ", binval1, mlvalue, floatval);
WriteLCD(dis_buf);
while( get_key_press( 0x01));
}
//=============== END WHILE ====================
} // While closes..
} // Main closes.
Thanks Raghu |
| Topic | Author | Date |
| A simple code...not working | 01/01/70 00:00 | |
Problem with LCD | 01/01/70 00:00 |



