Go Down

Topic: [solved] DIP204-4 with SPI (Read 3 times) previous topic - next topic


Sep 14, 2011, 01:52 am Last Edit: Jan 21, 2012, 10:49 pm by _frank_ Reason: 1
i try to get my Display to work with SPI and an arduino Uno.
of course i changed to soldering bridge (13) from 4/8 to SPI

here the Data-Sheet of the display:

and my code:

Code: [Select]

// include the SPI library:
#include <SPI.h>

10 (SS)   -> 4 (CS)
11 (MOSI) -> 5 (SID)
12 (MISO) -> 7 (SOD)
13 (SCK)  -> 6 (SCLK)

GND -> 1 (VSS)
5V  -> 2 (VDD)

       \_ 3 (VEE)

//int chartable[255];
// set pin 10 as the slave select for the digital pot:
const int slaveSelectPin = 10;

void setup() {
 // set the slaveSelectPin as an output:
 pinMode (slaveSelectPin, OUTPUT);
 //data for lcd dip204-4
 // initialize SPI:
 lcd_write(0x34,1);        // 34 0011 0100 (8Bit Bus, RE=1)
 lcd_write(0x09,1);        // 09 0000 1001 (4 Line Mode)
 lcd_write(0x30,1);        // 30 0011 0000 (8Bit Bus, N=0, RE=0, DH=0, REV=0)

void loop()
   * Zeile 1: 0x00 (bis 0x13)
   * Zeile 2: 0x20 (bis 0x33)
   * Zeile 3: 0x40 (bis 0x53)
   * Zeile 4: 0x60 (bis 0x73)

int lcd_write(int address, int value) {
 // take the SS pin low to select the chip:
 //  send in the address and value via SPI:
 // take the SS pin high to de-select the chip:

my Problem is, that nothing is displayed... i've searched google and this forum, but found no answer how to get this display working with arduino+spi.

the LCD-Library is imho only for 4 and 8bit normal transfer

regards Frank


According to datasheet I could not see "Display on" command on your sketch.


thanks for your answer, i'll try it out
currently experimenting with 4bit-mode and have to sold the bridge J3 again


I just want to mention this lib:
But I am not sure if this fits to your type of displays. At least it is SPI mode and same company.  :smiley-roll:



Sep 16, 2011, 03:10 pm Last Edit: Sep 16, 2011, 03:34 pm by _frank_ Reason: 1
nice idea...is DOGLCD working with LSBFIRST or MSBFIRST (i need LSBFirst)? i looked through the code, but its depending not on SPI-LIB.

hoping LiquidCrystal-Lib will support SPI in future (commands are the same)

Go Up