i need help with pic 16f877 lcd & push buttons

Thread Starter

superayman

Joined Apr 1, 2013
22
i need to make a project about a scrolling text in pic that have an lcd 16*2
and two push buttons that can move between texts ive tried a lot but didnt workout for me
thats how i connect the lcd

Rich (BB code):
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
 
Last edited by a moderator:

MrChips

Joined Oct 2, 2009
35,138
You have posted nothing for us to go on. It is not sufficient to say "didnt workout for me".
What doesn't work?
Show a circuit schematic and the complete listing of the program.
 

Thread Starter

superayman

Joined Apr 1, 2013
22
You have posted nothing for us to go on. It is not sufficient to say "didnt workout for me".
What doesn't work?
Show a circuit schematic and the complete listing of the program.
i connected push button 1 to c1
and connected push button 2 to c2
and thats all
 

ErnieM

Joined Apr 24, 2011
8,415
here's on proutos
Not everyone shares the Proteus program. A pdf or some other more universal means of showing your schematic would be much better choice.

Along with your schematic post your code for the buttons: how they get initialized, how they get read, and how the messages get displayed.

Question: does the code to display these "texts" get used anywhere else? That lets you and us know it is tested to work.
 
Top