EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / lcd interface with pic 16f877a

lcd interface with pic 16f877a

|

Microcontroller › PIC › lcd interface with pic 16f877a

  • This topic has 1 reply, 2 voices, and was last updated 13 years, 9 months ago by Nikhil.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • April 14, 2012 at 2:29 pm #1498
    Sushant Shetty
    Participant

    hey! …im trying to display a string on 16×2 lcd using pic16f877a but nothing is being displayed…m using a pic dev board (20mhz) …n using mikroC compiler…..pls help…

     

    my code:

    sbit LCD_RS at RD4_bit;
    sbit LCD_EN at RD5_bit;
    sbit LCD_D0 at RB0_bit;
    sbit LCD_D1 at RB1_bit;
    sbit LCD_D2 at RB2_bit;
    sbit LCD_D3 at RB3_bit;
    sbit LCD_D4 at RB4_bit;
    sbit LCD_D5 at RB5_bit;
    sbit LCD_D6 at RB6_bit;
    sbit LCD_D7 at RB7_bit;
    sbit LCD_RS_Direction at TRISD4_bit;
    sbit LCD_EN_Direction at TRISD5_bit;
    sbit LCD_D0_Direction at TRISB0_bit;
    sbit LCD_D1_Direction at TRISB1_bit;
    sbit LCD_D2_Direction at TRISB2_bit;
    sbit LCD_D3_Direction at TRISB3_bit;
    sbit LCD_D4_Direction at TRISB4_bit;
    sbit LCD_D5_Direction at TRISB5_bit;
    sbit LCD_D6_Direction at TRISB6_bit;
    sbit LCD_D7_Direction at TRISB7_bit;
    // End LCD module connections

    char *text = “Hello World!”;

    void main()
    {

    CMCON = 0x07;
    TRISB = 0; // PORTB is output

    delay_us(100);
    Lcd_Init(&PORTB); // Initialize LCD connected to PORTB
    delay_us(100);
    Lcd_Cmd(Lcd_CLEAR); // Clear display
    Lcd_Cmd(Lcd_CURSOR_OFF); // Turn cursor off
    Lcd_Out(1, 1, text); // Print text to LCD
    }

    April 17, 2012 at 2:39 am #7469
    Nikhil
    Participant

    You please give the clear, cursor and dispaly functions also.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Sine wave distortion January 16, 2026
  • potenciometer attachment / screwdriver January 16, 2026
  • flexible copper cable January 16, 2026
  • Variable audio oscillator January 16, 2026
  • renewed interest in old project I call it WICKED 8 January 16, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise