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

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?

  • "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.

  • Thanks very much.

    Making it real is much better than simulate.

    On the same source code (.asm) the program had SEND and RECEIVE functions.

    Then the program send an 'A' to a SBUF, after SBUF to the 'A'.
    To check if the program could send a value and receive the same value again.

    I tried it. In the beginning I did: MOV A, #30h.

    Used the RUN debugging the A after was 00h.

    Made step by step the A was 11h.

    Is there a difference between them?
    I cant use step by step when using the timer?

  • Then the program send an 'A' to a SBUF, after SBUF to the 'A'.
    To check if the program could send a value and receive the same value again.

    I tried it. In the beginning I did: MOV A, #30h.
    that does not start a transmit

    Used the RUN debugging the A after was 00h.

    Made step by step the A was 11h.

    yes, the code changed the contents

    Is there a difference between them?
    well 30h is not 11h

    I cant use step by step when using the timer?
    sure you can

    Erik