84PCE:Ports:8000

From WikiTI
Revision as of 18:56, 17 October 2016 by MateoConLechuga (Talk | contribs)

Jump to: navigation, search


The RTC is similar to the FTRTC010 or the FTRTC011. It has separate second/minute/hour/day counters, and can trigger an interrupt when any of the counters changes or when the current time of day matches an alarm value.

Synopsis

Port Number: 8000

Memory-mapped address: F30000

Function: Real-Time Clock

Registers

  • Count registers:
    • 8000 (R): Current second count (from 00h to 3Bh, or 0-59 decimal).
    • 8004 (R): Current minute count (from 00h to 3Bh, or 0-59 decimal).
    • 8008 (R): Current hour count (from 00h to 17h, or 0-23 decimal).
    • 800C-800D (R): Current day count (16-bit little-endian).
  • Alarm registers:
    • 8010 (R/W): Alarm second value.
    • 8014 (R/W): Alarm minute value.
    • 8018 (R/W): Alarm hour value.
  • 8020 (R/W): Control register.
    • Bit 0: Set to enable the RTC.
    • Bit 1: Set to enable second interrupt.
    • Bit 2: Set to enable minute interrupt.
    • Bit 3: Set to enable hour interrupt.
    • Bit 4: Set to enable day interrupt.
    • Bit 5: Set to enable alarm interrupt.
    • Bit 6: Load operation. Write a 1 to load the Count registers with the values in the Write registers. When the load operation completes, the bit will return to 0.
    • Bit 7: Reset to freeze the count registers. The time will continue to advance internally. Once this bit is set again, the count registers will not be updated to the current time until the next second tick.
  • Write registers:
    • 8024 (R/W): Write second register.
    • 8028 (R/W): Write minute register.
    • 802C (R/W): Write hour register.
    • 8030-8031 (R/W): Write day register.
  • 8034 (R/W): Interrupt status register. Reads the cause of the interrupt. Write 1 bits to reset. If any bits are set, they will continuously generate interrupts until acknowledged
    • Bit 0: Second interrupt.
    • Bit 1: Minute interrupt.
    • Bit 2: Hour interrupt.
    • Bit 3: Day interrupt.
    • Bit 4: Alarm interrupt.
    • Bit 5: Load operation complete
  • 803C-803F (R): Revision register. Reads 0x00010500 for revision 1.5.0.
  • 8044-8047 (R): Groups up all the time values into 32 bits (little-endian). Not very useful on the eZ80 which cannot load it atomically.
    • Bits 0-5: Current second count.
    • Bits 6-11: Current minute count.
    • Bits 12-16: Current hour count.
    • Bit 17-31: Low 15 bits of current day count.