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

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.