Xycom XVME-113 User Manual page 49

Ram/rom memory module
Table of Contents

Advertisement

3.5.3
Time Reading Procedure
The following flow chart and instructions demonstrate the procedure for reading the RTC time and date. Reading the
RTC time and date requires the use of the CF to validate the data read from the counter registers.
••••••••••••••••••••••
•••••••••••••••••••••••••••••
Clear CF
•••••••••••••••••••••••••••••
•••••••••••••••••••••••••••••
• Read the Counter Register •
•••••••••••••••••••••••••••••
•••••••••••••••••••••••••••••
YES •
Verify Read Operation
••••••••
(CF = 1 ?)
•••••••••••••••••••••••••••••
Follow the procedure below to read the RTC time and date:
1.
Since interrupts are not used, there is no need to be concerned with handling an interrupt from a carry
operation. (The CIE and AIE bits in Control Register A should always be written with '0').
2.
Clear the CF bit in Control Register A to '0'. Note: To prevent the AF bit from being cleared as well,
set the AF bit to '1' for the write operation.
3.
Read the desired time or date register by reading from the appropriate counter register (RTC Registers
03h to 0Fh).
4.
Poll the CF bit in Control Register A. If the CF bit is '0', the read operation was successful and the time
or date register data is valid.
5.
If the CF bit is '1', a carry has occurred and the procedure must be repeated. The internal carry period
lasts for a maximum of 125 µs. Wait 125 µs before attempting the procedure again. Restart the
procedure by clearing the CF bit to '0' (Step 2).
Clear the Carry Flag in Control Register A.
Poll CF bit in Control Register A.
• NO
(Repeat for all counter registers)
XVME-113 RAM/ROM Memory Module
October 1992
3-13

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the XVME-113 and is the answer not in the manual?

Table of Contents