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.

TM4C1294NCPDT: EPI configuration + LCD controller Solomon Systech SSD1926

Part Number: TM4C1294NCPDT
Other Parts Discussed in Thread: TM4C129XNCZAD

Hi,

We're trying to figure out how to configure the EPI from TM4C1294NCPDT to interface with the LCD controller SSD1926, from Solomon Systech.

We're only concerned with Write cycles, not interested in reading from LCD.

The picture below shows the Write cycle interface timing required from SSD1926.

Based on that diagram, we designed a custom hardware that has the following connections:

(MCU) ----------------- (SSD1926)

EPI0 28 WR  --------- WE0#
EPI0 29 RD ---------- RD#
EPI0 30 ALE --------  D/C#
EPI0 31 CLK -------- CS#

EPI0 15:0 ------------ DB15:0

Is it possible to configure the EPI to implement this kind of cycle? 

If yes, which EPI mode should be set? Is it Host Bus mode or General-Purpose mode? (It looks like Host Bus, but we're not sure).

Also, it's not clear how the SSD1926 will be mapped into the MCU memory map and how's the code to actually write data on the bus.

Is there an example similar to what we have here? We only found examples with SDRAM, and that's a very different application.

PS: we already have this working with GPIO "hard-coded" functions, but that's a very slow, cumbersome and sub-optimal solution, and makes LCD update very slow.

Best regards!

  • Hello Pedro,

    I am not sure if the EPI is capable of that. If it is, you would need to use General Purpose Mode. But we have not interface an LCD with the EPI before as it's more complicated than a much simpler solution we have! The EPI is really intended only for external memory and FPGA/CPLD interfaces. However, certain TM4C MCU's such as the TM4C129XNCZAD have a built in LCD controller!

    You should be able to interface your LCD with TM4C by using that controller. I looked up the D/S for your screen and it looks to me that all relevant signals will map over to the LCD controller peripheral. You can evaluate if this is a suitable solution by using the DK-TM4C129X development kit. Unfortunately we don't have example code for that LCD, but if you have it working by bit bang already I think you will find TivaWare documentation for the LCD controller and GR Lib will be sufficient to try this solution out.
  • Hello Ralph,

    Thanks for the quick reply.

    We'll have to try out using general-purpose mode on EPI before evaluating the other MCU option because we already have a custom hardware for this application. So replacing the MCU would be our last resort.

    Is there a code example of general-purpose EPI? It'd be very valuable to see how to configure and perform write operation with this settings.

    Best regards.

  • Hello Pedro,

    Unfortunately we don't have such an example available. We haven't had really seen much interest in it as everyone uses EPI for SDRAM and such. That said, the configuration for EPI in general should be mostly the same for general purpose mode and I would strongly recommend you look at the TivaWare example located at: [Install Path]\TivaWare_C_Series-2.1.4.178\examples\peripherals\epi
  • Pedro Mietto83 said:

    We're trying to figure out how to configure the EPI from TM4C1294NCPDT to interface with the LCD controller SSD1926, from Solomon Systech.

    [snip]

    (MCU) ----------------- (SSD1926)

    EPI0 28 WR  --------- WE0#
    EPI0 29 RD ---------- RD#
    EPI0 30 ALE --------  D/C#
    EPI0 31 CLK -------- CS#

    EPI0 15:0 ------------ DB15:0

    I'm currently doing a very similar configuration, although my external peripheral is not an LCD controller. I don't have EPI0 30 ALE hooked up; I've got that under manual GPIO control. I'm using HB8 mode not HB16 mode but I don't think that'll make my experience invalid for your case.

    Pedro Mietto83 said:

    Is it possible to configure the EPI to implement this kind of cycle? 

    If yes, which EPI mode should be set? Is it Host Bus mode or General-Purpose mode? (It looks like Host Bus, but we're not sure).

    Yes.

    I would start with HB16 mode. You'll want TI document SPMS 433B Section 11 External Peripheral Interface (EPI). Read through the section until the register map.
    Section 11.4 Initialization and Configuration is pretty important and gives you the general overview; Section 11.4.3.5 Sub-Modes of Host Bus 8/16 contains some important information about HB modes.

    I tried my peripheral with General Purpose mode, but the /RD and /WR strobes were hooked up inverted and GP mode doesn't contain a setting to invert them. HB8 mode worked for me after I noticed a hardware problem and my EE cut some traces.

    Pedro Mietto83 said:

    Also, it's not clear how the SSD1926 will be mapped into the MCU memory map and how's the code to actually write data on the bus.

    Is there an example similar to what we have here? We only found examples with SDRAM, and that's a very different application.

    This is not well-explained in the datasheet. :-( One of the EPI config registers will allow you to specify a base address at which your peripheral will be memory-mapped. 0xa0000000 or 0xc0000000 if I recall. Once mapped, writing to "register" address 0xa0000000 causes the EPI to translate the data onto the bus. Writing to 0xa0000001 would cause the EPI to put out address 0x00000001 on the bus, however the address lines are configured. You don't are about that, and address size can be set to 0 in the EPI configuration.

    Here's my code:

    void configureEPI(void)
    {
        int busy_count;
    
        SysCtlPeripheralEnable(SYSCTL_PERIPH_EPI0);
        busy_count = 100;
        while (!SysCtlPeripheralReady(SYSCTL_PERIPH_EPI0) && busy_count)
            busy_count--;
        if (!busy_count) {
            logError(EPI_ERROR, 0, 0, 0, ERROR);
            return;
        }
    
        EPIModeSet(EPI0_BASE, EPI_MODE_HB8);
        // 16 MHz isn't able to be accomplished exactly with the 120 MHz Tiva clock
        // and the available EPI baud configuration options. 15 MHz is next-best.
        EPIDividerSet(EPI0_BASE, 7);  // Using formula divider, 7 => 15 MHz
        EPIConfigHB8Set(EPI0_BASE, EPI_HB8_MODE_ADDEMUX | EPI_HB8_CSCFG_ALE_SINGLE_CS, 0);
        EPIAddressMapSet(EPI0_BASE, EPI_ADDR_PER_BASE_A | EPI_ADDR_PER_SIZE_256B);
    
        // Wait for 8 clock cycles, see spms433b.pdf Section 11.4
        // Each loop is 3 clock cycles
        SysCtlDelay(3);
    }
    

    ...Stu

  • Hi Ralph,

    Thanks for the reply.

    We'll try configuring EPI in general purpose mode, as you recommended, and hope to come back in the next weeks with some results.

    Best regards.

  • Hi Stuart,

    Thank you for all the information, very good stuff!

    We'll be working on this on the next few weeks , and hope to come back with some results.

    Best regards.