-
Thread
KS0108 GLCD Routinen
sind doch schon die funktionen int ks0108PutChar(char c) und void ks0108Puts(char* str) vorhanden.
font { uint8_t width; uint8_t height; PGM_P charData; }; // Function Prototypes void ks0108Enable(void); void ks0108Fill(uint8_t mode); void ks0108GotoXY(uint8_t, uint8_t); void ks0108Init(void); void ks0108SetDot(uint8_t, uint8_t); void ks0108ClearDot(uint8_t, uint8_t); void ks0108PutChar
-
Thread
LCD DM19264A (KS0108B Controller)
irgendwo. Ich benutze den PORTD als Datenausgang, den PORTB als Steuerausgang. Meine Verdrahtung in KS0108.h definiert: #define KS0108_DATA_PORT PORTD // Data-Port D #define KS0108_DATA_DIR DDRD #define KS0108_DATA_PIN PIND #define KS0108_CTRL_PORT PORTB // Controll-Port B #define KS0108_CTRL_DIR DDRB #define KS0108_RS (1 << 0) #define KS0108_RW (1 << 1) #define KS0108_EN (1 << 2) //#define KS0108_RST (1 << 3) // Reset = H wegen Widerstd gegen Vcc #define KS0108_CS1 (1 << 4) // 64x64 #define KS0108
-
Thread
Library KS0108
Hast du es versuch geschaft mit der funktion ks0108WriteData(by); nur ein Streifenmuster zu zeichenen. Ca. so:[c] ks0108WriteData(0x00); ks0108WriteData(0xFF); ks0108WriteData(0x00); ks0108WriteData(0xFF); ks0108WriteData(0x00); ks0108WriteData(0xFF); ks0108WriteData(0x00); ks0108WriteData(0xFF);[/c]
-
Thread
ks0108 lib aus Wiki: Problem mit Fontausgabe
ks0108WriteData(~data); } } // 1px gap between chars if(ks0108FontColor == BLACK) { ks0108WriteData(0x00); } else { ks0108WriteData(0xFF); } ks0108GotoXY
-8); }else ks0108GotoXY(ks0108Coord.x+1, ks0108Coord.y); } else { if(ks0108Inverted) data = ~data; LCD_DATA_OUT = data; // write data ks0108Enable(); // enable
-
Thread
GLCD Display und Atmega 32
font { uint8_t width; uint8_t height; PGM_P charData; }; // Function Prototypes void ks0108Enable(void); void ks0108Fill(uint8_t mode); void ks0108GotoXY(uint8_t, uint8_t); void ks0108Init(void); void ks0108SetDot(uint8_t, uint8_t); void ks0108ClearDot(uint8_t, uint8_t); void ks0108PutChar(char c, struct font font); void ks0108NewLine(uint8_t fontHeight, uint8_t offset); void ks0108PutString(char *string, struct font font); void ks0108PutStringP(PGM_P string, struct font font); char ks0108ReadData(uint8_t incXAdd); void
-
Thread
KS0108_Library
display starts up for(volatile uint16_t i=0; i<150000000; i++); // Initialize the LCD ks0108Init(0); // Select a font ks0108SelectFont(Arial_Bold_14, ks0108ReadFontData, BLACK); // Set a position ks0108GotoXY(15,10); // Print some text ks0108Puts_P(PSTR("KS0108-Treiber")); // a nice little round rect ks0108DrawRoundRect(5, 5, 117, 20, 8, BLACK); // Once again :) // Select a font ks0108SelectFont(Corsiva_12, ks0108ReadFontData, BLACK); // Set a position ks0108GotoXY(5,30); // Print
-
Thread
Grafik LCD am PortC geht am Port B nicht! atm8 & KS0108
, uint8_t color); int ks0108PutChar(char c); void ks0108Puts(char* str); void ks0108Puts_P(PGM_P str); uint8_t ks0108CharWidth(char c); uint16_t ks0108StringWidth(char* str); uint16_t ks0108StringWidth_P(PGM_P str); // Control Functions void ks0108GotoXY(uint8_t x, uint8_t y); void ks0108Init(uint8_t invert); inline uint8_t ks0108ReadData(void); void ks0108WriteCommand(uint8_t cmd, uint8_t chip); void ks0108WriteData(uint8_t data); #endif
-
Thread
Librarys einbinden - glcd (Ks0108) Test
the display starts up for(volatile uint16_t i=0; i<15000; i++); // Initialize the LCD ks0108Init(0); // Select a font ks0108SelectFont(Arial_Bold_14, ks0108ReadFontData, BLACK); // Set a position ks0108GotoXY(15,10); // Print some text ks0108Puts_P(PSTR("KS0108-Treiber")); // a nice little round rect ks0108DrawRoundRect(5, 5, 117, 20, 8, BLACK); // Once again :) // Select a font ks0108SelectFont(Corsiva_12, ks0108ReadFontData, BLACK); // Set a position ks0108GotoXY(5,30); // Print
-
Thread
GLCD KS0108 und apetech lib aus dem Wiki
signedness ks0108Test.c: At top level: ks0108.h:97: warning: inline function 'ks0108ReadData' declared but never defined ks0108.h:97: warning: inline function 'ks0108ReadData' declared but never defined Compiling
-MF,.dep/ks0108.o.d ks0108.c -o ks0108.o ks0108.c: In function 'ks0108SelectFont': ks0108.c:300: warning: pointer targets in assignment differ in signedness [/code] Das Display bleibt aber trotzdem leer :(
-
Thread
KS0108 Grafik anzeigen
void) { volatile uint16_t i; struct font bild; for(i=0; i<15000; i++); ks0108Init(); ks0108GotoXY(0,0); ks0108WriteData(bild); while(1); } [/c]
#2016797: [c] > for(y=0; y<63 ;y=y+8) > { > for(x=0; x<64 ;x++) > { > ks0108GotoXY(0, 0); > ks0108WriteData(ImageMap[offset]); > offset++; > } > } [/c] immer wieder [c]ks0108GotoXY(0, 0); ?????[/c] Sascha
-
Thread
Bitmap auf KS0108
ks0108GotoXY(x, y); ks0108WriteData(pgm_read_byte(ptr + offset)); offset++; } } } [/c]
ks0108WriteData(pgm_read_byte(ptr++)); } } for(y=0; y<64; y+=8) { for(x = 64; x<128; x++) { ks0108GotoXY(x, y); ks0108WriteData(pgm_read_byte(ptr++));
-
Thread
Löscher einzelner Werte auf einem Graphikdisplay
200ms erfolgt eine neue Messung.(C, AT1284p) [c] itoa( results[0], Buffer, 10 ); // Zeile 1 ks0108SelectFont(Arial8, ks0108ReadFontData, BLACK); ks0108GotoXY(28,20); // Angabe Position ks0108Puts_P(PSTR(" ")); // Ausgabe P ks0108GotoXY(30,20); ks0108Puts(Buffer); [/c] Leider
Hallo ich arbeite mit der Lib von apetech. Bestandteil da von sind: ks0108DrawLine ks0108DrawRect ks0108DrawRoundRect uint8_t radius, uint8_t color); ks0108FillRect ks0108InvertRect ks0108SetInverted ks0108SetDot Das Lib stammt auch von dieser Seite. Das mit dem
-
Thread
KS0108: Warum immer Anzeige auf beiden LCD-Hälften?
font { uint8_t width; uint8_t height; PGM_P charData; }; // Function Prototypes void ks0108Enable(void); void ks0108Fill(uint8_t mode); void ks0108GotoXY(uint8_t, uint8_t); void ks0108Init(void); void ks0108SetDot(uint8_t, uint8_t); void ks0108ClearDot(uint8_t, uint8_t); void ks0108PutChar
ks0108WriteCommand(uint8_t cmd, uint8_t chip); void ks0108WriteData(uint8_t data); #endif
-
Thread
KS0108 SetDot Problem
Mach es doch erst einmal ganz einfach: ks0108SetDot(0,0); ks0108SetDot(1,1); Wo landen die Punkte?
Die SetDot funktion: void ks0108SetDot(uint8_t x, uint8_t y) { uint8_t data=0; ks0108GotoXY(x, y); // read data from display memory data = ks0108ReadData(NO_INCREMENT_X); // dummy read data = ks0108ReadData
-
Thread
Graph in Diagramm zeichnen GLCD
// ks0108SetDot(15, 61, BLACK); //7h // ks0108SetDot(23, 61, BLACK); //8h // ks0108SetDot(31, 61, BLACK); //9h // ks0108SetDot(39, 61, BLACK); //10h // ks0108SetDot(47, 61
/ ks0108DrawLine(5, 44, 6, 44, BLACK); //4 ks0108DrawLine(3, 40, 6, 40, BLACK); //5 (lang) // ks0108DrawLine(5, 36, 6, 36, BLACK); //6 // ks0108DrawLine(5, 32, 6, 32, BLACK); //7 // ks0108DrawLine
-
Thread
ks0108-atmega32
the display starts up for(volatile uint16_t i=0; i<15000; i++); // Initialize the LCD ks0108Init(0); // Select a font ks0108SelectFont(Arial_Bold_14, ks0108ReadFontData, BLACK); // Set a position ks0108GotoXY(15,10); // Print some text ks0108Puts_P(PSTR("KS0108-Treiber")); // a nice little round rect ks0108DrawRoundRect(5, 5, 117, 20, 8, BLACK); // Once again :) // Select a font ks0108SelectFont(Corsiva_12, ks0108ReadFontData, BLACK); // Set a position ks0108GotoXY(5,30); // Print
-
Thread
8051 und KS0108 Display
verwenden. In der wollte ich nun die Pins anpassen, doch das ist leichter gesagt als getan. Die Datei ks0108-8051.c, wie sie von der Seite stammt, ist im Anhang. So habe ich sie bis jetzt mal angepasst: [c] #include <at89c51ac3.h> #define KS0108_DATA_PORT P0 #define KS0108_DATA_DIR P0 #define KS0108_DATA_PIN P0 #define KS0108_CTRL_PORT P2 #define KS0108_CTR_DIR P2 #define KS0108_RS (1 << 0) // P2.0 #define KS0108_RW (1 << 2) // P2.2 #define KS0108_EN (1 << 3) // P2.3 #define KS0108_CS1
-
Thread
Fehler in der Anzeige bei GLCD
habe ich gefunden. habe auch gelesen es könnten 450ns sein. Egal es braucht Zeit. In der Datei ks0108.c erfolgt die Ansteuerung. achim
Autor scheint es >seit 2007 nicht mehr zu geben. Meine, selbst geschriebene, Software für den KS0108B/HD61202 habe ich 1999 das letzte mal geändert. Und mich gibt es auch noch. MfG Spess
-
Thread
Funktionsaufruf mit Array als Parameter klappt nicht (einfach;))
bmp){ ks0108GotoXY(5, 5); ks0108WriteData(bmp[0]); ks0108WriteData(bmp[1]); ks0108WriteData(bmp[2]); ks0108WriteData(bmp[3]); ks0108WriteData(bmp[4]); ks0108WriteData(bmp[5]); ks0108WriteData(bmp[6]); ks0108WriteData(bmp[7]); } int main(void) { // Initialize the LCD ks0108Init(0); /* ks0108GotoXY(5,5); ks0108WriteData(bitmap[0]); ks0108WriteData(bitmap[1]); ks0108WriteData
-
Thread
KS 0108 - ein alter Bekannter - neu aufgelegt
Programme für die Bitmap Anzeige und Animation finden sich hier.. http://code.google.com/p/glcd-ks0108-avr-applications/downloads/detail?name=Displaying%20Bitmap.rar http://code.google.com/p/glcd-ks0108-avr-applications/downloads/detail?name=Animation%20Horse%20Running.rar ..und ausser vielleicht
Die Nutzung und Lizenz der Thiele KS0108-Bibliothek ist ja unstrittig. Diese Bibliothek wurde auch von einem anderen Author genutzt, um SEINE Programme zu entwickeln (Google-Code Links siehe oben). http://code.google.com/p/glcd-ks0108
-
Thread
Uhrzeit in einem String zusammen packen!
kleine frage noch... Code: [c] Sekunden &= 0x7F; Minuten &= 0x7F; Stunden &= 0x3F; ks0108GotoXY(30, 40); WriteBCD(Sekunden); ks0108GotoXY(50, 40); WriteBCD(Minuten); ks0108GotoXY(70, 40); WriteBCD(Stunden); }//Ende While }// Ende Main void WriteBCD
+ 0x30; strg[8] = '\0'; TimeToString(MeineZeit, Stunden, Minuten, Sekunden); ks0108GotoXY(50, 40); ks0108Puts(MeineZeit); }
-
Thread
KS0108 Atmega16/32 - nur streifen
the display starts up for(volatile uint16_t i=0; i<15000; i++); // Initialize the LCD ks0108Init(0); // Select a font //ks0108SelectFont(Arial_Bold_14, ks0108ReadFontData, BLACK); // Set a position //ks0108GotoXY(15,10); // Print some text //ks0108Puts_P(PSTR("test"))
text //ks0108Puts("test"); // ks0108DrawLine(0, 0, 100, 50, BLACK); //ks0108DrawCircle(50, 40, 20, BLACK); ks0108ClearScreen(); LoadBitmap(IMAGE); while(1); } [/c] [c] //**************
-
Thread
avr asm LCD Problem
Controller der auf Befehle reagiert wenn C1 und C2 > inaktiv sind? Das LCD hat 3 Controller! 2xKS0108 und 1xKS0107
Hi >Wobei der KS0108 halt drei CS-Signale hat, von denen zwei low- und das >dritte high-aktiv sind. Ist mir bekannt. Aber ich habe 16 Datenblätter von 128x8 Displays hier auf meinem Rechner. Und alle mit KS0107/KS0108
-
Thread
GLCD KS0108 Port zuweisen
#define KS0108_CTRL_PORT PORTC #define KS0108_CTRL_DIR DDRC #define KS0108_DI (1 << 2) #define KS0108_RW (1 << 1) #define KS0108_EN (1 << 0) #define KS0108_CS1 (1 << 6) #define KS0108
Data4Pin PIN_F5 Data5Pin PIN_F4 Data6Pin PIN_F1 Data7Pin PIN_F0 KS0108_CS1 PIN_D6 KS0108_CS2 PIN_D7 KS0108_RW PIN_B5 KS0108_DI PIN_B4 KS0108_EN PIN_B6 KS0108_RES PIN_D4 Ich hoffe mir kann jemand dabei helfen diesen C-Code anzupassen
-
Thread
Lib für Sensirion SHT1x Sensor an AVR
sht_value humidity; sht_value temperature; error=sht_softreset(); if (error) { ks0108GotoXY(60,90); ks0108Puts("ERROR Softreset"); } error=sht_measure(&humidity, &checksum, HUMI); if (error) { ks0108GotoXY(60,90); ks0108Puts("ERROR Hum"); } error=sht_measure
itoa(humidity.i, hstr , 10); ks0108ClearScreen(); ks0108GotoXY(16,32-8); ks0108Puts(tstr); ks0108GotoXY(75,32-8); ks0108Puts(hstr); }[/c]
-
Thread
schnelleres ks0108 GLCD
Die verwendete Library habe ich von hier: http://www.mikrocontroller.net/articles/KS0108_Library Direkter Link auf das Zip: http://www.mikrocontroller.net/attachment/21921/glcd_ks0108_v11.zip Dabei habe ich, wie oben beschrieben, ehrlich gesagt keine Ahnung, ob die im 4- oder im 8-bit Modus funktioniert. Die Tatsache, dass man in der HeaderDatei (ks0108.h) nur den DataPort und keine Pins angeben muss, deutet für mich auf 8-bit. Ausserdem auffällig ist diese Zeile: [code] #define ks0108ClearScreen() { ks0108FillRect(0, 0, 127, 63, WHITE
-
Thread
ks0108 library funktionen und der stm32
datenports D0-D7 fehlt es mir am wissen um den quelltext richtig zu lesen/umzuschreiben. in der KS0108-STM32.c steht #define KS0108_D0 0 und für den KS0108_Port wird GPIOE angegeben. in den c files tauchen immer wieder (shift)ausdrücke wie z.B. GPIO_InitStructure.GPIO_Pin = 0xFF << KS0108_D0; oder GPIO_StructInit(&GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = (0xFF << KS0108_D0); GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_Init(KS0108_PORT, &GPIO_InitStructure); auf meine frage was bewirkt ein GPIO_InitStructure.GPIO_Pin = 0b11111110 bzw. wie könnte ich
-
Thread
AVR Display RoundUp von Pollin mit TG12864B-03 und Wintek WD-G1203T
jeweiligen Library für den Controller http://en.radzio.dxp.pl/sed1520/ http://en.radzio.dxp.pl/ks0108/ Ich habe die 20 pins dann nach Code an ein STK500 angeschlossen. KS0108: #define KS0108_DATA_PORT PORTA #define KS0108_DATA_DIR DDRA #define KS0108_DATA_PIN PINA #define KS0108_CTRL_PORT PORTC #define KS0108_CTRL_DIR DDRC #define KS0108_RS (1 << 2) #define KS0108_RW (1 << 1) #define KS0108_EN (1 << 0) #define KS0108_CS1 (1 << 6) #define KS0108_CS2 (1 << 5) #define
-
Thread
GLCD dynamische Variable Anzeigen
ks0108GotoXY(15,17); ks0108PutString("Montag 03.08.2012",smallFont); ks0108DrawLine(63,31,63,63); ks0108GotoXY(1,31); ks0108PutString("Temp. Luft", smallFont); ks0108GotoXY(70,31); ks0108PutString
largeFont); //Ausgabe Luft Temperatur ks0108GotoXY(70,45); itoa( luft1 , Buffer, 10); ks0108PutString( Buffer , largeFont); ks0108PutString(".", largeFont); itoa( luft2 , Buffer, 10); ks0108PutString( Buffer , largeFont);
-
Thread
C-Verständniss
ist), und einen uint8_t zurueckliefert. Der Typ der hier vereinbart wird, hat dann den Namen: ks0108FontCallback > uint8_t ks0108CharWidth(char c); Das ist eine Prototypendeklaration einer Funktion. Konkret sagt sie: Irgendwo gibt es eine Funktion namens 'ks0108CharWidth'. Diese Funktion
typedef uint8_t (*ks0108FontCallback)(const uint8_t*); uint8_t TestFnkt( const uint8_t* Argument ) { bla bla bla } int main() { uint8_t i; ks0108FontCallback pFnkt; /* Zeiger definieren */
-
Thread
AVR studio 5 KS0108
übergeben. [c] void ks0108SelectFont(const char* font, ks0108FontCallback callback, uint8_t color ); [/c] Wie der Aufbau dieser Callback-Funktion und was genau geliefert werden muss, kann ich DIr nicht sagen, dass solltest
öhm gut, was der ks0108SelectFont jetzt mit dem ks0108ReadData zutuhen hat weiß ich nicht, aber ich versuche es mal nachzuvollziehen. Scheit ja aber ein "dickere" Fehler zu sein. Was mich dabei stuzig macht, das im
-
Thread
Kreis zeichnen - GLCD - bekomme nur ein Karo?
f += ddF_y; } x++; ddF_x += 2; f += ddF_x + 1; ks0108_set_pixel(x0 + x, y0 + y); ks0108_set_pixel(x0 - x, y0 + y); ks0108_set_pixel(x0 + x, y0 - y); ks0108_set_pixel(x0 - x, y0 - y); ks0108_set_pixel(x0 + y, y0 + x); ks0108_set_pixel(x0 - y, y0 + x); ks0108_set_pixel(x0 + y, y0 - x); ks0108_set_pixel(x0 - y, y0 - x); } } Gruß Tobi
-
Thread
Mit einem STRUCT Strings im FLASH ablegen und auslesen?
Folgend die Probleme, die ich noch nicht durchschaue... Beim Compilieren bekomme ich mit: [c]ks0108Puts_P(menu_rom_data[0].menu_text);[/c] keinen Fehler. Compiliere ich mit [c]ks0108Puts_P(&menu_rom_data[0].menu_text);[/c] dann erscheint folgende Warnung: [code]warning: passing argument 1
Karl Heinz Buchegger schrieb im Beitrag #2303830: >> Compiliere ich mit >> ks0108Puts_P(&menu_rom_data[0].menu_text);> dann erscheint folgende >> Warnung: >> warning: passing argument 1 of 'ks0108Puts_P' from incompatible >> pointer type > Da ist dann auch noch etwas anderes
-
Thread
Wie Graphik LCD anschliesen?
meinen Mega16 anzuschliesen habe. Giebt es da nen schaltplan oder muss ich mir die Belegung aus der ks0108.h zusammensuchen?
dafür gefunden habe und mir das selberschreiben einer solchigen nicht zutraue. Ich habe mir den KS0108 nicht wirklich "ausgesucht" das Display ist nur eben schon gut 10 jahre alt...habe das in meiner Ausbildungsfirma damals günstig abgestaubt. Zum Eigentlichen: Ich habe in der file: ks0108conf.h inwzwischen
-
Thread
Promotion sein lassen?
und dann bringt der Compiler eine Warnung, die ich nicht nachvollziehen kann: [c] #define GLCD_KS0108_DISPWIDTH 64U // [....] void foo(void) { uint_fast16_t idx = 0U; idx += GLCD_KS0108_DISPWIDTH; } [/c] und bekomme vom Compiler (MinGW 64) die Warnung: [code] blblabla.c:18:31
Naja, die ausführliche Variante sollte gehen: [c] idx = (uint_fast16_t) (idx + GLCD_KS0108_DISPWIDTH); [/c]
-
Thread
LCD 128x64 Ram kaputt?
= 0; } else if(ks0108Coord.x >= 64) { LCD_CMD_PORT.Ks0108E2 = 1; chip = 1; } if(ks0108Coord.x == 64) { ks0108WriteCommand(LCD_SET_ADD,1); // wuff
LCD_READ = data; //Debug ks0108GotoXY(ks0108Coord.x, ks0108Coord.y); if(ks0108Inverted) data = ~data; return data; } [/c]