hkBattousai
Member
Hello Pommie, it is a great job writing a library like this. Your library is one of the best, most understandable and standard one I have ever come across on the net. Thank you very much for your hard work.
I've just started to learn embedded systems with PIC series. Yesterday I wrote my first "Hello World" application which is actually nothing bot blinking a LED. Now I want to put my effort into something bigger, like interfacing an LCD. I have a few question about your code, but first I want to introduce the relevant information I collected over internet...
Direct links to photos of my LCD (with KS108 controller):
**broken link removed**, **broken link removed**
Port mapping in you code:
Pin configuration of a KS108 controller LCD:
KS0108 Controller, at the bottom of the page.
Instruction set of the LCD:
**broken link removed**
Now, the point which confuses me is,
Your code defines these 6 connections:
b_GLCD_GCS1
b_GLCD_GCS2
b_GLCD_RS
b_GLCD_RW
b_GLCD_E
b_GLCD_On
LCD has these 6 pins available:
D/I
R/W
E
CS1
CS2
RES
If you try to match these:
b_GLCD_GCS1 == CS1
b_GLCD_GCS2 == CS2
b_GLCD_RS == RES
b_GLCD_RW == R/W
b_GLCD_E == E
b_GLCD_On == ???
One can say that b_GLCD_On should match with D/I, but when you refer to the instruction set of the LCD, D/I pin is for specifying whether our output data at PIC pins is data or instruction. On the other hand, from my understanding (excuse me if I am wrong), b_GLCD_On is used for some other purpose like activating the LCD, I think you control power source of the LCD, by switching on and off a transistor with this pin.
Can you please specify what b_GLCD_On is for, and how you handle D/I pin?
Do you have any sample schematics and code?
Again, thank you for this wonderful project.
I will appreciate if you reply.
I've just started to learn embedded systems with PIC series. Yesterday I wrote my first "Hello World" application which is actually nothing bot blinking a LED. Now I want to put my effort into something bigger, like interfacing an LCD. I have a few question about your code, but first I want to introduce the relevant information I collected over internet...
Direct links to photos of my LCD (with KS108 controller):
**broken link removed**, **broken link removed**
Port mapping in you code:
Code:
#define GLCD_Data PORTD
#define b_GLCD_GCS1 LATBbits.LATB4
#define b_GLCD_GCS2 LATCbits.LATC0
#define b_GLCD_RS LATEbits.LATE0
#define b_GLCD_RW LATEbits.LATE1
#define b_GLCD_E LATEbits.LATE2
#define b_GLCD_On LATAbits.LATA4
#define b_GLCD_BL LATBbits.LATB3
Pin configuration of a KS108 controller LCD:
KS0108 Controller, at the bottom of the page.
Instruction set of the LCD:
**broken link removed**
Now, the point which confuses me is,
Your code defines these 6 connections:
b_GLCD_GCS1
b_GLCD_GCS2
b_GLCD_RS
b_GLCD_RW
b_GLCD_E
b_GLCD_On
LCD has these 6 pins available:
D/I
R/W
E
CS1
CS2
RES
If you try to match these:
b_GLCD_GCS1 == CS1
b_GLCD_GCS2 == CS2
b_GLCD_RS == RES
b_GLCD_RW == R/W
b_GLCD_E == E
b_GLCD_On == ???
One can say that b_GLCD_On should match with D/I, but when you refer to the instruction set of the LCD, D/I pin is for specifying whether our output data at PIC pins is data or instruction. On the other hand, from my understanding (excuse me if I am wrong), b_GLCD_On is used for some other purpose like activating the LCD, I think you control power source of the LCD, by switching on and off a transistor with this pin.
Can you please specify what b_GLCD_On is for, and how you handle D/I pin?
Do you have any sample schematics and code?
Again, thank you for this wonderful project.
I will appreciate if you reply.