4004 lcd problems

Sorry for the translation errors.

There is a 4004 screen, I cannot use the screen in one piece. It looks like 2 screens on Arduino, but it gets very confusing when you enter the codes. Does anyone have an idea, I've seen a few videos but they didn't work, thanks in advance.

For some reason the guy in the video is working, I couldn't figure it out.

https://www.youtube.com/watch?v=NCzIHrmNZo4

lcd datasheet

Thanks

What codes? Please post them in code tags. Also please post a wiring diagram.

Have a look at this thread: Dual HD44780 4 x 40 Library
Don

  • #include <LiquidCrystal.h>

  • #include <Wire.h>

  • #include <DHT.h>

  • #include <virtuabotixRTC.h> //

  • #define DHTPIN 13 //sıcaklık sensörü D13 pin araya 10k direnç (kahve siyah turuncu)

  • #define DHTTYPE DHT11

  • int CLK_PIN = 6;

  • int DAT_PIN = 7;

  • int RST_PIN = 8; /

  • virtuabotixRTC myRTC(CLK_PIN, DAT_PIN, RST_PIN);

  • LiquidCrystal lcd1(12, 10, 2, 3, 4, 5);

  • LiquidCrystal lcd2(12, 11, 2, 3, 4, 5);

  • DHT dht(DHTPIN, DHTTYPE);

  • void setup() {

  • lcd1.begin(20, 2);

  • lcd2.begin(20, 2);

  • lcd1.home();

  • lcd1.setCursor(0, 0);

  • lcd1.print("Warning :Do not accelerate the vehicle");

  • lcd1.setCursor(0, 1);

  • lcd1.print("when the engine is cold!!! The engine ");

  • lcd2.setCursor(0, 0);

  • lcd2.print("will be lubricated within 1 minute and ");

  • lcd2.setCursor(0, 1);

  • lcd2.print("will be ready to go. ///MPower ");

  • delay(3000);

  • lcd1.clear();

  • lcd2.clear();

  • dht.begin();

  • }

  • void loop() {

  • int temp = dht.readTemperature();

  • int hum = dht.readHumidity();

  • lcd1.setCursor(0, 0);

  • lcd1.print(" Information Display ");

  • lcd1.setCursor(0, 1);

  • lcd1.print("Vehicle Temperature : Clock:");

  • lcd1.setCursor(20, 1);

  • lcd1.print(temp);

  • lcd1.print("C");

  • lcd2.setCursor(0, 0);

  • lcd2.print("Engine Temperature:88 Date:");

  • lcd2.setCursor(0, 1);

  • lcd2.print("ABS:On ASC:Off PDC:On Hi-Fi:ON AUX:On");

  • myRTC.updateTime();

  • //Başlamadan önce ekranı temizliyoruz.

  • lcd2.setCursor(30, 0);

  • lcd2.print(myRTC.dayofmonth);

  • lcd2.print("/");

  • lcd2.print(myRTC.month);

  • lcd2.print("/");

  • lcd2.print(myRTC.year);

  • lcd1.setCursor(32, 1);

  • lcd1.print(myRTC.hours);

  • lcd1.print(":");

  • lcd1.print(myRTC.minutes);

  • lcd1.print(":");

  • lcd1.print(myRTC.seconds);

  • delay(1000);

  • }

  • #include <LiquidCrystal.h>
  • const int rs = 12, en1 = 11, en2 = 10, d4 = 2, d5 = 3, d6 = 4, d7 = 5;
  • LiquidCrystal lcd1(rs, en2, d4, d5, d6, d7);
  • LiquidCrystal lcd2(rs, en1, d4, d5, d6, d7);
  • void setup() {
  • lcd1.begin(40, 2);
  • lcd1.setCursor(0,0);
  • lcd1.print("Ekran 1");
  • lcd2.begin(40, 2);
  • lcd2.setCursor(0,0);
  • lcd2.print("Ekran 2");
  • }
  • void loop() {
  • }

Please read the forum guidelines to see how to properly post code and some information on making a good post.

Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags. Remove excess white space.

Please go back and fix your original posts.

the library no longer works

Please provide more information about the following parts of your post:

  1. "the library"
  2. "no longer works"

Don

1 Like

@ahmet93
you can try my LCD Library. It supports 40x4 character displays in 4bit mode as one display with 4 lines.
https://werner.rothschopf.net/microcontroller/202012_arduino_liquid_crystal_4004_en.htm

thanks guys

My problem is somewhat solved.
When I write from serial transfer, it does not exceed 3 lines.
Thanks again, BROTHER. :slight_smile:

#include <NoiascaLiquidCrystal.h>
#include <NoiascaHW/lcd_4bit.h>
const byte cols = 40;
const byte rows = 4;
const byte rs = 12;
const byte en = 10;
const byte en2 = 11;
const byte d4 = 2;
const byte d5 = 3;
const byte d6 = 4;
const byte d7 = 5;
const byte bl = 255;
const t_backlightPol blType = POSITIVE;
LiquidCrystal_4bit_4004 lcd(rs, en, en2, d4, d5, d6, d7, bl, POSITIVE, cols, rows);
#include <virtuabotixRTC.h>
int CLK_PIN = 6;
int DAT_PIN = 7;
int RST_PIN = 8;
virtuabotixRTC myRTC(CLK_PIN, DAT_PIN, RST_PIN);
void setup() {
Serial.begin(115200);
lcd.begin();
lcd.setCursor(0, 0);
lcd.print("Warning :Do not accelerate the vehicle");
lcd.setCursor(0, 1);
lcd.print("when the engine is cold!!! The engine ");
lcd.setCursor(0, 2);
lcd.print("will be lubricated within 1 minute and ");
lcd.setCursor(0, 3);
lcd.print("will be ready to go.");
delay(5000);
lcd.clear();
}
void loop() {
lcd.setCursor(0, 0);
lcd.print("Oil Pressure:2.3 Passing Time:");
lcd.setCursor(0, 1);
lcd.print("Vehicle Temp:28 Clock:");
lcd.setCursor(20, 1);
lcd.print("");
lcd.setCursor(0, 2);
lcd.print("Engine Temp:88 Date:");
lcd.setCursor(0, 3);
lcd.print("ABS:On ASC:Off PDC:On Hi-Fi:ON AUX:On");
myRTC.updateTime();
lcd.setCursor(36, 1);
lcd.print(myRTC.hours);
lcd.print(":");
lcd.print(myRTC.minutes);
lcd.setCursor(35, 2);
lcd.print(myRTC.dayofmonth);
lcd.print("/0");
lcd.print(myRTC.month);
lcd.setCursor(36, 0);
lcd.print(millis() / 60000);
lcd.setCursor(37, 0);
lcd.print(".");
lcd.setCursor(38, 0);
lcd.print(myRTC.seconds);
delay(1000);
}

I can't read your code. Please read in the forum how to - how to post code in code tags and correct your post accordingly.

Furthermore I can't see where you do any "serial transfer". Please explain what you expect and what you get instead.

Please check: Does the example "0420_4bit_4004.ino" from my library print in all 4 rows?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.