Hi everyone
I am using "The Polish Code" for the KS0108 LCD driver. I am using this LCD:
http://www.rapidonline.com/Elect...
and the mega2560.
I have used Oliver Kraus' graphics library and menu library with it, so I know the hardware is connected correctly, however his library refreshes very very slowly and I think its a bit over complicated for what Im after.
I was going to base a graphics menu system on Dean Camera's micromenu, but first I need to get this graphics library working.
I have made all the changes to the defines:
#define KS0108_DATA_PORT PORTC #define KS0108_DATA_DIR DDRC #define KS0108_DATA_PIN PINC #define KS0108_CTRL_PORT PORTG #define KS0108_CTRL_DIR DDRG #define KS0108_RS (1 << 5) #define KS0108_RW (1 << 1) #define KS0108_EN (1 << 2) #define KS0108_CS1 (1 << 3) #define KS0108_CS2 (1 << 4) #define KS0108_CS3
To match my connections (although I dont have CS3)
Then I just grabbed the example main() from the website and put it at the bottom of the setup file for the AVR (KS0108-AVR):
int main(void) { GLCD_InitalizePorts(); GLCD_ClearScreen(); GLCD_GoTo(0,0); GLCD_WriteString("+-------------------+"); GLCD_GoTo(0,1); GLCD_WriteString("| Universal |"); GLCD_GoTo(0,2); GLCD_WriteString("| KS0108 library |"); GLCD_GoTo(0,3); GLCD_WriteString("| |"); GLCD_GoTo(0,4); GLCD_WriteString("| en.radzio.dxp.pl |"); GLCD_GoTo(0,5); GLCD_WriteString("| STM32 Cortex-M3 |"); GLCD_GoTo(0,6); GLCD_WriteString("| microcontrollers |"); GLCD_GoTo(0,7); GLCD_WriteString("+-------------------+"); for( ; ; ); return 0; }
However I get absolutely nothing on the screen. I suspect that someone would ask to see all my code, so I have attached it.
I have also attached an image to show connections - sorry for low quality