Hello everyone,
I am having issues getting a blue pill to drive an "industry standard HD44780 equivalent LCD controller" that I got on AliExpress. I bought two of them, and have been able to drive them using the I2C backpack that came with them. The problem is that the serial has too great a latency (I am trying to update it while driving a stepper motor and it is causing the motor to miss steps). The blue pill has a genuine STM32F103.
I am fairly new to programming using C and Arduino in general, however not new at all to soldering, following schematics, etc.
When I connect the I2C version up to the oscilloscope, I see signals on every data pin, and on the register select and enable pins (and of course it prints "Hello World"). When I do the same thing for the parallel version, only data pins 1 and 6 and the register select and enable pins have signals, the rest of the pins are brought high for some reason, and nothing prints. I am not attempting to drive both displays the same time, there are no shorts, the contrast is set correctly and functioning, I promise it is wired correctly as the code indicates. I have spent hours verifying this, and reading forums as to how to correct it and have come up empty. Any assistance you can provide getting the "hello world" to print would be awesome.
#include <LiquidCrystal.h>
// rs = register select, rw = read/write, en = enable writing to shift registers
const int rs = 26, en = 21, d0 = 19, d1 = 25, d2 = 28, d3 = 27, d4 = 29, d5 = 38, d6 = 22, d7 = 18;
LiquidCrystal lcd(rs, en, d0, d1, d2, d3, d4, d5, d6, d7);
void setup()
{
lcd.begin(16, 2);
}
void loop()
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Hello World");
delay(200);
}
#include <Wire.h>
#include <hd44780.h> // main hd44780 header
#include <hd44780ioClass/hd44780_I2Cexp.h> // i2c expander i/o class header
hd44780_I2Cexp lcd; // declare lcd object: auto locate & auto config expander chip
// 0x27 = default address of PCF8574 module
void setup()
{
lcd.begin(16, 2);
}
void loop()
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Hello World");
delay(200);
}