| | |
Real time clock
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2007
Posts: 47
Reputation:
Solved Threads: 1
Hello everyone,
I know there is a build in real time clock inside the computer
and I know it's possible to use this clock when you write a program on Assembler(using an interupt that I don't remember at the moment),is there a way to use the real time clock
while programing on VC++ ?
(I use VC++ 6.0 with the 6th service pack instaled)
Andrei
I know there is a build in real time clock inside the computer
and I know it's possible to use this clock when you write a program on Assembler(using an interupt that I don't remember at the moment),is there a way to use the real time clock
while programing on VC++ ?
(I use VC++ 6.0 with the 6th service pack instaled)
Andrei
Yes, you get clock functionality from library <ctime> (or maybe it's still <time.h> in VC++ 6)
See here for a quick reference.
Check your MSDN help information in VC++ for what's actually supported in that compiler.
Consider moving into the 21st century with newer versions. VC++ 2008 Express is a freebie.
See here for a quick reference.
Check your MSDN help information in VC++ for what's actually supported in that compiler.
Consider moving into the 21st century with newer versions. VC++ 2008 Express is a freebie.
"We Americans got so tired of being thought of as dumb by the rest of the world that we went to the polls last November and removed all doubt."
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
~~~~~~~~~~~~~~~~~~
Looking for an exciting graduate degree? Robotics and Intelligent Autonomous Systems (RIAS) at SDSM&T See the program brochure here.
I think partially on device driver level or lower (HAL).
Did you need so low level really? The Windows without (as usually third-party and commercial) special software is not a real-time system. Your programs have no direct access to ALL hardware (except CPU in user mode
) on Windows installations. Didn't you know that?
Why you need RTC direct access? May be Windows API or even RTL stuff is enough for your task?..
Did you need so low level really? The Windows without (as usually third-party and commercial) special software is not a real-time system. Your programs have no direct access to ALL hardware (except CPU in user mode
) on Windows installations. Didn't you know that?Why you need RTC direct access? May be Windows API or even RTL stuff is enough for your task?..
•
•
Join Date: Jul 2007
Posts: 47
Reputation:
Solved Threads: 1
Well, ofcourse I know that from win 2000 and upwards the acces to the ports is blocked,
but I have a driver that opens the access(and I already tested it many times while working with the parallel port),so I do have access to the hardware.
I need a real time clock to generate accurate PWM for a robot...
but I have a driver that opens the access(and I already tested it many times while working with the parallel port),so I do have access to the hardware.
I need a real time clock to generate accurate PWM for a robot...
•
•
Join Date: Jun 2007
Posts: 275
Reputation:
Solved Threads: 45
For hi-res timers, you may want to have a look at the following (100us timer period):
http://www.codeproject.com/KB/system...imeModule.aspx
What's the frequency of the PWM? Are you interfacing to RC servos?
http://www.codeproject.com/KB/system...imeModule.aspx
What's the frequency of the PWM? Are you interfacing to RC servos?
•
•
Join Date: Jul 2007
Posts: 47
Reputation:
Solved Threads: 1
Ok,first of all I want to thank everyone for their help,thanks everyone! 
Now,dougey83, thank you for the program,did you try it? How accurate is it?
How much windows distortes the timers accuracy?(oh,and this time I use an H-bridge and regular DC motors,not servos,if it's possible I want to generate PWM with frequancies of 1 to few Khz).
ArkM,you didn't pay attention,I said a driver that gives me access to ports(in other words,it allows me to access hardware),not a RTC driver...

Now,dougey83, thank you for the program,did you try it? How accurate is it?
How much windows distortes the timers accuracy?(oh,and this time I use an H-bridge and regular DC motors,not servos,if it's possible I want to generate PWM with frequancies of 1 to few Khz).
ArkM,you didn't pay attention,I said a driver that gives me access to ports(in other words,it allows me to access hardware),not a RTC driver...
![]() |
Similar Threads
- Print out Date & Time Assignment (Assembly)
- incorrect date and time (Windows NT / 2000 / XP)
- assembly code alteration for real time clock controller (Assembly)
- Need really real time (Computer Science)
- Need help in understanding Round Robin!!! Please help!!! (Computer Science)
- My P4 won't post, people! (Troubleshooting Dead Machines)
- Abit-WB6 mobo not remembering date (Motherboards, CPUs and RAM)
- xp won't get past the welcome screen! (Windows NT / 2000 / XP)
- resource problem code 12 (Troubleshooting Dead Machines)
Other Threads in the C++ Forum
- Previous Thread: Homework - Array/Functions
- Next Thread: Matrix of string
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy desktop developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker list loop looping loops map math memory multiple news node number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference rpg sorting string strings struct temperature template test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






