MATLAB: How should i get output from serial port of laptop…

serial portserial port output from laptop

i want to get output from serial port or parallel port of laptop from matlab..
it should be in 0 or 5 V. means min or max voltage

Best Answer

0 to +5V is TTL levels, which you will not be able to get directly from a standard serial ports. Standard serial ports operate on both positive and negative voltages. It is possible to buy RS232 to TTL convertor modules.
Parallel ports operate on TTL levels. It is not recommended to create new projects that use parallel ports, as MS Windows is making it more and more difficult to access parallel ports.
Do you need these outputs as digital data, or as strobes, or as continuous high/low outputs? Or do you want variable output levels (e.g., 0.35V 0.91V at need) ? How quickly do you need to be able to vary the signals.