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 assumed that if it compiled without warning..." Yes sounds like a bug to me - the user should at least be warned!?