2003-05-20 02:26 PM
2011-05-17 02:54 AM
Hello Guys,
I'm trying to pushed key value using external interrupt 0. Port4 is defined as a GPIO port and assigned to keys. When a key is pushed, external interrupt 0 is occured and I'll copy the Port4 state to a variable. However, the Port4 state isn't read. This is the example code. key_var = P4; Is it fault? Thanks, Byounghoon2011-05-17 02:54 AM
In the Application note AN1171 appendix A, there is a design example that is samiliar to your application. You can get the app. note from the website at:
2011-05-17 02:54 AM
Thanks for the reply, but I want to know the handling method of 'P4'. AN1171 is refered about PA, PB, PC and PD. As I know, these 4 ports operate differently with P4.
Please give me some more advice... ----- I fixed it!! The problem was on the speed of the MCU. Actually, I copied the value of P4 in main routine. However, the value of P4 is changed in transition between interrupt routine and main routine. So I copied the value of P4 in interrupt routine and it work well. Thanks, Byounghoon [ This message was edited by: aormaniac on 21-05-2003 09:39 ]