We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi all i want to read RTC time parameters. RTC is treated as one of memory location,it gets enabled when parameters are refered. following where the codes:
struct tm{ unsigned char xdata second _at_(0xe000); unsigned char xdata minute _at_(0xe002); unsigned char xdata hour _at_(0xe004); }; void main() { struct tm time; printf("seconds %x",time.second) ... }
struct tm{ unsigned char second _at_(0xe000); }
xdata unsigned char second _at_(0xe000); xdata unsigned char minute _at_(0xe002); xdata unsigned char hour _at_(0xe004); void main() { printf("\nseconds %x",second); printf("\nminutes %x",minutes); printf("\nhours %x",hour); }
struct tm{ unsigned char xdata second _at_(0xe000); unsigned char xdata minute _at_(0xe002); unsigned char xdata hour _at_(0xe004); }; void main() { struct tm time1,time2; ......
I *think* that what you want is: struct tm { unsigned char sec _at_ 0xe000; unsigned char min _at_ 0xe002; }; void main() { struct tm xdata time; } Stefan
Or:
struct tm { unsigned char sec; unsigned char min; }; void main() { struct tm xdata time _at_ 0xe000; }
Hello sir, When debuging program,the control is flowing in abnormal way.It is not following the correct sequense. I am using Keil microvision 2 for Philips P8WE6004 chip. thanks and regards Amit
Amit, so what is your question? Unless it is directly related to this current thread of discussion, please start a new thread