Mikroelektronika - View Topic - Alphanumeric Lc... : Alphanumeric LCD and Push Button
Mikroelektronika - View Topic - Alphanumeric Lc... : Alphanumeric LCD and Push Button
Mikroelektronika - View Topic - Alphanumeric Lc... : Alphanumeric LCD and Push Button
Login
http://www.mikroe.com/forum/viewtopic.php?f=8...
Register
FAQ
Search
Author
akmalhilmi
Message
Post subject: Alphanumeric LCD and Push Button
In this experiment we will work with alphanumeric LCD and push button.
Communication with LCD will be performed through 4-bits and connections is made as follows: D4 with RB0, D5 with RB1, D6 with RB2, D7 with RB3, RS with RB4 and EN with RB5.
The Push button is connected to PORT RA0 - RA4 (for increment). I cant make it. anyone can help me to solve it? i using PIC 16F877A. LCD
// define display_init;
{
digit[0] = (number/10)%10 + 48;
// tens digit;
// unit digit;
Lcd_Out(1,6,digit);
Lcd_Out(1,14,digit);
Lcd_Out(2,6,digit);
Lcd_Out(2,14,digit);
}
void main()
// main;
{
CMCON |= 7;
TRISA = 1;
TRISB = 0;
PORTB = 0;
// Turn ON PORTB;
Lcd_init();
// LCD Initialization;
Lcd_cmd(_LCD_CLEAR);
// Clear LCD;
Lcd_cmd(_LCD_CURSOR_OFF);
Lcd_out(1,2,text1);
Lcd_out(1,10,text2);
Lcd_out(2,2,text3);
Lcd_out(2,10,text4);
while(1)
{
do{
if(Button(&PORTA,0,1,0)){
Delay_ms(200);
1 of 3
11/13/2014 10:40 AM
http://www.mikroe.com/forum/viewtopic.php?f=8...
display_init();
// call display_init();
delay_ms(1000);
// delay 1s;
number ++;
if (number > 99u)
// Increment number;
// if it's more than 9999 go to 0;
number = 0;
} while(1);
// infinite loop;
}
}
Top
jtemples
Quote:
Joined: 22 Jan 2012 05:46
Posts: 258
What is "it"?
Top
akmalhilmi
All posts
Sort by
Post time
Ascending
Go
Page 1 of 1 [ 3 posts ]
Board index Compilers mikroC Compilers mikroC PRO for PIC mikroC PRO for PIC General
Who is online
Users browsing this forum: Bing [Bot], pwdixon, qwall and 5 guests
2 of 3
11/13/2014 10:40 AM
Search for:
http://www.mikroe.com/forum/viewtopic.php?f=8...
Go
Jump to:
Go
3 of 3
11/13/2014 10:40 AM