(128x64) Dot Matrix GRAPHIC LCD (Need advice)

Hi usual suspects!

I am ready to complicate more my series of projects.
I've started with an 16x2 LCD, jumped to a 20x4... and looks like is not enough.

So far, (for this particular project) my code is 18,000 bytes long (leaving 12,500 byte free out of my 328p).

The question is how heavy is the library for this (128x64), and how much more I expect to load to my code?

Should I quit developing for the 328 if I take this path and just go straight to a Mega?

[ rant ]
PS: (Off topic) I feel sad that I we can't comment on the old forum. I don't understand why it's so complicated the migration of DB's to a new format
... never mind.
[ / rant ]

The ks0108 GLCD example code compiles to 8.2K. You need around 13-16 pins so mega is much better.

http://www.arduino.cc/playground/Code/GLCDks0108

I got myself one display but only got as far as seeing the demo. I don't have a mega and don't like that many jumper wires, messy.

If you're interested, the library seems to provide many features to simplify programming.

liudr:
... don't like that many jumper wires, messy.

I hear ya!

I hate that too... so I found a solution with the LCD-Keypad Shield...
All I did was removed the 16x2 LCD, removed the male pins and replaced with female pins...

... now I can plug my 20x4 LCD

... and probably ...(I have to take a look at the 128x64 datasheet)... too (?)..without modifications.

Anyhow, I might be safe Size-wise.
I am looking forward to that 128x64 then.

... and probably ...(I have to take a look at the 128x64 datasheet)... too (?)..without modifications.

Highly unlikely, the 128x84 KS0108 displays cannot normally be directly driven as you have to connect up the negative voltage supply to the contrast pot among other things. So you will need a breadboard or a shield specifically designed for it.

Mowcius

mowcius:

... and probably ...(I have to take a look at the 128x64 datasheet)... too (?)..without modifications.

Highly unlikely, the 128x84 KS0108 displays cannot normally be directly driven as you have to connect up the negative voltage supply to the contrast pot among other things. So you will need a breadboard or a shield specifically designed for it.

Mowcius

Exactly, that's why I am using the LCD-Keypad shield. The only difference is that the (128x64) needs extra 4 pins that can be re-routed on the shield.
Not a biggie.

There are at least 3 different pin mappings on 128*64 displays. Please read the link I posted. I warn you not to use your shield on the dot matrix display. You could be shorting 5V with GND if the pins are not compatible. You will need to suffer with jumper wires unless someone has made a shield for it (maybe). ]:slight_smile:

BTW, I have my own character LCD shield, it's just more awesome,IMHO, with RTC, EEPROM, and GPS etc

Right now, I'm making a project involving a ks0108 display where saving up is really important. Since I wanted to use a 328, and still use some pins, I've set up an ATMEGA8 (7.somthing Kb of free space) on a breadboard, and uploaded to it a simple code with the library and a serial communicacion protocol, to interface with the Duemilanove (the one that makes all the calculus and reads the sensors).
It works great, at this very moment I'm looking at it, and it's displaying a real-time sinus wave generated by the own ATMEGA8, so so far it doesn't seem to be too slow.

Salu2

@liudr
That is an awesome shield! A lot of things going on on that one! I just gave you another good Karma for that one.
You should sell that one on Ebay, for sure.

By the way, thanks for your advice, but you should know that I am one of those one who really read datasheets and always have a calculator on my left :wink:
I really take the extra job of modifying boards.

@mrquesito
That is exactly what I was thinking off !
Can you share a simple example?

Sure! Here you are some fresh pictures (I took them this morning):



The first one is the Atmega8 attached to the GLCD, the next is the same, but with the Duemilanove (working as a power supply), and the last one shows how using the 2009 as GLCD "driver" makes pins disappear.

It's quite straightforward to do this: burn bootloader into atmega8, upload the sketch using the FTDI chip, wire up, and see how the sine is generated :smiley:

EDIT: does anyone know how to reduce the size of the images on the forum?

That looks awesome.
Can you post the code of each board?

PS: I have no idea how to reduce the size, but you can always use http://imgur.com/ to upload and convert to a reasonable size.

Staedtler,

Thanks for the compliments. Right now dipmicro.com is selling my shield. They have all the parts the shield needs at a low low price. I can't find anywhere else with all those parts.

mrquesito,

That's awesome. Here is one Karma! Waiting for codes. Have you considered buying an RBBB PCB and mount everything nicely together? Here:
http://shop.moderndevice.com/products/rbbb-pcb
I just bought 5 of them :smiley:

Staedtler,

Actually, so far only the atmega8 has code in it. The Duemilanove board just provides power. Here you are the code in the atmega:

#include <ArduinoIcon.h>
#include <Arial14.h>
#include <ks0108.h>
#include <ks0108_Arduino.h>
#include <ks0108_Panel.h>
#include <SystemFont5x7.h>

#include "ks0108_Arduino.h"
#include "Arial14.h"         // proportional font
#include "SystemFont5x7.h"   // system font
//#include "rorschach.h"     // bitmap 

int i = 0;
int vertical = 0;
const float pi = 3.14159;
float paso = 0;
float angulo = 0;
int n = 2; //frecuencia del seno

float senos[128];

void setup(){
  GLCD.Init(NON_INVERTED);   // initialise the library, non inverted writes pixels onto a clear screen
  GLCD.ClearScreen();  
  
  paso = (2*pi) / 128;
//  Serial.begin(9600);
  
}

void loop(){
  GLCD.Init(NON_INVERTED);
  GLCD.ClearScreen();
  for (i = 0; i <= 128; i++){
    senos[i] = sin(i*paso*n);
    vertical = (senos[i] * 32) + 32;
    GLCD.SetDot(i,vertical,BLACK);
/*    Serial.print("i = ");
    Serial.print(i);
    Serial.print("  senos[i] = ");
    Serial.print(senos[i]);
    Serial.print("  i*paso = ");
    Serial.print(i*paso);
    Serial.print("  vertical = ");
    Serial.println(vertical);
*/
    delay(25);
  }
}

All the files I'm including are available at the KS0108 library page: http://www.arduino.cc/playground/Code/GLCDks0108 (except for the rorschach.h file :stuck_out_tongue: )

As soon as I've developed a communication protocol between the Atmega8 and the Duemilanove, I'll post the code.

liudr,

Thank you! Those PCBs look awesome; I'm trying to make an Oscilloscope shield for Arduino (a contest), so they might be useful... Although I had tried with hole-PCBs, and it seems to work.

Well, don't forget to post some code after you've done that! :slight_smile: