views:

17

answers:

1

Is there a way to write a program to output ON/OFF/ON/OFF sequence to one of USB, RS-232, or Parallel port? The On probably will be 5V or is "close circuit", and Off will be 0V or is "open circuit".

Can the frequency be very high? This can be achieve long time ago by using TTL chips and a "clock", and programming in Microcode, which is lower level than Machine Code. On a PC, can this be done?

+1  A: 

Well,

The easiest port is Parallel port. You don't need any hardware to do this with parallel port.

Logix4u contains a nice tutorial and other resources on this and it is more than enough. (Link) (Sample Project)

Writing to the serial port is not difficult because you have many options to do it directly. As an example in .NET you have a SerialPort class. But the problem is you need a hardware (Most probably a RS 232 to TTL converter + PIC) to implement the requirement.

Chathuranga Chandrasekara
ah, a major issue is I might have to set up the PC bought 8 or 10 years ago -- maybe that one has a Parallel port...
動靜能量
Then the Parallel port is the best option. If the hardware configuration is too low it is effective to use a simpler language like C instead of worrying about CLR based languages. I've done it using VB, C#, Pascal and C. using the parallel port is pretty straight forward and eeeeasy to learn than the others.
Chathuranga Chandrasekara