Getting Started

(lily) #1

Chapter 8: C Pointers and Arrays


Using Real Time Clock:


After c


You ar
Enter
Enter
Enter
Enter


Get the current tim


conds past 12. Set the current time as follows:

get the correct time:

t

{
gHOUR = 0;
}
}
}
}


ompiling and loading the code, in HyperTerminal you should see:

e talking to the 'Real Time Clock' demo.
'get' to get the time and date.
'secXX' to set the second to XX.
'minXX' to set the minute to XX.
'hourXX' to set the hour to XX.

e:

get
The time is: 12:00:03


Which initially should be a few se


sec45
min4
hour11


Then you can


ge
The time is: 11:05:01
get
The time is: 11:05:12
get
The time is: 11:05:17

Free download pdf