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

Help with process and underprocess in C

I need to start a function and it must run continiosly until i press a key.
I have tested it using "getchar()", but it doesn't work, becuase i need to press something to continue running the software.
So, I think that i should start a process that only waits for a key to be pressed, but i don't know how to do this.
What can i do?

Parents
  • "I need to start a function and it must run continiosly until i press a key."

    Where is this key?
    Is it connected directly to the 8051, or is it on a remote keyboard connected via RS232 (eg, on a PC), I2C, or somesuch?

    "I have tested it using "getchar()", but it doesn't work, becuase i need to press something to continue running the software."

    Of course you do - that is exactly what getchar() does!
    Read the description of getchar:
    http://www.keil.com/support/man/docs/c51/c51_getchar.htm
    You will, of course, also need to read the description of the function used by getchar...

Reply
  • "I need to start a function and it must run continiosly until i press a key."

    Where is this key?
    Is it connected directly to the 8051, or is it on a remote keyboard connected via RS232 (eg, on a PC), I2C, or somesuch?

    "I have tested it using "getchar()", but it doesn't work, becuase i need to press something to continue running the software."

    Of course you do - that is exactly what getchar() does!
    Read the description of getchar:
    http://www.keil.com/support/man/docs/c51/c51_getchar.htm
    You will, of course, also need to read the description of the function used by getchar...

Children