Open archwills opened 8 months ago
Maybe this helps: https://github.com/olikraus/u8g2/wiki/gallery#26-nov-2016-st7920-128x64-lcd-in-8080-parallel-mode
RW of the display has to be connected to GND, PSB has to be connected to 5V and I think the VarPot needs to be connected correctly.
Maybe you can post a wiring table for your display for crosscheck,
Have you solved this problem? How did you solve it
m working on a project that uses st7920 and atmega328p. Currently im trying to set up the st7920 lcd display in 8-bit parallel (8080) modifying the example code in the u8g2 library and trying to print something on to the screen. I've seen https://github.com/olikraus/u8g2/issues/90 and see that the CS has to set to U8x8_PIN_NONE, but a bit unsure how to do this as the post was from a few years ago and the library seems to have changed a lot. Any help apreaciated, thanks.
`#include <avr/io.h>
include
include <util/delay.h>
define DISPLAY_DATA_DIR DDRD
define DISPLAY_DATA_PORT PORTD
define DISPLAY_DATA_PIN0 0
define DISPLAY_DATA_PIN1 1
define DISPLAY_DATA_PIN2 2
define DISPLAY_DATA_PIN3 3
define DISPLAY_DATA_PIN4 4
define DISPLAY_DATA_PIN5 5
define DISPLAY_DATA_PIN6 6
define DISPLAY_DATA_PIN7 7
define DISPLAY_DC_DIR DDRB
define DISPLAY_DC_PORT PORTB
define DISPLAY_DC_PIN 2
define DISPLAY_RESET_DIR DDRB
define DISPLAY_RESET_PORT PORTB
define DISPLAY_RESET_PIN 0
define DISPLAY_E_DIR DDRB
define DISPLAY_E_PORT PORTB
define DISPLAY_E_PIN 5
define P_CPU_NS (1000000000UL / F_CPU)
u8g2_t u8g2;
uint8_t u8x8_avr_delay(u8x8_t u8x8, uint8_t msg, uint8_t arg_int, void arg_ptr) { uint8_t cycles;
define CALL_CYCLES 26UL
define CALC_CYCLES 4UL
define RETURN_CYCLES 4UL
define CYCLES_PER_LOOP 4UL
}
uint8_t u8x8_avr_gpio_and_delay(u8x8_t u8x8, uint8_t msg, uint8_t arg_int, void arg_ptr) { // Re-use library for delays
}
int main(void) {
}`