Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 4th, 2003, 08:58 AM
Authorized User
 
Join Date: Jul 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default operate electrical circuit using c program

I have connected a transistor circuit to my parallel port.I want to operate on it.
Basically i will set voltage and current from outside source and will take the values of voltage and current as input from parallel port(I have done everything regarding the hardware part and have difficulty in c programming)and using that values i want to plot the curves(current vs voltage).
How can i do that using c program?(taking the input from parallel port and plotting the curves)?


Reply With Quote
  #2 (permalink)  
Old July 17th, 2003, 01:27 PM
Registered User
 
Join Date: Jul 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm not an electrical engineer, so I might not fully answer your Q.

I'm using VC++, under Help, I found:
_inp (read one byte from specified I/O port)
_inpd(same as _inp but double word)
_inpw(2 byte)
_outp(for write)
_outpd
_outpw

I searched from Google, Parallelport programming, and found this:
http://www.lvr.com/jansfaq.htm

Be carefull with your wiring to Parallelport pin, you might hose your motherboard or Input card.


cheers,
  Johan
Reply With Quote
  #3 (permalink)  
Old August 1st, 2003, 05:48 PM
Authorized User
 
Join Date: Jul 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to merediths
Default


  Also, from UNIX / Linux and variants, you can open a file under your /dev directory and write to it like a normal file. for examplte /dev/lpr or /dev/ttyS0 ... /dev/ttyS<n-1>

Regards,
Meredith Shaebanyan

Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
electrical arm Innaorouk C# 3 August 27th, 2007 08:00 PM
need help! mean program xociology C++ Programming 3 March 19th, 2007 06:17 PM
anyone know of a program..... bammurdead C++ Programming 1 November 6th, 2005 08:16 PM
Setup Project: Program not added in Start>Program arif_1947 VS.NET 2002/2003 2 March 31st, 2005 06:40 AM
Start a program inside another program Silje Classic ASP Professional 1 November 16th, 2004 02:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.