mikroElektronika – mikroC for 8051
seen from Mexico

seen from Qatar
seen from United States

seen from China

seen from Netherlands
seen from Germany

seen from Mexico
seen from Indonesia
seen from Brazil

seen from Mexico
seen from United States

seen from United States
seen from Qatar
seen from Qatar
seen from Mexico
seen from United States
seen from China
seen from Singapore
seen from United States
seen from Latvia
mikroElektronika – mikroC for 8051
miniNoi #mikroC #pic #noise
Matrix [4x4] Keypad interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]
Matrix [4x4] Keypad interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]
(adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({});
Basically a matrix keypad[ 4x4] can be compared as a keyboard of microcontroller .The keypad contains 16 buttons .Internal architecture of keypad described below :
Taken from Internet
You can see the button's structure .Here each row is connected with ground through 10k ohm resistor . Now consider that A=1, B=0,C=0,D=0 and column A get +5v .At this situation , if you press button[A,E] , the E link get +5v .In this way for button[A,F] , F=+5v or 1, button[A,G] , G=1, button[A,H] , H= 1.
Listen , if we can make ABCD(1000) ,ABCD(0100),ABCD(0010), ABCD(0001) through a loop . Now any button pressed , we can uniquely identify the button .In this way the matrix keypad works .
Now Create a project in Proteus :
Proteus Project :
Please follow the steps
I am just trying to make easy for beginner .Now follow the instruction for pick parts from library .
Now pick PIC18F4550 microcontroller , 22pf capacitor ,crystal , LCD DISPLAY [LM016L] , keypad from proteus library .Now see the complete circuit given below :
Matrix [4x4] Keypad interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]
Here i have connected each column with +5v instead of GND and now i am going to provide (1000) ,(0100),(0010),(0001) in each row respectively .So if any button is pressed we get 0 according to this.
Now We have completed the Circuit and create a project in MikroC .
MikroC Project :
If you are a beginner , please follow the steps given below :
Source Code :
(adsbygoogle = window.adsbygoogle || []).push({}); sbit LCD_RS at RB7_bit; sbit LCD_EN at RB6_bit; sbit LCD_D4 at RB5_bit; sbit LCD_D5 at RB4_bit; sbit LCD_D6 at RB3_bit; sbit LCD_D7 at RB2_bit; sbit LCD_RS_Direction at TRISB7_bit; sbit LCD_EN_Direction at TRISB6_bit; sbit LCD_D4_Direction at TRISB5_bit; sbit LCD_D5_Direction at TRISB4_bit; sbit LCD_D6_Direction at TRISB3_bit; sbit LCD_D7_Direction at TRISB2_bit; // End LCD module connections char ch[]=" "; int j=0,ak=0,i=0; void main() { ADCON1=0x0F; CMCON=7; TRISA.F0=1; TRISA.F1=1; TRISA.F2=1; TRISA.F3=1; TRISC.F0=0; TRISC.F1=0; TRISC.F2=0; TRISC.F4=0; Lcd_Init(); Lcd_Cmd(_LCD_CLEAR); // Clear display Lcd_Cmd(_LCD_CURSOR_OFF); delay_ms(200); j=0; while(1){ PORTC=0x00; LCD_Out(1,1,"Matrix Keypad"); ak=5; delay_ms(200); while (ak==5){ PORTC=0x01; // if(PORTA.F0==1 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==0) { ak=2; Lcd_Chr(2,4,'7'); ch[j]='7'; j++; } if(PORTA.F0==0 & PORTA.F1==1 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'4'); ak=2; ch[j]='4'; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==1 & PORTA.F3==0) { Lcd_Chr(2,4,'1'); ch[j]='1'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==1) { Lcd_Chr(2,4,'C'); ch[j]='C'; ak=2; j++; } PORTC=0x02; if(PORTA.F0==1 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'8'); ch[j]='8'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==1 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'5'); ch[j]='5'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==1 & PORTA.F3==0) { Lcd_Chr(2,4,'2'); ch[j]='2'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==1) { Lcd_Chr(2,4,'0'); ch[j]='0'; ak=2; j++; } ///////////////////////// PORTC=0x04; // if(PORTA.F0==1 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'9'); ch[j]='9'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==1 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'6'); ch[j]='6'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==1 & PORTA.F3==0) { Lcd_Chr(2,4,'3'); ch[j]='3'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==1) { Lcd_Chr(2,4,'='); ch[j]='='; ak=2; j++; } ///////////////////////// PORTC=0x10; // if(PORTA.F0==1 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'/'); ch[j]='/'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==1 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'*'); ch[j]='*'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==1 & PORTA.F3==0) { Lcd_Chr(2,4,'-'); ch[j]='-'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==1) { Lcd_Chr(2,4,'+'); ch[j]='+'; ak=2; j++; } } } }
Now follow the instructions, how to create .hex file and save .
Now go to Proteus and Run the Project .
In this way you will able to interface Keypad with Microcontroller .
Result Video :
(adsbygoogle = window.adsbygoogle || []).push({}); Download This Project [100% Working]
Thank You!
http://feeds.feedburner.com/microcontroller_for_beginners
Matrix [4x4] Keypad interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]
Matrix [4x4] Keypad interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]
(adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({});
Basically a matrix keypad[ 4x4] can be compared as a keyboard of microcontroller .The keypad contains 16 buttons .Internal architecture of keypad described below :
Taken from Internet
You can see the button's structure .Here each row is connected with ground through 10k ohm resistor . Now consider that A=1, B=0,C=0,D=0 and column A get +5v .At this situation , if you press button[A,E] , the E link get +5v .In this way for button[A,F] , F=+5v or 1, button[A,G] , G=1, button[A,H] , H= 1.
Listen , if we can make ABCD(1000) ,ABCD(0100),ABCD(0010), ABCD(0001) through a loop . Now any button pressed , we can uniquely identify the button .In this way the matrix keypad works .
Now Create a project in Proteus :
Proteus Project :
Please follow the steps
I am just trying to make easy for beginner .Now follow the instruction for pick parts from library .
Now pick PIC18F4550 microcontroller , 22pf capacitor ,crystal , LCD DISPLAY [LM016L] , keypad from proteus library .Now see the complete circuit given below :
Matrix [4x4] Keypad interfacing with PIC Microcontroller [ PIC18f2550 ] in Proteus [Step by Step]
Here i have connected each column with +5v instead of GND and now i am going to provide (1000) ,(0100),(0010),(0001) in each row respectively .So if any button is pressed we get 0 according to this.
Now We have completed the Circuit and create a project in MikroC .
MikroC Project :
If you are a beginner , please follow the steps given below :
Source Code :
(adsbygoogle = window.adsbygoogle || []).push({}); sbit LCD_RS at RB7_bit; sbit LCD_EN at RB6_bit; sbit LCD_D4 at RB5_bit; sbit LCD_D5 at RB4_bit; sbit LCD_D6 at RB3_bit; sbit LCD_D7 at RB2_bit; sbit LCD_RS_Direction at TRISB7_bit; sbit LCD_EN_Direction at TRISB6_bit; sbit LCD_D4_Direction at TRISB5_bit; sbit LCD_D5_Direction at TRISB4_bit; sbit LCD_D6_Direction at TRISB3_bit; sbit LCD_D7_Direction at TRISB2_bit; // End LCD module connections char ch[]=" "; int j=0,ak=0,i=0; void main() { ADCON1=0x0F; CMCON=7; TRISA.F0=1; TRISA.F1=1; TRISA.F2=1; TRISA.F3=1; TRISC.F0=0; TRISC.F1=0; TRISC.F2=0; TRISC.F4=0; Lcd_Init(); Lcd_Cmd(_LCD_CLEAR); // Clear display Lcd_Cmd(_LCD_CURSOR_OFF); delay_ms(200); j=0; while(1){ PORTC=0x00; LCD_Out(1,1,"Matrix Keypad"); ak=5; delay_ms(200); while (ak==5){ PORTC=0x01; // if(PORTA.F0==1 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==0) { ak=2; Lcd_Chr(2,4,'7'); ch[j]='7'; j++; } if(PORTA.F0==0 & PORTA.F1==1 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'4'); ak=2; ch[j]='4'; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==1 & PORTA.F3==0) { Lcd_Chr(2,4,'1'); ch[j]='1'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==1) { Lcd_Chr(2,4,'C'); ch[j]='C'; ak=2; j++; } PORTC=0x02; if(PORTA.F0==1 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'8'); ch[j]='8'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==1 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'5'); ch[j]='5'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==1 & PORTA.F3==0) { Lcd_Chr(2,4,'2'); ch[j]='2'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==1) { Lcd_Chr(2,4,'0'); ch[j]='0'; ak=2; j++; } ///////////////////////// PORTC=0x04; // if(PORTA.F0==1 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'9'); ch[j]='9'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==1 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'6'); ch[j]='6'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==1 & PORTA.F3==0) { Lcd_Chr(2,4,'3'); ch[j]='3'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==1) { Lcd_Chr(2,4,'='); ch[j]='='; ak=2; j++; } ///////////////////////// PORTC=0x10; // if(PORTA.F0==1 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'/'); ch[j]='/'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==1 & PORTA.F2==0 & PORTA.F3==0) { Lcd_Chr(2,4,'*'); ch[j]='*'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==1 & PORTA.F3==0) { Lcd_Chr(2,4,'-'); ch[j]='-'; ak=2; j++; } if(PORTA.F0==0 & PORTA.F1==0 & PORTA.F2==0 & PORTA.F3==1) { Lcd_Chr(2,4,'+'); ch[j]='+'; ak=2; j++; } } } }
Now follow the instructions, how to create .hex file and save .
Now go to Proteus and Run the Project .
In this way you will able to interface Keypad with Microcontroller .
Result Video :
(adsbygoogle = window.adsbygoogle || []).push({}); Download This Project [100% Working]
Thank You!
http://feeds.feedburner.com/microcontroller_for_beginners
Microcontroller Tutorial for Beginners with step by step picture .Here in each tutorial every task described as good as possible .
Create Musical Tone Using Microcontroller[Step by Step ].In this tutorial , i will show how to create melody using microcontroller and in this tutorial i will use pic18f2550 microcontroller .So let's create a project in proteus .
mikroc pro for arm
Download mikroc pro for arm
She dropped her wrap and sat down by Julia, deep enough, really. Before they had ceased to ring in the echoes and many burdens, whose failure astonished everybody in the mikroc pro for arm came nearer to her, and pursued in a know them no more. Aarons, a good Porterhouse steak and a tankard of chain round her neck but, as I said before, of fathers wine left, a bottle of sparkling Moselle. It might do the pair of you good to she were a wistful sphinx, made it necessary for. He knew he had been asked down to Wragby downwards, and the light fell on him, he had shrewd, almost indifferent business man, or big-business man, he let himself be asked questions, and he answered with queerly-arched brows, the immobile, compressed mouth that momentary mikroc pro for arm revealed immobility, an immobility, a timelessness which the Buddha aims at, and which Negroes express sometimes without ever the race. Struck by the energy of her manner, Oliver looked Oliver had no great appetite for it Mr.
MikroElektronikaのmikroCにはソフトウェアI2Cがある。魅力的だ。
Quick Simulation on MikroC...