|
616
|
Using Arduino / Displays / Re: ST7565 LCD going haywire with Adafruit code
|
on: January 16, 2012, 06:38:34 pm
|
|
The U8GLIB constructor should be fine.
I took over the init sequence from github adafruit version. It is available in download v0.07 (you need to add your reset pin for the HelloWorld example!)
My dogm128 still shows up something with the LM6063 sequence, so i assume, that the init sequence is almost correct. Hopefully, you should see something now.
KS0108: Because of the large number of wires, there might be a mistake in the interconnect. GLCD lib also contains a nice diagnosis tool.
Oliver
|
|
|
|
|
617
|
Using Arduino / Displays / Re: ST7565 LCD going haywire with Adafruit code
|
on: January 16, 2012, 04:46:55 am
|
|
Ok, this means, that the adafruit code works with exactly the same hardware setup, correct?
If the adafruit code works, perhaps you could provide a link to it. The i would be able to reproduce the display init sequence from the adafruit code.
If the reset of the display is wired to the arduino, then add its pin number to the constructor. (mabye you can provide the U8GLIB constructor line)
Oliver
|
|
|
|
|
621
|
International / Deutsch / Re: Nokia 8310 LCD (Philips OM6211 Treiber) mit einem Arduino Uno ansteuern
|
on: January 14, 2012, 04:17:17 am
|
|
Hi
Ich lese das datenblatt so (Kapitel 15, Seite 23) VDD1: 1.7 bis 2.3 Volt --> Versorgungsspannung, muss erzeugt werden VDD2/3: 2.5 bis 4.5 Volt --> Ebenfalls Versorgungsspannung (soweit ich das sehe) --> Ohne Widerstand an 3.3 vom Arduino Board
Meine Empfehlung wäre, eine 2.0 Volt Spannung zu erzeugen. Damit versorgst Du dann den 74HC4050 und VDD1 vom Display. Die Stromaufnahme (Display + 74HC4050) müsste noch im einstelligen mA Bereich liegen.
Die Ausgänge vom Arduino Board kommen an die Eingänge vom 74HC4050 und die Ausgänge vom 74HC4050 kommen an das Display.
Edit & Nachtrag: Nicht benötigte Eingangs-Pins vom 74HC4050 auf GND legen. Nicht benötigte Ausgänge des 74HC4050 offen lassen. Für den Reset Eingang des Displays eine kleine Logic bauen: 100nF: Ein Pin an Reset vom Display, der andere an GND 10kOhm: Ein pin an Reset, der andere an die 2.0 Volt Grüße, Oliver
|
|
|
|
|
626
|
Using Arduino / Displays / Re: ST7565 LCD going haywire with Adafruit code
|
on: January 10, 2012, 01:05:39 am
|
First question, with the PCD8544 library, upon startup the Adafruit Logo pops up, since this project will be used by docters, they want their own logo displayed. How do I change this? I once had the same problem. As far as i remember, they put their logo into the frame buffer, so that i comes up as soon as the display turns on. I think I have cleared the frame buffer during init phase. But at the end, i wrote my own library...: A beta version 0.05 is available for download here: http://code.google.com/p/u8glib/downloads/list. Second is a Topway LM6063AFW (ST7565) - issues with displaying data It depends on the display, how the controller (e.g. ST7565) is connected to the actual LCD. So it might happen that for one display the graphics output is correct, but for another display there is something shifted or reversed. U8glib also supports ST7565 ( http://code.google.com/p/u8glib/wiki/device), so maybe you could try U8glib with the U8GLIB_DOGM128() subsystem. The DOGM128 is a different display with the same controller. If the display does not appear correctly, we could easily create a U8GLIB_LM6063 with a different setup for your display. You might also try this lib: http://code.google.com/p/dogm128/Oliver
|
|
|
|
|
627
|
Using Arduino / Displays / Re: GLCD library version 3
|
on: January 07, 2012, 02:38:04 pm
|
It becomes difficult to follow this HUGE thread, but let me allow to make some small notes. BDF: Yes, i think BDF is an excellent source for fonts. It is easy to parse, there is a ttf to bdf converter (called OTF2BDF) and there are already very good open source BDF fonts in the X11 distribution: http://cgit.freedesktop.org/xorg/font/Inner glyph offset: After profiling of my font format i found that the searching for the glyph data start position required a big fraction of the overall time for rendering. I added the offset of the lower case 'a' and the upper case 'A', to my font format, which was great speedup (about overall factor 2, if I remember correctly). Fonts in PROGMEM area: A big issue. In principle one can place one font in one C file (did not check C++ files), declared with the PROGMEM attribute. All other parts of the program will only see the external declaration from some .h file, e.g. extern uint8_t my_font_data[] PROGMEM; For the linker to be able to remove the font from the final hex file, it is required to place all fonts in separate C files. Unfortunately this becomes impractical as soon as there are several hundred fonts. Simply the compile time of the Arduino IDE gets very high. After several hours of investigation of the gcc garbage collector I found that it is possible to put all fonts into the same C file, if the font data are assigned to different progmem sections. This will look like this: extern uint8_t my_font_data1[] __attribute__ (( section(".progmem.font1") )); extern uint8_t my_font_data2[] __attribute__ (( section(".progmem.font2") ));
Oliver
|
|
|
|
|
628
|
International / Deutsch / Re: Arduino und Grafikdisplay
|
on: January 05, 2012, 09:26:35 am
|
Hi Anbei der Code zum Zeichnen einer Bitmap (kleiner Turm): const uint8_t rook_bitmap[] PROGMEM = { 0x00, // 00000000 0x55, // 01010101 0x7f, // 01111111 0x3e, // 00111110 0x3e, // 00111110 0x3e, // 00111110 0x3e, // 00111110 0x7f // 01111111 };
void draw(void) { // graphic commands to redraw the complete screen should be placed here u8g.drawBitmapP( 0, 0, 1, 8, rook_bitmap); }
void setup(void) { }
void loop(void) { // picture loop u8g.firstPage(); do { draw(); } while( u8g.nextPage() ); // rebuild the picture after some delay delay(1000); }
Die Bitmap wird im Flash abgelegt und belegt damit keinen RAM. Ich hab' auch schon mal mit der API-Referenz angefangen: http://code.google.com/p/u8glib/wiki/userreferenceOliver
|
|
|
|
|
629
|
International / Deutsch / Re: Arduino und Grafikdisplay
|
on: January 05, 2012, 03:00:03 am
|
Hi Na, das ist ja mal nicht schlecht, wenn U8GLIB bei Dir funktioniert. Langes compilieren: Ja das liegt an den mitgelieferten fonts. Es sind ca. 200 fonts dabei, die auch schon dokumentiert sind: http://code.google.com/p/u8glib/wiki/fontgroupGesetzt wird der font mit u8g.setFont(u8g_font_unifont); Ersetze beispielsweise "u8g_font_unifont" mit "u8g_font_tpss" ( http://code.google.com/p/u8glib/wiki/fontgrouporgdot). Wenn Du in das Verzeichnis "U8glib/utility/" gehst, dann könntest Du dort alle "u8g_font_*.c" dateien löschen, die Du nicht benötigst. Dann wäre das compilieren schneller. Ich arbeite aber noch an einer anderen Lösung... - Ich musste zudem dein Hello World ändern. Man hat das Ende des buchstaben d von World sowie das Ausrufezeichen nicht mehr gesehen. (Koordinaten waren 0, 20)
Klar, der Text war zu breit für Dein Display (ist mir beim Testen auch aufgefallen). Mit einem schmaleren/kleineren Font könnte das klappen. - Jede halbe oder ganze Sekunde leuchtet die LED auf dem Arduino (pin 13) und das Bild pulsiert somit
Die LED leuchtet, weil alle Sekunde das Bild neu aufgebaut wird (siehe Beispielcode): void loop(void) { // picture loop u8g.firstPage(); do { draw(); } while( u8g.nextPage() ); // rebuild the picture after some delay delay(1000); }
Abhilfe: Pin 13 nicht benutzen und entsprechend, die SCK Leitung auf einen anderen Pin legen (z.B. 5): U8GLIB_PCD8544 u8g(5, 11, 10, 9, 8); // SPI communication: SCK = 5, MOSI = 11, CS = 10, A0 = 9, Reset = 8 Sonst - TOP! Danke für die Hilfe Halte mic hauf dem Laufenden, wie ich sagte, ich spiele gern dein Versuchskaninchen Immer gerne. Am besten Fehler und Verbesserungsideen im U8GLIB Issue Tracker eingeben: http://code.google.com/p/u8glib/issues/listGerne auch auf Deutsch. Die lib ist eigentlich soweit schon fertig programmiert, es fehlt halt die Doku. Alle Graphik-Befehle stehen in U8glib.h, beispielsweise: void drawPixel(u8g_uint_t x, u8g_uint_t y) void drawHLine(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w) void drawVLine(u8g_uint_t x, u8g_uint_t y, u8g_uint_t h) void drawFrame(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h) void drawBox(u8g_uint_t x, u8g_uint_t y, u8g_uint_t w, u8g_uint_t h)
Oliver
|
|
|
|
|