Today it is common practice to use various circuit and microcontroller simulators for developing programs. Using simulators you have several benefits comparing to real prototype boards. You don’t have to connect any hardware to test a piece of code; also you don’t have to be in the same place when working. You can have simulator software in Laptop and work where ever you want, and of course, you can see more parameters within simulator like register values, memory, signals in a convenient form.
So controlling graphical LCD on simulator software like Proteus is an easy task.
Working with the simulator is easier because you don’t have to wary much about additional pins, like MCU power pins, crystals or other protection circuits. You need to connect control lines and LCD power pins. Define microcontroller Clock frequency in Atmega8 symbol and load program file(.hex) by browsing to it in the same component menu. And then you can run the program. Proteus simulator has KS0108 based 128×64 graphical LCD(LGM12641BS1R) which works as my real GLCD(HQM1286404 ), just in simulator pins are ordered differently than in real one.
Fabian Maximilian Thiele library also has powerful character control functions. First of all Just download GLCDFontCreator2 java program where you can fetch fonts from Windows system and generate fonts for graphical LCD.
Font creator generates convenient file .h with all font data which can be read by program functions.
First of all in the program you have to include font file .h or multiple files.
Then you have to select font which will be used currently:
ks0108SelectFont(SC, ks0108ReadFontData, BLACK);
And then you can simply put tech on the LCD screen with simple command:
Or if you want from flash memory:
You can also draw various graphic with functions built in library:
ks0108DrawRoundRect(5, 5, 117, 20, 8, BLACK);
ks0108DrawLine(5, 50, 122, 50, BLACK);
ks0108DrawCircle(25, 55, 5, BLACK);
And even more.
Project files and for example above and Proteus model you can download here: GLCD example with fonts