??? 07/31/10 16:16 Read: times |
#177551 - User editable parameter |
PCB = C8051F120X with 2Line x 16 Character LCD. ( HD 47780 driver )
I am coding for an cyclic timer with user programmable ON and OFF times. The range for each is 1 to 9999ms. To implement the EDIT routine I thought it will be easy to display the last programmed value - say 0500 - and allow the user to shift the cursor to the required digit and then use one INC button to scroll thorugh values 0-9 of that selected digit. I have got the cursor shift algorithm OK. But looking for some elegant way of editing each digit as required and then saving the final edited value to NV ram for use. I am trying to declare the parameter as a unsigned long to get a maximum of "9999" and then use a union to tackle each digit with a declaration like this : union merge ( unsigned char Digit[4]; unsigned long OnValue ;)OnDelay; Idea is to edit each char as required and then finally use the resultant OnValue. While the edit of each character is possible, I am unable to display the final value as required. How to go about this? Or is there any other method to do this ?? thanks Raghu |
Topic | Author | Date |
User editable parameter | 01/01/70 00:00 | |
Don't fight too much which which alternative to use | 01/01/70 00:00 | |
Solved.. | 01/01/70 00:00 | |
but you get a headache ... | 01/01/70 00:00 | |
Maybe a better way | 01/01/70 00:00 | |
Unpleasant with too large speedup steps | 01/01/70 00:00 | |
Fast scroll algorithm | 01/01/70 00:00 | |
I agree! | 01/01/70 00:00 | |
Use String | 01/01/70 00:00 | |
Exactly the way you said![]() | 01/01/70 00:00 |