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

E

Eddy

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.
 
R

Raymond Martineau

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.
 
F

Flemming Hansen

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.
 
C

Chris Croughton

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
 
T

Tor Rustad

Eddy said:
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
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
 
E

Eddy

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.
 
T

Tor Rustad

Eddy said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,156
Latest member
KetoBurnSupplement
Top