473,396 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

HELP! Pls tell me if i can access io ports with TC 2.1

Hi !
I have to help a student with his school project.

He is learning 'C', using Turbo C 2.1 on a Windows XP pc.
( don't ask me why pls ! )
I proposed him to decode a DCF77 time signal connected to
the serial or parrallel port, and display the results on screen.

To be able to do this, we must be able to read the status of
the i/o bits ( pins ), more or less in 'real time', to detect the
pulse width ( 100 or 200 mSec ).

Can somebody tell me if access to io ports is possible with
TC2.1 under Win2K or WinXP ?

Thanks for any inputs !

Regards,
Eddy.


Nov 14 '05 #1
6 1956
On Sun, 20 Mar 2005 14:01:53 GMT, "Eddy" <ed***********@pandora.be> wrote:
Hi !
I have to help a student with his school project.

He is learning 'C', using Turbo C 2.1 on a Windows XP pc.
( don't ask me why pls ! )
I proposed him to decode a DCF77 time signal connected to
the serial or parrallel port, and display the results on screen.

To be able to do this, we must be able to read the status of
the i/o bits ( pins ), more or less in 'real time', to detect the
pulse width ( 100 or 200 mSec ).


You need to ask on the newsgroup associated with your operating system. In
this case, either comp.os.msdos.programmer or
comp.os.ms-windows.programmer.win32.

BTW, the method to access such ports is described in either the
documentation that came with the compiler, or the course that the student
is working in.
Nov 14 '05 #2
Can somebody tell me if access to io ports is possible with
TC2.1 under Win2K or WinXP ?


I'm working on a "controlling LCD connected to parallel port" project and
I'm able to read and write to parallel port. If it's what you're asking for
then it's possible.
Nov 14 '05 #3
On Sun, 20 Mar 2005 14:01:53 GMT, Eddy
<ed***********@pandora.be> wrote:
Hi !
I have to help a student with his school project.

He is learning 'C', using Turbo C 2.1 on a Windows XP pc.
( don't ask me why pls ! )
I proposed him to decode a DCF77 time signal connected to
the serial or parrallel port, and display the results on screen.
That doesn't sound like "learning C", it sounds like "learning a
specific platform". Starting a student on doing platform-specific I/O
will not give good C aknowledge. A project to do something using just
standard C would seem more appropriate.

Are you the instructor? I assume not, since you don't know why he's
using TC on XP, so perhaps you or the student should clear the project
with the instructor first. If I were instructing and got back a
platform-specific project like that I wouldn't be giving a high mark if
what I was teaching was C language.
To be able to do this, we must be able to read the status of
the i/o bits ( pins ), more or less in 'real time', to detect the
pulse width ( 100 or 200 mSec ).


That is all way outside standard C, and nothing really to do with C at
all. For that matter, timings of that accuracy may not even be possible
with a user application on XP (it's multi-tasking, so other programs can
get in and hog the CPU for a while).

Chris C
Nov 14 '05 #4
"Eddy" <ed***********@pandora.be> wrote in message
Hi !
I have to help a student with his school project.

He is learning 'C', using Turbo C 2.1 on a Windows XP pc.
( don't ask me why pls ! )
I proposed him to decode a DCF77 time signal connected to
the serial or parrallel port, and display the results on screen.
Way back, when I used Turbo C 1.0.. there was a simple way
to access I/O ports directly via the functions inportb() and
outportb(), check the <dos.h> header. A more modern way,
is to access ports via the Win32 API [1].
To be able to do this, we must be able to read the status of
the i/o bits ( pins ), more or less in 'real time', to detect the
pulse width ( 100 or 200 mSec ).


One might need a kernel mode device driver to control I/O
ports fast. Not really an easy school project...
[1] See MSDN paper "Serial Communications in Win32", by
Allen Denver

--
Tor <torust AT online DOT no>

Nov 14 '05 #5
Thanks for your inputs...

I still don't know what i will do...
Chris is right when he say that we should first check with
the instructor...Unfortunatelly, we do'nt have much feedback
from him for the moment :-(

I am considering to install a DOS 6.22 in multi boot, so that he
can use the inport outport statements...

Thanks again,
Eddy.


"Eddy" <ed***********@pandora.be> wrote in message
news:ln*********************@phobos.telenet-ops.be...
Hi !
I have to help a student with his school project.

He is learning 'C', using Turbo C 2.1 on a Windows XP pc.
( don't ask me why pls ! )
I proposed him to decode a DCF77 time signal connected to
the serial or parrallel port, and display the results on screen.

To be able to do this, we must be able to read the status of
the i/o bits ( pins ), more or less in 'real time', to detect the
pulse width ( 100 or 200 mSec ).

Can somebody tell me if access to io ports is possible with
TC2.1 under Win2K or WinXP ?

Thanks for any inputs !

Regards,
Eddy.



Nov 14 '05 #6
"Eddy" <ed***********@pandora.be> wrote in message
news:gO*********************@phobos.telenet-ops.be...
Thanks for your inputs...

I still don't know what i will do...
Chris is right when he say that we should first check with
the instructor...Unfortunatelly, we do'nt have much feedback
from him for the moment :-(
Yes, it's a good idea to verify the project with the instructor.
I am considering to install a DOS 6.22 in multi boot, so that he
can use the inport outport statements...


Can't really speak for TC 2.1, since I never used it. However, if
using TC 1.x, the simplest way to control HW, would for sure
be on a DOS box.

--
Tor <torust AT online DOT no>

Nov 14 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
9
by: Tom | last post by:
A question for gui application programmers. . . I 've got some GUI programs, written in Python/wxPython, and I've got a help button and a help menu item. Also, I've got a compiled file made with...
4
by: Sarir Khamsi | last post by:
Is there a way to get help the way you get it from the Python interpreter (eg, 'help(dir)' gives help on the 'dir' command) in the module cmd.Cmd? I know how to add commands and help text to...
6
by: wukexin | last post by:
Help me, good men. I find mang books that introduce bit "mang header files",they talk too bit,in fact it is my too fool, I don't learn it, I have do a test program, but I have no correct doing...
6
by: d.warnermurray | last post by:
I am doing a project for school that involves creating help files for a html authoring tool. If you could help me with answers to some questions it would really help. 1. What tasks do you expect...
5
by: Craig Keightley | last post by:
Please help, i have attached my page which worksin IE but i cannnot get the drop down menu to fucntion in firefox. Any one have any ideas why? Many Thanks Craig ...
5
by: Steve | last post by:
I have written a help file (chm) for a DLL and referenced it using Help.ShowHelp My expectation is that a developer using my DLL would be able to access this help file during his development time...
8
by: Mark | last post by:
I have loaded Visual Studio .net on my home computer and my laptop, but my home computer has an abbreviated help screen not 2% of the help on my laptop. All the settings look the same on both...
1
by: trunxnirvana007 | last post by:
'UPGRADE_WARNING: Array has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' 'UPGRADE_WARNING: Couldn't resolve...
0
by: hitencontractor | last post by:
I am working on .NET Version 2003 making an SDI application that calls MS Excel 2003. I added a menu item called "MyApp Help" in the end of the menu bar to show Help-> About. The application...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.