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.
Well, I could test your library as well! If smaller, even better!
Reading the ubglib it's written "COM interfaces: Software SPI, Hardware SPI, 8Bit parallel".
But reading the supported devices I cannot understand a part:https://code.google.com/p/u8glib/wiki/device
Looking for ST7920, There are three ways to control:
SW SPI u8g_dev_st7920_128x64_sw_spi U8GLIB_ST7920_128X64(sck, mosi, cs, a0 [, reset])
HW SPI u8g_dev_st7920_128x64_hw_spi U8GLIB_ST7920_128X64(cs, a0 [, reset])
8 Bit u8g_dev_st7920_128x64_8bit U8GLIB_ST7920_128X64(d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw [, reset])
8Bit is parallel, ok.
Is SW SPI what I should need? But in case it uses SCK, MOSI that should part of SPI protocol on pins 11+13 already used.... what is then HW SPI? Confused again
BTW I'll test all those solutions, included your version.