I am using ATmega32-A micro controller, coding in C language and compiling using CodeVisionAVR compiler.
I want to display current time, I have tried with "time.h":
int main(void){
time_t now;
time(&now);
printf("(percent)s", ctime(&now));
}
but it seems this compiler and hardware won't support time.h
. I know that all AVRs don't have a RTC/calendar in them.
Is there any other way to display current time. I am very new to programming micro controllers. Can any one help me with some examples.
I don't want to add external hardware to the existing board now. I am displaying information on the PC (hyperterminal) using USART communication. Is there any possibility that I can get current time from PC? if there can you explain about it a little bit?