The LCD is tested with an AVR and it is working.
But it is dead connected to the blue pill board.
It makes no difference if an 4 or 8 bit bus for the LCD is being used.
Code: Select all
#include
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
LiquidCrystal lcd(PB4, PB5, PA0, PA1, PA2, PA3, PA4, PA5, PA6, PA7);
void blink() {
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
}
void setup() {
delay(100);
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
lcd.setCursor(0, 1);
lcd.print("hello second line!");
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
// scroll 13 positions (string length) to the left
// to move it offscreen left:
for (int positionCounter = 0; positionCounter < 13; positionCounter++) {
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(150);
}
blink();
// scroll 29 positions (string length + display length) to the right
// to move it offscreen right:
for (int positionCounter = 0; positionCounter < 29; positionCounter++) {
// scroll one position right:
lcd.scrollDisplayRight();
// wait a bit:
delay(150);
}
blink();
// scroll 16 positions (display length + string length) to the left
// to move it back to center:
for (int positionCounter = 0; positionCounter < 16; positionCounter++) {
// scroll one position left:
lcd.scrollDisplayLeft();
// wait a bit:
delay(150);
}
blink();
}
/home/me/.arduino15/packages/stm32duino/hardware/STM32F1/2018.12.3/libraries/LiquidCrystal (legacy) is used.
This should be the correct one.
When i measure for signals with an oscilloscope all signals for the LCD are dead!
Some are high (like rs), some are low (like en), but there is no change and data.
Any ideas?