New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ST7920 parallel 8080 not working #2399
Comments
Maybe this helps: 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, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #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 <u8g2.h>
#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)
{
}`
The text was updated successfully, but these errors were encountered: