Why Doesn't stdaux Exist When Programming Serial Ports in C?

Click For Summary
The term "stdaux" is outdated and not recognized by modern compilers when programming serial ports in C. Instead, programmers should use the Windows API for serial communication on Windows systems, while Linux users can refer to specific tutorials for guidance. Serial port communication involves configuring the communications chip, setting parameters like baud rate and data bits, typically starting at 9600 baud. Fixed addresses like COM1 and COM2 are used in PCs, and proper include files are necessary to interact with the serial port hardware. Understanding these fundamentals is essential for successful serial port programming in C.
Grotesque Puppet
Messages
41
Reaction score
0
In my C book it says that the serial port is stdaux, but when I make a program to send data to stdaux the compiler (Dev-C++ in Windows and gcc in linux) says that stdaux doesn't exist :frown: Can anyone explain or point me toward a good tutorial about using the serial ports in C?

Thanks
 
Computer science news on Phys.org
using serial ports

Hi

The serial port has been around and in use over 50 years. Some of the standards may seem odd, like signal names? why all those pins if we only use 3? Whats with data set ready, CTS, DCD? Realize those were for older systems and teletype equipment.

What we use today is a simple interface, it assumes the cable is fine and it tends to easily spout data across.

From the program, what you need to do is configure and talk to the communications chip that drives the serial port, it handles moving the data.

You have to set the data rate, start/stop bits usually 9600 baud, 8 bits no parity 1 stop, so its 9600, 8, N, 1 almost all the time.

To approach 100K speeds it can take some extra work; but generally I find it easiest to begin at 9600 to establish the link, then try for higher data rates.

Your program will have to have some include file like a .h to "drive" the serial port chip. you could call the stdaux function, which would then have to figure out how to program/talk to the serial port chip. COM1/2 are fixed addresses in a PC, locked into the hardware. If I recall you get 8 bytes to address, one of those is the actual data, another is a status byte, another a config byte? something like that.

You would, depending on your include file, either write bytes or write to a buffer area (or read) The functionality comes from that file, you could write your own but there should be great ones out in virtual cyberspace
 
Last edited:
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
69
Views
10K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
73
Views
6K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K