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

getting user input in Debugger

I have written a small function as below:

void checkKeyPress()
{
uchKeyPressed = P1; /* Read Port P1 */
uchKeyPressed = uchKeyPressed & 0x18; /* mask with 0x18 to check for P1.3 & P1.4 */
} /* end of function void checkKeyPress() */

void main()
{

do
{
checkKeyPress()
} while (uchKeyPressed != 0x08);

} /* end main */


I want to simulate the input from port P1 in the debugger. How can I do it?
Also if I want to simulate an input say from 8279 address 0xc001, how can we do it in the debugger?

Regards,

Mohit


  • To write to P1, you would enter
    P1 = 0xFF
    or some other value at the command line.
    No doubt you can wrap this into a more complex wrapper for extended functionality, but that's the most direct approach.

    For UV2, you could write an AGSI DLL that provides a more intricate UI including dialog boxes, etc, but if your target requires user IO you'll probably need to implement serial IO routines, anyway, which would allow you to interact with the application via the serial window(s).

    - Dave

  • Look in the 'Peripherals' menu, and read the uVision2 Getting Started Guide (GS51.pdf) - accessible via the 'Books' tab in the Project window