how to get cmos time in vb

Ibm Batteries cmos/real time clock batte...
October 11, 2009 at 23:29:34
Specs: Windows Vista
how to get cmos time in vb?

See More: how to get cmos time in vb

Report •


#1
October 12, 2009 at 03:04:22
this is from ralph brown's famous interrupts
documentation (bless his soul and those of
all his supporters). this all might be "TMI" but
also see ralph brown's interrupts web pg. for
more, or just say "i already know all that you
jerk" and ignore. apologies.


10 CLS
20 FOR i = 0 TO &H7F
30 OUT &H70, i
40 PRINT USING "\ \"; HEX$(INP(&H71));
50 NEXT i
60 PRINT " "

this dumps part of CMOS

CMOS-Memory Map Release 61 Last change 16jul00
Copyright (c) 1989-1999,2000 Ralf Brown

Originally compiled from multiple sources by Padgett Peterson
<padgett@tccslr.dnet.mmc.com>.

No guarantees of any kind.

Organization of CMOS Memory - Clock

00h-0Eh is defined by the clock hardware and all must follow it. Other
manufacturers generally follow the same format as specified for the
region 10h - 2Fh. Some also follow the IBM format for 30h-33h but not all
(Zenith in particular is different).

The first fourteen bytes are dedicated to the MC146818 chip clock functions
and consist of ten read/write data registers and four status registers, two
of which are read/write and two of which are read only.

The format of the ten clock data registers (bytes 00h-09h) is:

----------R00--------------------------------
CMOS 00h - RTC - SECONDS
Desc: (BCD 00-59, Hex 00-3B)
Note: Bit 7 is read only
SeeAlso: CMOS 01h,CMOS 02h,CMOS 04h
----------R01--------------------------------
CMOS 01h - RTC - SECOND ALARM
Desc: (BCD 00-59, Hex 00-3B; "don't care" if C0-FF)
SeeAlso: CMOS 00h,CMOS 03h,CMOS 05h,CMOS 7Dh
----------R02--------------------------------
CMOS 02h - RTC - MINUTES
Desc: (BCD 00-59, Hex 00-3B)
SeeAlso: CMOS 00h,CMOS 03h,CMOS 04h
----------R03--------------------------------
CMOS 03h - RTC - MINUTE ALARM
Desc: (BCD 00-59, Hex 00-3B; "don't care" if C0-FF))
SeeAlso: CMOS 00h,CMOS 02h,CMOS 05h,CMOS 7Dh,CMOS 7Eh"AMD-645"
----------R04--------------------------------
CMOS 04h - RTC - HOURS
Desc: (BCD 00-23, Hex 00-17 if 24 hr mode)
(BCD 01-12, Hex 01-0C if 12 hr am)
(BCD 81-92. Hex 81-8C if 12 hr pm)
SeeAlso: CMOS 00h,CMOS 02h,CMOS 05h
----------R05--------------------------------
CMOS 05h - RTC - HOUR ALARM
Desc: (same as hours; "don't care" if C0-FF))
SeeAlso: CMOS 01h,CMOS 03h,CMOS 04h
----------R06--------------------------------
CMOS 06h - RTC - DAY OF WEEK
Desc: (01-07 Sunday=1)
SeeAlso: CMOS 07h,CMOS 08h,CMOS 09h
----------R07--------------------------------
CMOS 07h - RTC - DATE OF MONTH
Desc: (BCD 01-31, Hex 01-1F)
SeeAlso: CMOS 06h,CMOS 08h,CMOS 09h
----------R08--------------------------------
CMOS 08h - RTC - MONTH
Desc: (BCD 01-12, Hex 01-0C)
SeeAlso: CMOS 06h,CMOS 07h,CMOS 09h
----------R09--------------------------------
CMOS 09h - RTC - YEAR
Desc: (BCD 00-99, Hex 00-63)
Notes: BCD/Hex selection depends on Bit 2 of register B (0Bh)
12/24 Hr selection depends on Bit 1 of register B (0Bh)
Alarm will trigger when contents of all three Alarm byte registers
match their companions.
SeeAlso: CMOS 06h,CMOS 07h,CMOS 08h

The following is the on-chip status register information.



Report •
Related Solutions


Ask Question