Serial Communication

Can I communicate two programs?
One written in C and another on ASM.
The ASM would use a function Send Serial.
The C would use a function Receive Serial.
They should be on the same project?
Or on the same source group?
How can I simulate this transmition?

Parents
  • "Can I communicate two programs?"

    Why do you ask us? That depends on your skills, and you haven't told us how skillful you are.

    "One written in C and another on ASM."

    The data flowing out on the serial line don't care what language the sender or receiver used.

    "The ASM would use a function Send Serial.
    The C would use a function Receive Serial."

    Note that unless you just loopback a single UART, you could even have two-way communication.

    "They should be on the same project?"

    That is up to the program designer. If you are going to run everything in the same processor, then you could use the same project. It's possible to have both assembler and C in the same project. If you are going to use two processors, then it would be logical to have to projects - one for an assembler-only program and one for a C-only program.

    "Or on the same source group?"

    What is your view of a difference between a source group and same project? I kind of think same source group would imply same project. If same project, then the compiler would not care too much how you group the source code files.

    "How can I simulate this transmition?"

    That obviously depends on what tools you have access to. Your original post was shock-full of very explicit details such as "Non-Specific (Generic)" architecture...

    What is your own view about potential ways to simulate the communication?

    By the way - why simulate? Wouldn't it be more fun to communicate for real?

    Sorry - have to b reak now. I need to go and simulate sleep.

Reply
  • "Can I communicate two programs?"

    Why do you ask us? That depends on your skills, and you haven't told us how skillful you are.

    "One written in C and another on ASM."

    The data flowing out on the serial line don't care what language the sender or receiver used.

    "The ASM would use a function Send Serial.
    The C would use a function Receive Serial."

    Note that unless you just loopback a single UART, you could even have two-way communication.

    "They should be on the same project?"

    That is up to the program designer. If you are going to run everything in the same processor, then you could use the same project. It's possible to have both assembler and C in the same project. If you are going to use two processors, then it would be logical to have to projects - one for an assembler-only program and one for a C-only program.

    "Or on the same source group?"

    What is your view of a difference between a source group and same project? I kind of think same source group would imply same project. If same project, then the compiler would not care too much how you group the source code files.

    "How can I simulate this transmition?"

    That obviously depends on what tools you have access to. Your original post was shock-full of very explicit details such as "Non-Specific (Generic)" architecture...

    What is your own view about potential ways to simulate the communication?

    By the way - why simulate? Wouldn't it be more fun to communicate for real?

    Sorry - have to b reak now. I need to go and simulate sleep.

Children
More questions in this forum