This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

lcd DM12864M with TM4C1294

Hello everyone !

 I am using LCD module DM12864M with my TM4C1294 launchpad, i have written code many times to get print on LCD, but unable to understand what is wrong with code or analogy, my hardware is absolutely ok, i have searched other posts for this problem but could not find my answer yet, please help me to know , i have google it but could not find solution, please help me to sort out.

here is my code

#include <stdint.h>
#include "inc/tm4c1294ncpdt.h"
#include <stdbool.h>
#include "driverlib/sysctl.h"
#include "driverlib/gpio.h"
#include"inc/hw_types.h"
#include"inc/hw_memmap.h"
#include"driverlib/timer.h"
#include"driverlib/interrupt.h"
#include"driverlib/systick.h"
#include "driverlib/rom.h"
#include "driverlib/rom_map.h"





//*****************************************************************************

void delay(uint32_t num);
volatile unsigned long long int clock,period;
int
   main(void)
{

//Clock Set
 clock=SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |SYSCTL_OSC_MAIN | SYSCTL_USE_PLL |SYSCTL_CFG_VCO_480), 120000000);
//Port Initialization-Used many ports, beacuse  few pins left, i have not left any free
//conscutive pins to connect with lcd, rest of all pins connected with sensors and other devices
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER0);
GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE,GPIO_PIN_0);
period=clock;

//Port Initialization-Used many ports, beacuse  few pins left, i have not left any free
//conscutive pins to connect witJh lcd, rest of all pins connected with sensors and other devices
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOH);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOM);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOK);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOL);

//DATA-SIGNALS
GPIOPinTypeGPIOOutput(GPIO_PORTK_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4
							        |GPIO_PIN_3|GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0);//DB0-DB7

//CONTROL-SIGNALS RS, R/W AND EN
GPIOPinTypeGPIOOutput(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
										GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0);//RS0,R/W1,EN2,RST3,PSB4



while(1){
	////////////////////////11111111111111///////////////////////////////////////////////////////////////////////

	GPIOPinWrite(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
			               GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x14);//RS,R/W,EN,RST,PSB


	GPIOPinWrite(GPIO_PORTK_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
											GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x30);//DB0-DB7

	delay(12000000);

	//EN-LOW
	GPIOPinWrite(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
			               GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x10);//RS,R/W,EN,RST,PSB

	/////////////////////////2222222////////////////////////////////////////////////////////////////////

	GPIOPinWrite(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
			               GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x14);//RS,R/W,EN,RST,PSB


	GPIOPinWrite(GPIO_PORTK_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
											GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x0C);//DB0-DB7

	delay(12000000);

	//EN-LOW
	GPIOPinWrite(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
			               GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x10);//RS,R/W,EN,RST,PSB



	/////////////////////////333333////////////////////////////////////////////////////////////////////

	GPIOPinWrite(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
			               GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x14);//RS,R/W,EN,RST,PSB


	GPIOPinWrite(GPIO_PORTK_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
											GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x01);//DB0-DB7

	delay(12000000);

	//EN-LOW
	GPIOPinWrite(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
			               GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x10);//RS,R/W,EN,RST,PSB


	/////////////////////////4444////////////////////////////////////////////////////////////////////

	GPIOPinWrite(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
			               GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x14);//RS,R/W,EN,RST,PSB


	GPIOPinWrite(GPIO_PORTK_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
											GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x02);//DB0-DB7

	delay(12000000);

	//EN-LOW
	GPIOPinWrite(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
			               GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x10);//RS,R/W,EN,RST,PSB


	/////////////////////////555555555555555555555555////////////////////////////////////////////////////////////////////

	GPIOPinWrite(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
			               GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x14);//RS,R/W,EN,RST,PSB


	GPIOPinWrite(GPIO_PORTK_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
											GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x06);//DB0-DB7

	delay(12000000);

	//EN-LOW
	GPIOPinWrite(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
			               GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x10);//RS,R/W,EN,RST,PSB


	////////////////////////////888888//////////////////////////////////////////////////////////////////////

	GPIOPinWrite(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
			               GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x14);//RS,R/W,EN,RST,PSB


	GPIOPinWrite(GPIO_PORTK_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
											GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x41);//DB0-DB7

	delay(12000000);

	//EN-LOW
	GPIOPinWrite(GPIO_PORTL_BASE,GPIO_PIN_7|GPIO_PIN_6|GPIO_PIN_5|GPIO_PIN_4|GPIO_PIN_3|
			               GPIO_PIN_2|GPIO_PIN_1|GPIO_PIN_0,0x10);//RS,R/W,EN,RST,PSB
	GPIOPinWrite(GPIO_PORTN_BASE,GPIO_PIN_0,1);
	delay(period/2);
	GPIOPinWrite(GPIO_PORTN_BASE,GPIO_PIN_0,0);
	delay(period/2);
}

}
void delay(uint32_t num){

 TimerIntClear(TIMER0_BASE,TIMER_TIMA_TIMEOUT);
  TimerConfigure(TIMER0_BASE,TIMER_CFG_PERIODIC);
    TimerLoadSet(TIMER0_BASE,TIMER_A,num-1);
// TimerIntEnable(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
 TimerEnable(TIMER0_BASE, TIMER_A);
 while(!TimerIntStatus(TIMER0_BASE,false)){

	}

}

 

 

  • Haroon,

    So far, this is the third post on the same topic you have posted. Continuously posting the same thread over and over will not improve the likelihood of someone providing you an answer. This only increases the burden of those that are trying to help you and actually will decrease the possibility of a solution if new information is presented in a separate thread.

    I will continue to monitor your original post and will provide assistance when/if I am able to offer useful information. Also, please remember that each of us are here to help as much as we can. In many cases this means offering advise and suggestions that will lead you to a solution even if we do not have the specific details of your application or the hardware to actively debug your system.

    As a suggestion, have you tried reaching out to the display driver vendor to see if they have any suggestions? Also, how do you know the Hardware is not without fault given the system is not currently working? It seems to be a stretch unless you can take the driver board/LCD and connect it to another system to check it's validity and replicate the same connections using the TM4C to do the same.
  • Chuck Davenport said:
    how do you know the Hardware is not without fault given the system is not currently working? It seems to be a stretch

    Well said, Chuck!   "Leaps of faith" are not famed as "proof" or definitive pathways to success...

    As you advise - posters always do best when they confine their questions to one "well titled" thread.   Forcing TRIPLE the work (or more) upon helpers (via multiple, near identical, post openings) is unlikely to improve poster's situation.  

    More & justifiable, focused detail & measurements proves far superior to "Repetition of a central theme!"