go_away

Author Topic: Standard output of a PC with no graphics card?  (Read 1708 times)

0 Members and 1 Guest are viewing this topic.

Offline voyager2Topic starter

  • Supreme Robot
  • *****
  • Posts: 459
  • Helpful? 6
  • Behold! The Impossible Triangle of robotics!
Standard output of a PC with no graphics card?
« on: June 09, 2011, 07:39:46 PM »
Title says it all.
In C, printf() prints to the standard output, which on a computer is usually the Graphics card => then the screen.
I want to know what would happen if I unplugged the Graphics card.
Would the computer output though the Serial Port (like a micro-controller)??
Would it output through the parallel port?
Would it just try and output through the Graphics slot, fail , then continue?
What would it do!?

 Voyager
And Admin said "Let there be robots!"
And it was good.

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: Standard output of a PC with no graphics card?
« Reply #1 on: June 10, 2011, 07:03:07 AM »
Title says it all.
In C, printf() prints to the standard output, which on a computer is usually the Graphics card => then the screen.
I want to know what would happen if I unplugged the Graphics card.

Depends on the OS. I think Windows (at one point anyway) would simply refuse to run without a graphics card. You can setup various flavors of unix to use a serial port as a console, but that won't automatically translate to what applications will use for output.

What are you trying to do?

Joe

Offline richiereynolds

  • Full Member
  • ***
  • Posts: 112
  • Helpful? 3
Re: Standard output of a PC with no graphics card?
« Reply #2 on: June 10, 2011, 03:36:00 PM »
Yes, depends on the OS and architecture, Solaris (on sparc architecture at least) can output from the serial port, I doubt windows can.

Offline voyager2Topic starter

  • Supreme Robot
  • *****
  • Posts: 459
  • Helpful? 6
  • Behold! The Impossible Triangle of robotics!
Re: Standard output of a PC with no graphics card?
« Reply #3 on: June 11, 2011, 02:17:20 AM »
...
Depends on the OS. I think Windows (at one point anyway) would simply refuse to run without a graphics card. You can setup various flavors of unix to use a serial port as a console, but that won't automatically translate to what applications will use for output.
WinDOS* is very restrictive...
Never thought about Unix/Linux...

Quote
What are you trying to do?
I thought it would be more convenient to have a program running on my computer, with the output automatically streamed through the serial port to a robot; rather than having 100 lines of code, just to send one byte at the the very lowest baud rate.
It would be more efficient.

Yes, depends on the OS and architecture, Solaris (on sparc architecture at least) can output from the serial port, I doubt windows can.
I plan on using a standard 86x (aka 32bit) IBM compatible (insert other PC stuff) computer.
Any OS is fine  :P  just as long as its free to download ;)


*Please note WinDOS i personally believe that Windows is nothing more than extension to DOS.
« Last Edit: June 11, 2011, 02:20:54 AM by voyager2 »
And Admin said "Let there be robots!"
And it was good.

Offline mstacho

  • Supreme Robot
  • *****
  • Posts: 360
  • Helpful? 10
Re: Standard output of a PC with no graphics card?
« Reply #4 on: June 13, 2011, 05:55:07 PM »
well...

a) stdout on a unix machine CAN be redirected to a port.  Everything in unix is a file.  However, to actually redirect stdout (which is where printf goes) you do it when RUNNING the code, not when WRITING the code.  You do it like this:

SHELL:>> program > myFile

where "program" is the compiled C code, and "myFile" is the file you want.  Now, although this depends on the flavour you're using and how it names its serial ports and how you've initialized (etc...look at the documentation) the upshot is that the serial port itself is a "file" you can redirect to!  (as long as you open it).  Google it to see exactly how to do it with your particular unix flavour...

b) there is no analog to stdout on a windows machine, and as you said, windows is more restrictive.  

c) the ABSOLUTE easiest way I see to do this: just write the serial port code once, and re-use it a thousand times (or google it, it must be on the internet).  This way, you're absolutely certain that it will work, and if you change to a new flavour of linux (...unix...) you won't have to search forever to figure out the redirect.

MIKE

**EDIT: I assumed you weren't using windows in part C.  Truthfully, unless you're *stuck* on using C, and if you have windows, just do it on an easier language, like C# (which is how I do all my serial comm. in windows, just because it's like 5 lines of code that's on the internet already).  Remember, the robot will only ever see serial messages from the computer, it won't care if you're writing that serial code in C, C#, or FORTRAN (but uh...don't ever use FORTRAN :P).
« Last Edit: June 13, 2011, 05:58:33 PM by mstacho »
Current project: tactile sensing systems for multifingered robot hands

Offline adanvasco

  • Full Member
  • ***
  • Posts: 107
  • Helpful? 6
  • Necessity is the mother of invention.
Re: Standard output of a PC with no graphics card?
« Reply #5 on: June 13, 2011, 08:40:29 PM »
The efficiency of such a project would definitely depend upon what you want it to do. If you want to do heavy data processing, such as image/voice then it would probably be more efficient.
The 100 lines of code would only move from the MCU to the CPU, which adds the communication problem.
As mstacho said, it would be pretty easy to redirect the standard output to any port as long as it is installed on a Unix machine, specifically any Linux flavor. I have used and currently use (and will ever use) several Linux variants, so if you need help with this, just let me know.
Knowledge does not weigh.

Offline GrooveHolmes

  • Jr. Member
  • **
  • Posts: 43
  • Helpful? 0
Re: Standard output of a PC with no graphics card?
« Reply #6 on: June 14, 2011, 11:45:23 PM »
Will your motherboard even POST without a video card? Most boards without an onboard video will fail and halt at the POST test with an error if there is no graphics card.
The difference between the student and the master, is that the master knows what he does not know.

Offline tbeale

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Re: Standard output of a PC with no graphics card?
« Reply #7 on: July 15, 2011, 12:51:17 PM »
I had a video card go out in a dell, and the BIOS wouldn't even load... I thought it was a bad power supply. The video card is the first thing it checks.

 


Get Your Ad Here

data_list