This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

about sio.c

What is sio.c file?
What is it used for?
I can't find a clear answer on line.
Please help.
Thanks

Parents
  • Here at work we once had a project that used a file called "sio.c" but nobody had a clue about why it is there, and what such a file name would mean.

    After all, it wasn't a DOCument (.DOC), or a TeXT (.TXT) file, or an EXEcutable... (.EXE) or even a .MP3 file.

    One of our veteran engineers here said that the ".c" part could mean that it is a "C" programming language file. (We laughed, but he actually seemed serious).

    Our new college grad kid was confused about the 's' but blurted out something about his professor using the term 'io' as if it meant the same thing as the phrase "input-output."

    What a dorky kid. Imagine an "input-output C" file! What the heck was he thinking? Input AND output? of what?

    Our project only had one thing that did both input AND output. That was the serial terminal thing that we had attached to that DB9 connector on the back of the box. (oh, that's right, you guys say its technically called a "DE-9" connector).

    I suggested the 's' stood for "serial" but I stood alone: "a Serial Input Output C module" I postulated. Everybody just shrugged their shoulders and continued arguing about the meaning of "io."

    [Sorry about the sarcasm. I just couldn't help myself.]

    <sarcasm>
    Drawing on my vast knowledge of writing embedded code, and seeing that other forum contributors couldn't answer your question...
    </sarcasm>

    Your 'sio.c' file is most likely a "C" source file module that contains the serial input and output routines for some serial peripheral like a UART, or SPI, or I2C, or USB, or something to that effect.

    You'll have to read (and understand) the contents of the file to know what it actually is does.

    I am glad that you tried to find the answer "on line" but the "sio.c" module is such a common file name, and can be many things depending upon the application, that I'm not surprised that you couldn't find a simple definition.

    The name could be more descriptive, like UART_SIO.C, or I2C_SIO.C, or SPI_SIO.C. (I usually leave off the _SIO part since it is implied).

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

    P.S. I hope your test went well.

Reply
  • Here at work we once had a project that used a file called "sio.c" but nobody had a clue about why it is there, and what such a file name would mean.

    After all, it wasn't a DOCument (.DOC), or a TeXT (.TXT) file, or an EXEcutable... (.EXE) or even a .MP3 file.

    One of our veteran engineers here said that the ".c" part could mean that it is a "C" programming language file. (We laughed, but he actually seemed serious).

    Our new college grad kid was confused about the 's' but blurted out something about his professor using the term 'io' as if it meant the same thing as the phrase "input-output."

    What a dorky kid. Imagine an "input-output C" file! What the heck was he thinking? Input AND output? of what?

    Our project only had one thing that did both input AND output. That was the serial terminal thing that we had attached to that DB9 connector on the back of the box. (oh, that's right, you guys say its technically called a "DE-9" connector).

    I suggested the 's' stood for "serial" but I stood alone: "a Serial Input Output C module" I postulated. Everybody just shrugged their shoulders and continued arguing about the meaning of "io."

    [Sorry about the sarcasm. I just couldn't help myself.]

    <sarcasm>
    Drawing on my vast knowledge of writing embedded code, and seeing that other forum contributors couldn't answer your question...
    </sarcasm>

    Your 'sio.c' file is most likely a "C" source file module that contains the serial input and output routines for some serial peripheral like a UART, or SPI, or I2C, or USB, or something to that effect.

    You'll have to read (and understand) the contents of the file to know what it actually is does.

    I am glad that you tried to find the answer "on line" but the "sio.c" module is such a common file name, and can be many things depending upon the application, that I'm not surprised that you couldn't find a simple definition.

    The name could be more descriptive, like UART_SIO.C, or I2C_SIO.C, or SPI_SIO.C. (I usually leave off the _SIO part since it is implied).

    --Cpt. Vince Foster
    2nd Cannon Place
    Fort Marcy Park, VA

    P.S. I hope your test went well.

Children
  • I normally let the file names tell which device in the chip that it services.

    In some situations, it may be a general file for all devices of the same type.

    In some situations, there is a separate source file for uart0 and uart1 because they may differ fundemantally all the way from the interrupt service routine.

    I did see this thread earlier but skipped past it since I didn't really know how to phrase myself in just a semi-provocative way and I didn't have the time to write a long answer.

    Anyway - a file sio.c most probably contains accesses to some parts of the processor. In the case of a C51 project, it is more than likely that the code references a couple of special function registers (SFR) that can be located in the datasheet for the processor, or in the general documentation for the 8051 architecture.

    These magic SFR should quickly tell what the file does - even if it is called mrn (My Random Name). Sometimes the file name is easy to decode. Sometimes hard. But you can get a lot of hints by looking in the file.

    I don't think too many people on this forum would bet against a serial I/O module - most porbably for the UART.