Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

NIC Programming

Posted on 2004-10-26
6
Medium Priority
?
300 Views
Last Modified: 2008-02-01
I'm planning to make use of the NIC to control and read devices (such as Ph Device, Airconditioners, etc.) since there are 2 input and 2 output if you use ethernet. Any help regarding how to control NIC. I believe it would be possible for Parallel printer port and serial port but I don't know if it's possible for Network INterface Card. Any information is highly appreciated. Thanks!
0
Comment
Question by:sinnedph
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 12421895
You have not any possibility to control NIC to produce your own signals, because transmision protocol is hardwired in NIC's logic. It is not like serial or parallel where you have the possibility to control state of individual pins. Even more, Ethernet signal is differential type, so a pair of lines produces a signal together, no individual pin signal.
The best you can do with Ethernet is to use Embedded Ethernet microcontroller cards, like those produced by EDTP Electronics:
http://www.edtp.com/
Then you have to program and connect each card ($70-$80 each) to each or more than one device. Microcontroller is programmed in C or Assembler. In your PC, just have to build an application with Visual C++ or VB with socket transmissions in UDP mode in order to "talk" with microcontroller cards.
0
 
LVL 12

Assisted Solution

by:fulscher
fulscher earned 500 total points
ID: 12427442
sinnedph,

As Jaime said, you'll be better off using the parallel port or a USB port of your PC for things like this.

Programming the parallel port can be a tricky; essentially, you need direct access to the hardware in order to control the individual bits. It's easy in MS-DOS (if that's sufficient for you), it's a bit more difficult in Windows (needs a driver).

Alternatively, it might be easier to use a USB device which already contains isolated inputs and outputs (check, for example, http://www.audon.co.uk/usbdio.html). You have to spend some money, but you get a complete hardware device including drivers and software to control it.

Whenever possible, I'd suggest using a separate device which is very well insulated (it's probably cheaper to buy a new one than to replace the motherboard if something goes wrong).

HTH, J
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 12427537
As a personal experience, I recommend you to use Ethernet ports instead of USB for many reasons:
- USB is harder to program than Ethernet, Ethernet is as easy as create a Socket object and use Send() function
- USB microcontrollers are harder to program than Ethernet
- USB is intended for near peripherals not for mid- and long-distances
- USB hardware is less fail tolerant, it is easier to build a ethernet cable than a USB cable
0
 
LVL 12

Expert Comment

by:fulscher
ID: 12428134
Well, it certainly depends on the requirements.

The USB module I thought of contains insulated inputs and outputs, so it shouldn't be sensible at all to external influences - you can even connect certain devices directly to the inputs, as long as the voltage is below 24V. The outputs are protected by relays, so you again can connect low-voltage devices directly without additional electronics. I would imagine that programming them with the included software modules is just a matter of a function call (something like Port1 = FALSE). I'm not sure about this, though; check the docs.

For most other ports (Ethernet, parallel port, serial port, etc.) you'll need additional hardware for the insulation and protection of the main board - add this to the cost of the chip, and you'll end up at similar prices ($100+), without accounting for the time required to assemble the device.

But of course, for long distances, Ethernet is a good solution. You could also use RS485 (can be used over Ethernet cable, is much less sensitive to electronic noise, allows for distances of several 100 feet). Or you could use a TCP/IP-to-Serial converter with additional logic and hardware and transmit the signals over a WLAN. Or use two TCP/IP-over-Powerline adapters and again a TCP/IP-to-serial converter. There are probably many more options. It all depends on what you need and want to spend in terms of money and effort.

J
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question