---
+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Member level 2
    Points: 737, Level: 5
    bskumar7080's Avatar
    Join Date
    Feb 2010
    Location
    India
    Posts
    48
    Helped
    4 / 4
    Points
    737
    Level
    5

    HOW to interface JHD204A 20x4 LCD with PIC microcontroller

    Hi all,.
    How to interface LCD with PIC microcontroller. what is the functions to be used . i am using JHD204A 20x4 LCD display and PIC18f452.


    Thanks & Regards
    sivakumar

    •   Alt20th October 2010, 12:26

      advertising

        
       

  2. #2
    Advanced Member level 3
    Points: 7,719, Level: 20

    Join Date
    Apr 2006
    Location
    Hyderabad, India.
    Posts
    755
    Helped
    119 / 119
    Points
    7,719
    Level
    20

    Re: HOW to interface JHD204A 20x4 LCD with PIC microcontroller

    Quote Originally Posted by bskumar7080 View Post
    Hi all,.
    How to interface LCD with PIC microcontroller. what is the functions to be used . i am using JHD204A 20x4 LCD display and PIC18f452.Thanks & Regardssivakumar
    if you want to do under CCS C
    please see the link below.
    even otherwise , perhaps this software approximately guides you towards your goal.
    CCS :: View topic - Crystalfontz 20x4 LCD with PIC18F452



    •   Alt20th October 2010, 15:08

      advertising

        
       

  3. #3
    Member level 2
    Points: 737, Level: 5
    bskumar7080's Avatar
    Join Date
    Feb 2010
    Location
    India
    Posts
    48
    Helped
    4 / 4
    Points
    737
    Level
    5

    Re: HOW to interface JHD204A 20x4 LCD with PIC microcontroller

    The following code is not working, what is wrong in this code, i gave connections as per xlcd.h, i am using c18 libraries

    Code:
    #include <p18f452.h>
    #include <xlcd.h>
    #include <delays.h>
    #include <usart.h>
    
    //**************Configuration Bits******************
    
    #pragma config OSC = HS
    #pragma config OSCS = ON
    #pragma config PWRT = OFF
    #pragma config BOR = OFF
    #pragma config WDT = OFF
    #pragma config CCP2MUX = OFF
    #pragma config STVR = OFF
    #pragma config LVP =OFF
    #pragma config DEBUG = OFF
    #pragma config CP0 = OFF
    #pragma config CP1 = OFF
    #pragma config CP2 = OFF
    #pragma config CP3 = OFF
    #pragma config CPB = OFF
    #pragma config WRT0 = OFF
    #pragma config WRT1 =OFF
    #pragma config WRT2 = OFF
    #pragma config WRT3 = OFF
    #pragma config WRTB = OFF
    #pragma config WRTC = OFF
    #pragma config WRTD = OFF
    #pragma config EBTR0 = OFF
    #pragma config EBTR1 = OFF
    #pragma config EBTR2 = OFF
    #pragma config EBTR3 = OFF
    #pragma config EBTRB = OFF
    
    void DelayFor18TCY( void )
    {
    Nop();
    Nop();
    Nop();
    Nop();
    Nop();
    Nop();
    Nop();
    Nop();
    Nop();
    Nop();
    Nop();
    Nop();
    }
    void DelayPORXLCD (void)
    {
    Delay1KTCYx(60); // Delay of 15ms
    // Cycles = (TimeDelay * Fosc) / 4
    // Cycles = (15ms * 16MHz) / 4
    // Cycles = 60,000
    return;
    }
    void DelayXLCD (void)
    {
    Delay1KTCYx(20); // Delay of 5ms
    // Cycles = (TimeDelay * Fosc) / 4
    // Cycles = (5ms * 16MHz) / 4
    // Cycles = 20,000
    return;
    }
    void main( void )
    {
    char data;
    // configure external LCD
    OpenXLCD( FOUR_BIT & LINES_5X7 );
    
    while(1)
    {
    
    
    WriteDataXLCD('s'); //write to LCD
    
    }
    
    }



    •   Alt22nd October 2010, 05:12

      advertising

        
       

  4. #4
    Member level 2
    Points: 737, Level: 5
    bskumar7080's Avatar
    Join Date
    Feb 2010
    Location
    India
    Posts
    48
    Helped
    4 / 4
    Points
    737
    Level
    5

    Re: HOW to interface JHD204A 20x4 LCD with PIC microcontroller

    It is solved, check this thread


    LCD display chararcter in reverse direction



+ Post New Thread
Please login