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

sending an interupt

I need to send an interupt out on the RS232 and get the time back.

What commands is best for it?

  • You can't send an interrupt out on the serial port. The serial port will send out characters, and may toggle and detect status lines. The UART may on the other hand generate interrupts for a number of reasons.

    Please return with more information about what you want to accomplish.

  • Sorry I will say,

    I need to send an interupt for the RS232. I must have the computer see the interupt and give the time for the program to see.

  • But once more, the serial port can not send any interrupts. It can only send characters.

    The hardware in the PC can generate an interrupt if the PC UART receives characters, or if it sees a handshake signal changing state.

    So no, you do not need to send an interrupt. But you can write an application that sends characters to the PC. And if you look in the examples directory, there are a number of examples that does transmit and receive data using an UART.

    It will be up to you do design a protocol: What characters to send to the PC to request a time, and on what format the PC should send back the time.

  • "I need to send an interupt for the RS232."

    As Per says, you cannot "send" an interrupt;
    An interrupt is an internal thing within the processor - it is not "sent" across any external interface.

    "I must have the computer see the interupt"

    What "computer"?
    As Per says, this "computer" will not "see" the interrupt.
    You will need to write a program to run on this "computer" and that program will need to see the characters arriving at its serial port (COM port, if it's a PC).

    "give the time for the program to see"

    What "program"?

    This system requires two programs:

    One running on the 8051 that sends the request to the "computer", and receives its resonse;

    Another one running on the "computer" that sees the request coming from the 8051, and sends the time as its response

  • i send interuopt on pc using (eg) echo > com1

    it is good and working on it
    and need for the same on 8051

    but what ciommand top send on 8051 for the same?

  • thanx,

    your' answer is bad and i try another forum now,

    ======================================================================================

  • The answers are very fine. You have just decided that you don't believe them. That is your problem.

    Do you want us to lie to you, just to pamper and comfort you and let you keep your misconception?

    You have already been directed to look at all the sample code in the examples directory FOR SENDING CHARACTERS. You can not send interrupts, since interrupts are not physical entities. Interrupts are something that a chip may generate itself as response to an internal or external event. And when it comes to the UART, such events are reception or transmission of characters, or toggling of handshake signals.

    By the way, if you do select another forum: Please post a link to the conversation in this thread. People may get a laugh about you ignoring perfectly good answers...

  • If you want people to understand you, then you need to use the terminology correctly!

    "i send interuopt on pc using (eg) echo > com1"

    No, that does not send an interrupt - it sends characters