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.

ft843_with_tm4c123gxl



Hello makers and developers.

I try to get begin the ft843-display with the launchpad tm4c123gxl using the ISP interphase, only I find arduino examples but I'm going to use TivaC launchpad .

Someone will have experience on this devices and can you give me a example reference in C. I'm programing in C on code composer v6

I'm sorry for my bad English, I don't know much English.

Thank you and Regards! :D

Angel nino

  • My friend - might you link to or simply attach that display spec? Forcing your helpers to do "extra" work may not prove ideal...
  • thank you for your response cb1

    this is the link of display: www.4dsystems.com.au/.../
    and this is the module for connect the display: www.4dsystems.com.au/.../4DLCD-FT843-Breakout_datasheet_R_1_0.pdf

    regards!
  • Thank you - appreciated - we've reviewed. This appears to be the display & Controller developed ~ a year past by "FTDI."   As such - I recall it being less expensive from its originator. (FTDI)

    That (new) firm is upon an "island continent" - unless you share that geography - you'll add greatly to delivery time & cost.

    For a "first project" that display is (likely) to over-challenge - might you consider a 2x16 Text Lcd Module, instead?   The learning you gain with that simpler display will advance your skills, understanding & confidence.

    Very few "climbers" START at Kilimanjaro - preferring faster, safer, easier (initial) climbs.   Such advice may apply to you here, too...

  • thank you cb1

    you have reason friend, I need practice for start with this, I will practice a little with the 2x16 lcd module.
    I found this programmer guide (www.ftdichip.com/.../FT800 Programmers Guide.pdf), I'll do some tests and I'll comment my issues and the advances.

    regars!
  • My friend - please do "start" w/the 2x16 Lcd module - firm/I have sold over 250K of these - they provide GREAT learning - and "set the stage" for your use of more complex displays and systems. (but those - out of necessity - later.)

    Reading that FT800's Guide now seems w/out great value. Your mastery of the MCU and its basics - which is very well accomplished by a 2x16 Lcd should be more than enough challenge for you at this time. Good luck...
  • Hi guys

    I made some practice with the lcd_display and the launchpad TM4C123G,  I think what now I can begin with the ft843 display, I will do some test and I will comment, because I need make a little and funny project with this FT.

    regards!

    I share my "start lcd display code"  if this helps to someone.

    /*
     * - TEST: LCD_2x16 Display on Tiva_c TM4C123GH6PM
     * - AUTOR: Alberto A.B. Nino	/,,/
     *
     *	 VSS	--	GND
     *	 VDD	--	VCC
     *	 VEE	--	GND (contrast, pot 10K or resitor 1K)
     *
     *	 DB7	--	PB7 < if you want  a 4bit's interfaz.
     *	 DB6	--	PB6 < conect DB7 - DB4.
     *	 DB5	--	PB5 <  "        "
     *	 DB4	--	PB4 <  "   		"
     *	 DB3	--	PB3
     *	 DB2	--	PB2
     *	 DB1	--	PB1
     *	 DB0	--	PB0
     *
     *	 E	--	PE3
     *	 R/W	--	PE4
     *	 RS	--	PE5
     *
     *	 LED+	--	3.3V
     *	 LED-	--	GND
     */
    
    #include <stdint.h>
    #include <stdbool.h>
    #include "inc/hw_memmap.h"
    #include "inc/hw_types.h"
    #include "inc/hw_gpio.h"
    #include "driverlib/debug.h"
    #include "driverlib/fpu.h"
    #include "driverlib/gpio.h"
    #include "driverlib/pin_map.h"
    #include "driverlib/rom.h"
    #include "driverlib/rom_map.h"
    #include "driverlib/sysctl.h"
    
    // instructions for init display.
    #define RST_FUNC 	0x30 // step0: for reset sequence.
    #define SET_FUNC 	0x38 // step1: DL- 1 interface de 8bits, N- 0 usara una linea, F- 0 fuente 5x7.
    #define DISP_SWH_OF 0x08 // step2: D- 0 display off, C- 0 cursor off, B- 0 flash character off.
    #define DISP_CLR	0x01 // ster3: clear all display.
    #define SET_MODE	0x06 // step4: ID- 1 increment mode, S- 0 hold data on display.
    #define DISP_SWH_ON	0x0C // step5: D- 1 display on, C- 0 cursor off, B- 0 flash character off.
    
    // set pins
    #define RW	GPIO_PIN_4
    #define RS	GPIO_PIN_5
    #define E	GPIO_PIN_3
    
    // functions
    void init_display(void);	//this function starts the LCD display.
    void send_dat_cmd(uint8_t instruct, unsigned int dat_or_cmd); // this function sends a command or a data.
    
    // variables
    int i,j;
    unsigned char msg1[] = {"Hello world"};
    unsigned char msg2[] = {"This is a test in c"};
    
    int main()
    {
    	// set MCU's ports.
    	ROM_SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN); //80MHZ
    
    	ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOE);
    	ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
    	ROM_GPIOPinTypeGPIOOutput(GPIO_PORTE_BASE, RW | RS | E);	//set port_E and all Port_B as outputs.
    	ROM_GPIOPinTypeGPIOOutput(GPIO_PORTB_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);
    	//init sequence.
    	init_display();
    
    	//SEND_MESSAGES.
    		//clear display.
    		send_dat_cmd(DISP_CLR,0);
    		ROM_SysCtlDelay((SysCtlClockGet()*0.005)/3);	//5ms
    		//send address1 on 1st line.
    		send_dat_cmd(0x82,0);
    		ROM_SysCtlDelay((SysCtlClockGet()*0.00008)/3);	//80us
    		//send data1.
    		for(i = 0; i <= 10; ++i)
    			send_dat_cmd(msg1[i],1);
    
    		//send data2.
    		for(j = 0; j <= 20; ++j)
    		{
    			//send address2 on 2nd line.
    			send_dat_cmd(0xC0,0);
    			ROM_SysCtlDelay((SysCtlClockGet()*0.00008)/3);	//80us
    			//send data2 and slide it.
    			if(j < 20)
    			{
    				for(i = j; i <= 18; ++i)
    					send_dat_cmd(msg2[i],1);
    			}
    			else
    			{
    				for(i = 0; i <= 18; ++i)
    					send_dat_cmd(msg2[i],1);
    			}
    			send_dat_cmd(' ',1);
    			ROM_SysCtlDelay((SysCtlClockGet()*0.5)/3);	//500ms
    		}
    }
    
    void send_dat_cmd(uint8_t instruct, unsigned int dat_or_cmd)
    {
    	ROM_GPIOPinWrite(GPIO_PORTE_BASE, RW, 0);	// RW = 0 will make a write.
    
    	if (dat_or_cmd == 1)
    	{
    		ROM_GPIOPinWrite(GPIO_PORTE_BASE, RS, RS);	//RS = 1 will send a data.
    	}
    	else
    	{
    		ROM_GPIOPinWrite(GPIO_PORTE_BASE, RS, 0);	//RS = 0 will send a command.
    	}
    
    	ROM_GPIOPinWrite(GPIO_PORTE_BASE, E, 0);	// E = 0 makes sure that enable signal is low.
    
    	ROM_GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_7 | GPIO_PIN_6 | GPIO_PIN_5 | // this will send the data or instruction.
    						GPIO_PIN_4 | GPIO_PIN_3 | GPIO_PIN_2 | GPIO_PIN_1 | GPIO_PIN_0, instruct);
    
    	ROM_GPIOPinWrite(GPIO_PORTE_BASE, E, E);	//E = 1 makes that enable signal is high for a falling edge.
    	ROM_SysCtlDelay((SysCtlClockGet()*0.001)/3);	//1mS
    	ROM_GPIOPinWrite(GPIO_PORTE_BASE, E, 0);	//E = 0 makes that enable signal is low and the data or instructions was send.
    	ROM_SysCtlDelay((SysCtlClockGet()*0.001)/3);	//1ms
    }
    
    void init_display()
    {
    	// INIT DISPLAY
    				//power-up delay
    		ROM_SysCtlDelay((SysCtlClockGet()*0.05)/3);		//50mS - wait time > 15ms
    		ROM_GPIOPinWrite(GPIO_PORTE_BASE, RW | RS | E, 0); //this makes sure that RW, RS and E signals are low.
    				//reset sequence
    		send_dat_cmd(RST_FUNC,0);						// first command of reset sequence
    		ROM_SysCtlDelay((SysCtlClockGet()*0.01)/3);		//10mS - wait time > 4.1ms
    		send_dat_cmd(RST_FUNC,0);						// second command of reset sequence
    		ROM_SysCtlDelay((SysCtlClockGet()*0.0002)/3);	//200us - wait time > 100us
    		send_dat_cmd(RST_FUNC,0);						// third command of reset sequence
    		ROM_SysCtlDelay((SysCtlClockGet()*0.0002)/3);	//200us this "wait time" is omitted in the datasheet
    				//set display
    		send_dat_cmd(SET_FUNC,0);		//set DL (4 or 8 bits interfaz), N (1 or 2 lines), F (font 5x7 or 5x10).
    		ROM_SysCtlDelay((SysCtlClockGet()*0.00008)/3);	//80us (wait time > 40us)
    		send_dat_cmd(DISP_SWH_OF,0);	//display off
    		ROM_SysCtlDelay((SysCtlClockGet()*0.00008)/3);	//80us (wait time > 40us)
    		send_dat_cmd(DISP_CLR,0);		//clear all display
    		ROM_SysCtlDelay((SysCtlClockGet()*0.005)/3);	//5ms (wait time > 1.64ms)
    		send_dat_cmd(SET_MODE,0);		//set the mode DI and S
    		ROM_SysCtlDelay((SysCtlClockGet()*0.00008)/3);	//80us (wait time > 40us)
    		send_dat_cmd(DISP_SWH_ON,0);	//display on
    		ROM_SysCtlDelay((SysCtlClockGet()*0.00008)/3);	//80us (wait time > 40us)
    }