Heythi 40 LCD interface

Heythi 40 LCD interface - 5.0 out of 5 based on 2 votes
User Rating:  / 2
PoorBest 

LCD interface using Eclipse and WinAVR

A 16*2 Lcd can be plugged directly in the heythi Kit.
A 16 pin connector is placed in the kit and the Lcd should be connected by facing outside the kit.
The data pins of Lcd are connected with PORTC in Heythi kit.
Eclipse:
Sample code1:
#include <avr/io.h>
#include <util/delay.h>
#include "lcd_lib.h"
#include <stdio.h>
// Declare your global variables here
char A[20]="    ";
int  main(void){
LCDinit( );// LCD module initialization
LCDclr(  );
while (1){
      LCDGotoXY(0,0);
      sprintf(A,"IgniteMindZ");
      LCDstring(A,12);
      };return 0;
}

Sample code2:
#include <avr/io.h>
#include <util/delay.h>
#include "lcd_lib.h"
#include <stdio.h>
// Declare your global variables here
char A[20]="    ";
int i=0;
int  main(void){
    LCDinit( );// LCD module initialization
    LCDclr(  );
    while (1){
        i++;    
        LCDGotoXY(0,0);
        sprintf(A,"i=%d",i);
        LCDstring(A,12);
          };return 0;
}

Now connect the LCD as shown in the figure and transfer the code and check the output

Making a Arduino-Compatible LCD interface


Write this program in the arduino IDE by creating new file.
In arduino we need to mention the data pins connected to the LCD.
#include <LiquidCrystal.h>
LiquidCrystal lcd(16, 18, 20, 21, 22, 23);  // data pins connected to LCD
const int ledPin1 =  17;
void setup() {
    // declare the ledPin as an OUTPUT:
     pinMode(ledPin1, OUTPUT);
      digitalWrite(ledPin1, LOW);R/W pin should be set to low.
      // set up the LCD's number of columns and rows:
      lcd.begin(16,2);
      lcd.clear();
}
void loop()
{
    lcd.setCursor(3, 0);
    lcd.print("Heythi-40");
    //lcd.print(sensorValue1);  
    lcd.setCursor(0, 1);
    lcd.print("IgniteMindZ.com");
}

You are here: Home IT Services Uncategorised Heythi 40 LCD interface