| Electronic Components Datasheet Search |
|
SH7721 Datasheet(PDF) 643 Page - Renesas Technology Corp |
|
|
|||||||||||||||||||||||||||||
SH7721 Datasheet(HTML) 643 Page - Renesas Technology Corp |
|
643 / 1524 page ![]() Section 17 Realtime Clock (RTC) Rev. 3.00 Jan. 18, 2008 Page 581 of 1458 REJ09B0033-0300 17.4.3 Reading Time Figure 17.3 shows how to read the time. Disable the carry interrupt Clear the carry flag Read counter register Carry flag = 1? Yes No Yes No Read counter register interrupt Disable the carry interrupt Write 0 to CF in RCR1 (Set AF in RCR1 to 1 so that alarm flag is not cleared.) Read RCR1 and check CF bit Write 1 to CIE in RCR1 Write 0 to CIE in RCR1 Clear the carry flag Enable the carry interrupt Clear the carry flag Write 0 to CF in RCR1 (Set AF in RCR1 to 1 so that alarm flag is not cleared.) Read RCR1 and check CF bit Write 0 to CIE in RCR1 To read the time without using interrupts (b) To use interrupts (a) Figure 17.3 Reading Time If a carry occurs while reading the time, the correct time will not be obtained, so it must be read again. Part (a) in figure 17.3 shows the method of reading the time without using interrupts; part (b) in figure 17.3 shows the method using carry interrupts. To keep programming simple, method (a) should normally be used. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |