Closed microgenios closed 1 year ago
In Wokwi simulator your LCD library was not working properly. I changed the Enable pin's Clock time and now everything is OK. Following the modified code (Parallel bus access)
static esp_err_t write_nibble(const hd44780_t *lcd, uint8_t b, bool rs) { if (lcd->write_cb) { (...) } else { CHECK(gpio_set_level(lcd->pins.rs, rs)); ets_delay_us(1); // Address Setup time >= 60ns.
CHECK(gpio_set_level(lcd->pins.d7, (b >> 3) & 0x01)); CHECK(gpio_set_level(lcd->pins.d6, (b >> 2) & 0x01)); CHECK(gpio_set_level(lcd->pins.d5, (b >> 1) & 0x01)); CHECK(gpio_set_level(lcd->pins.d4, (b >> 0) & 0x01)); //Enable clock CHECK(gpio_set_level(lcd->pins.e, 0)); ets_delay_us(1); CHECK(gpio_set_level(lcd->pins.e, true));ets_delay_us(1); CHECK(gpio_set_level(lcd->pins.e, 0)); ets_delay_us(100); } return ESP_OK;
}
esp-idf
master
hd44780
No response
does it work on a real hardware without the fix?
The issue
In Wokwi simulator your LCD library was not working properly. I changed the Enable pin's Clock time and now everything is OK. Following the modified code (Parallel bus access)
static esp_err_t write_nibble(const hd44780_t *lcd, uint8_t b, bool rs) { if (lcd->write_cb) { (...) } else { CHECK(gpio_set_level(lcd->pins.rs, rs)); ets_delay_us(1); // Address Setup time >= 60ns.
}
Which SDK are you using?
esp-idf
Which version of SDK are you using?
master
Which build target have you used?
Component causing the issue
hd44780
Anything in the logs that might be useful for us?
No response
Additional information or context
No response
Confirmation