i need help with pic 16f877 lcd & push buttons

Discussion in 'Programmer's Corner' started by superayman, Apr 3, 2013.

  1. superayman

    Thread Starter New Member

    Apr 1, 2013
    22
    0
    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

    Code ( (Unknown Language)):
    1. sbit LCD_RS at RB4_bit;
    2. sbit LCD_EN at RB5_bit;
    3. sbit LCD_D4 at RB0_bit;
    4. sbit LCD_D5 at RB1_bit;
    5. sbit LCD_D6 at RB2_bit;
    6. sbit LCD_D7 at RB3_bit;
    7. sbit LCD_RS_Direction at TRISB4_bit;
    8. sbit LCD_EN_Direction at TRISB5_bit;
    9. sbit LCD_D4_Direction at TRISB0_bit;
    10. sbit LCD_D5_Direction at TRISB1_bit;
    11. sbit LCD_D6_Direction at TRISB2_bit;
    12. sbit LCD_D7_Direction at TRISB3_bit;
    13.  
    14.  
     
    Last edited by a moderator: Apr 3, 2013
  2. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    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.
     
  3. superayman

    Thread Starter New Member

    Apr 1, 2013
    22
    0
    i connected push button 1 to c1
    and connected push button 2 to c2
    and thats all
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,432
    3,360
    Too bad, you don't get it.
     
  5. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    A schematic is a drawing, showing the connections you've made with the hardware you have. Try again....
     
  6. superayman

    Thread Starter New Member

    Apr 1, 2013
    22
    0
    here's on proutos
     
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    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.
     
Loading...