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
You are here: Home / Topics / PIC18F4550 interface with LCD 20×4 liner in MikroC

PIC18F4550 interface with LCD 20×4 liner in MikroC

|

Microcontroller › PIC › PIC18F4550 interface with LCD 20×4 liner in MikroC

  • This topic has 1 reply, 1 voice, and was last updated 10 years, 7 months ago by raize.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • December 20, 2011 at 3:33 am #4754
    raize
    Participant

    Hi everyone, I’m newbie in this forum..we have this  GSM based project which will interface with the LCD and a keypad.. we are having a problem interfacing the LCD to the microcontroller using the MikroC..The LCD does’nt display the code that we have burned to the PIC, we just use the built in function of the MikroC and it works fine in proteus but if we implement it on the hardware, it does’nt work.  It only display the boxes in the row 1 and row 3.  

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    here is our code, please check if what are the problems:

     

     

    sbit LCD_RS at RD2_bit;
    sbit LCD_RD at RD1_bit;
    sbit LCD_EN at RD3_bit;
    sbit LCD_D4 at RD4_bit;
    sbit LCD_D5 at RD5_bit;
    sbit LCD_D6 at RD6_bit;
    sbit LCD_D7 at RD7_bit;
     
    sbit LCD_RS_Direction at TRISD2_bit;
    sbit LCD_RD_Direction at TRISD1_bit;
    sbit LCD_EN_Direction at TRISD3_bit;
    sbit LCD_D4_Direction at TRISD4_bit;
    sbit LCD_D5_Direction at TRISD5_bit;
    sbit LCD_D6_Direction at TRISD6_bit;
    sbit LCD_D7_Direction at TRISD7_bit;
     
     
     
     
    // End LCD module connections
    char txt10[] = “HELLO WORLD”;
     
     
    void main(){
      ADCON1 = 0x7F;
      CMCON = 0x07;
      TRISD = 0x00;
      ADRESH = 0;                        // Configure AN pins as digital I/O
      ADRESL = 0;
      LCD_RD_Direction = 1;
      LCD_RD = 0;
      delay_ms(2000);
      Lcd_Init();                        // Initialize LCD
      delay_ms(2000);
      Lcd_Out_Cp(txt10);
     
     
    }
     
    Hoping for your positive response..Thanks You!! =)
    December 20, 2011 at 5:27 am #6937
    raize
    Participant

    Please really need your help.

  • 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

  • Can I use an SPDT 5 wire Relay in reverse? August 9, 2022
  • Basic questions about MOSFETS, Gate Drivers and Diodes August 9, 2022
  • LTSpice DC-AC August 9, 2022
  • Circuit Problem August 8, 2022
  • Google translate suggest "device sheet" or "apparatus sheet" but that cannot be ? August 8, 2022

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2022 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