You don't have to use the SPI pins to drive the ST7920 display in serial mode. You can use any 2 pins, although the update speed will be slower than the speed you can get using SPI.
// SPI Com: SCK = en = 13, MOSI = rw = 11, CS = di = 10U8GLIB_ST7920_128X64 u8g(13, 11, 10, U8G_PIN_NONE);
U8GLIB_ST7920_128X64 u8g(4, 5, 6, U8G_PIN_NONE);
You'll need to check the u8glib documentation to see whether it supports serial mode using pins other than the SPI pins. If it doesn't, then you can find my own ST7920 library at https://github.com/dc42/arduino, but it's not as comprehensive as u8glib and it uses a 1K image buffer (which is half the RAM on an Uno).The point about the SPI pins is that is uses hardware to do fast serial transfers. However, you can do similar sorts of serial transfer at a slower speed using the shiftOut function (which is very slow) or using direct port manipulation.
Yes, it supports hardware SPI. See the comments in the Lcd7920.h file.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16