| ??? 08/29/06 03:44 Read: times |
#123261 - Through debugging Responding to: ???'s previous message |
Yes Jan, I have considered your recommendations and when I debugged it using keil debugger, it showed that the MC never executes even the first loop of the delay, instead it assumes a key has been pressed at:
CONFIRM_KEY_PRESS: mov p0,#0f0h acall delay_16ms MOV A,P0 ;p0.0 t0 p0.3 => rows, p0.4 to 0.6 => columns ANL A,#01110000b ;scan columns cjne a,#01110000b,KEY_PRESS_CONFIRMED; if key pressed within 423ms, come out of delay loop and jumps to 'keypad_ready' and ultimately to 'keypad_ready1' where IT WAITS UNTIL A KEY IS PRESSED. If not for the 'not equal' condition at 'cjne a,#01110000b,KEY_PRESS_CONFIRMED' the MC would have executed the delay completly and then execute 'SJMP SECOND_KEY_SCAN1'. What I don't understand here is, even with: mov p0,#0f0h
acall delay_16ms |
| Topic | Author | Date |
| problem with delays | 01/01/70 00:00 | |
| Omitted pull-ups at Port 0? | 01/01/70 00:00 | |
| No, it's pulled high | 01/01/70 00:00 | |
| You should see the connection... | 01/01/70 00:00 | |
| could it be your approach? | 01/01/70 00:00 | |
| p0 initialised as input port | 01/01/70 00:00 | |
| post the WHOLE code | 01/01/70 00:00 | |
| WHOLE code | 01/01/70 00:00 | |
| Try this | 01/01/70 00:00 | |
| WHOLE code | 01/01/70 00:00 | |
| Assuming that the external pullups are not working | 01/01/70 00:00 | |
| why is the delay not being excecuted? | 01/01/70 00:00 | |
| HOW DO YOU KNOW | 01/01/70 00:00 | |
| Through debugging | 01/01/70 00:00 | |
| I know nothing about keil debugger | 01/01/70 00:00 | |
| make code that resembles the flowchart and you wil | 01/01/70 00:00 | |
| whole? | 01/01/70 00:00 | |
| Ashwins stack handling is totally unsuited! | 01/01/70 00:00 | |
| to generate tone of octave(8keys)with 89c51 | 01/01/70 00:00 | |
sandy please start a new thread | 01/01/70 00:00 |



