Software usage:

The library is a part of registerHeap repo. 

* It is based on my stm32 lib. In linux download folders stm32 and st7920 folders or clone registerHeap repo.

* Choose NSS port and pin in ST7920_GPIO, ST7920_CS macros in st7920.h.

* Include st7920.h. Call dispInit() function, then you can render your pbm array with dispImage(pbm), that's all.
Also there is function of setting line writeLine(int lineNumber, uint8_t* line).

Hardware:

In my variant there was a lot of useful jumpers, who reduces required wires.

* Connect JP5 and JP6 to power up backlight from VCC-GND pins through 30Ohm R11. 

* Connect JP2 in S position to activate SPI interface (pulls down PSB pin). Thats'why you need only 5 wires instead of 8.

Adding your picture:

Unfortunately there isn't one command to make a picture from your photo. 

  • First, crop the image in 2:1 aspect ratio and, optionally, delete the background in gimp. For cropping nomacs image wiever is esiest variant.
  • Resize your image to 128x64. For not coming back to gimp, mirage image viewer can do it instead.
  • Futher you need to have imageMagick and netPbm packages in linux. 
  • Convert your jpeg/pgng to grayscale binary with commad: 
    convert img.png img.pgm 
  • Add halftone imitation in your binary image. Convert from grayscale to halftone binary: 
    pamditherbw -value 0.2 img.pgm | pamtopnm > img.pnm

    Value is the threshold. Closer to 0 values is lighter, to 1 darker.

  • Convert halftone image to native st7920 format, pbm header: 

    convert img.pnm img.pbm
    convert -format pbm img.pbm img.h 
  • Correct your header while changing the name from ImageMagick to appropriate. And deleting first 10 bytes in array with header (from 0x50 to 0x0a.

  • Include your img.h and put the array in the dispImage(img) function.