We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi
i am using arm 9 board(samsung s3c2440), and i am doing the simple program to recognize user button from user led . actually there is no error in this program but this program is not working properly....." #include "def.h" #include "2440addr.h"
void delay(int x) { int i,j; for(i=0;i<=x;i++) { for(j=0;j<=x;j++) {}}
}
int main (void) { rGPGCON=0x000000; rGPGUP=0x000000; rGPBCON=0X0015400; rGPBUP=0x000000;
while(1) { while((rGPGDAT)&(0x0800)==0x0800) {rGPBDAT=~0x020;} while((rGPGDAT)&(0x080)==0x080) {rGPBDAT=~0x040;} while((rGPGDAT)&(0x040)==0x040) {rGPBDAT=~0x080;} while((rGPGDAT)&(0x020)==0x020) {rGPBDAT=~0x100;}
}" the problem is that all leds are recognizing with only one user button randomly. and no other buttons are working except 1st. help me what is the problem?
So - your problem should have been solved if you had worked through my list.
Have you considered maybe having code that can both turn on - and turn off - a LED? Code that can only turn on - or only turn off - a LED is rather boring.