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

How to simulate a input?

Hello friends,

Iam new to keil. I want to calculate the period of square wave. For that i should simulate a square wave using SIGNAL function.

I have some problem with writting and initiating the debugger function. Please tell me the steps to be followed to simulate a square wave input.

Thank u.

Parents
  • Thanx for ur reply.

    I copied a signl function from keil website. It is as follows.

    signal void square_wave (void) {

    while(1)
    { PORT1 |= 1; swatch(0.0005); PORT1 &= ~1; swatch(0.0005);
    }}
    As u can c it should simulate a square wave at P1.0 continuously. But when i invoked the function by typing square_wave(); in the command window, only the first line of the while loop is executing. i.e Port 1's 0th bit is set always. This is my problem. Please help me in resolving it. What is the wrong iam doig in this?

    Waiting for your reply.
    Thank u
    Manikandan

Reply
  • Thanx for ur reply.

    I copied a signl function from keil website. It is as follows.

    signal void square_wave (void) {

    while(1)
    { PORT1 |= 1; swatch(0.0005); PORT1 &= ~1; swatch(0.0005);
    }}
    As u can c it should simulate a square wave at P1.0 continuously. But when i invoked the function by typing square_wave(); in the command window, only the first line of the while loop is executing. i.e Port 1's 0th bit is set always. This is my problem. Please help me in resolving it. What is the wrong iam doig in this?

    Waiting for your reply.
    Thank u
    Manikandan

Children