I'm currently working with the PSoC4 Pioneer Kit and trying to interface a GLCD with two KS0108 Controllern on it.
I connected the data-port (8 bit) to Port2, a control-port (including chip-select 1 and 2, RS and RW signals) to port P1.1-P1.4, the Enable-signal to P1.0 and the Reset-Signal to +5V (the board is currently running on 5V).
V0 is tied to VLCD with an 1K potentiometer for contrast adjustment. K and A are directly connected to GND and +5V.
I always measured 4,7V but it should still be inside the range of the display.
This is my code:
#define CHIP1 0x02
#define CHIP2 0x01
#define CHIP12 0x00
#define DESELCT 0x03
#define LOW 0x00
#define HIGH 0x01
void P6800_SendCommandPacket(uint8 chip, uint8 cmd)
ControlPort_Write((chip << 2));
void P6800_SendDataPacket(uint8 chip, uint8 data)
ControlPort_Write((chip << 2) | 0x02);
P6800_SendCommandPacket(CHIP1, 0x3E); // dsp off
P6800_SendCommandPacket(CHIP1, 0xC0); // start line
P6800_SendCommandPacket(CHIP1, 0x3F); // dsp on
P6800_SendCommandPacket(CHIP1, 0x40); // col select
P6800_SendCommandPacket(CHIP1, 0xB8); // page select
P6800_SendDataPacket(CHIP1, 0xFE); // print the letter P
CyGlobalIntEnable; /* Enable global interrupts. */
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
/* Place your application code here. */
I measured the signals directly on the display-pins and everything seemed finde. But I only get a blue screen (backlight is on).
The delays originally have been shorter than this but I wanted to be on the save side.
I hope you can help me with my problem.
Thank, but they did it almost the same way. I managed to fix it. I had some problems with the Port-Pins. Another really bad mistake was, that I used the wrong Port-Masks. Everything works fine now.
Thank you for your suggestions.