I'm trying to connect 128x64 GLCD with TM4C123G Connected Launchpad and programming with Code Composer Studio. I want to interface with my LCD by using 8-Bit Data interfacing. I am having trouble doing that. I connected
VBus to VCC
GND to GND
PA2 to RS
PA3 to RW
PA4 to EN
Below you will find my pin connections from the Stellaris Launchpad to the LCD:
tm4c123gxl Pin PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7
--------------------------------------------------------------------------------------------------------------
LCD Pin DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7
This is my code:
SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_PLL| SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); SysCtlDelay(1000000); GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1| GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5| GPIO_PIN_6 | GPIO_PIN_7); GPIOPinTypeGPIOOutput(GPIO_PORTA_BASE, GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4); SysCtlDelay(625000) GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_2 , 0x00); SysCtlDelay(4167); GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1| GPIO_PIN_2 | GPIO_PIN_3 |GPIO_PIN_4 | GPIO_PIN_5| GPIO_PIN_6 | GPIO_PIN_7, 0xc); SysCtlDelay(4167); //Register Select(RS) = 0, Enable(E) = 1// GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3, 0x08); SysCtlDelay(4167); //Register Select(RS) = 0, Enable(E) = 0// GPIOPinWrite(GPIO_PORTA_BASE, GPIO_PIN_3, 0x00); SysCtlDelay(4167);
but its not working, i just need write something to LCD.