Go Down

Topic: Newbie help ? (Read 2 times) previous topic - next topic

flak88

Hi recently acquired a JN12864J lcd module from China how do i interface it with a atmega 328 also what libraries do i need ?


Thx

Riva

Hi flak88,
To save people the hassle of hunting the web for details on the device a link to it would have been helpful.
A quick google finds thousands of references but most useful looking are http://arduino.cc/forum/index.php/topic,91732.msg688825.html#msg688825

olikraus

Good link. Crosscheck: If the display has a pin labeled with PSB, then it is a display with a st7920 controller.
You could use u8glib (http://code.google.com/p/u8glib/) with "U8GLIB_ST7920_128X64(...)"
Set a0 to U8G_PIN_NONE.

Oliver

flak88

Sorry didnt post a direct link I bought the lcd from ebay it didn't have a datasheet in the description.

Had a look though the U8glib cant find the header that defines the pins to be used for this controller im using a atmega 328 btw.

Any ideas ?

olikraus

Hi

Google for ST7920.pdf. It will give you all required information:
Connect
PSB to GND
RS (chip select) to pin 2 of your Arduino
RW (serial data) to pin 3 of your Arduino
E (serial clock) to pin 4 of your Arduino

Then use:
U8GLIB_ST7920_128X64 u8g(4, 3, 2, U8G_PIN_NONE )

Of course you could use any other Arduino pins also.

Oliver




Go Up