Show Posts
Pages: [1] 2
1  Using Arduino / Displays / Using Serial and KS0108 display on: February 13, 2011, 12:42:26 pm
Hi,

I'm developing a project where communication between two Atmegas is needed. Also, one of the Atmegas acts as an KS0108 display controller. The code of the atmega that has the display does a few Serial. funtions, such as Serial.begin, Serial.write... But as soon as any KS0108 GLCD library command is executed, Serial communication finishes, and I can't get it to work again even if I call again "Serial.begin".
 Is there any way of solving this? I would be interested in using the 0 and 1 pins.
Gracias! smiley
2  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Duemilanove - Atmega8 standalone serial communication on: February 06, 2011, 05:43:00 am
I solved the problem; it was just a burnt resistor at reset pin... T__T
3  Using Arduino / Networking, Protocols, and Devices / Arduino Duemilanove - Atmega8 standalone serial communication on: February 05, 2011, 06:23:53 am
Hi,

I'm trying to drive a GLCD for a project. Since I need as many pins as possible on the Duemilanove, I came up with the idea of using an Atmega8 to control the display. It works fine: really accurate, nice speed... The problem is that I can't send any data through my Duemilanove via RX/TX pins (0 and 1).
I wrote a quick program, just to test it: the emitter sends 1 and 2, with a delay of 1 second between them. If the receiver gets 1, lights up a LED. If it's a 2, it switches it off.
It's strange that the TX/RX on-board SMD LEDs on the Duemilanove just blink when I've opened the "Serial Monitor" on the Arduino IDE. However, they don't blink if I close it. I suppose I'm missing something, but I though that the data sent via Serial is also sent trough the pins 0 and 1.

Any advice?

Thanks.
4  Using Arduino / Displays / Re: (128x64) Dot Matrix GRAPHIC LCD (Need advice) on: January 30, 2011, 06:28:34 am
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:
Code:
#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 smiley-razz )

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.
5  Using Arduino / Displays / Re: (128x64) Dot Matrix GRAPHIC LCD (Need advice) on: January 29, 2011, 07:34:35 pm
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-grin

EDIT: does anyone know how to reduce the size of the images on the forum?
6  Using Arduino / Displays / Re: Toasted ST7920? on: January 29, 2011, 04:38:03 pm
I'm sorry, I've realized that the shop where I bought the display made an error, and they sold me a KS0108. Since the pin configuration is similar, I haven't toasted anything, so problem solved.
7  Using Arduino / Displays / Re: (128x64) Dot Matrix GRAPHIC LCD (Need advice) on: January 29, 2011, 04:36:14 pm
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
8  Using Arduino / Displays / Re: Toasted ST7920? on: January 27, 2011, 04:17:06 pm
I had already done those steps before, but I've done it again, and the screen is still blank. However, I've looked for "Reset" through the datasheet (the one in whose URL "Sitronix" appears), and in page 37 I found an interesting graph...  Unluckily, I can't understand its consequences :/

Thanks
9  Using Arduino / Displays / Toasted ST7920? on: January 27, 2011, 03:39:38 pm
Hello,

A few days ago I bought a ST7920 128x64 screen (http://www.allshore.com/pdf/Sitronix_ST7920V33.pdf   http://www.satistronics.com/myfiles/file/LCD/YB12864ZB.pdf), Arduino compatible. I've got all the libraries and stuff, everything works correctly on my computer, but when I tried it with Arduino, there was motion (it was supposed to be), but it was kind of messy. I tried connecting it both in parallel and serial, but I only could make it "work" in parallel mode. Afterwards, I looked more carefully at the datasheet, and found the Reset pin, that I had left unconnected. I put it to GND, since it's the value it is supposed to have, but then I put it into 5V, trying to make the screen reset. The problem was that since that moment, the screen doesn't work anymore.
If I've broken somthing, could it have been a fuse? Maybe with a steady hand I could resolder a new one again...

Thank you,

Juan
10  Forum 2005-2010 (read only) / Español / Re: Arduino Hacklab Zaragoza on: December 10, 2010, 04:22:03 pm
Hola! No tenía ni idea de que hubiese un grupo de Arduino en Zaragoza, así que había estado mirando para montar uno en mi colegio con algunos amigos. Exactamente, ¿a qué os dedicáis en el HackLab? A mí me encanta Arduino, pero sólo tengo 16 años, por lo que quizá sea demasiado.

Un saludo!
11  Forum 2005-2010 (read only) / Español / Re: Gente en Zaragoza? on: January 10, 2011, 01:42:37 pm
Gracias! Ahora le echo un ojo.
Lo de los amigos lo he intentado, de hecho monté un taller de iniciación a Arduino en mi colegio e hice comprar a 8 personas arduino, pero no hay interés T__T
12  Forum 2005-2010 (read only) / Español / Gente en Zaragoza? on: January 10, 2011, 01:33:26 pm
Hola! Soy un estudiante de bachillerato de zaragoza, y llevo un tiempo ya con arduino. Me interesaría conocer gente de instituto de por aquí para hacer algún grupo. No sé si esto va aquí, porque no es exactamente Off-Topic, pero bueno.

Un saludo.
13  Forum 2005-2010 (read only) / Español / Re: Arduino + módulos RF Aurel on: December 12, 2010, 12:16:18 pm
Gracias! Pensaba que la RF tenía algún misterio más; no me esperaba que fuese tan sencillo. La verdad es que no los necesitaba, pero los vi de oferta y se me ocurrió un proyecto con ellos.

Un saludo, y feliz Navidad  smiley
14  Forum 2005-2010 (read only) / Español / Arduino + módulos RF Aurel on: December 12, 2010, 10:39:13 am
Hola! El otro día me compré un set de módulos de RF SAW a 433Mhz de Aurel-Cebek (C-0503 y C-0504), emisor y receptor, respectivamente.

He googleado bastante, y no he encontrado nada de información para novatos como yo acerca de estos módulos, así que, realmente, no tengo ni idea de cómo emplearlos.

No obstante, tengo la documentación necesaria:
Emisor:
http://ottomat.hu/RFmodulok/650200689_um.pdf
http://img.icnea.net/E6001/docs/C-0503.pdf

Receptor:
http://img.icnea.net/E6001/docs/C-0504.pdf
http://juan.aguarondeblas.es/650200208G_um.pdf

Posteriormente haré el montaje con dos Arduinos, o con un Arduino y un PIC, pero de momento me gustaría saber cómo conectarlos exactamente...

Nunca he hecho nada con RF, así que perdonad por la ignorancia  :-[
15  Forum 2005-2010 (read only) / Interfacing / Re: Graphical LCD (ST7920 Driver) - Wiring Help Needed on: January 21, 2011, 07:35:33 pm
Hello,

I'm trying to wire up the ST7920 display, but I'm intrigued about the fact that the library says that you must connect, for instance, EN to Arduino pin 18. How would it be possible on an Uno, since it has just 13 digital pins? There's probably an easy answer, but I've just worked with 2x16 text displays so far.
I could use a Mega, but I think that only 13 I/O digital pins are needed, according to the schematic (http://www.satistronics.com/myfiles/file/LCD/YB12864ZB.pdf)
Another question: is VOUT a pin that provides the excess of voltage?

Thank you,

Juan.
Pages: [1] 2