Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| back2root:ibm-pc-ms-dos:hardware:informations:cmos_ram [2023/01/16 17:54] – supprimée - modification externe (Unknown date) 127.0.0.1 | back2root:ibm-pc-ms-dos:hardware:informations:cmos_ram [2024/12/22 11:50] (Version actuelle) – [Notes] frater | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | ====== CMOS RTC - Real Time Clock and Memory (ports 70h & 71h) ====== | ||
| + | <WRAP round info> | ||
| + | The information here is only applicable to AT and PS/2 systems | ||
| + | </ | ||
| + | |||
| + | {{tablelayout? | ||
| + | ^ Reg# ^ Description | ||
| + | | 00 | RTC seconds | ||
| + | | 01 | RTC seconds alarm | | ||
| + | | 02 | RTC minutes | ||
| + | | 03 | RTC minutes alarm | | ||
| + | | 04 | RTC hours | | ||
| + | | 05 | RTC hours alarm | | ||
| + | | 06 | RTC day of week | | ||
| + | | 07 | RTC day of month | | ||
| + | | 08 | RTC month | | ||
| + | | 09 | RTC year | | ||
| + | | 0A | RTC Status [[# | ||
| + | | 0B | RTC Status [[# | ||
| + | | 0C | RTC Status [[# | ||
| + | | 0D | RTC Status [[# | ||
| + | | 0E | [[# | ||
| + | | 0F | [[# | ||
| + | | 10 | Diskette [[# | ||
| + | | 11 | Reserved | ||
| + | | 12 | Fixed disk [[# | ||
| + | | 13 | Reserved | ||
| + | | 14 | [[# | ||
| + | | 15 | LSB of system base memory in 1k blocks | ||
| + | | 16 | MSB of system base memory in 1k blocks | ||
| + | | 17 | LSB of total extended memory in 1k blocks | ||
| + | | 18 | MSB of total extended memory in 1k blocks | ||
| + | | 19 | Drive C extension byte (reserved AT) | | ||
| + | | 1A | Drive D extension byte (reserved AT) | | ||
| + | | 1B | 13 bytes reserved | ||
| + | | 2E | CMOS checksum of bytes 10h-20h (MSB) | | ||
| + | | 2F | CMOS checksum of bytes 10h-20h (LSB) | | ||
| + | | 30 | LSB of extended memory size found above 1 megabyte during POST | | ||
| + | | 31 | MSB of extended memory size found above 1 megabyte during POST | | ||
| + | | 32 | Date century byte in BCD ( BIOS interface to read and set) | | ||
| + | | 33 | [[# | ||
| + | | 34 | 12 bytes reserved | ||
| + | |||
| + | ==== RTC Status register A ==== | ||
| + | {{anchor: | ||
| + | |||
| + | ^ bit ^ descr. ^ | ||
| + | | 0-3 | rate selection Bits for divider output frequency (set to 0110 = 1.024kHz, 976.562 µs) | | ||
| + | | 4-6 | 22 stage divider, time base being used; (initialized to 010 = 32.768kHz) | | ||
| + | | | ||
| + | |||
| + | ==== RTC Status register B ==== | ||
| + | {{anchor: | ||
| + | {{tablelayout? | ||
| + | ^ bit ^ Description | ||
| + | | 0 | 0=disable (default)\\ 1=enable daylight savings | ||
| + | | 1 | 0=12 hour mode (24 default)\\ 1=24 hour mode | | ||
| + | | 2 | 0=BCD (BCD default)\\ 1=time/date in binary | ||
| + | | 3 | 0=disable\\ 1=enable square wave frequency | ||
| + | | 4 | 0=disable\\ 1=enable update ended interrupt | ||
| + | | 5 | 0=disable\\ 1=enable alarm interrupt | ||
| + | | 6 | 0=disable\\ 1=enable periodic interrupt | ||
| + | | 7 | 0=update count normally\\ 1=disable clock update | ||
| + | |||
| + | ==== RTC Status register C (read only) ==== | ||
| + | {{anchor: | ||
| + | {{tablelayout? | ||
| + | ^ bit ^ Description | ||
| + | | 0-3 | reserved (set to 0) | | ||
| + | | 4 | update ended interrupt enabled | ||
| + | | 5 | alarm interrupt enabled | ||
| + | | 6 | periodic interrupt enabled | ||
| + | | 7 | IRQF flag | | ||
| + | |||
| + | ==== RTC Status register D (read only) ==== | ||
| + | {{anchor: | ||
| + | {{tablelayout? | ||
| + | ^ bit ^ Description | ||
| + | | 0-6 | reserved (set to 0) | | ||
| + | | 7 | 1=CMOS RAM has power\\ 0=CMOS RAM has lost power | | ||
| + | |||
| + | ==== Diagnostic status byte ==== | ||
| + | {{anchor: | ||
| + | {{tablelayout? | ||
| + | ^ bit ^ Description | ||
| + | | 0-1 | reserved | ||
| + | | 2 | 0=ok (POST validity check)\\ 1=time is invalid | ||
| + | | 3 | 0=ok\\ 1=fixed disk 0 failed initialization | ||
| + | | 4 | 0=ok\\ 1=memory size doesn' | ||
| + | | 5 | 0=ok (see [[# | ||
| + | | 6 | 0=ok\\ 1=config record checksum is bad | | ||
| + | | 7 | 0=power state stable\\ 1=RTC lost power | | ||
| + | |||
| + | ==== Shutdown status byte ==== | ||
| + | {{anchor: | ||
| + | {{tablelayout? | ||
| + | ^ value ^ Description | ||
| + | | 0 | soft reset or unexpected shutdown | ||
| + | | 1 | shut down after memory size determination | ||
| + | | 2 | shut down after memory test | | ||
| + | | 3 | shut down with memory error | | ||
| + | | 4 | shut down with boot loader request | ||
| + | | 5 | JMP DWORD request with INT init | | ||
| + | | 6 | protected mode test 7 passed | ||
| + | | 7 | protected mode test 7 failed | ||
| + | | 8 | protected mode test1 failed | ||
| + | | 9 | block move shutdown request | ||
| + | | A | JMP DWORD request without INT init | | ||
| + | |||
| + | ==== Diskette drive type for A: and B: ==== | ||
| + | {{anchor: | ||
| + | {{tablelayout? | ||
| + | ^ bit ^ Description | ||
| + | | 0-3 | second diskette type | | ||
| + | | 4-7 | first diskette type | | ||
| + | {{tablelayout? | ||
| + | ^ values | ||
| + | | 0000 | no drive installed | ||
| + | | 0001 | DSDD 48 TPI drive (Double Side Double Density) | ||
| + | | 0010 | DSQD 96 TPI drive (Double Side Quad Density) | ||
| + | |||
| + | other values are reserved | ||
| + | |||
| + | ==== Fixed disk drive type for drive 0 and drive 1 ==== | ||
| + | {{anchor: | ||
| + | {{tablelayout? | ||
| + | ^ bit ^ Description | ||
| + | | 0-3 | second drive type (0000=no disk) | | ||
| + | | 4-7 | first drive type (0000=no disk) | | ||
| + | |||
| + | |||
| + | ==== Equipment byte ==== | ||
| + | |||
| + | {{anchor: | ||
| + | {{tablelayout? | ||
| + | ^ bit ^ Description | ||
| + | | 0 | 0=none\\ 1=diskette drives installed | ||
| + | | 1 | 0=none\\ 1=math coprocessor installed | ||
| + | | 2-3 | unused | ||
| + | | 4-5 | primary display | ||
| + | | 6-7 | number of diskette drives installed | ||
| + | {{tablelayout? | ||
| + | ^ Bits\\ 54 ^ Primary Display | ||
| + | | 00 | reserved | ||
| + | | 01 | 40 column color | | ||
| + | | 10 | 80 column color | | ||
| + | | 11 | monochrome | ||
| + | {{tablelayout? | ||
| + | ^ Bits\\ 76 ^ Number of Drives | ||
| + | | 00 | 1 diskette drive | | ||
| + | | 01 | 2 diskette drives | ||
| + | | 10 | reserved | ||
| + | | 11 | reserved | ||
| + | |||
| + | |||
| + | ==== Information Flags ==== | ||
| + | |||
| + | {{anchor: | ||
| + | {{tablelayout? | ||
| + | ^ bit ^ Description | ||
| + | | 0-5 | reserved | ||
| + | | 6 | initial setup message flag | | ||
| + | | 7 | 0=none\\ 1=IBM 128k expansion installed | ||
| + | ===== Programming Considerations ===== | ||
| + | |||
| + | * Write CMOS address to read or write to port 70h | ||
| + | * Read/write port 71h to get/set data | ||
| + | |||
| + | ===== Notes ===== | ||
| + | |||
| + | <WRAP round box> | ||
| + | * INT 1A is used to read/set the Time of Day and Alarm. | ||
| + | * configuration settings are maintained using the Motorola MC146818 Real Time Clock. Each of this chips 64 memory registers is used for storage (0-3F). | ||
| + | * Bit 5 of the diagnostic (0Eh) status byte is set during a power on test. This Bit is set if no floppy disks are found or the display doesn' | ||
| + | * all addresses sent to port 70h have Bits 7&6 clear since Bit 7 of port 70h is used to enable/ | ||
| + | * when masking the NMI through using port 70H, port 71H should be read immediately after or the RTC may be left in an unknown state.\\ This wont affect the PS/2 watchdog timer or system channel timeout. | ||
| + | </ | ||
| + | |||
| + | see [[back2root: | ||