Keypad Programming
Discussion in "8051 Discussion Forum" started by Luqman Nov 30, 2007.
Fri Nov 30 2007, 04:55 pm
hi, Ajay plz make me understand this section of code.
unsigned char get_key(){ unsigned char i,k,key=0; k=1; for(i=0;i<4;i++){ keyport &=~(0x80> > i); if(!col1){ key = k+0; while(!col1); return key; } if(!col2){ key = k+1; while(!col2); return key; } if(!col3){ key = k+2; while(!col3); return key; } if(!col4){ key = k+3; while(!col4); return key; } k+=4; keyport |= 0x80> > i; } return FALSE; }
Fri Nov 30 2007, 06:49 pm
I will put comments on the tutorial do not worry..
Everything is same as i did in AVR program. Please wait till tonight so that i can update the tutorial with comments. If you are in hurry then look at the AVR program, everything is same as this.
Everything is same as i did in AVR program. Please wait till tonight so that i can update the tutorial with comments. If you are in hurry then look at the AVR program, everything is same as this.
Sun Dec 02 2007, 01:36 pm
Well Ajay, how will i call these keypad routines in assembly and C functions from main program. Plz give me idea in Assebly and C as well.
Sat Dec 22 2007, 05:38 am
sorry i couldnt understand how to program with assembler
can you give more information?
thanks a lot
can you give more information?
thanks a lot
Sat Dec 22 2007, 02:39 pm
check tutorial page.. i have given code for assembly too.. ask me if you feel any problem
Powered by e107 Forum System