Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

BIOS clock data mining

Status
Not open for further replies.

the_risk_master

Advanced Member level 2
Joined
Aug 12, 2005
Messages
660
Helped
79
Reputation
158
Reaction score
19
Trophy points
1,298
Location
UE+MIT, Philippines, (14°N , 120°E )
Activity points
5,514
Dear sirs,


I want to know if I can extract information through the parallel port or serial port
from the BIOS clock (RTC), I am programming through C, the gettime displays in decimal form, I want to have it on HEX or BIN format to input it to my custom design circuit. Any help/advise/URL is welcome, thank you.


regards,
the_risk_master
 

Reading time in software(C) via BIOS call is a on-demand event. So C can call function in BIOS which will read the appriopriate register from RTC circuit on motherboard and give back the time.

Connecting this time information from RTC block to a parallel/serial port would be some sort of continuous connection. So Either there could be some s/w routine running in background that keeps reading time from RTC and write it to serial/parallel port, or if RTC chip outputs are visible on motherboard ( impossible these days, its part of super IO chip or southbridge), then it could be connect to some encoder circuit that could take the time/date and encode it to drive a new serial/parallel port.
 

Okay this is it, I made a test program

#include<conio.h>
#include<dos.h>
#include<time.h>

struct time t;
struct date d;
unsigned char h,m,s,month,num,year,flag;

void main()
{
while(1){ /* this makes my program read the time continuously */

gettime(&t);
getdate(&d);

h=t.ti_hour;
m=t.ti_min;
s=t.ti_sec;

month=d.da_mon;
num=d.da_day;
year=d.da_year;

printf("TIME: %02x:%02x:%02x DATE: %x/%x/%4x \n",h,m,s,month,num,year);

}
}

I'll update some other time for improvements...
at least I made to continuously read the date and time in HEX format
Now, I will plan the circuitry for the interfacing
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top