MyAdvantech Registration

MyAdvantech is a personalized portal for Advantech customers. By becoming an Advantech member, you can receive latest product news, webinar invitations and special eStore offers.

Sign up today to get 24/7 quick access to your account information.

RTC programming and test

2007-10-22 Installation Document No.1-0003387

Solution:

  • RTC programming and test

    There are three system times in a computer system ?DOS time, BIOS time and
    RTC(CMOS) time. For example, under DOS environment, we can access the three
    system times by using:
    DOS interrupt 0x21, 0x2A/0x2C
    BIOS interrupt 0x1A, 0x04/0x02
    RTC(CMOS) direct port addressing
    However, if you check these three system simultaneously, you will find that the
    DOS time is always different from the BIOS time (slower or faster). As a
    result, it is better for an application to use the BIOS time instead of using
    DOS time.

    Get DOS Date
    Software interrupt AH = 0x2A
    CX:Year
    DH:Month
    DL:Day
    AL:
    0 - Sunday
    1 - Monday
    2 - Tuesday
    3 - Wednesday
    4 - Thursday
    5 - Friday
    6 - Saturday

    Set DOS Date
    Software interrupt AH = 0x2B
    Success: AL - 0
    Fail : AL - FF

    Get DOS Time
    Software interrupt AH = 0x2C
    CH for Hour : 0-23
    CL for Minute : 0-59
    DH for Second : 0-59
    DL for 1/100 second : 0-00

    Set DOS Time
    Software interrupt AH = 0x2D
    Success: AL=0
    Fail: AL=FF

    For BIOS Time
    Software Interrupt 0x1A, 0x04/0x02

    Get RTC Date (CMOS)
    To read 128 Bytes CMOS data (for AWARD BIOS), you must use direct port address.
    Index Port 70
    Data Port 71

    For Year (09H)
    C:>DEBUG
    -o 70 09
    -i 71
    98

    For Centry (32H)
    C:>DEBUG
    -o 70 32
    -i 71
    19

    I am sending you a small utility Viewcmos.exe. It can show the three system
    time at same time.
    As for the programing and register please refer to the source code time.c and
    you can run the example file R-time.exe


    There is an tsr program that can update DOS time continuously.

The content is too difficult to understand The content does not match the title The information is out of date It is not the information I'm looking for The content is empty Download file missing Invalid download link Download speed is slow Others

This field of information is requried

Yes No

This field of information is invalid

This field of information is requried

This field of information is requried

Would you like to subscribe to Advantech marketing communications, including eDM, event invites, and product updates? Unsubscribe at any time.*

Note: If you are already subscribed, selecting "No thanks" will cancel your existing subscription.

Required field

Do you agree to the processing of your personal data in accordance with Advantech Privacy Policy?*

Required field
전체동의 (선택사항 포함)

어드밴텍 이용약관 동의 전체보기*

This field of information is requried


개인정보 수집 및 이용 동의*

This field of information is requried


산업뉴스/적용사례/할인이벤트 이메일 수신 동의

당사는 회원 기반 서비스 제공을 위해 다음과 같이 개인정보를 수집하여 이용, 제공, 파기 합니다.

구분 수집항목 이용 목적 이용∙보유기간
1:1 문의 필수 이름, 이메일, 전화번호, 회사명, 국가, 상담내용 고객의 문의 대응 및 분쟁해결 등을 위함 소비자의 불만 또는 분쟁처리에 관한 기록: 3년
선택 제품, 시리얼넘버 효율적인 상담 대응
선택 뉴스레터 수신 동의 여부 신규 서비스/상품, 할인 이벤트 안내 법정 의무 보유 기간
I have read KVKK Clarification Text and I accept to share with you my personal data*

This field of information is requried


I have read KVKK Clarification Text for the Contact Form Process, I would like to receive Advantech emails and product information. Unsubscribe at any time. Already receiving Advantech Emails? Not ticking this box will automatically unsubscribe you
アドバンテックのプライバシーポリシーに基づき、売買手続き上必要な個人情報をアドバンテックが使用することに同意します。*

This field of information is requried


アドバンテックの製品情報、スペシャルオファー、重要なアドバンテックニュースの配信を希望します。(配信停止はいつでも可能です。)