interfacing dog lcd with dogm128 library

Hey,

I would like to interface an arduino duemilanove with a dogm grafic lcd http://www.reichelt.de/?ACTION=3;GROUP=A5213;GROUPID=3007;ARTICLE=86714;SID=2651e69KwQARoAABYlWME169d18a9e3af7545ea27289862456d07 with the dogm128 library from the playground http://code.google.com/p/dogm128/.

Maybe it´s a stupid question. But I have problems to understand the wiring http://code.google.com/p/dogm128/wiki/hardware

1) Can I connect the Digital Output from the Arduino Duemilanove directly to the LCD? 2) The Arduino has a 3.3 V Output. So I think it isn´t necessary to use an extra regulator like the LM1086. Is that right? 3) If not, must I use the schematic below on the side? 4) Is there someone, who has experiences with the library?

Thanx!

After a few days of waitng for an answer - with no result - :( I bought a dogm128x64 lcd.

So I can answer myself ;) Cause everything works great. :) Maybe it´s useful for someone else.

1) Yes. 2) Yes 3) Yes

Hello,

can you be little more specific :).

I suppose you have used Arduino 3.3 V source but how about the level translation (5 volt to 3.3 volt) with the HC4050? From you response it look like you have connected it directly. Also have you connected all the capacitors? And how about back light ?

Thanks

Remember you can only get 50mA from the arduino's 3v3 output.

can you be little more specific

I´ll try ;)

Yes, I used the 3.3V output. No problems. Yes, I used the HC4050 for the level translation.

From you response it look like you have connected it directly.

Yes, I used the 3.3V directly.

Also have you connected all the capacitors?

Yes. First I tried without it. It worked. But then I was afraid that the lcd will be damaged. So I use now the HC4050 for the level translation and all capacitors.

And how about back light ?

I didn´t use a backlight. I use a white dogm. It´s not necessary to use a backlight.

I use the lcd to make a remake of the C64 game choplifter. It´s fast enough and the library is okay.

I hope I could help you.

Excellent, I have all the answers I needed, thanks. Definitely going to buy one.
Just wondering about DOGM128 and DOGL128. DOGL seems to me the same driver, but just with bigger dots.

The power of 3.3V should be a problem. As documentation says:
DOGM128 POWER SUPPLY: SINGLE SUPPLY 3.0V TO 3.3V (TYPICALLY 150[ch956]A)
DOGL128 POWER SUPPLY: SINGLE SUPPLY 3.0V TO 3.3V (TYPICALLY 320[ch956]A)

Excellent, I have all the answers I needed, thanks. Definitely going to buy one.

You´re welcome!

Just wondering about DOGM128 and DOGL128. DOGL seems to me the same driver, but just with bigger dots.

That´s right. I use a DOGL128. No problems with the library.

The power of 3.3V should be a problem.

Yes, it should. But it isn´t. But it´s a good hint. Maybe next time I will use a LM1086.

Please tell me your experiences with the dogm.

Hello again,

I meant to say, The power of 3.3V shouldn't be a problem, as it is bellow 50mA.

Finally I bought the white module as well, tried the font example, and it was very nice, and fast. But today I'm not able to make it run :-/ . Strange, signal levels form HC4050 looks OK, hopefully I didn't damage the module somehow.

How is your game going out? Would be nice to see some pictures or even video.

Hey vysocan,

maybe I can help you. When I first built the circuit on a breadboard everything was okay. The next day - I changed nothing - I can´t see anything. First: I checked all capacitors. After a while I could see the correct output on the lcd. But then it faded out and nothing was to see again. I decided to rebuilt the circuit. From this point on, everything works fine. I think, if one capacitor does not have the correct contact the output of the lcd goes wrong.

I hope I could help you.

How is your game going out? Would be nice to see some pictures or even video.

It works. All necessary game elements for my choplifter-clone-game are implemented: helicopter, fighter jet, drone, tanks, hostages, buildings, landing zone, collision detection between all objects and the bullets. Missing: level design, highscore

and

sound!

For this I´m working on a SID Clone. I programmed a second arduino to generate 3 voices (2 are working), 3 Waveforms, Ringmodulation, ADSR. No filter. To compose I´m using my own c# program.

Pictures and videos will come later. I think in 2 or 3 month.

It sounds very interesting, looking forward to see how it is evolving. How did you create graphics as sprites? I’m thinking to create some special symbols. So far I just imagine I will use some characters from fonts.

About my DOGL, I’ll try your suggestion. Also I build the circuit with tantal caps. They are small, cheaper, but are polarized. But I saw other are using them as well.

Hi vysocan.

Also I build the circuit with tantal caps.

I used the same.

How did you create graphics as sprites?

I use a routine from the dogm library: dogm.setPixel(x,y);

I saved the sprite in a binary code. Spriteformat = 8x8 Pixel
Example:

byte sprites[1][8] = { // a 2 dimensional array 
 {15,128,192,255,3,1,0,1}, // my helicopter sprite
};

and this is the routine to draw

void drawSprite(byte number, byte x, byte y)
{
  c3=0; // counter of spritebytes
  c2=0; // counter of x-pos
  for (byte c1=0; c1<8; c1++) // counter of y
  { // draw the sprite donwright to leftup
    wert = sprites[number][c3]; // get the first byte of spritenumber 
    
    for (byte c2=0; c2<8; c2++)
    {
     wertbuffer = wert >> c2; // shift to right
     wertbuffer = wertbuffer&1; // and with 1
     if (wertbuffer==1) {dogm.setPixel(x-c2,y-c1);} // if it´s 1 then  draw the pixel
    }     
    c3++;
  }
}

I know, it´s not the fastest and a little bit ugly! :wink:

And don´t forget this in between dogm.start and dogm.next.

     drawSprite(0,32,32); // spritenumber, x-pos, y-pos

You can use this to create your own characters. If you need a bigger font you have to change the routine.

Hello domspitze,

I have rebuilded the circuit on breadboard again and it start working. :). I have to get used to way the library is drawing, since I have lcd.print all over my code. But I have to put the dogl and all on PBC. Because now it its not working again. Your sprite code looks OK, but just an idea for you. It would be maybe faster to create custom fonts 8x8 and every letter would be one of your symbols. Then you would just put a symbol on x, y coordinates. But this would need some testing. ... just an idea though :)

Hi vysocan!

I have rebuilded the circuit on breadboard again and it start working.

Cool!

But I have to put the dogl and all on PBC.

Nice! Show me please!

Because now it its not working again.

That´s not good. :(

It would be maybe faster to create custom fonts 8x8 and every letter would be one of your symbols.

This was my first idea too. But I didn´t find any prog to build my own font. So I had to create my own routine. And it´s a little bit faster than the ldc.print. Because my routine mustn´t check the single letters of the string.

Let my know, how your project goes on.