how to write a debug.ini to simulate 4*4 keypad conntected with P1??

i write a function ,but it not works at all..
how can i do?
signal void key_s1()
{ while((P4 &0x0f) != 0) { twatch(10); }

P4 &= 0x0f; twatch(200); P4 |= 0xf0;

while((P4 &0x0f) != 0) { twatch(10); }

P4 &= 0x0f; twatch(200); P4 |= 0xf0;

}

Parents
  • how can i do?
    tell us what you "know" and assume we know as well.
    What pins (names, not numbers) is the keypad connected to (columns/rows)?
    What derivative do you use?
    Have you any idea of debouncing?
    comment your scribbles (anything without comments is NOT 'code').
    what is 'signal', what is 'twatch'?

    I know you are asking how to simulate, but with the above, no amount of simulation is going to help you

    Erik

Reply
  • how can i do?
    tell us what you "know" and assume we know as well.
    What pins (names, not numbers) is the keypad connected to (columns/rows)?
    What derivative do you use?
    Have you any idea of debouncing?
    comment your scribbles (anything without comments is NOT 'code').
    what is 'signal', what is 'twatch'?

    I know you are asking how to simulate, but with the above, no amount of simulation is going to help you

    Erik

Children
More questions in this forum